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;
    }
}
Example #2
0
    }
    foreach ($tags as $id) {
        $tag = new MWTag($id);
        if ($tag->isNew()) {
            continue;
        }
        $tag->update_posts();
    }
    redirectMsg('tags.php?page=' . $page, __('Tags updated!', 'mywords'), 0);
}
$action = rmc_server_var($_REQUEST, 'action', '');
switch ($action) {
    case 'new':
        save_tag(false);
        break;
    case 'saveedit':
        save_tag(true);
        break;
    case 'edit':
        edit_form();
        break;
    case 'delete':
        delete_tag();
        break;
    case 'update':
        update_tag();
        break;
    default:
        show_tags();
        break;
}
Example #3
0
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;
    }
}