コード例 #1
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) {
                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;
    }
}
コード例 #2
0
<?
$check_split = split($tagquery['tag'],$lftheme['content']);
$added = "";
while ($check_split['1']<>"") {
	$result_array="";
	$result_array=show_tag ($lftheme,  $tagquery['tag'], $tagquery['num'] , $tagquery, "array");	
	if ($result_array<>"") {

		include $table_file[$result_array['query']['2']]; 	// Including table file for $dBid
		$linkcol="";
		foreach ($result_array as $resName => $resValue) {	// For each result show a link
			
			if ($resName<>"query" AND $resName<>"set") { 	// For not showin result for settings
//						$lftheme['content'].= $resValue[$result_array['query']['5']]."<br>";
				if ($tag_block[$result_array['query']['5']]<>"yes") {
					
					$addstring = "</a><!-- linkcol ".$result_array['query']['2']."_".$result_array['query']['5']." -->"."<a href=\"system/lfredirect.php?&amp;where=".$dbid."&amp;equal=".$resValue[$dbid]."&amp;lfredirect=".$result_array['query']['2']."_".$result_array['query']['5']."\">". $resValue[$result_array['query']['5']]."</a><!-- linkcol_end ".$result_array['query']['2']."_".$result_array['query']['5']." -->";
					};
					// this if is dealing with the doubles issue...
				if ($added[$resValue[$result_array['query']['5']]]<>"yes") {
					$added[$resValue[$result_array['query']['5']]]="yes";
					$linkcol .= $addstring;
					};
				};
			};
		};
	//echo $result_array['set']['replacestring']."<br>";
	//echo $linkcol."<br>";
	$lftheme['content'] = str_replace($result_array['set']['replacestring'], $linkcol, $lftheme['content']);
	$check_split="";
	$check_split = split($tagquery['tag'],$lftheme['content']);
コード例 #3
0
<?
	$tagged = show_tag ($lftheme,  $tagquery['tag'],$tagquery['num'], $tagquery, "theme");
	while ($lftheme['content']<>$tagged['content']) {
		$lftheme['content'] = $tagged['content'];
		$tagged = show_tag ($lftheme,  $tagquery['tag'],$tagquery['num'], $tagquery, "theme");
		}

?>
コード例 #4
0
ファイル: Player.php プロジェクト: voquanghoa/WebPhim
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;
    }
}