\n"; echo "\n"; echo "\n"; MenuNukeC(1); echo "
"; OpenTable(); echo "
"._NUKECEDITPOSTED."

"; $adsinfo = AdsInfo($id_ads); if (($EditPostedAds == 1) && (is_user($user))) { if ($cookie[0] == $adsinfo[submitter]) { $AllowedToEditThisAds = 1; } } else { $AllowedToEditThisAds = 0; } if (is_admin($admin) || ($AllowedToEditThisAds == 1)) { themeads ($adsinfo[id_ads],$adsinfo[id_catg],$adsinfo[title],$adsinfo[ads_desc],$adsinfo[imageads],$adsinfo[curr],$adsinfo[price],$adsinfo[submitter],$adsinfo[email],$adsinfo[website],$adsinfo[dateposted],$adsinfo[hits]); echo "
"; echo "\n"; echo "\n"; echo "\n"; echo "
"; echo ""; echo ""; echo "\n" ."\n"; echo "\n" ."\n"; echo "\n"; echo "\n" ."\n"; echo "\n" ."\n"; echo "\n" ."\n"; if ($adsinfo[imageads] || $UploadImg) { if ($adsinfo[imageads] != "") { list($widthimg,$heightimg) = @getimagesize("modules/".$module_name."/imageads/$adsinfo[imageads]"); echo "\n" ."\n"; echo "\n"; echo "\n" ."\n"; } else { echo "\n" ."\n"; } //* end if $adsinfo*/ } echo "\n"; if (is_admin($admin)) { $zduration = datesub($adsinfo[validuntil],$adsinfo[dateposted]); echo ""; } else { echo ''; } echo "\n"; echo ""; echo "
\n"; echo ""._NUKECEDITWAITINGADS.""; echo "
"._NUKECADSTITLE." (".$AdsTitleLength." "._NUKECADSMAXCHARS.")*
"._NUKECADSDESC ." * \n" ."
(".$AdsContentLength." "._NUKECADSMAXCHARS.")
"._NUKECADSCATG." \n" ."\n" ."
"._NUKECADSPRICE.""; echo ""; echo "
"._NUKECADSURL." "._NUKECEGURL."
"._NUKECADSEMAIL." "._NUKECEGEMAIL."
"._NUKECADSUPLOADEDIMG."\"\"
"._NUKECDELETEIMG."
"._NUKECADSCHANGEIMAGE."
"._NUKECCHANGEIMAGEADSNOTE."
"._NUKECADSUPLOAD."
"._NUKECLANGUAGE."\n"; echo "
"._NUKEADSPOSTFOR.""; echo "
\n"; echo " \n" ." [ Delete]" ."
* -> "._NUKECREQUIRED."\n" ."
"._NUKECNOTE." : "; if ($adsinfo[imageads]) { if ($adsinfo[imageads] != "") { echo "
·  "._NUKECNOTE1."\n"; } } echo "
·  Updated Ads by member will have the ads set to inactive and need admin to review and reactivate it\n"; echo "
"; echo "
"; } CloseTable(); @include("footer.php"); } function UpdateAdsChange($id_ads_chng,$submitteruid_chng,$title_chng,$cdesc_chng,$catgforprocess_chng,$price_chng,$website_chng,$email_chng,$setemptyimg,$fileupload_chng,$fileupload_chng_name,$fileupload_chng_type,$fileupload_chng_size,$adslanguage_chng,$postfor_chng,$AdsCurr_chng) { global $prefix,$db,$folder_name, $module_name, $multilingual, $currentlang,$AdsTitleLength, $AdsContentLength, $MemberRequired, $PostInMainCatg, $cookie, $user, $UploadImg,$Waiting,$anonymous,$UploadPath,$cookie,$user,$DescLength,$UploadImg, $MaxImgSize,$MaxImgHeight, $MaxImgWidth, $MaxAllowedAds; if ((!$title_chng) || ($title_chng == "") || (strlen($title_chng) > $AdsTitleLength)) $errorTitle = 1; if ((!$cdesc_chng) || ($cdesc_chng == "") || (strlen($cdesc_chng) > $AdsContentLength)) $errorCdesc = 1; if ($email_chng != ""){ if (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$email_chng)) $errorEmail = 1; } if (!$setemptyimg) { if ($UploadImg && ($fileupload_chng != "") && ($fileupload_chng != "none")) { if ($fileupload_size_chng > ($UploadImageSize * 1024)) { $errorImageSize = 1; } $imageadstype = basename($fileupload_chng_type); $UploadImageType = getImgType(); if (!in_array($imageadstype,$UploadImageType)) $errorImageType = 1; if (($imageadstype != "jpeg") && ($imageadstype != "jpg") && ($imageadstype != "pjpeg")) { $imgsize = @getimagesize($fileupload_chng); $imgwidth = $imgsize[0]; $imgheight = $imgsize[1]; if (($imgwidth > $MaxImgWidth) || ($imgheight > $MaxImgHeight)) { $errorImageDimension = 1; } } } } if ($errorTitle || $errorCdesc || $errorPrice || $erroremailanony || $errorEmail || $errorImageSize || $errorImageDimension || $errorImageType) { @include("header.php"); MenuNukeC(1); echo "
"; OpenTable(); echo "
"._NUKECUPDATEERROR."

"; echo "
"; if ($errorTitle) { if ($title == "") { echo "
"._NUKECERRORTITLE."
"; } if (($title != "") && (strlen($title) > $TitleLength)) { echo "
"._NUKECERRORCTITLEMAX." $TitleLength "._NUKECCHARS."
"; } } if ($errorCdesc) { if ($cdesc_chng == "") { echo "
"._NUKECERRORCDESCEMPTY."
"; } if (($cdesc_chng != "") && (strlen($cdesc_chng) > $DescLength)) { echo "
"._NUKECERRORCDESCMAX." $DescLength "._NUKECCHARS."
"; } } if ($erroremailanony) { echo "
"._NUKECANONYEMAILREQ."
"; } if ($errorEmail) { echo "
"._NUKECERROREMAIL."
"; } if ($errorImageSize) { echo "
"._NUKECERRORMAXSIZEALLOWED." $UploadImageSize "._NUKECKB."
"; } if ($errorImageDimension) { echo "
"._NUKECERRORMAXDIMENSION." $MaxImgHeight x $MaxImgWidth "._NUKECPIXEL."
"; } if ($errorImageType) { echo "
"._NUKECALLOWEDFILETYPE.": "; for ($i = 0;$i<= sizeof($UploadImageType)-1;$i++) { echo "'.".$UploadImageType[$i]."'"; if ($j != sizeof($UploadImageType)-1) { echo ", "; } $j++; } echo "
"; } echo "

"._NUKECPLEASEGOBACK.""; echo "
<< "._NUKECGOBACK.""; echo "
"; CloseTable(); @include("footer.php"); } else { $sqlupdate = "update ".$prefix."_nukec_ads_ads"; if ($price_chng != "") { $price_chng = FixQuotes(filter_text($price_chng, "nohtml")); $AdsCurrx = $AdsCurr_chng; } else { $AdsCurrx = ""; } $ads_title = check_html($title_chng,"nohtml"); $ads_content = FixQuotes(nl2br(filter_text($cdesc_chng))); $sqlupdate .= " set title='$title_chng', ads_desc='$ads_content', "; $sqlupdate .= " id_catg='$catgforprocess_chng', curr='$AdsCurr_chng',price='$price_chng', website='$website_chng', "; $sqlupdate .= " email='$email_chng',"; if ($postfor_chng != "NP") { $nowdatetmp = date("H i s m d Y"); $datearraytmp = explode (" ", $nowdatetmp); $NewAdsNowUnixTime = GetTimeUnix($datearraytmp[0],$datearraytmp[1],$datearraytmp[2],$datearraytmp[3],$datearraytmp[4],$datearraytmp[5],0,0,0); $NewAdsExpUnixTime = GetTimeUnix($datearraytmp[0],$datearraytmp[1],$datearraytmp[2],$datearraytmp[3],$datearraytmp[4],$datearraytmp[5],0,$postfor_chng,0); $sqlupdate .= " dateposted='$NewAdsNowUnixTime', validuntil='$NewAdsExpUnixTime', "; } if (!$setemptyimg) { if ($fileupload_chng != "") { $type = basename($fileupload_chng_type); if (($type == "jpeg") || ($type == "jpg") || ($type == "pjpeg")) { $type= "jpeg"; } if ($type == "x-png") { $type = "png"; } $filename = $UploadPath.$id_ads_chng.".".$type; $filename_thumb = $UploadPath.$id_ads_chng."_thumb.".$type; copy ($fileupload_chng, $filename); copy ($fileupload_chng, $filename_thumb); $imguploadname = $id_ads_chng.".".$type; $imgsize = @getimagesize($fileupload_chng); $imgwidth = $imgsize[0]; $imgheight = $imgsize[1]; @include("modules/".$module_name."/resize.php"); global $ThumbToHeight,$ThumbToWidth,$ThumbHeight,$ThumbWidth,$MaxImgHeight,$MaxImgWidth; if ($ThumbToHeight) { if ($imgheight <= $ThumbHeight) { $HeightToThumb = $imgheight; $LargeHeight = $imgheight; copy($imageupload, $filenamecopy_thumb); } else { $HeightToThumb = $ThumbHeight; if ($imgheight <= $MaxImgHeight) { $LargeHeight = $imgheight; } else { $LargeHeight = $MaxImgHeight; $thumb2 = new thumbnail($filename); $thumb2 -> size_height($MaxImgHeight); $thumb2->jpeg_quality(75); $thumb2->save($filename); } $thumb = new thumbnail($filename_thumb); $thumb->size_height($HeightToThumb); $thumb->jpeg_quality(75); $thumb->save($filename_thumb); } } else { if ($imgwidth <= $ThumbWidth) { $WidthToThumb = $imgwidth; $LargeWidth = $imqwidth; copy($imageupload, $filename_thumb); } else { $WidthToThumb = $ThumbWidth; if ($imgwidth <= $MaxImgWidth) { $LargeWidth = $imgwidth; } else { $LargeWidth = $MaxImgWidth; $thumb2 = new thumbnail($filename); $thumb2 -> size_width($LargeWidth); $thumb2->jpeg_quality(75); $thumb2->save($filename); } $thumb = new thumbnail($filename_thumb); $thumb->size_width($WidthToThumb); $thumb->jpeg_quality(75); $thumb->save($filename_thumb); } } $sqlupdate .= " imageads='$imguploadname', "; } } else { $sqlupdate .= " imageads='', "; } $sqlupdate .= " language='$adslanguage_chng' "; $sqlupdate .= " where id_ads='$id_ads_chng' and submitter='$submitteruid_chng'"; $res = $db->sql_query($sqlupdate); if (!$res) { die($sqlupdate."
".mysql_error()); } header("Location:modules.php?name=$module_name&file=manage&op=updated&id_ads=$id_ads_chng"); die(); } } function AdsUpdated($id_ads) { global $module_name; include ("header.php"); OpenTable(); echo "
Your ads has been updated, Click here to view your ads
"; CloseTable(); include ("footer.php"); } switch($op) { case "UpdateAdsChange":UpdateAdsChange($id_ads_chng,$submitteruid_chng,$title_chng,$cdesc_chng,$catgforprocess_chng,$price_chng,$website_chng,$email_chng,$setemptyimg,$fileupload_chng,$fileupload_chng_name,$fileupload_chng_type,$fileupload_chng_size,$adslanguage_chng,$postfor_chng,$AdsCurr_chng);break; case "updated": AdsUpdated($id_ads);break; default : Index($id_ads); break; } } else { @include("header.php"); MenuNukeC(1); echo "
"; OpenTable(); echo "
"._NUKECYOURADSBOX."

\n"; printnotallowforanonymouse(); CloseTable(); @include("footer.php"); } ?>