".$lang['nash5303']."

"; } else { if ($s_membersarea!="Active"&&$_SESSION[$setts['pk']."_classified"]['logined']!=TRUE) echo ""; if ($s_membersarea!="Active"||(int)$s_memberid==0) $user['email'] = $_SESSION[$setts['pk']."s_classified"]['s_email']; if ($user['enable_fbprivate']==1&&$setts['isfbprivate_allow_to_sell']==0) { ?>
0)?$mainCat_primary:0; $mainCat_secondary = getMainCatInClassads($_REQUEST['addlcategory']); $mainCat_secondary = (getSqlNumber("user","SELECT category_id FROM nash_fees WHERE category_id='".$mainCat_secondary."'")>0)?$mainCat_secondary:0; $fee = getSqlRow("user","SELECT * FROM nash_fees WHERE category_id='".$mainCat_primary."' AND destination_type='0'");?>
0) { $owneremail = $user['email']; $ownerid = $s_memberid; } else { $owneremail = $_SESSION[$setts['pk']."s_classified"]['s_email']; $ownerid = 0; } $extraQuery = ($s_membersarea=="Active"&&(int)$s_memberid>0)?" AND ownerid='".$s_memberid."'":" AND ownerid='0' AND owneremail='".$_SESSION[$setts['pk']."s_classified"]['s_email']."'"; $fullname = $_REQUEST['fullname']; $address = $_REQUEST['address']; $phone = $_REQUEST['phone']; $email = $_REQUEST['email']; $website = $_REQUEST['website']; $show_contact = $_REQUEST['show_contact']; $getWordFilter = getSqlResults("user","SELECT * FROM nash_wordfilter"); foreach($getWordFilter as $wordFilter) { if ($name!="") $name = str_replace(addSpecialChars($wordFilter['word']),"~",$name); if ($description!="") $description = str_replace(addSpecialChars($wordFilter['word']),"~",$description); } $keywords = $name." ".$description; $keywords = strip_tags(addSpecialChars($keywords)); $keywords = preg_replace(array('/[^-a-zA-Z~ ]/'),array(''),$keywords); $keywords = (trim($keywords)!="")?strtolower(trim($keywords)):""; if ($_REQUEST['mode']=="edit") { $oldMainImage = getSqlField("user","SELECT picpath FROM nash_classified WHERE id='".$_REQUEST['id']."'","picpath"); $updateitem = editSqlRow("user","UPDATE nash_classified SET itemname='".$name."', description='".$description."', duration='".$_REQUEST['duration']."', country= '".$_REQUEST['country']."', zip='".$_REQUEST['zip']."', category= '".$_REQUEST['category']."', startdate='".$timeNowOffset."', enddate='".$closingdate."', keywords='".$keywords."', fullname='".$fullname."', address='".$address."', phone='".$phone."', email='".$email."', show_contact='".$show_contact."', website='".$website."', offer_active='".$_REQUEST['offer_active']."', offer_range_min='".$_REQUEST['offer_range_min']."', offer_range_max='".$_REQUEST['offer_range_max']."', currency='".$_REQUEST['currency']."' WHERE id='".$_REQUEST['id']."'".$extraQuery.""); addclasscount($_REQUEST['category']); delclassifiedcount($_REQUEST['cat_prv']); delclassifiedcount($_REQUEST['addlcat_prv']); $classadidx = $_REQUEST['id']; $texter .= "

".$lang['nash6115']."

"; } else { if (($fee['classad_fee']>0||$fee['is_clad_dur_fee']=="Y"||($fee['classad_contactinfo_fee']>0&&$show_contact==1)||($fee['iconit_fee']>0&&$_REQUEST['iconit']!="000"))&&$s_membersarea=="Active"&&(int)$s_memberid>0&&freeFees($s_memberid)==FALSE) { $payment_status = "unconfirmed"; $active = 0; } else { $payment_status = "confirmed"; $active = 1; addclasscount($_REQUEST['category']); addclasscount($_REQUEST['addlcategory']); } $additem = addSqlRow("user","INSERT INTO nash_classified (itemname, description, duration, country, zip, category, active, startdate, enddate, closed, keywords, ownerid, owneremail, deleted, fullname, address, phone, email, show_contact, website, offer_active, offer_range_min, offer_range_max, currency, iconit) VALUES ('".$name."', '".$description."', '".$_REQUEST['duration']."', '".$_REQUEST['country']."', '".$_REQUEST['zip']."', '".$_REQUEST['category']."', '".$active."', '".$timeNowOffset."', '".$closingdate."', '0', '".$keywords."', '".$ownerid."', '".$owneremail."','0', '".$fullname."', '".$address."', '".$phone."', '".$email."', '".$show_contact."', '".$website."', '".$_REQUEST['offer_active']."', '".$_REQUEST['offer_range_min']."', '".$_REQUEST['offer_range_max']."', '".$_REQUEST['currency']."', '".$_REQUEST['iconit']."')"); $classadidx = $additem; if (isset($_SESSION[$setts['pk']."_classified"])) unset($_SESSION[$setts['pk']."_classified"]); if (isset($_SESSION[$setts['pk']."s_classified"])) unset($_SESSION[$setts['pk']."s_classified"]); if (($fee['classad_fee']>0||$fee['is_clad_dur_fee']=="Y"||($fee['classad_contactinfo_fee']>0&&$show_contact==1)||($fee['iconit_fee']>0&&$_REQUEST['iconit']!="000"))&&$s_membersarea=="Active"&&(int)$s_memberid>0&&freeFees($s_memberid)==FALSE) classAdFee($classadidx); $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_classads_fields AS f, nash_classads_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_classads_fields AS f, nash_classads_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_classads_fields_data WHERE auctionid='".$classadidx."' AND ownerid='".$s_memberid."'"); 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_classads_fields_data (auctionid, ownerid, boxid, boxvalue, boxcaption) VALUES ('".$classadidx."','".$s_memberid."','".$fields['f_boxid']."','".remSpecialChars(trim($box_value))."','".$fields['f_boxcaption']."')"); } $getItemKeywords = getSqlRow("user","SELECT * FROM nash_classified WHERE id='".$classadidx."'".$extraQuery.""); $getCustomFieldsKeywords = getSqlResults("user","SELECT * FROM nash_classads_fields_data WHERE auctionid='".$classadidx."'"); foreach($getCustomFieldsKeywords as $showCustomFieldsKeywords) $arraycustomkeywords[] = $showCustomFieldsKeywords['boxvalue']; $all_custom_words = implode(" ",$arraycustomkeywords); $combineKeywords = $getItemKeywords['keywords']." ".$all_custom_words; $combineKeywords = strip_tags(addSpecialChars($combineKeywords)); $combineKeywords = preg_replace(array('/[^a-zA-Z- ]/'),array(''),$combineKeywords); $combineKeywords = (trim($combineKeywords)!="")?strtolower(trim($combineKeywords)):""; $updateItemWithNewKeywords = editSqlRow("user","UPDATE nash_classified SET keywords='".$combineKeywords."' WHERE id='".$classadidx."'".$extraQuery.""); } $tempNumber = md5(uniqid(rand(2,999999999))); $imgMaxSize = $setts['pic_gal_max_size']*1024; if ($_FILES['file']['name']!=""||$_REQUEST['mainpicurl']!="") { 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']); $isUpload = true; } else { $fileExtension = getFileExtension($_FILES['file']['name']); $imageName = date('Y')."_clad".$s_memberid."_".$tempNumber."_mainpic.".$fileExtension; $isUpload = uploadFile($_FILES['file']['tmp_name'], $imageName, "uplimg/"); $imageName = "uplimg/".$imageName; } if ($isUpload==TRUE) { $updateAuction = editSqlRow("user","UPDATE nash_classified SET picpath='".$imageName."' WHERE id='".$classadidx."' 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_classified SET picpath='".$remotePicName."' WHERE id='".$classadidx."' AND ownerid='".$s_memberid."'"); }}}} else { $texter .= $lang['auc_errpicsize1']." ".$setts['pic_gal_max_size']." kb
".$lang['auc_errpicsize2']."
"; }} for ($i=0;$i<$setts['pic_gal_max_nb'];$i++) { if ($_FILES['addfile']['name'][$i]!=""||$_REQUEST['picurl'][$i]) { if ($_FILES['addfile']['size'][$i]<$imgMaxSize) { if ($_REQUEST['picurl'][$i]) $addImageName="http://".str_replace("http://","",$_REQUEST['picurl'][$i]); else { $fileExtension = getFileExtension($_FILES['addfile']['name'][$i]); $addImageName = date('Y')."_clad".$s_memberid."_".$tempNumber."_addpic".$i.".".$fileExtension; uploadFile($_FILES['addfile']['tmp_name'][$i],$addImageName,"uplimg/"); $addImageName = "uplimg/".$addImageName; } $insertImage = addSqlRow("user","INSERT INTO nash_classads_images (name,classad_id) VALUES ('".$addImageName."','".$classadidx."')"); $isPhotoshoped = photoshopFile($addImageName,"uplimg/"); if ($setts['is_remote_pic_linkage']==1) { $insertImageID = $insertImage; list($x,$y) = explode("uplimg/",$addImageName); $isFTP = ftp_file($addImageName,$y); if ($isFTP) { $remotePicName = $setts['remote_pic_linkage'].$y; $updateAuction = editSqlRow("user","UPDATE nash_classads_images SET name='".$remotePicName."' WHERE id='".$insertImageID."'"); }}} else { $texter .= "".$lang['error_a']." ".$lang['auc_errpicsize3']." #".($i+1)." ".$lang['auc_errpicsize4']." ".$setts['pic_gal_max_size']."kb ".$lang['img_or_error']."
"; }}} if ($setts['enable_digdel_classads']==1) { $isdigdel = getSqlField("user","SELECT isdigdel FROM nash_categories_classads WHERE id='".$mainCat_primary."'","isdigdel"); if ($isdigdel==1) { $tempNumber = md5(uniqid(rand(2,999999999))); if ($_FILES['matfile']['name']!="") { $fileMaxSize = ($setts['video_gal_max_size']>0)?($setts['video_gal_max_size']*1024):(50000*1024); if ($_FILES['matfile']['size']<$fileMaxSize) { if (preg_match("/^http:\/\//is",$oldMatFile)==0) deleteFile("",$oldMatFile); $fileExtension = getFileExtension2($_FILES['matfile']['name']); $fileName = date('Y')."_".$s_memberid."_".$tempNumber."_material.".$fileExtension; $isUpload = uploadFile($_FILES['matfile']['tmp_name'], $fileName, "downloads/"); $fileName = "downloads/".$fileName; if ($isUpload==TRUE) $updRow = editSqlRow("user","UPDATE nash_classified SET matpath='".$fileName."' WHERE id='".$classadidx."' AND ownerid='".$s_memberid."'"); } else { $texter .= $lang['nash3891']."
"; }}}} ?> 0) { ?>
0) { ?>
$_REQUEST['name'], 'id' => $classadidx))." "; $part2 = strtoupper($_REQUEST['name']); $part3 = " - ".$lang['nash5331']." "; $part4 = $path; list($a,$b) = explode("://",$part4); $part4 = substr($b,0,-1); $count_part1 = strlen($part1); $count_part2 = strlen($part2); $count_part3 = strlen($part3); $count_part4 = strlen($part4); $count_parts = ($count_part1+$count_part2+$count_part3+$count_part4); if ($count_parts>140) $part2 = substr($part2,0,-($count_parts-140)); $parts = $part1.$part2.$part3.$part4; if (strlen($parts)>140) $part1 = substr($part1,0,-(strlen($parts)-140)); $parts = $part1.$part2.$part3.$part4; if (strlen($parts)>0) $twitterResponseCode = post_tweet($setts['twitter_consumerKey'],$setts['twitter_consumerSecret'],$setts['twitter_oauth_token'],$setts['twitter_oauth_token_secret'],$parts); } if ($setts['isautoping']==1) doPingOMatic(ucfirst(trim($_REQUEST['name'])),$path.processLink('classified.details', array('itemname' => $_REQUEST['name'], 'id' => $classadidx))); if ($setts['is_tinyurls']==1) tinyurl_builder("c",$classadidx,trim($_REQUEST['name'])); if ($s_membersarea!="Active"||(int)$s_memberid==0) { echo "";exit(); }}} 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)?" AND ownerid='".$s_memberid."'":" AND ownerid='0' AND owneremail='".$_SESSION[$setts['pk']."s_classified"]['s_email']."'"; $ad = getSqlRow("user","SELECT * FROM nash_classified WHERE id='".$_REQUEST['id']."'".$extraQuery." AND closed='0' AND deleted!='1'"); $isAd = getSqlNumber("user","SELECT id FROM nash_classified WHERE id='".$_REQUEST['id']."'".$extraQuery." AND closed='0' AND deleted!='1'"); if (!empty($_REQUEST['deletepic'])) { if (preg_match("/mainpic/i",$_REQUEST['deletepic'])>0) { $isPic = getSqlNumber("user","SELECT id FROM nash_classified WHERE picpath='".$ad['picpath']."'"); if (!$isPic) @unlink($_REQUEST['mainpic']); $remPicDb = editSqlRow("user","UPDATE nash_classified SET picpath='' WHERE id='".$_REQUEST['id']."' AND ownerid='".$s_memberid."'"); $ad['picpath'] = ""; }} if ($_REQUEST['mode']=="edit"&&$isAd==0) { echo "

".$lang['editauctionerror1']."

"; 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 = ($mainCat_primary!="")?$mainCat_primary:getMainCatInClassads($adEdit['category']); $mainCat_secondary = ($mainCat_secondary!="")?$mainCat_secondary:getMainCatInClassads($adEdit['addlcategory']); $adEdit['duration'] = (trim($_REQUEST['duration'])!="")?$_REQUEST['duration']:$ad['duration']; if ($_REQUEST['mode']=="edit") { $country = $ad['country']; $zip = $ad['zip']; $adEdit['iconit'] = $ad['iconit']; $adEdit['offer_active'] = $ad['offer_active']; $adEdit['offer_range_min'] = $ad['offer_range_min']; $adEdit['offer_range_max'] = $ad['offer_range_max']; $_REQUEST['fullname'] = (trim($_REQUEST['fullname'])!="")?$_REQUEST['fullname']:$ad['fullname']; $_REQUEST['address'] = (trim($_REQUEST['address'])!="")?$_REQUEST['address']:$ad['address']; $_REQUEST['phone'] = (trim($_REQUEST['phone'])!="")?$_REQUEST['phone']:$ad['phone']; $_REQUEST['email'] = (trim($_REQUEST['email'])!="")?$_REQUEST['email']:$ad['email']; $_REQUEST['website'] = (trim($_REQUEST['website'])!="")?$_REQUEST['website']:$ad['website']; $_REQUEST['show_contact'] = (trim($_REQUEST['show_contact'])!="")?$_REQUEST['show_contact']:$ad['show_contact']; $adEdit['fullname'] = (trim($_REQUEST['fullname'])!="")?$_REQUEST['fullname']:$user['fullname']; $adEdit['address'] = (trim($_REQUEST['address'])!="")?$_REQUEST['address']:$user['address']; $adEdit['phone'] = (trim($_REQUEST['phone'])!="")?$_REQUEST['phone']:$user['phone']; $adEdit['email'] = (trim($_REQUEST['email'])!="")?$_REQUEST['email']:$user['email']; $adEdit['website'] = (trim($_REQUEST['website'])!="")?$_REQUEST['website']:$user['website']; $adEdit['webshow_contactsite'] = (trim($_REQUEST['show_contact'])!="")?$_REQUEST['show_contact']:"0"; } else if ($_REQUEST['mode']=="similar") { $similar = getSqlRow("user","SELECT * FROM nash_classified WHERE id='".$_REQUEST['id']."'".$extraQuery.""); $adEdit['itemname'] = $similar['itemname']; $adEdit['description'] = $similar['description']; $adEdit['category'] = $similar['category']; $adEdit['addlcategory'] = $similar['addlcategory']; $mainCat_primary = ($mainCat_primary!="")?$mainCat_primary:getMainCatInClassads($adEdit['category']); $mainCat_secondary = ($mainCat_secondary!="")?$mainCat_secondary:getMainCatInClassads($adEdit['addlcategory']); $adEdit['duration'] = $similar['duration']; $adEdit['currency'] = $similar['currency']; $adEdit['buynow'] = $similar['buynow']; $country = $similar['country']; $zip = $similar['zip']; $ad['picpath'] = ""; $adEdit['iconit'] = $similar['iconit']; $adEdit['offer_active'] = $similar['offer_active']; $adEdit['offer_range_min'] = $similar['offer_range_min']; $adEdit['offer_range_max'] = $similar['offer_range_max']; } else { $country = ($_REQUEST['country']=="")?$user['country']:$_REQUEST['country']; $zip = ($_REQUEST['zip']=="")?$user['zip']:$_REQUEST['zip']; } ?>
: 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_classads WHERE id='".$croot."'"); if ($cntr==0) { $nav = $ca_lang[$crw['id']]; } else { if ($parent!=$croot) $nav = $ca_lang[$crw['id']]." > ".$nav; } $cntr++; $croot = $crw['parent']; }} echo $nav;?>   #   
:
: