Merge branch 'QA_3_3'
[phpmyadmin/dkf.git] / server_status.php
blob3ab8a49a2ec014c9b83c754e00f28aebbc715016
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * displays status variables with descriptions and some hints an optmizing
5 * + reset status variables
7 * @version $Id$
8 * @package phpMyAdmin
9 */
11 /**
12 * no need for variables importing
13 * @ignore
15 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
16 define('PMA_NO_VARIABLES_IMPORT', true);
18 require_once './libraries/common.inc.php';
20 /**
21 * Does the common work
23 require './libraries/server_common.inc.php';
26 /**
27 * Displays the links
29 require './libraries/server_links.inc.php';
31 /**
32 * Replication library
34 require './libraries/replication.inc.php';
35 require_once './libraries/replication_gui.lib.php';
37 /**
38 * Displays the sub-page heading
40 echo '<div id="serverstatus">' . "\n";
41 echo '<h2>' . "\n"
42 . ($GLOBALS['cfg']['MainPageIconic']
43 ? '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] .
44 's_status.png" width="16" height="16" alt="" />'
45 : '')
46 . __('Runtime Information') . "\n"
47 . '</h2>' . "\n";
50 /**
51 * flush status variables if requested
53 if (isset($_REQUEST['flush'])) {
54 $_flush_commands = array(
55 'STATUS',
56 'TABLES',
57 'QUERY CACHE',
60 if (in_array($_REQUEST['flush'], $_flush_commands)) {
61 PMA_DBI_query('FLUSH ' . $_REQUEST['flush'] . ';');
63 unset($_flush_commands);
67 /**
68 * get status from server
70 $server_status = PMA_DBI_fetch_result('SHOW GLOBAL STATUS', 0, 1);
72 /**
73 * for some calculations we require also some server settings
75 $server_variables = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES', 0, 1);
77 /**
78 * starttime calculation
80 $start_time = PMA_DBI_fetch_value(
81 'SELECT UNIX_TIMESTAMP() - ' . $server_status['Uptime']);
84 /**
85 * cleanup some deprecated values
87 $deprecated = array(
88 'Com_prepare_sql' => 'Com_stmt_prepare',
89 'Com_execute_sql' => 'Com_stmt_execute',
90 'Com_dealloc_sql' => 'Com_stmt_close',
93 foreach ($deprecated as $old => $new) {
94 if (isset($server_status[$old])
95 && isset($server_status[$new])) {
96 unset($server_status[$old]);
99 unset($deprecated);
103 * calculate some values
105 // Key_buffer_fraction
106 if (isset($server_status['Key_blocks_unused'])
107 && isset($server_variables['key_cache_block_size'])
108 && isset($server_variables['key_buffer_size'])) {
109 $server_status['Key_buffer_fraction_%'] =
111 - $server_status['Key_blocks_unused']
112 * $server_variables['key_cache_block_size']
113 / $server_variables['key_buffer_size']
114 * 100;
115 } elseif (
116 isset($server_status['Key_blocks_used'])
117 && isset($server_variables['key_buffer_size'])) {
118 $server_status['Key_buffer_fraction_%'] =
119 $server_status['Key_blocks_used']
120 * 1024
121 / $server_variables['key_buffer_size'];
124 // Ratio for key read/write
125 if (isset($server_status['Key_writes'])
126 && isset($server_status['Key_write_requests'])
127 && $server_status['Key_write_requests'] > 0)
128 $server_status['Key_write_ratio_%'] = 100 * $server_status['Key_writes'] / $server_status['Key_write_requests'];
130 if (isset($server_status['Key_reads'])
131 && isset($server_status['Key_read_requests'])
132 && $server_status['Key_read_requests'] > 0)
133 $server_status['Key_read_ratio_%'] = 100 * $server_status['Key_reads'] / $server_status['Key_read_requests'];
135 // Threads_cache_hitrate
136 if (isset($server_status['Threads_created'])
137 && isset($server_status['Connections'])
138 && $server_status['Connections'] > 0) {
139 $server_status['Threads_cache_hitrate_%'] =
141 - $server_status['Threads_created']
142 / $server_status['Connections']
143 * 100;
146 // Format Uptime_since_flush_status : show as days, hours, minutes, seconds
147 if (isset($server_status['Uptime_since_flush_status'])) {
148 $server_status['Uptime_since_flush_status'] = PMA_timespanFormat($server_status['Uptime_since_flush_status']);
152 * define some alerts
154 // name => max value before alert
155 $alerts = array(
156 // lower is better
157 // variable => max value
158 'Aborted_clients' => 0,
159 'Aborted_connects' => 0,
161 'Binlog_cache_disk_use' => 0,
163 'Created_tmp_disk_tables' => 0,
165 'Handler_read_rnd' => 0,
166 'Handler_read_rnd_next' => 0,
168 'Innodb_buffer_pool_pages_dirty' => 0,
169 'Innodb_buffer_pool_reads' => 0,
170 'Innodb_buffer_pool_wait_free' => 0,
171 'Innodb_log_waits' => 0,
172 'Innodb_row_lock_time_avg' => 10, // ms
173 'Innodb_row_lock_time_max' => 50, // ms
174 'Innodb_row_lock_waits' => 0,
176 'Slow_queries' => 0,
177 'Delayed_errors' => 0,
178 'Select_full_join' => 0,
179 'Select_range_check' => 0,
180 'Sort_merge_passes' => 0,
181 'Opened_tables' => 0,
182 'Table_locks_waited' => 0,
183 'Qcache_lowmem_prunes' => 0,
184 'Slow_launch_threads' => 0,
186 // depends on Key_read_requests
187 // normaly lower then 1:0.01
188 'Key_reads' => (0.01 * $server_status['Key_read_requests']),
189 // depends on Key_write_requests
190 // normaly nearly 1:1
191 'Key_writes' => (0.9 * $server_status['Key_write_requests']),
193 'Key_buffer_fraction' => 0.5,
195 // alert if more than 95% of thread cache is in use
196 'Threads_cached' => 0.95 * $server_variables['thread_cache_size']
198 // higher is better
199 // variable => min value
200 //'Handler read key' => '> ',
205 * split variables in sections
207 $allocations = array(
208 // variable name => section
210 'Com_' => 'com',
211 'Innodb_' => 'innodb',
212 'Ndb_' => 'ndb',
213 'Handler_' => 'handler',
214 'Qcache_' => 'qcache',
215 'Threads_' => 'threads',
216 'Slow_launch_threads' => 'threads',
218 'Binlog_cache_' => 'binlog_cache',
219 'Created_tmp_' => 'created_tmp',
220 'Key_' => 'key',
222 'Delayed_' => 'delayed',
223 'Not_flushed_delayed_rows' => 'delayed',
225 'Flush_commands' => 'query',
226 'Last_query_cost' => 'query',
227 'Slow_queries' => 'query',
229 'Select_' => 'select',
230 'Sort_' => 'sort',
232 'Open_tables' => 'table',
233 'Opened_tables' => 'table',
234 'Table_locks_' => 'table',
236 'Rpl_status' => 'repl',
237 'Slave_' => 'repl',
239 'Tc_' => 'tc',
241 'Ssl_' => 'ssl',
244 $sections = array(
245 // section => section name (description)
246 'com' => array('title' => ''),
247 'query' => array('title' => __('SQL query')),
248 'innodb' => array('title' => 'InnoDB'),
249 'ndb' => array('title' => 'NDB'),
250 'handler' => array('title' => __('Handler')),
251 'qcache' => array('title' => __('Query cache')),
252 'threads' => array('title' => __('Threads')),
253 'binlog_cache' => array('title' => __('Binary log')),
254 'created_tmp' => array('title' => __('Temporary data')),
255 'delayed' => array('title' => __('Delayed inserts')),
256 'key' => array('title' => __('Key cache')),
257 'select' => array('title' => __('Joins')),
258 'repl' => array('title' => __('Replication')),
259 'sort' => array('title' => __('Sorting')),
260 'table' => array('title' => __('Tables')),
261 'tc' => array('title' => __('Transaction coordinator')),
262 'ssl' => array('title' => 'SSL'),
266 * define some needfull links/commands
268 // variable or section name => (name => url)
269 $links = array();
271 $links['table'][__('Flush (close) all tables')]
272 = $PMA_PHP_SELF . '?flush=TABLES&amp;' . PMA_generate_common_url();
273 $links['table'][__('Show open tables')]
274 = 'sql.php?sql_query=' . urlencode('SHOW OPEN TABLES') .
275 '&amp;goto=server_status.php&amp;' . PMA_generate_common_url();
277 if ($server_master_status) {
278 $links['repl'][__('Show slave hosts')]
279 = 'sql.php?sql_query=' . urlencode('SHOW SLAVE HOSTS') .
280 '&amp;goto=server_status.php&amp;' . PMA_generate_common_url();
281 $links['repl'][__('Show master status')] = '#replication_master';
283 if ($server_slave_status) {
284 $links['repl'][__('Show slave status')] = '#replication_slave';
287 $links['repl']['doc'] = 'replication';
289 $links['qcache'][__('Flush query cache')]
290 = $PMA_PHP_SELF . '?flush=' . urlencode('QUERY CACHE') . '&amp;' .
291 PMA_generate_common_url();
292 $links['qcache']['doc'] = 'query_cache';
294 $links['threads'][__('Show processes')]
295 = 'server_processlist.php?' . PMA_generate_common_url();
296 $links['threads']['doc'] = 'mysql_threads';
298 $links['key']['doc'] = 'myisam_key_cache';
300 $links['binlog_cache']['doc'] = 'binary_log';
302 $links['Slow_queries']['doc'] = 'slow_query_log';
304 $links['innodb'][__('Variables')]
305 = 'server_engines.php?engine=InnoDB&amp;' . PMA_generate_common_url();
306 $links['innodb'][__('InnoDB Status')]
307 = 'server_engines.php?engine=InnoDB&amp;page=Status&amp;' .
308 PMA_generate_common_url();
309 $links['innodb']['doc'] = 'innodb';
312 // sort status vars into arrays
313 foreach ($server_status as $name => $value) {
314 if (isset($allocations[$name])) {
315 $sections[$allocations[$name]]['vars'][$name] = $value;
316 unset($server_status[$name]);
317 } else {
318 foreach ($allocations as $filter => $section) {
319 if (preg_match('/^' . $filter . '/', $name)
320 && isset($server_status[$name])) {
321 unset($server_status[$name]);
322 $sections[$section]['vars'][$name] = $value;
327 unset($name, $value, $filter, $section, $allocations);
329 // rest
330 $sections['all']['vars'] =& $server_status;
332 $hour_factor = 3600 / $server_status['Uptime'];
335 * start output
338 <div id="statuslinks">
339 <a href="<?php echo
340 $PMA_PHP_SELF . '?' . PMA_generate_common_url(); ?>"
341 ><?php echo __('Refresh'); ?></a>
342 <a href="<?php echo
343 $PMA_PHP_SELF . '?flush=STATUS&amp;' . PMA_generate_common_url(); ?>"
344 ><?php echo _pgettext('for Show status', 'Reset'); ?></a>
345 <?php echo PMA_showMySQLDocu('server_status_variables','server_status_variables'); ?>
346 </div>
349 <?php
350 echo sprintf(__('This MySQL server has been running for %s. It started up on %s.'),
351 PMA_timespanFormat($server_status['Uptime']),
352 PMA_localisedDate($start_time)) . "\n";
354 </p>
356 <?php
357 if ($server_master_status || $server_slave_status) {
358 echo '<p>';
359 if ($server_master_status && $server_slave_status) {
360 echo __('This MySQL server works as <b>master</b> and <b>slave</b> in <b>replication</b> process.');
361 } elseif ($server_master_status) {
362 echo __('This MySQL server works as <b>master</b> in <b>replication</b> process.');
363 } elseif ($server_slave_status) {
364 echo __('This MySQL server works as <b>slave</b> in <b>replication</b> process.');
366 echo __('For further information about replication status on the server, please visit the <a href=#replication>replication section</a>.');
367 echo '</p>';
371 <div id="sectionlinks">
372 <?php
373 foreach ($sections as $section_name => $section) {
374 if (! empty($section['vars']) && ! empty($section['title'])) {
375 echo '<a href="' . $PMA_PHP_SELF . '?' .
376 PMA_generate_common_url() . '#' . $section_name . '">' .
377 $section['title'] . '</a>' . "\n";
381 </div>
383 <h3><?php echo __('<b>Server traffic</b>: These tables show the network traffic statistics of this MySQL server since its startup.'); ?></h3>
385 <table id="serverstatustraffic" class="data">
386 <thead>
387 <tr>
388 <th colspan="2"><?php echo __('Traffic') . '&nbsp;' . PMA_showHint(__('On a busy server, the byte counters may overrun, so those statistics as reported by the MySQL server may be incorrect.')); ?></th>
389 <th>&oslash; <?php echo __('per hour'); ?></th>
390 </tr>
391 </thead>
392 <tbody>
393 <tr class="odd">
394 <th class="name"><?php echo __('Received'); ?></th>
395 <td class="value"><?php echo
396 implode(' ',
397 PMA_formatByteDown($server_status['Bytes_received'], 2, 1)); ?></td>
398 <td class="value"><?php echo
399 implode(' ',
400 PMA_formatByteDown(
401 $server_status['Bytes_received'] * $hour_factor, 2, 1)); ?></td>
402 </tr>
403 <tr class="even">
404 <th class="name"><?php echo __('Sent'); ?></th>
405 <td class="value"><?php echo
406 implode(' ',
407 PMA_formatByteDown($server_status['Bytes_sent'], 2, 1)); ?></td>
408 <td class="value"><?php echo
409 implode(' ',
410 PMA_formatByteDown(
411 $server_status['Bytes_sent'] * $hour_factor, 2, 1)); ?></td>
412 </tr>
413 <tr class="odd">
414 <th class="name"><?php echo __('Total'); ?></th>
415 <td class="value"><?php echo
416 implode(' ',
417 PMA_formatByteDown(
418 $server_status['Bytes_received'] + $server_status['Bytes_sent'], 2, 1)
419 ); ?></td>
420 <td class="value"><?php echo
421 implode(' ',
422 PMA_formatByteDown(
423 ($server_status['Bytes_received'] + $server_status['Bytes_sent'])
424 * $hour_factor, 2, 1)
425 ); ?></td>
426 </tr>
427 </tbody>
428 </table>
430 <table id="serverstatusconnections" class="data">
431 <thead>
432 <tr>
433 <th colspan="2"><?php echo __('Connections'); ?></th>
434 <th>&oslash; <?php echo __('per hour'); ?></th>
435 <th>%</th>
436 </tr>
437 </thead>
438 <tbody>
439 <tr class="odd">
440 <th class="name"><?php echo __('max. concurrent connections'); ?></th>
441 <td class="value"><?php echo
442 PMA_formatNumber($server_status['Max_used_connections'], 0); ?> </td>
443 <td class="value">--- </td>
444 <td class="value">--- </td>
445 </tr>
446 <tr class="even">
447 <th class="name"><?php echo __('Failed attempts'); ?></th>
448 <td class="value"><?php echo
449 PMA_formatNumber($server_status['Aborted_connects'], 4, 0); ?></td>
450 <td class="value"><?php echo
451 PMA_formatNumber($server_status['Aborted_connects'] * $hour_factor,
452 4, 2); ?></td>
453 <td class="value"><?php echo
454 $server_status['Connections'] > 0
455 ? PMA_formatNumber(
456 $server_status['Aborted_connects'] * 100 / $server_status['Connections'],
457 0, 2) . '%'
458 : '--- '; ?></td>
459 </tr>
460 <tr class="odd">
461 <th class="name"><?php echo __('Aborted'); ?></th>
462 <td class="value"><?php echo
463 PMA_formatNumber($server_status['Aborted_clients'], 4, 0); ?></td>
464 <td class="value"><?php echo
465 PMA_formatNumber($server_status['Aborted_clients'] * $hour_factor,
466 4, 2); ?></td>
467 <td class="value"><?php echo
468 $server_status['Connections'] > 0
469 ? PMA_formatNumber(
470 $server_status['Aborted_clients'] * 100 / $server_status['Connections'],
471 0, 2) . '%'
472 : '--- '; ?></td>
473 </tr>
474 <tr class="even">
475 <th class="name"><?php echo __('Total'); ?></th>
476 <td class="value"><?php echo
477 PMA_formatNumber($server_status['Connections'], 4, 0); ?></td>
478 <td class="value"><?php echo
479 PMA_formatNumber($server_status['Connections'] * $hour_factor,
480 4, 2); ?></td>
481 <td class="value"><?php echo
482 PMA_formatNumber(100, 0, 2); ?>%</td>
483 </tr>
484 </tbody>
485 </table>
487 <hr class="clearfloat" />
489 <h3><?php echo
490 sprintf(__('<b>Query statistics</b>: Since its startup, %s queries have been sent to the server.'),
491 PMA_formatNumber($server_status['Questions'], 0)); ?></h3>
493 <table id="serverstatusqueriessummary" class="data">
494 <thead>
495 <tr>
496 <th><?php echo __('Total'); ?></th>
497 <th>&oslash; <?php echo __('per hour'); ?></th>
498 <th>&oslash; <?php echo __('per minute'); ?></th>
499 <th>&oslash; <?php echo __('per second'); ?></th>
500 </tr>
501 </thead>
502 <tbody>
503 <tr class="odd">
504 <td class="value"><?php echo
505 PMA_formatNumber($server_status['Questions'], 4, 0); ?></td>
506 <td class="value"><?php echo
507 PMA_formatNumber($server_status['Questions'] * $hour_factor,
508 3, 2); ?></td>
509 <td class="value"><?php echo
510 PMA_formatNumber(
511 $server_status['Questions'] * 60 / $server_status['Uptime'],
512 3, 2); ?></td>
513 <td class="value"><?php echo
514 PMA_formatNumber(
515 $server_status['Questions'] / $server_status['Uptime'],
516 3, 2); ?></td>
517 </tr>
518 </tbody>
519 </table>
521 <div id="serverstatusqueriesdetails">
522 <?php
524 $used_queries = $sections['com']['vars'];
525 // reverse sort by value to show most used statements first
526 arsort($used_queries);
527 // remove all zero values from the end
528 while (end($used_queries) == 0) {
529 array_pop($used_queries);
532 // number of tables to split values into
533 $tables = 3;
534 $max_rows_per_table = (int) ceil(count($used_queries) / $tables);
535 $current_table = 0;
536 $odd_row = true;
537 $count_displayed_rows = 0;
538 $perc_factor = 100 / ($server_status['Questions'] - $server_status['Connections']);
540 foreach ($used_queries as $name => $value) {
541 $current_table++;
542 if ($count_displayed_rows === 0 || $count_displayed_rows === $max_rows_per_table) {
543 $odd_row = true;
544 if ($count_displayed_rows === $max_rows_per_table) {
545 echo ' </tbody>' . "\n";
546 echo ' </table>' . "\n";
547 $count_displayed_rows = 0;
550 <table id="serverstatusqueriesdetails<?php echo $current_table; ?>" class="data">
551 <col class="namecol" />
552 <col class="valuecol" span="3" />
553 <thead>
554 <tr><th colspan="2"><?php echo __('Query type'); ?></th>
555 <th>&oslash; <?php echo __('per hour'); ?></th>
556 <th>%</th>
557 </tr>
558 </thead>
559 <tbody>
560 <?php
561 } else {
562 $odd_row = !$odd_row;
564 $count_displayed_rows++;
566 // For the percentage column, use Questions - Connections, because
567 // the number of connections is not an item of the Query types
568 // but is included in Questions. Then the total of the percentages is 100.
569 $name = str_replace('Com_', '', $name);
570 $name = str_replace('_', ' ', $name);
572 <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
573 <th class="name"><?php echo htmlspecialchars($name); ?></th>
574 <td class="value"><?php echo PMA_formatNumber($value, 4, 0); ?></td>
575 <td class="value"><?php echo
576 PMA_formatNumber($value * $hour_factor, 3, 3); ?></td>
577 <td class="value"><?php echo
578 PMA_formatNumber($value * $perc_factor, 0, 2); ?>%</td>
579 </tr>
580 <?php
583 </tbody>
584 </table>
585 </div>
587 <div id="serverstatussection">
588 <?php
589 //Unset used variables
590 unset(
591 $tables, $max_rows_per_table, $current_table, $count_displayed_rows, $perc_factor,
592 $hour_factor, $sections['com'],
593 $server_status['Aborted_clients'], $server_status['Aborted_connects'],
594 $server_status['Max_used_connections'], $server_status['Bytes_received'],
595 $server_status['Bytes_sent'], $server_status['Connections'],
596 $server_status['Questions'], $server_status['Uptime'],
597 $used_queries
600 foreach ($sections as $section_name => $section) {
601 if (! empty($section['vars'])) {
603 <table class="data" id="serverstatussection<?php echo $section_name; ?>">
604 <caption class="tblHeaders">
605 <a class="top"
606 href="<?php echo $PMA_PHP_SELF . '?' .
607 PMA_generate_common_url() . '#serverstatus'; ?>"
608 name="<?php echo $section_name; ?>"><?php echo __('Begin'); ?>
609 <?php echo
610 ($GLOBALS['cfg']['MainPageIconic']
611 ? '<img src="' . $GLOBALS['pmaThemeImage'] .
612 's_asc.png" width="11" height="9" align="middle" alt="" />'
613 : ''); ?>
614 </a>
615 <?php
616 if (! empty($section['title'])) {
617 echo $section['title'];
620 </caption>
621 <col class="namecol" />
622 <col class="valuecol" />
623 <col class="descrcol" />
624 <thead>
625 <tr>
626 <th><?php echo __('Variable'); ?></th>
627 <th><?php echo __('Value'); ?></th>
628 <th><?php echo __('Description'); ?></th>
629 </tr>
630 </thead>
631 <?php
632 if (! empty($links[$section_name])) {
634 <tfoot>
635 <tr class="tblFooters">
636 <th colspan="3" class="tblFooters">
637 <?php
638 foreach ($links[$section_name] as $link_name => $link_url) {
639 if ('doc' == $link_name) {
640 echo PMA_showMySQLDocu($link_url, $link_url);
641 } else {
642 echo '<a href="' . $link_url . '">' . $link_name . '</a>' . "\n";
645 unset($link_url, $link_name);
647 </th>
648 </tr>
649 </tfoot>
650 <?php
653 <tbody>
654 <?php
655 $odd_row = false;
656 foreach ($section['vars'] as $name => $value) {
657 $odd_row = !$odd_row;
659 <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
660 <th class="name"><?php echo htmlspecialchars($name); ?></th>
661 <td class="value"><?php
662 if (isset($alerts[$name])) {
663 if ($value > $alerts[$name]) {
664 echo '<span class="attention">';
665 } else {
666 echo '<span class="allfine">';
669 if ('%' === substr($name, -1, 1)) {
670 echo PMA_formatNumber($value, 0, 2) . ' %';
671 } elseif (is_numeric($value) && $value == (int) $value) {
672 echo PMA_formatNumber($value, 3, 1);
673 } elseif (is_numeric($value)) {
674 echo PMA_formatNumber($value, 3, 1);
675 } else {
676 echo htmlspecialchars($value);
678 if (isset($alerts[$name])) {
679 echo '</span>';
681 ?></td>
682 <td class="descr">
683 <?php
684 if (isset($GLOBALS['strShowStatus' . $name . 'Descr'])) {
685 echo $GLOBALS['strShowStatus' . $name . 'Descr'];
688 if (isset($links[$name])) {
689 foreach ($links[$name] as $link_name => $link_url) {
690 if ('doc' == $link_name) {
691 echo PMA_showMySQLDocu($link_url, $link_url);
692 } else {
693 echo ' <a href="' . $link_url . '">' . $link_name . '</a>' .
694 "\n";
697 unset($link_url, $link_name);
700 </td>
701 </tr>
702 <?php
704 unset($name, $value);
706 </tbody>
707 </table>
708 <?php
711 unset($section_name, $section, $sections, $server_status, $odd_row, $alerts);
713 </div>
714 <?php
715 /* if the server works as master or slave in replication process, display useful information */
716 if ($server_master_status || $server_slave_status)
719 <hr class="clearfloat" />
721 <h3><a name="replication"></a><?php echo __('Replication status'); ?></h3>
722 <?php
724 foreach ($replication_types as $type)
726 if (${"server_{$type}_status"}) {
727 PMA_replication_print_status_table($type);
730 unset($types);
734 </div>
736 <?php
738 * Sends the footer
740 require_once './libraries/footer.inc.php';