//node/182664
if(isset($_REQUEST['submit']))
{
$date=$_REQUEST['date'];
$qry="select * from magazine where date='".$date."'";

$res=db_query($qry);
$magazineid=db_result($res);
if($_REQUEST['submit'] == "Unpublish")
{
$upqry="update magazine set status='Unpublish' where id=".$magazineid;
$published="Unpublished";
}else{
$upqry="update magazine set status='published' where id=".$magazineid;
$published="Published";
}
if($magazineid != "")
{
//$upqry="update magazine set status='published' where id=".$magazineid;
db_query($upqry);
echo "

".$date." Issue is ".$published."

";
}else{

echo "

".$date." Issue not found.
Please upload the issue.

";
}

//UPDATE `newstatesmandev`.`magazine` SET `status` = 'unpublished' WHERE `magazine`.`id` =675;

//$qry="INSERT INTO magazine (name, date, special, source, status, path) VALUES('".$filename."', '".$date."', 0, 'magazine', 'unpublished', '".$path."')";

}

?>
 

Magzine Title:
Date (yyyy-mm-dd):