$_FILES["uploadedfile"]["size"] && $_FILES["uploadedfile"]["size"]>0) {
if (in_array("images",$GBupload)) if (getimagesize($_FILES["uploadedfile"]["tmp_name"]))
return "
";
if ($GBupload===true)
return "
"."๐ ".$Titles["AttachedFile"]."";
if (in_array(mb_strtolower(pathinfo($_FILES["uploadedfile"]["name"], PATHINFO_EXTENSION)),$GBupload))
return "
"."๐ ".$Titles["AttachedFile"]."";
} else return false;
return false;
}
function AddHttp($Link) {
if (!$Link=="") if (!preg_match("~^(?:f|ht)tps?://~i",$Link)) {
$Link = "http://".$Link;
}
return $Link;
}
function AddEntry() {
global $GBdata;
global $Titles;
global $PageStatus;
global $UploadedFile;
global $GBcityfield;
global $GBlinkfield;
global $GBsubjectfield;
global $GBcategoryfield;
global $GBstriptags;
if (!$GBstriptags) $NewEntry["name"]=$_POST["name"];
else $NewEntry["name"]=strip_tags($_POST["name"]);
if ($GBcityfield) {
if (!$GBstriptags) $NewEntry["from"]=$_POST["from"];
else $NewEntry["from"]=strip_tags($_POST["from"]);
} else $NewEntry["from"]="";
if ($GBlinkfield) {
if (!$GBstriptags) $NewEntry["link"]=AddHttp($_POST["link"]);
else $NewEntry["link"]=AddHttp(strip_tags($_POST["link"]));
} else $NewEntry["link"]="";
$NewEntry["email"]=$_POST["email"];
if (!$GBstriptags) $NewEntry["text"]=$_POST["text"];
else $NewEntry["text"]=strip_tags($_POST["text"]);
if ($UploadedFile) $NewEntry["text"]=$NewEntry["text"].$UploadedFile;
$NewEntry["datetime"]=time();
$NewEntry["response"]="";
if ($GBsubjectfield) {
if (!$GBstriptags) $NewEntry["subj"]=$_POST["subj"];
else $NewEntry["subj"]=strip_tags($_POST["subj"]);
} else $NewEntry["subj"]="";
if ($GBcategoryfield) $NewEntry["category"]=strip_tags($_POST["category"]);
else $NewEntry["category"]="";
if (isset($_SESSION["reply"])) {
$NewEntry["reply"]=$_SESSION["reply"][5];
unset($_SESSION["reply"]);
} else $NewEntry["reply"]="";
$NewEntry["number"]="";
$NewEntry["lock"]="";
$NewEntry["sticky"]="";
$fhandle=fopen($GBdata,"a");
fputcsv($fhandle,$NewEntry);
fclose($fhandle);
$PageStatus="added";
$_SESSION["captcha"]="";
}
function AddEntryView() {
global $Titles;
global $Values;
global $PageStatus;
global $GBcaptcha;
global $GBtextlenght;
global $GBupload;
global $GBcityfield;
global $GBlinkfield;
global $GBsubjectfield;
global $GBcategoryfield;
global $GBfilesize;
echo "