".$lang['nash6116']."

"; } else { if ($fee['wantedad_fee']>0&&freeFees($s_memberid)==FALSE) { $payment_status = "unconfirmed"; $active = 0; } else { $payment_status = "confirmed"; $active = 1; addwantedcount($_REQUEST['category']); addwantedcount($_REQUEST['addlcategory']); } $additem = addSqlRow("user","INSERT INTO nash_wanted_ads (itemname, description, duration, country, zip, category, startdate, enddate, keywords, addlcategory, active, payment_status, ownerid) VALUES ('".$name."','".$description."','".$_REQUEST['duration']."','".$_REQUEST['country']."','".$_REQUEST['zip']."','".$_REQUEST['category']."','".$timeNowOffset."','".$closingdate."','".$keywords."','".$_REQUEST['addlcategory']."','".$active."','".$payment_status."','".$s_memberid."')"); $wantedadidx = $additem; if ($fee['wantedad_fee']>0&&freeFees($s_memberid)==FALSE) wantedAdFee($wantedadidx); else echo "

".$lang['nash6116']."

"; } $getFields = getSqlResults("user","SELECT DISTINCT f.boxid AS f_boxid, f.boxname AS f_boxname, f.boxtype AS f_boxtype, f.boxcaption AS f_boxcaption, f.active AS f_active, f.mandatory AS f_mandatory, f.groupid AS f_groupid, f.allow_multiple AS f_allow_multiple FROM nash_wanted_fields AS f, nash_wanted_field_groups AS g WHERE (f.categoryid='".$mainCat_primary."' OR f.categoryid='".$_REQUEST['category']."' OR f.categoryid='0') AND f.active=1 AND f.groupid=g.id AND g.lang='".$s_sess_lang."' ORDER BY f.fieldorder ASC"); if ($mainCat_secondary>0||$_REQUEST['addlcategory']>0) $getFields = getSqlResults("user","SELECT DISTINCT f.boxid AS f_boxid, f.boxname AS f_boxname, f.boxtype AS f_boxtype, f.boxcaption AS f_boxcaption, f.active AS f_active, f.mandatory AS f_mandatory, f.groupid AS f_groupid, f.allow_multiple AS f_allow_multiple FROM nash_wanted_fields AS f, nash_wanted_field_groups AS g WHERE (f.categoryid='".$mainCat_primary."' OR f.categoryid='".$_REQUEST['category']."' OR f.categoryid='".$mainCat_secondary."' OR f.categoryid='".$_REQUEST['addlcategory']."' OR f.categoryid='0') AND f.active=1 AND f.groupid=g.id AND g.lang='".$s_sess_lang."' ORDER BY f.fieldorder ASC"); if (count($getFields)>0) { $delFields = removeSqlRow("user","DELETE FROM nash_wanted_fields_data WHERE wantedadid='".$wantedadidx."' AND ownerid='".$s_memberid."'"); $collectMandatoryFields = ""; $countMandatoryFields = 0; foreach($getFields as $fields) { if ($fields['f_boxtype']=="checkbox") { $box_value = ""; $maxNumber = count($_REQUEST['box'.$fields['f_boxid']]); for ($i=0;$i<$maxNumber;$i++) { if (trim($_REQUEST['box'.$fields['f_boxid']][$i])!=""&&trim($_REQUEST['box'.$fields['f_boxid']][$i])!=";") { $box_value .= $_REQUEST['box'.$fields['f_boxid']][$i]."; "; }}} else { $box_value = $_REQUEST['box'.$fields['f_boxid']]; } $addFieldData = addSqlRow("user","INSERT INTO nash_wanted_fields_data (wantedadid, ownerid, boxid, boxvalue, boxcaption) VALUES ('".$wantedadidx."','".$s_memberid."','".$fields['f_boxid']."','".remSpecialChars(trim($box_value))."','".$fields['f_boxcaption']."')"); if ($fields['mandatory']==1) { $collectMandatoryFields .= "\"mandatobox".$fields['boxid']."\","; $countMandatoryFields++; }} if ($countMandatoryFields>0) $collectMandatoryFields = substr($collectMandatoryFields,0,-1); } $tempNumber = md5(uniqid(rand(2,999999999))); if ($_FILES['file']['name']!=""||$_REQUEST['mainpicurl']!="") { $imgMaxSize = $setts['pic_gal_max_size']*1024; if ($_FILES['file']['size']<$imgMaxSize||$_REQUEST['mainpicurl']!="") { if (preg_match("/^http:\/\//is",$oldMainImage)==0) deleteFile("",$oldMainImage); if ($_REQUEST['mainpicurl']!="") { $imageName = "http://".str_replace("http://","",$_REQUEST['mainpicurl']); $updateAuction = editSqlRow("user","UPDATE nash_wanted_ads SET picpath='".$imageName."' WHERE id='".$wantedadidx."' AND ownerid='".$s_memberid."'"); } else { $fileExtension = getFileExtension($_FILES['file']['name']); $imageName = "waad".$s_memberid."_".$tempNumber."_mainpic.".$fileExtension; $isUpload = uploadFile($_FILES['file']['tmp_name'],$imageName,"uplimg/"); $imageName = "uplimg/".$imageName; if ($isUpload==TRUE) { $updateAuction = editSqlRow("user","UPDATE nash_wanted_ads SET picpath='".$imageName."' WHERE id='".$wantedadidx."' AND ownerid='".$s_memberid."'"); $isPhotoshoped = photoshopFile($imageName,"uplimg/"); if ($setts['is_remote_pic_linkage']==1) { list($a,$z) = explode("uplimg/",$imageName); $isFTP = ftp_file($imageName,$z); if ($isFTP) { $remotePicName = $setts['remote_pic_linkage'].$z; $updateAuction = editSqlRow("user","UPDATE nash_wanted_ads SET picpath='".$remotePicName."' WHERE id='".$wantedadidx."' AND ownerid='".$s_memberid."'"); }}}}} else { echo $lang['auc_errpicsize1']." ".$setts['pic_gal_max_size']." kb
".$lang['auc_errpicsize2']."
"; }} if ($setts['is_tinyurls']==1) tinyurl_builder("w",$wantedadidx,trim($_REQUEST['name'])); $link = "membersarea.php?page=cma_wanted"; echo ""; } else if (!isset($_REQUEST['submit_button1'])&&$_REQUEST['action']!="submit_wanted_ad"&&$_REQUEST['mode']!="similar"&&(($_REQUEST['mode']!="edit"&&$_REQUEST['revcats']!=1)||($_REQUEST['mode']=="edit"&&$_REQUEST['revcats']==1))) { ?>
#
0) { $isPic = getSqlNumber("user","SELECT id FROM nash_wanted_ads WHERE picpath='".$ad['picpath']."'"); if (!$isPic) @unlink($_REQUEST['mainpic']); $remPicDb = editSqlRow("user","UPDATE nash_wanted_ads SET picpath='' WHERE id='".$_REQUEST['id']."' AND ownerid='".$s_memberid."'"); $ad['picpath'] = ""; }} if ($_REQUEST['mode']=="edit"&&$isAd==0) { echo "

".$lang['editauctionerror1']."

\n"; echo "

".$lang['editreditectmsg']."

"; } else if ($_REQUEST['mode']=="edit"&&$ad['nrbids']>0) { echo "

".$lang['editauctionerror2']."

\n"; echo "

".$lang['editreditectmsg']."

"; } else { $adEdit['itemname'] = (trim($_REQUEST['name'])!="")?$_REQUEST['name']:$ad['itemname']; $adEdit['description'] = (trim($_REQUEST['description_main'])!="")?remSpecialChars($_REQUEST['description_main']):$ad['description']; $adEdit['category'] = ($_REQUEST['category']>0)?$_REQUEST['category']:$ad['category']; $adEdit['addlcategory'] = ($_REQUEST['addlcategory']>0)?$_REQUEST['addlcategory']:$ad['addlcategory']; $mainCat_primary = getMainCat($adEdit['category']); $mainCat_secondary = getMainCat($adEdit['addlcategory']); $adEdit['duration'] = (trim($_REQUEST['duration'])!="")?$_REQUEST['duration']:$ad['duration'];?>
: 0)?(int)$_REQUEST['rev_category']:(int)$adEdit['category']; $nav = ""; $cntr = 0; if ($parent>0) { $croot = $parent; while ($croot>0) { $crw = getSqlRow("user","SELECT id,parent FROM nash_categories WHERE id='".$croot."'"); if ($cntr==0) { $nav = $c_lang[$crw['id']]; } else { if ($parent!=$croot) $nav = $c_lang[$crw['id']]." > ".$nav; } $cntr++; $croot = $crw['parent']; }} echo $nav;?>   #   
:
: