A little nit of optimization
This commit is contained in:
@@ -3,41 +3,20 @@
|
|||||||
|
|
||||||
@set_time_limit(10000);
|
@set_time_limit(10000);
|
||||||
|
|
||||||
|
|
||||||
require("grab_globals.inc.php3");
|
require("grab_globals.inc.php3");
|
||||||
|
|
||||||
require("lib.inc.php3");
|
require("lib.inc.php3");
|
||||||
|
|
||||||
|
|
||||||
// set up default values
|
// set up default values
|
||||||
$view_bookmark = 0;
|
|
||||||
$sql_bookmark = isset($sql_bookmark) ? $sql_bookmark : "";
|
|
||||||
$sql_query = isset($sql_query) ? $sql_query : "";
|
$sql_query = isset($sql_query) ? $sql_query : "";
|
||||||
$sql_file = isset($sql_file) ? $sql_file : "none";
|
$sql_file = isset($sql_file) ? $sql_file : "none";
|
||||||
|
|
||||||
|
|
||||||
// Bookmark Support
|
|
||||||
if(!empty($id_bookmark)) {
|
|
||||||
switch($action_bookmark) {
|
|
||||||
case 0:
|
|
||||||
$sql_query = query_bookmarks($db, $cfgBookmark, $id_bookmark);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
$sql_query = query_bookmarks($db, $cfgBookmark, $id_bookmark);
|
|
||||||
$view_bookmark = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
$sql_query = delete_bookmarks($db, $cfgBookmark, $id_bookmark);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($sql_file != "none") {
|
if($sql_file != "none") {
|
||||||
// do file upload
|
// do file upload
|
||||||
if(!empty($sql_file) && $sql_file != "none" && ereg("^php[0-9A-Za-z_.-]+$", basename($sql_file))) {
|
if(ereg("^php[0-9A-Za-z_.-]+$", basename($sql_file))) {
|
||||||
$sql_query = fread(fopen($sql_file, "r"), filesize($sql_file));
|
$sql_query = fread(fopen($sql_file, "r"), filesize($sql_file));
|
||||||
if (get_magic_quotes_runtime() == 1) $sql_query = stripslashes($sql_query);
|
if (get_magic_quotes_runtime() == 1) $sql_query = stripslashes($sql_query);
|
||||||
}
|
}
|
||||||
@@ -75,5 +54,5 @@ if($sql_query != "") {
|
|||||||
// copy the original query back for display purposes
|
// copy the original query back for display purposes
|
||||||
$sql_query = $sql_query_cpy;
|
$sql_query = $sql_query_cpy;
|
||||||
$message = $strSuccess;
|
$message = $strSuccess;
|
||||||
include("db_details.php3");
|
require("db_details.php3");
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user