( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
require("./NewsSql.inc.php");
$db = new NewsSQL($dbname);
page_protect();
$VideoPath = "uploads/live/";
$live_img = 'uploads/images/';
$newsid = $db->base64url_decode($newsid);
$result = $db->getreportabyid($newsid);
$catalogid = $result[0]["catalogid"];
$title = $result[0]["title"];
$content = $result[0]["content"];
$viewnum = $result[0]["viewnum"];
$rating = $result[0]["rating"];
$picture = $result[0]["picture"];
$ratenum = $result[0]["ratenum"];
$episodeid = $result[0]["episodeid"];
$slug = $result[0]["slug"];
$keywords = $result[0]["keywords"];
$isdisplay = $result[0]["isdisplay"];
$description = $result[0]["description"];
$vcat = $result[0]["vcat"];
$summary = $result[0]["summary"];
$video = $result[0]["video"];
$thumb= $result[0]["thumb"];
?>
<html>
<head>
<title><?php print "$admin_newsadmin"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php print "$admin_charset"; ?>">
<link href="styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style4 {
font-size: 11px
}
-->
</style><script language="JavaScript" type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript" src="js/jquery.validate.js"></script>
<script>
$(document).ready(function(){
$("#myform").validate();
});
</script>
</head>
<body><?php
include 'header.php';
?>
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="300" valign="top"><?php ?><?php
include 'navigation.php';
?>
<p> </p>
<p> </p>
<p> </p>
<p> </p></td>
<td width="700" valign="top"><div style="padding:10px;">
<div class="wa">
<div class="wb">
<div class="wc">
<div class="wd">
<h3 class="titlehdr">Update content</h3>
<form action="home.php" name="myform" id="myform" method="POST" ENCTYPE="multipart/form-data">
<input type="hidden" name="newsid" value="<?php print "$newsid"; ?>">
<input type="hidden" name="catid" value="<?php print "$catid"; ?>">
<table width="566" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="700" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="122"><span class="style4 style4 style4"><?php print "$admin_title"; ?> :</span></td>
<td colspan="2"><input name="mytitle" class="required" type="text" id="mytitle" value="<?php print "$title"; ?>" size="50"></td>
</tr>
<tr>
<td><span class="style4 style4 style4">Description:(Short description )</span></td>
<td colspan="2"><span class="style4 style4 style4">
<input type="hidden" name="description" value="<? echo $_SESSION['user_name'];?>"> <textarea name="content" cols="50" rows="4" class="required"><?php print "$content"; ?></textarea>
</span></td>
</tr>
<tr>
<td colspan="3"><span class="style4 style4 style4">
<input type="hidden" name="catalogid" value="<? echo $_SESSION['euserid'];?>">
<input type="hidden" size="65" name="viewnum" value="<?php print "$viewnum"; ?>">
<input type="hidden" size="65" name="rating" value="<?php print "$rating"; ?>">
<input type="hidden" size="65" name="ratenum" value="<?php print "$ratenum"; ?>">
</span></td>
</tr>
<tr>
<td><?php /*?><span class="style4 style4 style4"><img src="<?php print "$live_img$picture"; ?>" /><br>
</span><?php */?></td>
<td colspan="2"><span class="style4"></span> </td>
</tr>
<tr>
<td><span class="style6 style6 style4 style4 style4">Category :</span></td>
<td width="159"><span class="style4 style4 style4">
<select name="vcat" class="required">
<?php
$nameinfo = $db->getallcategories();
if (!empty($nameinfo)){
while (list($key,$val)=each($nameinfo)) {
$tempcatalogid = stripslashes($val["categoryid"]);
$categoryname = stripslashes($val["categoryname"]);
if ($vcat==$tempcatalogid){
print "<option value=\"$tempcatalogid\" selected>$categoryname</option>";
}else{
print "<option value=\"$tempcatalogid\">$categoryname</option>";
}
}
}
?>
</select>
</span></td>
<td width="303">
<?php
$nameinfo = $db->getallepi();
if (!empty($nameinfo)){?>
<span class="style6">My Categories</span> <select name="episodeid">
<?php
if (!empty($nameinfo)){
while (list($key,$val)=each($nameinfo)) {
$catalogid = stripslashes($val["catalogid"]);
$theparentid = stripslashes($val["parentid"]);
$catalogname = stripslashes($val["catalogname"]);
if ($episodeid==$catalogid){
print "<option value=\"$catalogid\" selected>$catalogname</option>";
}else{ print "<option value=\"$catalogid\">$catalogname</option>";}
}
}
?>
</select>
<?php
}
?></td>
</tr>
<?php /*?> <tr>
<td><span class="style4 style4 style4"> Video : </span></td>
<td colspan="2"><input name="userfile" type="file" class="style4 style4"> </td>
</tr><?php */?>
<tr>
<td><span class="style4 style4 style4"><?php print "$admin_sourceurl"; ?> :</span></td>
<td colspan="2"><input name="keywords" type="text" class="style4 style4" value="<?php print "$keywords"; ?>" size="50"></td>
</tr>
<tr>
<td><!--<span class="style4 style4 style4">slug:</span>--></td>
<td colspan="2"><input name="slug" type="hidden" class="style4 style4" value="<?php print "$slug"; ?>" size="50"></td>
</tr>
<tr>
<td><span class="style4 style4 style4">Publish ?</span></td>
<td colspan="2"><span class="style4 style4 style4">
<select name="isdisplay">
<option value="10" selected>Editor's Choice</option>
<option value="11" selected>As Seen on TV</option>
<option value="12" selected>As Seen on Newspaper</option>
<?php
switch($isdisplay){
case "3":
?>
<option value="1" selected><?php print "$admin_yes"; ?></option>
<option value="0"><?php print "$admin_no"; ?></option>
<?php
break;
case "2":
?>
<option value="1" selected><?php print "$admin_yes"; ?></option>
<option value="0"><?php print "$admin_no"; ?></option>
<?php
break;
case "1":
?>
<option value="1" selected><?php print "$admin_yes"; ?></option>
<option value="0"><?php print "$admin_no"; ?></option>
<?php
break;
case "0":
?>
<option value="1"><?php print "$admin_yes"; ?></option>
<option value="0" selected><?php print "$admin_no"; ?></option>
<?php
break;
}
?>
</select>
</span> </td>
</tr>
</table>
<p>
<input name="editreporta" type="submit" class="large ezbutton green" style=" margin-top:2px;border:0px;width:105px; margin-right:5px" value="Finish">
</p></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div></td>
<td width="114" valign="top"> </td>
</tr>
<tr></tr>
</table>
</body>
</html>