require("include/top.php");
unset($submitok);
// check the submitted data
if($sceneorgflag)
{
// check user account
if(!$_SESSION["SESSION"]||!$_SESSION["SCENEID"])
$errormessage[]="you need to be logged in first.";
// check if this prod exists
$query = "SELECT count(0) FROM prods WHERE id=".$which;
$result = mysql_query($query);
if(!mysql_result($result,0))
$errormessage[] = "The lobster ate this prod for lunch (\/) o_O (\/) *clack clack clack*";
// check if sceneorg for this prod already exists
$query = "SELECT sceneorg FROM prods WHERE id=".$which;
$result = mysql_query($query);
if(mysql_result($result,0)>0)
$errormessage[] = "sceneorg for this prod already exists (\/) O_o (\/)";
// if everything is ok
if(!$errormessage)
$submitok=true;
}
if($submitok){
$query ="update prods set sceneorg=".((int)$sceneorgflag)." where id=".$which;
mysql_query($query);
}
?>