Ejemplo n.º 1
0
    }
    Header("Location: {$location}");
}
/**
 * Process: Update Action Selected
 */
if (isset($_POST['tntBtnAct'])) {
    $tntVid = new TNT_Video();
    $tntAction = $_POST["tntActions"];
    $arrVideoID = $_POST["tntChkVideos"];
    $tntResult = true;
    switch ($tntAction) {
        case 1:
            foreach ($arrVideoID as $vID) {
                if ($vID) {
                    $tntVid->tntGetVideo($vID);
                    $tntVid->videoStatus = 1;
                    $tntVid->tntUpdateVideo();
                } else {
                    $tntResult = false;
                    break;
                }
            }
            break;
        case 2:
            foreach ($arrVideoID as $vID) {
                if ($vID) {
                    $tntVid->tntGetVideo($vID);
                    $tntVid->videoStatus = 0;
                    $tntVid->tntUpdateVideo();
                } else {
Ejemplo n.º 2
0
/**
 * Function to display the "delete video" page
 */
function tnt_video_del()
{
    ?>
		<div class="wrap">
			<?php 
    screen_icon('edit');
    ?>
			<h2>Delete Video</h2>
			<?php 
    $v = new TNT_Video();
    $videoID = isset($_GET['videoID']) ? $_GET['videoID'] : 0;
    if ($videoID != 0) {
        $v->tntGetVideo($videoID);
    } else {
        wp_die("videoID not found");
    }
    ?>
			<form method="POST" action="">
				<input type="hidden" name="vID" value="<?php 
    echo $v->videoID;
    ?>
" />
				<div style="padding-bottom: 10px;">
					<p>Do you want to delete the video <a href="<?php 
    echo $v->videoLink;
    ?>
"><?php 
    echo $v->videoTitle;
    ?>
</a> ?</p>
					<input type="submit" name="tntDelVideo_Yes" class="button-secondary" value="Yes" />
					<input type="submit" name="tntDelVideo_No" class="button-secondary" value="No" />
				</div>
			</form>
		</div>
	<?php 
}