[security] Self-XSS on column type (Create index), see PMASA-2011-18
[phpmyadmin/alexukf.git] / db_structure.php
blobb7047594c8b35b1d247b099b308f3db93cd71c92
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package phpMyAdmin
6 */
8 /**
11 require_once './libraries/common.inc.php';
13 $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
14 $GLOBALS['js_include'][] = 'db_structure.js';
16 /**
17 * Prepares the tables list if the user where not redirected to this script
18 * because there is no table in the database ($is_info is true)
20 if (empty($is_info)) {
21 // Drops/deletes/etc. multiple tables if required
22 if ((!empty($submit_mult) && isset($selected_tbl))
23 || isset($mult_btn)) {
24 $action = 'db_structure.php';
25 $err_url = 'db_structure.php?'. PMA_generate_common_url($db);
27 // see bug #2794840; in this case, code path is:
28 // db_structure.php -> libraries/mult_submits.inc.php -> sql.php
29 // -> db_structure.php and if we got an error on the multi submit,
30 // we must display it here and not call again mult_submits.inc.php
31 if (! isset($error) || FALSE === $error) {
32 require './libraries/mult_submits.inc.php';
34 if (empty($message)) {
35 $message = PMA_Message::success();
38 require './libraries/db_common.inc.php';
39 $url_query .= '&amp;goto=db_structure.php';
41 // Gets the database structure
42 $sub_part = '_structure';
43 require './libraries/db_info.inc.php';
45 require_once './libraries/replication.inc.php';
48 require_once './libraries/bookmark.lib.php';
50 require_once './libraries/mysql_charsets.lib.php';
51 $db_collation = PMA_getDbCollation($db);
53 // in a separate file to avoid redeclaration of functions in some code paths
54 require_once './libraries/db_structure.lib.php';
55 $titles = PMA_buildActionTitles();
57 // 1. No tables
58 if ($num_tables == 0) {
59 echo '<p>' . __('No tables found in database') . '</p>' . "\n";
61 // Routines
62 require './libraries/db_routines.inc.php';
64 // Events
65 if (PMA_MYSQL_INT_VERSION > 50100) {
66 require './libraries/db_events.inc.php';
69 if (empty($db_is_information_schema)) {
70 require './libraries/display_create_table.lib.php';
71 } // end if (Create Table dialog)
73 /**
74 * Displays the footer
76 require_once './libraries/footer.inc.php';
77 exit;
80 // else
81 // 2. Shows table informations
83 /**
84 * Displays the tables list
86 echo '<div id="tableslistcontainer">';
87 $_url_params = array(
88 'pos' => $pos,
89 'db' => $db);
91 // Add the sort options if they exists
92 if (isset($_REQUEST['sort'])) {
93 $_url_params['sort'] = $_REQUEST['sort'];
96 if (isset($_REQUEST['sort_order'])) {
97 $_url_params['sort_order'] = $_REQUEST['sort_order'];
100 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
103 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
104 <?php
105 echo PMA_generate_common_hidden_inputs($db);
107 PMA_TableHeader($db_is_information_schema, $server_slave_status);
109 $i = $sum_entries = 0;
110 $sum_size = (double) 0;
111 $overhead_size = (double) 0;
112 $overhead_check = '';
113 $checked = !empty($checkall) ? ' checked="checked"' : '';
114 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
115 $row_count = 0;
118 $hidden_fields = array();
119 $odd_row = true;
120 $sum_row_count_pre = '';
122 $tableReductionCount = 0; // the amount to reduce the table count by
124 foreach ($tables as $keyname => $each_table) {
125 if (PMA_BS_IsHiddenTable($keyname)) {
126 $tableReductionCount++;
127 continue;
130 // Get valid statistics whatever is the table type
132 $table_is_view = false;
133 $table_encoded = urlencode($each_table['TABLE_NAME']);
134 // Sets parameters for links
135 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
136 // do not list the previous table's size info for a view
137 $formatted_size = '-';
138 $unit = '';
140 switch ( $each_table['ENGINE']) {
141 // MyISAM, ISAM or Heap table: Row count, data size and index size
142 // are accurate; data size is accurate for ARCHIVE
143 case 'MyISAM' :
144 case 'ISAM' :
145 case 'HEAP' :
146 case 'MEMORY' :
147 case 'ARCHIVE' :
148 case 'Aria' :
149 case 'Maria' :
150 if ($db_is_information_schema) {
151 $each_table['Rows'] = PMA_Table::countRecords($db,
152 $each_table['Name']);
155 if ($is_show_stats) {
156 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
157 $sum_size += $tblsize;
158 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
159 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
160 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
161 $overhead_size += $each_table['Data_free'];
164 break;
165 case 'InnoDB' :
166 // InnoDB table: Row count is not accurate but data and index
167 // sizes are.
169 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
170 $each_table['COUNTED'] = true;
171 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
172 $each_table['TABLE_NAME'], $force_exact = true,
173 $is_view = false);
174 } else {
175 $each_table['COUNTED'] = false;
178 if ($is_show_stats) {
179 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
180 $sum_size += $tblsize;
181 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
183 //$display_rows = ' - ';
184 break;
185 // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM
186 // Both are aliases for MERGE
187 case 'MRG_MyISAM' :
188 case 'MRG_MYISAM' :
189 case 'MERGE' :
190 case 'BerkeleyDB' :
191 // Merge or BerkleyDB table: Only row count is accurate.
192 if ($is_show_stats) {
193 $formatted_size = ' - ';
194 $unit = '';
196 break;
197 // for a view, the ENGINE is sometimes reported as null,
198 // or on some servers it's reported as "SYSTEM VIEW"
199 case null :
200 case 'SYSTEM VIEW' :
201 // if table is broken, Engine is reported as null, so one more test
202 if ($each_table['TABLE_TYPE'] == 'VIEW') {
203 // countRecords() takes care of $cfg['MaxExactCountViews']
204 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
205 $each_table['TABLE_NAME'], $force_exact = true,
206 $is_view = true);
207 $table_is_view = true;
209 break;
210 default :
211 // Unknown table type.
212 if ($is_show_stats) {
213 $formatted_size = 'unknown';
214 $unit = '';
216 } // end switch
218 if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) {
219 $sum_entries += $each_table['TABLE_ROWS'];
222 if (isset($each_table['Collation'])) {
223 $collation = '<dfn title="'
224 . PMA_getCollationDescr($each_table['Collation']) . '">'
225 . $each_table['Collation'] . '</dfn>';
226 } else {
227 $collation = '---';
230 if ($is_show_stats) {
231 if (isset($formatted_overhead)) {
232 $overhead = '<a href="tbl_structure.php?'
233 . $tbl_url_query . '#showusage">' . $formatted_overhead
234 . ' ' . $overhead_unit . '</a>' . "\n";
235 unset($formatted_overhead);
236 $overhead_check .=
237 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
238 } else {
239 $overhead = '-';
241 } // end if
243 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
244 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
245 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
246 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
247 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
248 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
250 $i++;
252 $row_count++;
253 if ($table_is_view) {
254 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
258 * Always activate links for Browse, Search and Empty, even if
259 * the icons are greyed, because
260 * 1. for views, we don't know the number of rows at this point
261 * 2. for tables, another source could have populated them since the
262 * page was generated
264 * I could have used the PHP ternary conditional operator but I find
265 * the code easier to read without this operator.
267 if ($each_table['TABLE_ROWS'] > 0 || $table_is_view) {
268 $may_have_rows = true;
269 } else {
270 $may_have_rows = false;
272 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">';
273 if ($may_have_rows) {
274 $browse_table .= $titles['Browse'];
275 } else {
276 $browse_table .= $titles['NoBrowse'];
278 $browse_table .= '</a>';
280 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">';
281 if ($may_have_rows) {
282 $search_table .= $titles['Search'];
283 } else {
284 $search_table .= $titles['NoSearch'];
286 $search_table .= '</a>';
288 $browse_table_label = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $truename . '</a>';
290 if (! $db_is_information_schema) {
291 $empty_table = '<a ';
292 if ($GLOBALS['cfg']['AjaxEnable']) {
293 $empty_table .= 'class="truncate_table_anchor"';
295 $empty_table .= ' href="sql.php?' . $tbl_url_query
296 . '&amp;sql_query=';
297 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
298 . '&amp;message_to_show='
299 . urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
300 .'">';
301 if ($may_have_rows) {
302 $empty_table .= $titles['Empty'];
303 } else {
304 $empty_table .= $titles['NoEmpty'];
306 $empty_table .= '</a>';
308 $drop_query = 'DROP '
309 . ($table_is_view ? 'VIEW' : 'TABLE')
310 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
311 $drop_message = sprintf(
312 $table_is_view ? __('View %s has been dropped') : __('Table %s has been dropped'),
313 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
316 $tracking_icon = '';
317 if (PMA_Tracker::isActive()) {
318 if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
319 $tracking_icon = '<a href="tbl_tracking.php?' . $url_query.'&amp;table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye.png" alt="' . __('Tracking is active.') . '" title="' . __('Tracking is active.') . '" /></a>';
320 } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
321 $tracking_icon = '<a href="tbl_tracking.php?' . $url_query . '&amp;table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye_grey.png" alt="' . __('Tracking is not active.') . '" title="' . __('Tracking is not active.') . '" /></a>';
325 if ($num_columns > 0 && $num_tables > $num_columns
326 && (($row_count % $num_columns) == 0)) {
327 $row_count = 1;
328 $odd_row = true;
330 </tr>
331 </tbody>
332 </table>
333 <?php
334 PMA_TableHeader(false, $server_slave_status);
337 $ignored = false;
338 $do = false;
340 if ($server_slave_status) {
341 ////////////////////////////////////////////////////////////////
343 if ((strlen(array_search($truename, $server_slave_Do_Table)) > 0)
344 || (strlen(array_search($db, $server_slave_Do_DB)) > 0)
345 || (count($server_slave_Do_DB) == 1 && count($server_slave_Ignore_DB) == 1)
347 $do = true;
349 foreach ($server_slave_Wild_Do_Table as $db_table) {
350 $table_part = PMA_extract_db_or_table($db_table, 'table');
351 if (($db == PMA_extract_db_or_table($db_table, 'db')) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) {
352 $do = true;
355 ////////////////////////////////////////////////////////////////////
356 if ((strlen(array_search($truename, $server_slave_Ignore_Table)) > 0) || (strlen(array_search($db, $server_slave_Ignore_DB)) > 0)) {
357 $ignored = true;
359 foreach ($server_slave_Wild_Ignore_Table as $db_table) {
360 $table_part = PMA_extract_db_or_table($db_table, 'table');
361 if (($db == PMA_extract_db_or_table($db_table)) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) {
362 $ignored = true;
365 unset($table_part);
368 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
369 <td align="center">
370 <input type="checkbox" name="selected_tbl[]"
371 value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
372 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
373 <th><?php echo $browse_table_label; ?>
374 <?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
375 </th>
376 <?php if ($server_slave_status) { ?><td align="center"><?php echo $ignored ? ' <img class="icon" src="' . $pmaThemeImage . 's_cancel.png" width="16" height="16" alt="NOT REPLICATED" />' : ''. $do ? ' <img class="icon" src="' . $pmaThemeImage . 's_success.png" width="16" height="16" alt="REPLICATED" />' : ''; ?></td><?php } ?>
377 <td align="center"><?php echo $browse_table; ?></td>
378 <td align="center">
379 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
380 <?php echo $titles['Structure']; ?></a></td>
381 <td align="center"><?php echo $search_table; ?></td>
382 <?php if (! $db_is_information_schema) { ?>
383 <td align="center">
384 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
385 <?php echo $titles['Insert']; ?></a></td>
386 <td align="center"><?php echo $empty_table; ?></td>
387 <td align="center">
388 <a <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="drop_table_anchor"' : ''); ?> href="sql.php?<?php echo $tbl_url_query;
389 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
390 echo urlencode($drop_query); ?>&amp;message_to_show=<?php
391 echo urlencode($drop_message); ?>" >
392 <?php echo $titles['Drop']; ?></a></td>
393 <?php } // end if (! $db_is_information_schema)
395 // there is a null value in the ENGINE
396 // - when the table needs to be repaired, or
397 // - when it's a view
398 // so ensure that we'll display "in use" below for a table
399 // that needs to be repaired
400 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
401 if ($table_is_view) {
402 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
403 $row_count_pre = '~';
404 $sum_row_count_pre = '~';
405 $show_superscript = PMA_showHint(PMA_sanitize(sprintf(__('This view has at least this number of rows. Please refer to %sdocumentation%s.'), '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')));
407 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
408 // InnoDB table: we did not get an accurate row count
409 $row_count_pre = '~';
410 $sum_row_count_pre = '~';
411 $show_superscript = '';
412 } else {
413 $row_count_pre = '';
414 $show_superscript = '';
417 <td class="value tbl_rows"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
418 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
419 <td nowrap="nowrap"><?php echo ($table_is_view ? __('View') : $each_table['ENGINE']); ?></td>
420 <?php if (isset($collation)) { ?>
421 <td nowrap="nowrap"><?php echo $collation ?></td>
422 <?php } ?>
423 <?php } ?>
425 <?php if ($is_show_stats) { ?>
426 <td class="value tbl_size"><a
427 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
428 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
429 <td class="value"><?php echo $overhead; ?></td>
430 <?php } // end if ?>
431 <?php } elseif ($table_is_view) { ?>
432 <td class="value">-</td>
433 <td><?php echo __('View'); ?></td>
434 <td>---</td>
435 <?php if ($is_show_stats) { ?>
436 <td class="value">-</td>
437 <td class="value">-</td>
438 <?php } ?>
439 <?php } else { ?>
440 <td colspan="<?php echo ($colspan_for_structure - ($db_is_information_schema ? 5 : 8)) ?>"
441 align="center">
442 <?php echo __('in use'); ?></td>
443 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
444 </tr>
445 <?php
446 } // end foreach
448 // Show Summary
449 if ($is_show_stats) {
450 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
451 list($overhead_formatted, $overhead_unit) =
452 PMA_formatByteDown($overhead_size, 3, 1);
455 </tbody>
456 <tbody id="tbl_summary_row">
457 <tr><th></th>
458 <th align="center" nowrap="nowrap">
459 <?php
460 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
461 // (we don't want negative numbers here)
462 if ($num_tables == 0)
463 $tableReductionCount = 0;
465 echo sprintf(_ngettext('%s table', '%s tables', $num_tables - $tableReductionCount), PMA_formatNumber($num_tables - $tableReductionCount, 0));
467 </th>
468 <?php
469 if ($server_slave_status) {
470 echo ' <th>' . __('Replication') . '</th>' . "\n";
473 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
474 <?php echo __('Sum'); ?></th>
475 <th class="value tbl_rows"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
476 <?php
477 if (!($cfg['PropertiesNumColumns'] > 1)) {
478 $default_engine = PMA_DBI_get_default_engine();
479 echo ' <th align="center">' . "\n"
480 . ' <dfn title="'
481 . sprintf(__('%s is the default storage engine on this MySQL server.'), $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
482 // we got a case where $db_collation was empty
483 echo ' <th align="center">' . "\n";
484 if (! empty($db_collation)) {
485 echo ' <dfn title="'
486 . PMA_getCollationDescr($db_collation) . ' (' . __('Default') . ')">' . $db_collation
487 . '</dfn>';
489 echo '</th>';
492 if ($is_show_stats) {
494 <th class="value tbl_size"><?php echo $sum_formatted . ' ' . $unit; ?></th>
495 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
496 <?php
499 </tr>
500 </tbody>
501 </table>
503 <div class="clearfloat">
504 <?php
505 // Check all tables url
506 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
508 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
509 width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
510 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
511 onclick="if (markAllRows('tablesForm')) return false;">
512 <?php echo __('Check All'); ?></a>
514 <a href="<?php echo $checkall_url; ?>"
515 onclick="if (unMarkAllRows('tablesForm')) return false;">
516 <?php echo __('Uncheck All'); ?></a>
517 <?php if ($overhead_check != '') { ?>
519 <a href="#" onclick="unMarkAllRows('tablesForm');
520 <?php echo $overhead_check; ?> return false;">
521 <?php echo __('Check tables having overhead'); ?></a>
522 <?php } ?>
524 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
525 <?php
526 echo ' <option value="' . __('With selected:') . '" selected="selected">'
527 . __('With selected:') . '</option>' . "\n";
528 echo ' <option value="export" >'
529 . __('Export') . '</option>' . "\n";
530 echo ' <option value="print" >'
531 . __('Print view') . '</option>' . "\n";
533 if (!$db_is_information_schema) {
534 echo ' <option value="empty_tbl" >'
535 . __('Empty') . '</option>' . "\n";
536 echo ' <option value="drop_tbl" >'
537 . __('Drop') . '</option>' . "\n";
538 echo ' <option value="check_tbl" >'
539 . __('Check table') . '</option>' . "\n";
540 echo ' <option value="optimize_tbl" >'
541 . __('Optimize table') . '</option>' . "\n";
542 echo ' <option value="repair_tbl" >'
543 . __('Repair table') . '</option>' . "\n";
544 echo ' <option value="analyze_tbl" >'
545 . __('Analyze table') . '</option>' . "\n";
548 </select>
549 <script type="text/javascript">
550 <!--
551 // Fake js to allow the use of the <noscript> tag
552 //-->
553 </script>
554 <noscript>
555 <input type="submit" value="<?php echo __('Go'); ?>" />
556 </noscript>
557 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
558 </div>
559 </form>
560 <?php
561 // display again the table list navigator
562 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
564 </div>
565 <hr />
567 <?php
568 // Routines
569 require './libraries/db_routines.inc.php';
571 // Events
572 if (PMA_MYSQL_INT_VERSION > 50100) {
573 require './libraries/db_events.inc.php';
577 * Work on the database
579 /* DATABASE WORK */
580 /* Printable view of a table */
581 echo '<p>';
582 echo '<a href="db_printview.php?' . $url_query . '">';
583 if ($cfg['PropertiesIconic']) {
584 echo '<img class="icon" src="' . $pmaThemeImage
585 .'b_print.png" width="16" height="16" alt="" />';
587 echo __('Print view') . '</a> ';
589 echo '<a href="./db_datadict.php?' . $url_query . '">';
590 if ($cfg['PropertiesIconic']) {
591 echo '<img class="icon" src="' . $pmaThemeImage
592 .'b_tblanalyse.png" width="16" height="16" alt="" />';
594 echo __('Data Dictionary') . '</a>';
595 echo '</p>';
597 if (empty($db_is_information_schema)) {
598 require './libraries/display_create_table.lib.php';
599 } // end if (Create Table dialog)
602 * Displays the footer
604 require './libraries/footer.inc.php';