Location: PHPKode > projects > Coxiar Media Platform > coxiar_productions/cpanel/modify_video.php
<?php
set_time_limit(0);
session_start();
include("../db.php");
require_once '../widget/widget_categories.php';
require_once '../date.inc';
if(isset($_SESSION['logged_in']) != true) 	exit; 

$dat = new ShowDate(true);
$Categories = new Widget_Categories();
$VideoId = (isset($_GET['video_id'])) ? $_GET['video_id'] : '';
$Msg = '';
if ( isset($_POST['TheFunction']) ){
		$VideoId = $_POST['ttid'];
	   	$sql = 'Update `videos` Set `video_title` = "'.$_POST['ttitle'].'" '.
							', `video_date` = "'.$_POST['TheYear'].'-'.$_POST['TheMonth'].'-'.$_POST['TheDay'].'" '.
							//', `video_url` = "'.$uploadfile_date.'/'.$uploadfile_temp.'" '.
							', `category_id` = "'.$_POST['tcategory_id'].'" '.
							', `video_desc` = "'.$_POST['tvideo_desc'].'"';
							//', `taken_by` = "'.$_POST['ttaken_by'].'"';
		$sql .= " Where `video_id` = '".$VideoId."'";
		mysql_query($sql);
		
		$Msg = 'Your video has been modified. You can view the video <a href="../video.php?video_id='.$VideoId.'">here</a>';
	
}
	
	$sql = 'Select * from `videos` Where `video_id` = "'.$VideoId.'"';
	$result = mysql_query($sql);
	$row = mysql_fetch_assoc($result);
?>
<html>
<head>
<style type="text/css">
<!--
body {
	background-color: black;
}
h1{
font-size:20px;
font-family:Arial, Helvetica, sans-serif;
}
div, td, tr, table, p{
font-size:10px;
font-family:Arial, Helvetica, sans-serif;
color:white;
}
a:link {
	color:white;
	text-decoration: underline;
}
a:visited {
	color:white;
	text-decoration: underline;
}
a:hover {
	text-decoration: underline;
	color:white;
}
a:active {
	text-decoration: underline;
	color:white;
}
input{

font-size:10px;
font-family:Tahoma;
}
-->
</style>
</head>
<body>
<br>

<form name="DataEntry" method="post" action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data">
  <input type="hidden" name="TheFunction" value="1">
  <input type="hidden" name="ttid" value="<?=$VideoId?>">
  <p>&nbsp;</p>
  <div align="center">
    <?=$Msg ?>
    <table width="230" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2"><div align="center"><img src="../images/easy_tms.php?text=<?= urlencode('Modify Video') ?>&font_size=12"><br><br></div></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center"><img src="../videos/thumbnail.php?video_id=<?=$VideoId?>"><br><br></div></td>
      </tr>
      <tr>
        <td><img src="../images/easy_tms.php?text=<?=urlencode('Video Title:')?>&font_size=10"></td>
        <td><input type="text" name="ttitle" size="30" maxlength="120" value="<?= htmlentities($row['video_title']) ?>"/></td>
      </tr>
      <tr>
        <td><img src="../images/easy_tms.php?text=<?=urlencode('Video Date:')?>&font_size=10"></td>
        <td><?= $dat->DayMonthYear_Date( 'TheDay', 'TheMonth', 'TheYear', $row['video_date']);?></td>
      </tr>
      <tr>
        <td><img src="../images/easy_tms.php?text=<?=urlencode('Video Description:')?>&font_size=10"></td>
        <td>
		<textarea rows="6" cols="56" name="tvideo_desc" style="font-size:10px; font-family:Arial;"><?= htmlentities($row['video_desc']) ?></textarea>
	</td>
      </tr>
<!--
      <tr>
        <td><img src="../images/easy_tms.php?text=<?=urlencode('This video was taken by:')?>&font_size=10"></td>
        <td><input type="text" name="ttaken_by" size="62" maxlength="30" value="<?= htmlentities($row['taken_by']) ?>"/></td>
      </tr>
-->
      <tr>
        <td><img src="../images/easy_tms.php?text=<?=urlencode('Video Category')?>&font_size=10"></td>
        <td><?=$Categories->Videos_Combobox('tcategory_id', $row['category_id'])?></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center"><a href="javascript:document.DataEntry.submit();"><br><br<img src="../images/easy_tms.php?text=Submit&font_size=12" border="0"></a></div></td>
      </tr>
      </table>
  </div>
  <p align="center">&nbsp;</p>
</form>
</body>
</html>
Return current item: Coxiar Media Platform