require("include/top.php");
if ( ($which&&$when) && ($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator')):
// extend years to 4 digits
$when = intval($when);
if ($when < 50) {
$when += 2000;
} elseif ($when < 100) {
$when += 1900;
}
// check the submitted data
unset($submitok);
if($which&&$when&&$id)
{
// 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 prod.";
// check prod id
$result=mysql_query("SELECT count(0) FROM partylinks WHERE party=$which AND year=$when");
if(mysql_result($result,0)!=1)
$errormessage[]="doesnt seem to exist....";
// check the download url
if($download)
{
$myurl=parse_url($download);
if(($myurl["scheme"]!="http")&&($myurl["scheme"]!="ftp"))
$errormessage[] = "only http and ftp protocols are supported for the download link";
if(strlen($myurl["host"])==0)
$errormessage[] = "missing hostname in the download link";
if(strstr($myurl["path"],"incoming"))
$errormessage[] = "the file you submitted is in an incoming path, try to find a real path";
if( ((($myurl["port"])!=80) && (($myurl["port"])!=0)) && ((strlen($myurl["user"])>0) || (strlen($myurl["pass"])>0)) )
$errormessage[] = "no private FTP please".$port;
}
// if everything is ok
if(!$errormessage)
$submitok=true;
}
// insert the submitted prod
if($submitok){
$query = "UPDATE partylinks SET ";
$query.= "download='".$download."', ";
$query.= "csdb=".((int)$csdb).", ";
$query.= "slengpung=".((int)$slengpung).", ";
$query.= "zxdemo=".((int)$zxdemo).", ";
$query.= "artcity='".($artcity)."' ";
$query.= "WHERE party=".$which." AND year=".$when." LIMIT 1";
mysql_query($query);
logGloperatorAction("partylinks_edit",$which);
}
// get data to build the page
$result=mysql_query("SELECT * FROM partylinks WHERE party=$which AND year=$when");
$links = 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: ?>