} /** * Process: Delete Video Type (Click Yes) */ if (isset($_POST['tntDelVideoType_Yes'])) { $location = admin_url() . "/admin.php?page=tnt_video_type_manager_page"; $t = new TNT_VideoType(); $t->videoTypeID = $_POST["typeID"]; //Update status of videos have typeID deleted into 0 (unpubslished) $args = array('typeID' => $t->videoTypeID); $videos = TNT_Video::tntGetVideos($args); if ($videos != null) { wp_die("This type is having videos"); } else { //Delete video type $t->tntDeleteVideoType(); } Header("Location: {$location}"); } /** * Process: Delete Video Type (Click No) */ if (isset($_POST['tntDelVideoType_No'])) { $location = admin_url() . "/admin.php?page=tnt_video_type_manager_page"; Header("Location: {$location}"); } /** * Process: Insert Video Category */ if (isset($_POST['tntAddVideoCat'])) { $c = new TNT_VideoCat();