Code:
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKEC_STATE."</b></td><td width=\"5\">:</td><td><input type=\"text\" name=\"state\" size=\"25\"></td></tr>\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKEC_COUNTRY."</b></td><td width=\"5\">:</td><td><input type=\"text\" name=\"country\" size=\"25\"></td></tr>\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKEADSPOSTFOR." </b></td><td width=\"5\">:</td><td>\n"
."<select name=\"postfor\">\n";
buildduration($sel="");
echo "</select></td></tr>\n";
if ($UploadImg) {
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECADSUPLOAD."</b></td><td width=\"5\">:</td>\n"
."<td><input type=\"file\" name=\"fileupload\" size=\"40\"></td></tr>\n";
} else {
echo "<input type=\"hidden\" name=\"fileupload\" value=\"\">";
}
if ($multilingual) {
echo "<TR><TD><b>"._NUKECLANGUAGE."</b></td><TD><b>:</b></td><TD>";
echo "<select name=\"adslanguage\">\n";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($i=0; $i < sizeof($languageslist); $i++) {
if($languageslist[$i]!="") {
echo "<option value=\"$languageslist[$i]\" ";
if($languageslist[$i]==$currentlang) echo "selected";
echo ">".ucfirst($languageslist[$i])."</option>\n";
}
}
echo "</select></td></tr>";
} else {
echo "<input type=\"hidden\" name=\"adslanguage\" value=\"\">\n";
}
echo "<TR><TD colspan=\"3\"><input type=\"submit\" value=\""._NUKECSUBMIT."\"></td></tr>";
echo "<input type=\"hidden\" name=\"op\" value=\"SubmitAds\">";
echo "</form>";
echo "</table>";
}
} else {
echo "<center><font class=\"title\">"._NUKECPOSTNEWADS."</font></center><BR>\n";
printnotallowforanonymouse();
}
CloseTable();
include("footer.php");
}
function SubmitAds($submitteruid,$title, $cdesc, $catgforprocess, $AdsCurr, $price, $website, $email, $city, $state, $country, $postfor, $fileupload, $adslanguage, $fileupload, $fileupload_name, $fileupload_type, $fileupload_size) {
global $nukecprefix,$dbi,$folder_name, $module_name, $multilingual, $currentlang;
global $AdsTitleLength, $AdsContentLength, $MemberRequired, $PostInMainCatg, $cookie, $user, $UploadImg,$Waiting;
global $anonymous;
global $UploadPath,$cookie,$user,$DescLength,$UploadImg, $MaxImgSize, $MaxImgHeight, $MaxImgWidth,$MaxAllowedAds;
if ($submitteruid != 1) {
$jmladsposted = AdsPostedByUser($submitteruid,0,0,0);
if ($jmladsposted >= $MaxAllowedAds) {
$NotAllowedByJml = 1;
} else {
$NotAllowedByJml = 0;
}
if ($NotAllowedByJml == 1) {
header("Location:modules.php?name=".$module_name."&file=postads&id_catg=$catgforprocess");
die();
}
}
if (is_user($user) || ($MemberRequired == 0)) {
if ((!$title) || ($title == "") || (strlen($title) > $AdsTitleLength)) $errorTitle = 1;
if ((!$cdesc) || ($cdesc == "") || (strlen($cdesc) > $AdsContentLength)) $errorCdesc = 1;
if ((!$email) || ($email == "") || (strlen($email) == "")) $errorEmail1 = 1;
if ($submitteruid == 1) {
if ($email == "") {
$erroremailanony = 1;
}
}
if ($email != ""){
if (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$email)) $errorEmail = 1;
}
if ($UploadImg && ($fileupload != "") && ($fileupload != "none")) {
$imageadstype = basename($fileupload_type);
$UploadImageType = getImgType();
|