<?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();
$StillId = (isset($_GET['still_id'])) ? $_GET['still_id'] : '';
$Msg = '';
if ( isset($_POST['TheFunction']) ){
$StillId = $_POST['ttid'];
$sql = 'Update `stills` Set `still_title1` = "'.$_POST['ttitle1'].'" '.
', `still_title2` = "'.$_POST['ttitle2'].'" '.
', `still_date` = "'.$_POST['TheYear'].'-'.$_POST['TheMonth'].'-'.$_POST['TheDay'].'" '.
//', `still_url` = "'.$uploadfile_date.'/'.$uploadfile_temp.'" '.
', `category_id` = "'.$_POST['tcategory_id'].'" '.
', `still_desc` = "'.$_POST['tstill_desc'].'" '.
', `taken_by` = "'.$_POST['ttaken_by'].'"';
$sql .= " Where `still_id` = '".$StillId."'";
mysql_query($sql);
$Msg = 'Your still has been modified. You can view the still <a href="../view_still.php?still_id='.$StillId.'" target="_NEW">here</a>';
}
$sql = 'Select * from `stills` Where `still_id` = "'.$StillId.'"';
$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="<?=$StillId?>">
<p> </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 Still') ?>&font_size=12"><br><br></div></td>
</tr>
<tr>
<td colspan="2"><div align="center"><img src="../stills/thumbnail.php?still_id=<?=$StillId?>"><br><br></div></td>
</tr>
<tr>
<td><img src="../images/easy_tms.php?text=<?=urlencode('Still Title 1:')?>&font_size=10"></td>
<td><input type="text" name="ttitle1" size="30" maxlength="30" value="<?= htmlentities($row['still_title1']) ?>"/></td>
</tr>
<tr>
<td><img src="../images/easy_tms.php?text=<?=urlencode('Still Title 2:')?>&font_size=10"></td>
<td><input type="text" name="ttitle2" size="30" maxlength="30" value="<?= htmlentities($row['still_title2']) ?>"/></td>
</tr>
<tr>
<td><img src="../images/easy_tms.php?text=<?=urlencode('Still Date:')?>&font_size=10"></td>
<td><?= $dat->DayMonthYear_Date( 'TheDay', 'TheMonth', 'TheYear', $row['still_date']);?></td>
</tr>
<tr>
<td><img src="../images/easy_tms.php?text=<?=urlencode('Still Description:')?>&font_size=10"></td>
<td>
<textarea rows="6" cols="56" name="tstill_desc" style="font-size:10px; font-family:Arial;"><?= htmlentities($row['still_desc']) ?></textarea>
</td>
</tr>
<tr>
<td><img src="../images/easy_tms.php?text=<?=urlencode('This still 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('Still Category')?>&font_size=10"></td>
<td><?=$Categories->Stills_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"> </p>
</form>
</body>
</html>