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(!isset($_SESSION['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 parties WHERE id=$which");
if(mysql_result($result,0)!=1)
$errormessage[]="I can't find the party you are trying to modify";
// if everything is ok
if(!$errormessage)
$submitok=true;
}
// insert the submitted prod
if($submitok){
$query = "UPDATE parties SET ";
$query.= "name='".$name."'";
if($web) {
$query.= ", web='".$web."'";
} else {
$query.= ", web=NULL";
}
$query.= " WHERE id=$which LIMIT 1";
mysql_query($query);
logGloperatorAction("party_edit",$which);
}
// get data to build the page
$result = mysql_query("SELECT * FROM parties WHERE id=$which");
$prod = mysql_fetch_assoc($result);
?>
the lobster says "aiiiiiiiiii cookie!"
you need to have more sex with dead lobsters to access this place.
it's also possible that you forgot a ?which=xxx
else: ?>