require("include/top.php");
unset($submitok);
// check the submitted data
if($zxdemoflag)
{
// 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 groups WHERE id=".$which;
$result = mysql_query($query);
if(!mysql_result($result,0))
$errormessage[] = "This group has been lobstercized long ago (\/) -_- (\/) *clack clack clack*";
// check if zxdemo for this prod already exists
$query = "SELECT zxdemo FROM groups WHERE id=".$which;
$result = mysql_query($query);
if(mysql_result($result,0)>0)
$errormessage[] = "zxdemo for this group already exists (\/) O_o (\/)";
// if everything is ok
if(!$errormessage)
$submitok=true;
}
if($submitok){
$query ="update groups set zxdemo=".((int)$zxdemoflag)." where id=".$which;
mysql_query($query);
}
?>