2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * @todo we must handle the case if sql.php is called directly with a query
5 * what returns 0 rows - to prevent cyclic redirects or includes
10 * Gets some core libraries
12 require_once './libraries/common.inc.php';
13 require_once './libraries/Table.class.php';
14 require_once './libraries/check_user_privileges.lib.php';
15 require_once './libraries/bookmark.lib.php';
18 * Defines the url to return to in case of error in a sql statement
22 $is_gotofile = preg_replace('@^([^?]+).*$@s', '\\1', $goto);
23 if (!@file_exists
('./' . $is_gotofile)) {
26 $is_gotofile = ($is_gotofile == $goto);
28 } // end if (security checkings)
31 $goto = (! strlen($table)) ?
$cfg['DefaultTabDatabase'] : $cfg['DefaultTabTable'];
34 if (!isset($err_url)) {
35 $err_url = (!empty($back) ?
$back : $goto)
36 . '?' . PMA_generate_common_url($db)
37 . ((strpos(' ' . $goto, 'db_') != 1 && strlen($table)) ?
'&table=' . urlencode($table) : '');
40 // Coming from a bookmark dialog
41 if (isset($fields['query'])) {
42 $sql_query = $fields['query'];
45 // This one is just to fill $db
46 if (isset($fields['dbase'])) {
47 $db = $fields['dbase'];
50 // Default to browse if no query set an we have table
51 // (needed for browsing from DefaultTabTable)
52 if (empty($sql_query) && strlen($table) && strlen($db)) {
53 require_once './libraries/bookmark.lib.php';
54 $book_sql_query = PMA_queryBookmarks($db,
55 $GLOBALS['cfg']['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'',
58 if (! empty($book_sql_query)) {
59 $sql_query = $book_sql_query;
61 $sql_query = 'SELECT * FROM ' . PMA_backquote($table);
63 unset($book_sql_query);
65 // set $goto to what will be displayed if query returns 0 rows
66 $goto = 'tbl_structure.php';
68 // Now we can check the parameters
69 PMA_checkParameters(array('sql_query'));
72 // instead of doing the test twice
73 $is_drop_database = preg_match('/DROP[[:space:]]+(DATABASE|SCHEMA)[[:space:]]+/i',
77 * Check rights in case of DROP DATABASE
79 * This test may be bypassed if $is_js_confirmed = 1 (already checked with js)
80 * but since a malicious user may pass this variable by url/form, we don't take
81 * into account this case.
83 if (!defined('PMA_CHK_DROP')
84 && !$cfg['AllowUserDropDatabase']
87 require_once './libraries/header.inc.php';
88 PMA_mysqlDie($strNoDropDatabases, '', '', $err_url);
91 require_once './libraries/display_tbl.lib.php';
92 PMA_displayTable_checkConfigParams();
95 * Need to find the real end of rows?
97 if (isset($find_real_end) && $find_real_end) {
98 $unlim_num_rows = PMA_Table
::countRecords($db, $table, true, true);
99 $_SESSION['userconf']['pos'] = @((ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']) - 1) * $_SESSION['userconf']['max_rows']);
106 if (isset($store_bkm)) {
107 PMA_addBookmarks($fields, $cfg['Bookmark'], (isset($bkm_all_users) && $bkm_all_users == 'true' ?
true : false));
108 PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . $goto);
112 * Parse and analyze the query
114 require_once './libraries/parse_analyze.lib.php';
117 * Sets or modifies the $goto variable if required
119 if ($goto == 'sql.php') {
120 $is_gotofile = false;
122 . PMA_generate_common_url($db, $table)
123 . '&sql_query=' . urlencode($sql_query);
128 * Go back to further page if table should not be dropped
130 if (isset($btnDrop) && $btnDrop == $strNo) {
135 if (strpos($goto, 'db_') === 0 && strlen($table)) {
138 $active_page = $goto;
139 require './' . PMA_securePath($goto);
141 PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&', '&', $goto));
148 * Displays the confirm page if required
150 * This part of the script is bypassed if $is_js_confirmed = 1 (already checked
151 * with js) because possible security issue is not so important here: at most,
152 * the confirm message isn't displayed.
154 * Also bypassed if only showing php code.or validating a SQL query
156 if (! $cfg['Confirm'] ||
isset($_REQUEST['is_js_confirmed']) ||
isset($btnDrop)
157 // if we are coming from a "Create PHP code" or a "Without PHP Code"
158 // dialog, we won't execute the query anyway, so don't confirm
159 //|| !empty($GLOBALS['show_as_php'])
160 ||
isset($GLOBALS['show_as_php'])
161 ||
!empty($GLOBALS['validatequery'])) {
164 $do_confirm = isset($analyzed_sql[0]['queryflags']['need_confirm']);
168 $stripped_sql_query = $sql_query;
169 require_once './libraries/header.inc.php';
170 if ($is_drop_database) {
171 echo '<h1 class="warning">' . $strDropDatabaseStrongWarning . '</h1>';
173 echo '<form action="sql.php" method="post">' . "\n"
174 .PMA_generate_common_hidden_inputs($db, $table);
176 <input type
="hidden" name
="sql_query" value
="<?php echo htmlspecialchars($sql_query); ?>" />
177 <input type
="hidden" name
="zero_rows" value
="<?php echo isset($zero_rows) ? PMA_sanitize($zero_rows) : ''; ?>" />
178 <input type
="hidden" name
="goto" value
="<?php echo $goto; ?>" />
179 <input type
="hidden" name
="back" value
="<?php echo isset($back) ? PMA_sanitize($back) : ''; ?>" />
180 <input type
="hidden" name
="reload" value
="<?php echo isset($reload) ? PMA_sanitize($reload) : 0; ?>" />
181 <input type
="hidden" name
="purge" value
="<?php echo isset($purge) ? PMA_sanitize($purge) : ''; ?>" />
182 <input type
="hidden" name
="cpurge" value
="<?php echo isset($cpurge) ? PMA_sanitize($cpurge) : ''; ?>" />
183 <input type
="hidden" name
="purgekey" value
="<?php echo isset($purgekey) ? PMA_sanitize($purgekey) : ''; ?>" />
184 <input type
="hidden" name
="show_query" value
="<?php echo isset($show_query) ? PMA_sanitize($show_query) : ''; ?>" />
186 echo '<fieldset class="confirmation">' . "\n"
187 .' <legend>' . $strDoYouReally . '</legend>'
188 .' <tt>' . htmlspecialchars($stripped_sql_query) . '</tt>' . "\n"
189 .'</fieldset>' . "\n"
190 .'<fieldset class="tblFooters">' . "\n";
192 <input type
="submit" name
="btnDrop" value
="<?php echo $strYes; ?>" id
="buttonYes" />
193 <input type
="submit" name
="btnDrop" value
="<?php echo $strNo; ?>" id
="buttonNo" />
195 echo '</fieldset>' . "\n"
199 * Displays the footer and exit
201 require_once './libraries/footer.inc.php';
202 } // end if $do_confirm
205 // Defines some variables
206 // A table has to be created, renamed, dropped -> navi frame should be reloaded
208 * @todo use the parser/analyzer
212 && preg_match('/^(CREATE|ALTER|DROP)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $sql_query)) {
216 // SK -- Patch: $is_group added for use in calculation of total number of
218 // $is_count is changed for more correct "LIMIT" clause
219 // appending in queries like
220 // "SELECT COUNT(...) FROM ... GROUP BY ..."
223 * @todo detect all this with the parser, to avoid problems finding
224 * those strings in comments or backquoted identifiers
227 $is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = $is_analyse = $is_group = $is_func = $is_replace = false;
228 if ($is_select) { // see line 141
229 $is_group = preg_match('@(GROUP[[:space:]]+BY|HAVING|SELECT[[:space:]]+DISTINCT)[[:space:]]+@i', $sql_query);
230 $is_func = !$is_group && (preg_match('@[[:space:]]+(SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND)\s*\(@i', $sql_query));
231 $is_count = !$is_group && (preg_match('@^SELECT[[:space:]]+COUNT\((.*\.+)?.*\)@i', $sql_query));
232 $is_export = (preg_match('@[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+@i', $sql_query));
233 $is_analyse = (preg_match('@[[:space:]]+PROCEDURE[[:space:]]+ANALYSE@i', $sql_query));
234 } elseif (preg_match('@^EXPLAIN[[:space:]]+@i', $sql_query)) {
236 } elseif (preg_match('@^DELETE[[:space:]]+@i', $sql_query)) {
239 } elseif (preg_match('@^(INSERT|LOAD[[:space:]]+DATA|REPLACE)[[:space:]]+@i', $sql_query)) {
242 if (preg_match('@^(REPLACE)[[:space:]]+@i', $sql_query)) {
245 } elseif (preg_match('@^UPDATE[[:space:]]+@i', $sql_query)) {
247 } elseif (preg_match('@^[[:space:]]*SHOW[[:space:]]+@i', $sql_query)) {
249 } elseif (preg_match('@^(CHECK|ANALYZE|REPAIR|OPTIMIZE)[[:space:]]+TABLE[[:space:]]+@i', $sql_query)) {
253 // Do append a "LIMIT" clause?
254 if ((! $cfg['ShowAll'] ||
$_SESSION['userconf']['max_rows'] != 'all')
255 && ! ($is_count ||
$is_export ||
$is_func ||
$is_analyse)
256 && isset($analyzed_sql[0]['queryflags']['select_from'])
257 && ! isset($analyzed_sql[0]['queryflags']['offset'])
258 && empty($analyzed_sql[0]['limit_clause'])
260 $sql_limit_to_append = ' LIMIT ' . $_SESSION['userconf']['pos'] . ', ' . $_SESSION['userconf']['max_rows'] . " ";
262 $full_sql_query = $analyzed_sql[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_sql[0]['section_after_limit'];
264 * @todo pretty printing of this modified query
266 if (isset($display_query)) {
267 // if the analysis of the original query revealed that we found
268 // a section_after_limit, we now have to analyze $display_query
269 // to display it correctly
271 if (!empty($analyzed_sql[0]['section_after_limit']) && trim($analyzed_sql[0]['section_after_limit']) != ';') {
272 $analyzed_display_query = PMA_SQP_analyze(PMA_SQP_parse($display_query));
273 $display_query = $analyzed_display_query[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_display_query[0]['section_after_limit'];
278 $full_sql_query = $sql_query;
282 PMA_DBI_select_db($db);
285 // E x e c u t e t h e q u e r y
287 // Only if we didn't ask to see the php code (mikebeck)
288 if (isset($GLOBALS['show_as_php']) ||
!empty($GLOBALS['validatequery'])) {
292 if (isset($_SESSION['profiling']) && PMA_profilingSupported()) {
293 PMA_DBI_query('SET PROFILING=1;');
296 // garvin: Measure query time.
297 // TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23067&atid=377411
298 $querytime_before = array_sum(explode(' ', microtime()));
300 $result = @PMA_DBI_try_query
($full_sql_query, null, PMA_DBI_QUERY_STORE
);
302 $querytime_after = array_sum(explode(' ', microtime()));
304 $GLOBALS['querytime'] = $querytime_after - $querytime_before;
306 // Displays an error message if required and stop parsing the script
307 if ($error = PMA_DBI_getError()) {
309 if (strpos($goto, 'db_') === 0 && strlen($table)) {
312 $active_page = $goto;
313 $message = PMA_Message
::rawError($error);
314 require './' . PMA_securePath($goto);
316 require_once './libraries/header.inc.php';
317 $full_err_url = (preg_match('@^(db|tbl)_@', $err_url))
318 ?
$err_url . '&show_query=1&sql_query=' . urlencode($sql_query)
320 PMA_mysqlDie($error, $full_sql_query, '', $full_err_url);
326 // Gets the number of rows affected/returned
327 // (This must be done immediately after the query because
328 // mysql_affected_rows() reports about the last query done)
331 $num_rows = ($result) ? @PMA_DBI_num_rows
($result) : 0;
332 } elseif (!isset($num_rows)) {
333 $num_rows = @PMA_DBI_affected_rows
();
336 // Grabs the profiling results
337 if (isset($_SESSION['profiling']) && PMA_profilingSupported()) {
338 $profiling_results = PMA_DBI_fetch_result('SHOW PROFILE;');
341 // Checks if the current database has changed
342 // This could happen if the user sends a query like "USE `database`;"
344 * commented out auto-switching to active database - really required?
345 * bug #1814718 win: table list disappears (mixed case db names)
346 * https://sourceforge.net/support/tracker.php?aid=1814718
347 * @todo RELEASE test and comit or rollback before release
348 $current_db = PMA_DBI_fetch_value('SELECT DATABASE()');
349 if ($db !== $current_db) {
356 // tmpfile remove after convert encoding appended by Y.Kawada
357 if (function_exists('PMA_kanji_file_conv')
358 && (isset($textfile) && file_exists($textfile))) {
362 // Counts the total number of rows for the same 'SELECT' query without the
363 // 'LIMIT' clause that may have been programatically added
365 if (empty($sql_limit_to_append)) {
366 $unlim_num_rows = $num_rows;
367 // if we did not append a limit, set this to get a correct
368 // "Showing rows..." message
369 //$_SESSION['userconf']['max_rows'] = 'all';
370 } elseif ($is_select) {
372 // c o u n t q u e r y
374 // If we are "just browsing", there is only one table,
375 // and no where clause (or just 'WHERE 1 '),
376 // so we do a quick count (which uses MaxExactCount)
377 // because SQL_CALC_FOUND_ROWS
378 // is not quick on large InnoDB tables
380 // but do not count again if we did it previously
381 // due to $find_real_end == true
384 && !isset($analyzed_sql[0]['queryflags']['union'])
385 && !isset($analyzed_sql[0]['table_ref'][1]['table_name'])
386 && (empty($analyzed_sql[0]['where_clause'])
387 ||
$analyzed_sql[0]['where_clause'] == '1 ')
388 && !isset($find_real_end)
391 // "j u s t b r o w s i n g"
392 $unlim_num_rows = PMA_Table
::countRecords($db, $table, true);
394 } else { // n o t " j u s t b r o w s i n g "
396 // add select expression after the SQL_CALC_FOUND_ROWS
398 // for UNION, just adding SQL_CALC_FOUND_ROWS
399 // after the first SELECT works.
401 // take the left part, could be:
404 $count_query = PMA_SQP_formatHtml($parsed_sql, 'query_only', 0, $analyzed_sql[0]['position_of_first_select'] +
1);
405 $count_query .= ' SQL_CALC_FOUND_ROWS ';
406 // add everything that was after the first SELECT
407 $count_query .= PMA_SQP_formatHtml($parsed_sql, 'query_only', $analyzed_sql[0]['position_of_first_select']+
1);
408 // ensure there is no semicolon at the end of the
409 // count query because we'll probably add
410 // a LIMIT 1 clause after it
411 $count_query = rtrim($count_query);
412 $count_query = rtrim($count_query, ';');
414 // if using SQL_CALC_FOUND_ROWS, add a LIMIT to avoid
415 // long delays. Returned count will be complete anyway.
416 // (but a LIMIT would disrupt results in an UNION)
418 if (!isset($analyzed_sql[0]['queryflags']['union'])) {
419 $count_query .= ' LIMIT 1';
422 // run the count query
424 PMA_DBI_try_query($count_query);
425 // if (mysql_error()) {
428 // (SELECT `User`, `Host`, `Db`, `Select_priv` FROM `db`)
429 // UNION (SELECT `User`, `Host`, "%" AS "Db",
431 // FROM `user`) ORDER BY `User`, `Host`, `Db`;
432 // and although the generated count_query is wrong
433 // the SELECT FOUND_ROWS() work! (maybe it gets the
434 // count from the latest query that worked)
436 // another case where the count_query is wrong:
437 // SELECT COUNT(*), f1 from t1 group by f1
438 // and you click to sort on count(*)
440 $unlim_num_rows = PMA_DBI_fetch_value('SELECT FOUND_ROWS()');
441 } // end else "just browsing"
443 } else { // not $is_select
445 } // end rows total count
447 // garvin: if a table or database gets dropped, check column comments.
448 if (isset($purge) && $purge == '1') {
449 require_once './libraries/relation_cleanup.lib.php';
451 if (strlen($table) && strlen($db)) {
452 PMA_relationsCleanupTable($db, $table);
453 } elseif (strlen($db)) {
454 PMA_relationsCleanupDatabase($db);
456 // garvin: VOID. No DB/Table gets deleted.
457 } // end if relation-stuff
460 // garvin: If a column gets dropped, do relation magic.
461 if (isset($cpurge) && $cpurge == '1' && isset($purgekey)
462 && strlen($db) && strlen($table) && !empty($purgekey)) {
463 require_once './libraries/relation_cleanup.lib.php';
464 PMA_relationsCleanupColumn($db, $table, $purgekey);
466 } // end if column PMA_* purge
467 } // end else "didn't ask to see php code"
469 // No rows returned -> move back to the calling page
470 if ($num_rows < 1 ||
$is_affected) {
472 $message = PMA_Message
::success('strRowsDeleted');
473 $message->addParam($num_rows);
474 } elseif ($is_insert) {
476 /* For replace we get DELETED + INSERTED row count, so we have to call it affected */
477 $message = PMA_Message
::success('strRowsAffected');
478 $message->addParam($num_rows);
480 $message = PMA_Message
::success('strRowsInserted');
481 $message->addParam($num_rows);
483 $insert_id = PMA_DBI_insert_id();
484 if ($insert_id != 0) {
485 // insert_id is id of FIRST record inserted in one insert, so if we inserted multiple rows, we had to increment this
486 $message->addMessage('[br]');
487 // need to use a temporary because the Message class
488 // currently supports adding parameters only to the first
490 $_inserted = PMA_Message
::notice('strInsertedRowId');
491 $_inserted->addParam($insert_id +
$num_rows - 1);
492 $message->addMessage($_inserted);
494 } elseif ($is_affected) {
495 $message = PMA_Message
::success('strRowsAffected');
496 $message->addParam($num_rows);
498 // Ok, here is an explanation for the !$is_select.
499 // The form generated by sql_query_form.lib.php
500 // and db_sql.php has many submit buttons
501 // on the same form, and some confusion arises from the
502 // fact that $zero_rows is sent for every case.
503 // The $zero_rows containing $strSuccess and sent with
504 // the form should not have priority over
505 // errors like $strEmptyResultSet
506 } elseif (!empty($zero_rows) && !$is_select) {
507 $message = PMA_Message
::rawSuccess($zero_rows);
508 } elseif (!empty($GLOBALS['show_as_php'])) {
509 $message = PMA_Message
::success('strShowingPhp');
510 } elseif (isset($GLOBALS['show_as_php'])) {
511 /* User disable showing as PHP, query is only displayed */
512 $message = PMA_Message
::notice('strShowingSQL');
513 } elseif (!empty($GLOBALS['validatequery'])) {
514 $message = PMA_Message
::notice('strValidateSQL');
516 $message = PMA_Message
::success('strEmptyResultSet');
519 if (isset($GLOBALS['querytime'])) {
520 $_querytime = PMA_Message
::notice('strQueryTime');
521 $_querytime->addParam($GLOBALS['querytime']);
522 $message->addMessage('(');
523 $message->addMessage($_querytime);
524 $message->addMessage(')');
528 $goto = PMA_securePath($goto);
529 // Checks for a valid target script
530 $is_db = $is_table = false;
531 include 'libraries/db_table_exists.lib.php';
532 if (strpos($goto, 'tbl_') === 0 && ! $is_table) {
533 if (strlen($table)) {
536 $goto = 'db_sql.php';
538 if (strpos($goto, 'db_') === 0 && ! $is_db) {
544 // Loads to target script
545 if (strpos($goto, 'db_') === 0
546 ||
strpos($goto, 'tbl_') === 0) {
547 $GLOBALS['js_include'][] = 'functions.js';
549 if ($goto != 'main.php') {
550 require_once './libraries/header.inc.php';
552 $active_page = $goto;
553 require './' . $goto;
555 // avoid a redirect loop when last record was deleted
556 if ('sql.php' == $cfg['DefaultTabTable']) {
557 $goto = str_replace('sql.php','tbl_structure.php',$goto);
559 PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&', '&', $goto) . '&message=' . urlencode($message));
562 } // end no rows returned
564 // At least one row is returned -> displays a table with results
566 // Displays the headers
567 if (isset($show_query)) {
570 if (isset($printview) && $printview == '1') {
571 require_once './libraries/header_printview.inc.php';
573 $GLOBALS['js_include'][] = 'functions.js';
575 if (strlen($table)) {
576 require './libraries/tbl_common.php';
577 $url_query .= '&goto=tbl_sql.php&back=tbl_sql.php';
578 require './libraries/tbl_info.inc.php';
579 require './libraries/tbl_links.inc.php';
580 } elseif (strlen($db)) {
581 require './libraries/db_common.inc.php';
582 require './libraries/db_info.inc.php';
584 require './libraries/server_common.inc.php';
585 require './libraries/server_links.inc.php';
590 require_once './libraries/relation.lib.php';
591 $cfgRelation = PMA_getRelationsParam();
594 // Gets the list of fields properties
595 if (isset($result) && $result) {
596 $fields_meta = PMA_DBI_get_fields_meta($result);
597 $fields_cnt = count($fields_meta);
600 // Display previous update query (from tbl_replace)
601 if (isset($disp_query) && $cfg['ShowSQL'] == true) {
602 PMA_showMessage($disp_message, $disp_query, 'success');
605 if (isset($profiling_results)) {
606 PMA_profilingResults($profiling_results);
609 // Displays the results in a table
610 if (empty($disp_mode)) {
611 // see the "PMA_setDisplayMode()" function in
612 // libraries/display_tbl.lib.php
613 $disp_mode = 'urdr111101';
616 // hide edit and delete links for information_schema
617 if ($db == 'information_schema') {
618 $disp_mode = 'nnnn110111';
621 PMA_displayTable($result, $disp_mode, $analyzed_sql);
622 PMA_DBI_free_result($result);
624 // BEGIN INDEX CHECK See if indexes should be checked.
625 if (isset($query_type) && $query_type == 'check_tbl' && isset($selected) && is_array($selected)) {
626 foreach ($selected as $idx => $tbl_name) {
627 $check = PMA_Index
::findDuplicates($tbl_name, $db);
628 if (! empty($check)) {
629 printf($strIndexWarningTable, $tbl_name);
635 // Bookmark support if required
636 if ($disp_mode[7] == '1'
637 && (isset($cfg['Bookmark']) && ! empty($cfg['Bookmark']['db']) && ! empty($cfg['Bookmark']['table']) && empty($id_bookmark))
638 && !empty($sql_query)) {
642 . PMA_generate_common_url($db, $table)
643 . '&sql_query=' . urlencode($sql_query)
644 . '&id_bookmark=1';
647 <form action
="sql.php" method
="post" onsubmit
="return emptyFormElements(this, 'fields[label]');">
648 <?php
echo PMA_generate_common_hidden_inputs(); ?
>
649 <input type
="hidden" name
="goto" value
="<?php echo $goto; ?>" />
650 <input type
="hidden" name
="fields[dbase]" value
="<?php echo htmlspecialchars($db); ?>" />
651 <input type
="hidden" name
="fields[user]" value
="<?php echo $cfg['Bookmark']['user']; ?>" />
652 <input type
="hidden" name
="fields[query]" value
="<?php echo urlencode(isset($complete_query) ? $complete_query : $sql_query); ?>" />
655 echo ($cfg['PropertiesIconic'] ?
'<img class="icon" src="' . $pmaThemeImage . 'b_bookmark.png" width="16" height="16" alt="' . $strBookmarkThis . '" />' : '')
660 <div
class="formelement">
661 <label
for="fields_label_"><?php
echo $strBookmarkLabel; ?
>:</label
>
662 <input type
="text" id
="fields_label_" name
="fields[label]" value
="" />
665 <div
class="formelement">
666 <input type
="checkbox" name
="bkm_all_users" id
="bkm_all_users" value
="true" />
667 <label
for="bkm_all_users"><?php
echo $strBookmarkAllUsers; ?
></label
>
670 <div
class="clearfloat"></div
>
672 <fieldset
class="tblFooters">
673 <input type
="submit" name
="store_bkm" value
="<?php echo $strBookmarkThis; ?>" />
677 } // end bookmark support
679 // Do print the page if required
680 if (isset($printview) && $printview == '1') {
682 <script type
="text/javascript">
685 window
.onload
= function()
687 if (typeof(window
.print) != 'undefined') {
695 } // end rows returned
698 * Displays the footer
700 require_once './libraries/footer.inc.php';