"; } else { // echo "no session id
"; header("Location: index.php"); exit; } require_once('Encoding.php'); use \ForceUTF8\Encoding; // It's namespaced now. ini_set("default_charset", "UTF-8"); //mb_internal_encoding("UTF-8"); //ini_set('display_errors', 1); //ini_set('display_startup_errors', 1); //error_reporting(E_ALL); $video_id = $_GET['v']; if(isset($_GET['logoff'])) { $_SESSION = array(); session_destroy(); header("Location: index.php"); exit; } //if(!$_SESSION['id']){ // header("Location: ./index.php"); // die(); // } $db = mysqli_connect ("localhost", "pack", "watch3r"); mysqli_select_db ($db, "pack"); mysqli_set_charset($db, 'utf8mb4'); // check if you own this video //$checker = mysqli_query("SELECT * FROM pack_engine LIMIT 1"); // while ($gather = mysqli_fetch_array($checker)) { //$enginestatus = $gather["status"]; // } // if($enginestatus == 'DOWN'){ // header("Location: ./index.php"); // die(); // } // if(!$_SESSION[id]){ // header("Location: ./index.php"); // die(); // } $videosystem = 0; $query = mysqli_query($db,"SELECT * FROM pack_song WHERE status LIKE '%PHASE%' order by status"); while ($gather = mysqli_fetch_array($query)) { $videosystem++; } $d = $_GET['d']; $rb = $_GET['rb']; $yt = $_GET['yt']; $dyt = $_GET['dyt']; $pri = $_GET['pri']; $pyt = $_GET['pyt']; $alv = $_GET['alv']; $dlv = $_GET['dlv']; $pm = $_GET['pm']; //$user_id = $_GET['id']; // Change from public to private. Should back this up with Session ID IF if ($pri) { $query = "UPDATE pack_song set privacy = '$pri' WHERE id = '$pyt'"; mysqli_query($db, $query); $video_id = $pyt; } #################################### // DELETE VIDEO FUNCTION: CHECKS IF YOU ARE THE OWNER ####################################### if ($d) { // Check to see if the user from the SESSION ID owns this video: $exchecker = mysqli_query($db, "SELECT * FROM pack_song WHERE id = '$d'"); while ($seesaw = mysqli_fetch_array($exchecker)) { $video_owner = $seesaw["user_id"]; } if ($video_owner = $user_id){ //echo "Video ID:" . $id; $result = mysqli_query($db, "SELECT * FROM pack_song WHERE id = '$d'"); while ($boo = mysqli_fetch_array($result)) { $music_file = $boo["music_file"]; $video_link = $boo["video_link"]; $archive_flag = $boo["metadata"]; } ## DELETE THE MUSIC FILE $dir = "/home/mvgen/public/mvgen.com/public/music_uploads/"; $file = $dir . $music_file; //echo $file; if (file_exists($file)) { unlink ($file); clearstatcache(); } ## DELETE THE OTHER MUSIC FILE $process_audio = substr($music_file,0,-4); $dir = "/home/mvgen/public/mvgen.com/public/music/"; $file3 = $dir . $process_audio . ".wav"; //echo $file; if (file_exists($file3)) { unlink ($file3); clearstatcache(); } ## DELETE THE VIDEO FILE if ($archive_flag){ $output = shell_exec("python /var/www/amazon_delete.py " . $d . " 2>&1" ); echo $output; } else { $dir = "/home/mvgen/public/mvgen.com/public/video/"; $file2 = $dir . $video_link; //echo $file2; if (file_exists($file2)) { unlink($file2); } } ## DELETE THE ENTRY IN THE DATABASE $query = "DELETE FROM pack_song WHERE id = '$d'"; mysqli_query($db, $query); } else { echo "YOU ARE NOT THE OWNER"; } } ################################################################# // DELETE YOUTUBE VIDEO // BROKEN ##################################################################### if ($dyt){ # get youtube ID link for deletions $query = mysqli_query($db, "SELECT * FROM pack_song WHERE id = '$dyt'"); while ($image_data = mysqli_fetch_array($query)) { $video_link = $image_data["youtube_link"]; } $stringOne = split("=",$video_link); $youtube_id = $stringOne[1]; $youtube_id = trim($youtube_id); echo $youtube_id; ################################################### ### We will need to check this out : the python script ######################################################### // $output = shell_exec("python /var/www/erase.py --id " . $youtube_id . " 2>&1" ); //echo $output; # update and wipe that youtubelink! //$query = "UPDATE pack_song set youtube_link = '' WHERE id = '$dyt'"; //mysqli_query($db, $query); } ############################################################################ // REBUILD THIS VIDEO ####################################################################### if ($rb) { $video_id = $rb; $ctitle = $_GET['title']; $cartist = $_GET['artist']; $cdatabase = $_GET['database']; $ccolor = $_GET['color']; $cspeed = $_GET['speed']; $ceffect = $_GET['effect']; $clens = $_GET['lens']; $cfilter = $_GET['filter']; $ctitlemode = $_GET['titlemode']; if ($ctitle){ $query = "UPDATE pack_song set title = '$ctitle' WHERE id = '$rb'"; mysqli_query($db, $query); } if ($cartist){ $query = "UPDATE pack_song set title = '$cartist' WHERE id = '$rb'"; mysqli_query($db, $query); } $prep = array($cdatabase , $ccolor , $cspeed, $ceffect, $cfilter, $clens, $ctitlemode); $options = implode(":" , $prep); $status = "INITIALIZATION PHASE: 0%"; $frame = "mvgen.gif"; mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$cfilter'"); mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$ccolor'"); mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$cspeed'"); mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$ceffect'"); mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$ctitlemode'"); mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$clens'"); mysqli_query($db,"UPDATE pack_filters set counter = counter + 1 WHERE filtername = '$csource'"); $query = "UPDATE pack_song set creation_date = NOW() WHERE id = '$rb' "; mysqli_query($db,$query); $query = "UPDATE pack_song set process_flag = 0 WHERE id = '$rb' "; mysqli_query($db,$query); $query = "UPDATE pack_song set status = '$status' WHERE id = '$rb'"; mysqli_query($db,$query); $query = "UPDATE pack_song set frame = '$frame' WHERE id = '$rb'"; mysqli_query($db,$query); $query = "UPDATE pack_song set options = '$options' WHERE id = '$rb'"; mysqli_query($db,$query); //$query = "UPDATE pack_song set process_flag = '0' WHERE id = '$rb'"; //mysqli_query($db, $query); } ############################################################################// REUPLOAD TO YOUTUBE! ######################################################################### if ($yt) { $output = shell_exec("python /var/www/youtube_upload_byid.py " . $yt . " 2>&1"); # debug echo $output; } if ($alv) { ## a list of updates from the form if its just title and artist, then dont change anything. $query = "UPDATE pack_song set live = '1' WHERE id = '$alv'"; mysqli_query($db, $query); $video_id = $alv; } if ($dlv) { ## a list of updates from the form if its just title and artist, then dont change anything. $query = "UPDATE pack_song set live = '0' WHERE id = '$dlv'"; mysqli_query($db, $query); $video_id = $dlv; } if ($pm) { ## a list of updates from the form if its just title and artist, then dont change anything. ## check if KEEP already is 4 ## this maybe costs credits! subtract 10 credits. When you get a subscription to MVGEN you get like 100 credits $query = "UPDATE pack_song set keep = '4' WHERE id = '$pm'"; mysqli_query($db, $query); $video_id = $pm; } ?> MVGEN: Video Manager: <? echo $title; ?>

by

VIDEO SETTINGS