Bookmark : 'executer' option

This commit is contained in:
Armel Fauveau
2001-05-11 20:32:08 +00:00
parent 48872783fc
commit 51c73a30e6
2 changed files with 14 additions and 14 deletions

View File

@@ -84,8 +84,9 @@ if($cfgBookmark['db'] && $cfgBookmark['table'])
echo "<option value=\"".htmlentities($value)."\">".htmlentities($key)."</option>\n";
}
echo "</select>\n";
echo "<input type=\"radio\" name=\"action_bookmark\" value=\"0\">".$strBookmarkView;
echo "<input type=\"radio\" name=\"action_bookmark\" value=\"1\">".$strDelete;
echo "<input type=\"radio\" name=\"action_bookmark\" value=\"0\" checked>".$strSubmit;
echo "<input type=\"radio\" name=\"action_bookmark\" value=\"1\">".$strBookmarkView;
echo "<input type=\"radio\" name=\"action_bookmark\" value=\"2\">".$strDelete;
echo "<br>\n";
}
}

View File

@@ -14,19 +14,18 @@ include("lib.inc.php3");
// Bookmark Support
if(!empty($id_bookmark)) {
if(!empty($action_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);
break;
case 2:
$sql_query = delete_bookmarks($db, $cfgBookmark, $id_bookmark);
break;
}
}
else
$sql_query = query_bookmarks($db, $cfgBookmark, $id_bookmark);
}
//
@@ -39,7 +38,7 @@ else if (get_magic_quotes_gpc()) {
$pieces = split_string($sql_query, ";");
if (count($pieces) == 1 && !empty($pieces[0]) && empty($action_bookmark)) {
if (count($pieces) == 1 && !empty($pieces[0]) && $action_bookmark==0) {
$sql_query = addslashes(trim($pieces[0]));
// Enforce reloading of the left frame when a table has to be created
if (eregi('^CREATE TABLE (.+)', $sql_query)) {