require("include/top.php");
if ($which && ($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator')):
// check the submitted data
unset($submitok);
if($name)
{
// check user account
if(!session_is_registered("SESSION"))
$errormessage[]="you need to be logged in first.";
if(($SESSION_LEVEL!='administrator')&&($SESSION_LEVEL!='moderator')&&($SESSION_LEVEL!='gloperator'))
$errormessage[]="you need to be a lobster god to edit a group.";
// check prod id
$result=mysql_query("SELECT count(0) FROM groups WHERE id=$which");
if(mysql_result($result,0)!=1)
$errormessage[]="I can't find the group you are trying to modify";
// if everything is ok
if(!$errormessage)
$submitok=true;
}
// insert the submitted prod
if($submitok){
$query = "UPDATE groups SET ";
$query.= "name='".$name."'";
if($web) {
$query.= ", web='".$web."'";
} else {
$query.= ", web=NULL";
}
if($acronym) {
$query.= ", acronym='".$acronym."'";
} else {
$query.= ", acronym=NULL";
}
$query.= ", csdb=".((int)$csdb);
$query.= ", zxdemo=".((int)$zxdemo);
$query.= " WHERE id=$which LIMIT 1";
mysql_query($query);
logGloperatorAction("group_edit",$which);
}
// get data to build the page
$result = mysql_query("SELECT * FROM groups WHERE id=$which");
$prod = mysql_fetch_assoc($result);
?>
the lobster says "NO ENTRANCE!"
you need god priveligies to access this place.
it's also possible that you forgot a ?which=xxx
else: ?>