/* 绠$悊鍛樻棩蹇 */ admin_log(addslashes($tag_name), 'remove', 'tag_manage'); $url = 'tag_manage.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']); ecs_header("Location: {$url}\n"); exit; } else { make_json_error($db->error()); } } elseif ($_REQUEST['act'] == "edit_tag_name") { check_authz_json('tag_manage'); $name = json_str_iconv(trim($_POST['val'])); $id = intval($_POST['id']); if (!tag_is_only($name, $id)) { make_json_error(sprintf($_LANG['tagword_exist'], $name)); } else { edit_tag($name, $id); make_json_result(stripslashes($name)); } } /** * 鍒ゆ柇鍚屼竴鍟嗗搧鐨勬爣绛炬槸鍚﹀敮涓€ * * @param $name 鏍囩?鍚 * @param $id 鏍囩?id * @return bool */ function tag_is_only($name, $tag_id, $goods_id = '') { if (empty($goods_id)) { $db = $GLOBALS['db']; $sql = 'SELECT goods_id FROM ' . $GLOBALS['ecs']->table('tag') . " WHERE tag_id = '{$tag_id}'";
$result = get_tag_item($tid); if (mysqli_num_rows($result) == 1) { $tag = mysqli_fetch_array($result, MYSQLI_ASSOC); } else { redirect_to('admin/list_tag.php'); } if ($_SERVER['REQUEST_METHOD'] == 'POST') { $errors = array(); // validate tag if (empty($_POST['tag'])) { $errors[] = "tag"; } else { $tag = mysqli_real_escape_string($dbc, strip_tags($_POST['tag'])); } if (empty($errors)) { $result = edit_tag($tid, $tag); if (mysqli_affected_rows($dbc) == 1) { echo "<script type='text/javascript'>\n alert('{$lang['AD_EDIT_GAME_SUCCESS']}');\n window.location = 'list_tag.php';\n </script>\n "; } else { echo "<script type='text/javascript'>\n alert('{$lang['AD_EDIT_FAIL']}');\n window.location = 'list_tag.php';\n </script>\n "; } } else { $error = $lang['AD_REQUIRED']; } } // END main IF submit condition } else { redirect_to('admin/list_tag.php'); } include '../includes/backend/header-admin.php'; ?>
function Tags_Spider_Video_Player() { global $wpdb; require_once "tag_functions.php"; // add functions for Spider_Video_Player require_once "tag_function.html.php"; // add functions for vive Spider_Video_Player if (isset($_GET["task"])) { $task = htmlspecialchars($_GET["task"]); } else { $task = "default"; } if (isset($_GET["id"])) { $id = htmlspecialchars($_GET["id"]); } else { $id = 0; } switch ($task) { case 'tag': show_tag(); break; case 'add_tag': add_tag(); break; case 'cancel_tag': cancel_tag(); break; case 'apply_tag': if ($id == 0) { check_admin_referer('nonce_sp_vid', 'nonce_sp_vid'); $save_or_no = save_tag(); } else { check_admin_referer('nonce_sp_vid', 'nonce_sp_vid'); $save_or_no = apply_tag($id); } if ($save_or_no) { edit_tag($id); } else { show_tag(); } break; case 'save_tag': if (!$id) { check_admin_referer('nonce_sp_vid', 'nonce_sp_vid'); save_tag(); } else { check_admin_referer('nonce_sp_vid', 'nonce_sp_vid'); apply_tag($id); } show_tag(); break; case 'saveorder': check_admin_referer('nonce_sp_vid', 'nonce_sp_vid'); saveorder(); break; case 'orderup': ordertag(-1); break; case 'orderdown': ordertag(1); break; case 'edit_tag': edit_tag($id); break; case 'remove_tag': $nonce_sp_vid = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) { die("Are you sure you want to do this?"); } remove_tag($id); show_tag(); break; case 'publish_tag': $nonce_sp_vid = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) { die("Are you sure you want to do this?"); } change_tag($id); show_tag(); break; case 'unpublish_tag': $nonce_sp_vid = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) { die("Are you sure you want to do this?"); } change_tag($id); show_tag(); break; case 'required_tag': $nonce_sp_vid = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) { die("Are you sure you want to do this?"); } required_tag($id); show_tag(); break; case 'unrequired_tag': $nonce_sp_vid = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) { die("Are you sure you want to do this?"); } required_tag($id); show_tag(); break; default: show_tag(); break; } }
function Tags_Spider_Video_Player() { global $wpdb; require_once "tag_functions.php"; // add functions for Spider_Video_Player require_once "tag_function.html.php"; // add functions for vive Spider_Video_Player if (isset($_GET["task"])) { $task = htmlspecialchars($_GET["task"]); } else { $task = "default"; } if (isset($_GET["id"])) { $id = htmlspecialchars($_GET["id"]); } else { $id = 0; } switch ($task) { case 'tag': show_tag(); break; case 'add_tag': add_tag(); break; case 'cancel_tag': cancel_tag(); break; case 'apply_tag': if ($id == 0) { $save_or_no = save_tag(); } else { $save_or_no = apply_tag($id); } if ($save_or_no) { edit_tag($id); } else { show_tag(); } break; case 'save_tag': if (!$id) { save_tag(); } else { apply_tag($id); } show_tag(); break; case 'saveorder': saveorder(); break; case 'orderup': ordertag(-1); break; case 'orderdown': ordertag(1); break; case 'edit_tag': edit_tag($id); break; case 'remove_tag': remove_tag($id); show_tag(); break; case 'publish_tag': change_tag($id); show_tag(); break; case 'unpublish_tag': change_tag($id); show_tag(); break; case 'required_tag': required_tag($id); show_tag(); break; case 'unrequired_tag': required_tag($id); show_tag(); break; default: show_tag(); break; } }