예제 #1
0
    $c->videoCatTitle = $_POST["catTitle"];
    $t->videoCatParent = 0;
    if ($c->tntInsertVideoCat()) {
        $location = add_query_arg(array('m' => 1));
    } else {
        $location = add_query_arg(array('m' => 0));
    }
    Header("Location: {$location}");
}
/**
 * Process: Edit Video Category
 */
if (isset($_POST['tntEditVideoCat'])) {
    $catID = $_POST["catID"];
    $c = new TNT_VideoCat();
    $c->tntGetCat($catID);
    $c->videoCatTitle = $_POST["catTitle"];
    if ($c->tntUpdateVideoCat() >= 0) {
        $location = add_query_arg(array('m' => 1));
    } else {
        if ($t->tntUpdateVideoType() == false) {
            $location = add_query_arg(array('m' => 0));
        }
    }
    Header("Location: {$location}");
}
/**
 * Process: Delete Video Category (Click Yes)
 */
if (isset($_POST['tntDelVideoCat_Yes'])) {
    $location = admin_url() . "/admin.php?page=tnt_video_cat_manager_page";
예제 #2
0
/**
 * Function to display the "delete video cat" page
 */
function tnt_video_cat_del()
{
    ?>
		<div class="wrap">
			<?php 
    screen_icon('edit');
    ?>
			<h2>Delete Video Category</h2>
			<?php 
    $c = new TNT_VideoCat();
    $catID = isset($_GET['catID']) ? $_GET['catID'] : 0;
    if ($catID != 0) {
        $c->tntGetCat($catID);
    } else {
        wp_die("catID not found");
    }
    ?>
			<form method="POST" action="">
				<input type="hidden" name="catID" value="<?php 
    echo $c->videoCatID;
    ?>
" />
				<div style="padding-bottom: 10px;">
					<p>Do you want to delete the video type "<?php 
    echo $c->videoCatTitle;
    ?>
" ? </p>
					<input type="submit" name="tntDelVideoCat_Yes" class="button-secondary" value="Yes" />
					<input type="submit" name="tntDelVideoCat_No" class="button-secondary" value="No" />
				</div>
			</form>
		</div>
	<?php 
}