-->*/ define('SAVE_URI', 'disabled'); require_once dirname(__FILE__) . '/../../common/connect/applyCredentials.php'; if (!is_logged_in()) { return; } require_once "actionMethods.php"; //require_once(dirname(__FILE__).'/../../common/php/dbMySqlWrappers.php'); //$reload_message = "\\n\\nInformation changes will be visible on reload of this page.\\nReloading will reset filters and selection.\\n\\n'OK' to reload, 'Cancel' to leave display as-is"; $res = null; // decode and unpack data if (@$_REQUEST['data']) { $data = json_decode(urldecode(@$_REQUEST['data']), true); switch (@$_REQUEST['action']) { case 'delete_bookmark': $res = delete_bookmarks($data); break; case 'add_wgTags_by_id': $res = add_wgTags_by_id($data); break; case 'remove_wgTags_by_id': $res = remove_wgTags_by_id($data); break; case 'add_tags': $res = add_tags($data); break; case 'remove_tags': $res = remove_tags($data); break; case 'bookmark_reference': $res = bookmark_references($data);
*/ define('SAVE_URI', 'disabled'); require_once dirname(__FILE__) . '/../../common/connect/applyCredentials.php'; if (!is_logged_in()) { return; } require_once dirname(__FILE__) . "/actionMethods.php"; $result = null; // decode and unpack data if (@$_REQUEST['data']) { //$data = json_decode(urldecode($_REQUEST['data']), true); $str = $_REQUEST['data']; $data = json_decode($str, true); switch (@$_REQUEST['action']) { case 'delete_bookmark': $result = delete_bookmarks($data); break; case 'add_wgTags_by_id': $result = add_wgTags_by_id($data); break; case 'remove_wgTags_by_id': $result = remove_wgTags_by_id($data); break; case 'add_tags': $result = add_tags($data); break; case 'remove_tags': $result = remove_tags($data); break; case 'bookmark_reference': $result = bookmark_references($data);
* Bookmark Support: get a query back from bookmark if required */ if (!empty($id_bookmark)) { switch ($action_bookmark) { case 0: // bookmarked query that have to be run $sql_query = query_bookmarks($db, $cfgBookmark, $id_bookmark); break; case 1: // bookmarked query that have to be displayed $sql_query = query_bookmarks($db, $cfgBookmark, $id_bookmark); $view_bookmark = 1; break; case 2: // bookmarked query that have to be deleted $sql_query = delete_bookmarks($db, $cfgBookmark, $id_bookmark); break; } } // end if /** * Prepares the sql query */ // Gets the query from a file if required if ($sql_file != 'none') { // loic1: php < 4.05 for windows seems not to list the regexp test // if (ereg('^php[0-9A-Za-z_.-]+$', basename($sql_file))) { if (file_exists($sql_file)) { $sql_query = fread(fopen($sql_file, 'r'), filesize($sql_file)); if (get_magic_quotes_runtime() == 1) { $sql_query = stripslashes($sql_query);