Toplam Üye:
32638
Aktif Üye:
0
Aktif Ziyaretçi:
684
ME_Haber 2.3 ..(114457 okuma, 145 yanıt) Resim Galerisi Modülü 2.0 ..(127472 okuma, 173 yanıt) Ustalardan Bir Ricam Olac ..(14252 okuma, 6 yanıt) nukecode.com will close ..(11745 okuma, 5 yanıt) super youtube player a lo ..(6618 okuma, 1 yanıt) Need good PHP Haber port ..(5836 okuma, 0 yanıt) Forum Nasil Tam Sayfa Olu ..(36673 okuma, 40 yanıt) Php nuke Forumu Düzenleme ..(10349 okuma, 6 yanıt) Yeni Üyelik Aktivasyon Li ..(11410 okuma, 6 yanıt) Aşk Flashları Modülü ..(7349 okuma, 2 yanıt) resim galeri 2.0 da kateg ..(11913 okuma, 9 yanıt) Yeni iki modul: Merhumlar ..(33722 okuma, 36 yanıt) ürün tanıtım modülü ..(26240 okuma, 23 yanıt) PHP Nuke is out ..(15707 okuma, 13 yanıt) MSN Video Bing Video oldu ..(5440 okuma, 0 yanıt) haberhit.com ..(6032 okuma, 1 yanıt) Bilgi Yarışması 1.0 tama ..(54512 okuma, 72 yanıt) Musıc Box elinde olan var ..(7016 okuma, 2 yanıt) Online Okey , Batak , Tav ..(181655 okuma, 340 yanıt) Emlak Modül ve Blockları ..(12867 okuma, 8 yanıt) WM who ist shampions ..(5282 okuma, 1 yanıt) coppermine resim galerisi ..(5722 okuma, 1 yanıt) Forumda Teşekkür Eklentis ..(9441 okuma, 7 yanıt) free wordpress themes ..(5832 okuma, 1 yanıt) JW image rotator for nsn ..(7984 okuma, 4 yanıt) need Iletisim module ..(11508 okuma, 8 yanıt) Yeni modul: İletişim modu ..(28907 okuma, 33 yanıt) Başvuru Modulu ve Etkinli ..(6092 okuma, 1 yanıt) world cup flash ..(5259 okuma, 0 yanıt) ..:: Php Nuke FTP link Ha ..(5153 okuma, 0 yanıt) yeni phpnuke youtube 2.0 ..(5393 okuma, 1 yanıt) Content Plus Önceki Konu ..(4981 okuma, 0 yanıt) Php nuke Tickets Modülü ..(8322 okuma, 5 yanıt) need help to news time ..(4743 okuma, 0 yanıt) NSN News v3.0 new plugin ..(5031 okuma, 0 yanıt) how to save flash as imag ..(6337 okuma, 2 yanıt) Video Blok Yardım Lütfen. ..(6248 okuma, 2 yanıt) gazete ara ..(10164 okuma, 5 yanıt) Bizim Yazarlar ve Bizim Ş ..(15610 okuma, 14 yanıt) Nuke Reflections v2 Türkç ..(15229 okuma, 14 yanıt) CNB Your Account 750 442 ..(14902 okuma, 13 yanıt) Admin panelindeki simge ç ..(12867 okuma, 9 yanıt) Hosting Modülü ..(14601 okuma, 13 yanıt) Bizim şairler Modülü ..(5440 okuma, 1 yanıt) new plugin for nsn news v ..(4960 okuma, 1 yanıt) php nuke 8.0 türkce dil s ..(7258 okuma, 3 yanıt) Kan Bankası Modül istek ..(6460 okuma, 2 yanıt) Haber Konulari Sayfasinda ..(6026 okuma, 2 yanıt) Kan Bankası Modülünde İsi ..(7395 okuma, 3 yanıt) sonhaberler flash block ..(6938 okuma, 4 yanıt)
Netopsiyon Online: Forums
Netopsiyon Online :: Başlık görüntüleniyor - Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
Önceki başlık :: Sonraki başlık
Yazar
Mesaj
tyson Mesaj: 100+
Kayıt: Jul 20, 2003 Mesajlar: 181
Tarih: 2008-03-04, 01:58:58 Mesaj konusu: Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
Youtube modülünde ayarlardan anonim kullanıcılar yorum yapmasını kapatmama ragmen "Misafir" adı altında spam mesajlar geliyor..
Bunu nasıl çözebiliriz?
Başa dön
Bu Site Google Adsense ile Gelir Elde Ediyor
Tarih: 2024-09-28, 20:44:54 Mesaj konusu: Forum Arası Reklamlar
Başa dön
sima19 Mesaj: 1000+
Kayıt: Oct 07, 2006 Mesajlar: 1856 Konum: Dünya'nın Bi Yerinden
Tarih: 2008-03-04, 02:04:48 Mesaj konusu:
Admin Panelinizden Seçenekler bölümünde aşagı doğru bakarsanız yorumları misafirler ve kayıtlı kullanıcılar yorum yazsın yada yazmasın seçeği var oradan ayarlayabilirsin...
Başa dön
polibo06 Site Yöneticisi
Kayıt: Nov 01, 2006 Mesajlar: 2412 Konum: izmirimi özledim
Tarih: 2008-03-04, 02:07:01 Mesaj konusu:
bu modülü hiç kullanmadım bilmiyorum..başka böyle bir sorunla karşılaşan varsa kodlar ile çözebiliriz yoksa admin panelinden çözülüyordur belki
Başa dön
shahan Mesaj: 50+
Kayıt: Feb 29, 2008 Mesajlar: 79
Tarih: 2008-03-04, 02:52:07 Mesaj konusu:
Modül dosyalarından index.php isimli dosyayı herhangi bir metin editörü ile aç.
function postcomment($id) diye bir fonksiyon var onu bul.
Bu fonksiyon şu şekildedir:
Kod:
function postcomment($id)
{
global $user, $AllowableHTML, $anonymous, $module_name, $module_url, $io_db, $allow_anonymous;
module_header();
OpenTable();
title(_IO_REVIEWCOMMENT);
echo "<form action=$module_url method=post>";
if ($allow_anonymous == 1) {
echo "<input type=checkbox name=xanonpost> "._POSTANON."<br><br>";
}
echo "<input type=hidden name=id value=$id>"
."<b>"._SELECTSCORE."</b> : "
."<select name=\"score\">";
for ($i = 10;$i > 0;$i--) {
echo "<option name=score value=\"$i\">$i</option>\n";
}
echo "</select><br><br>"
."<b>"._YOURCOMMENT."</b><br>"
."<textarea name=comments rows=10 cols=70></textarea><br>"
._ALLOWEDHTML."<br>";
while (list($key,)= each($AllowableHTML)) echo " <".$key.">";
echo "<br><br>"
."<input type=\"hidden\" name=\"op\" value=\"savecomment\">"
."<input type=\"submit\" value=\""._IO_SUBMIT."\">"
."</form>";
CloseTable();
module_footer();
}
Bunu aşağıdaki kodlarla değiştir:
Kod:
function postcomment($id)
{
global $user, $AllowableHTML, $anonymous, $module_name, $module_url, $io_db, $allow_anonymous;
module_header();
OpenTable();
if (!is_user($user) AND !is_admin($admin) AND $allow_anonymous == 0) {
$pagetitle = "- "._ACCESSDENIED;
title($sitename.": "._ACCESSDENIED);
echo "<center><strong>"._RESTRICTEDAREA."</strong><br><br>"._MODULEUSERS;
echo _GOBACK;
}
else {
title(_IO_REVIEWCOMMENT);
echo "<form action=$module_url method=post>";
if ($allow_anonymous == 1) {
echo "<input type=checkbox name=xanonpost> "._POSTANON."<br><br>";
}
echo "<input type=hidden name=id value=$id>"
."<b>"._SELECTSCORE."</b> : "
."<select name=\"score\">";
for ($i = 10;$i > 0;$i--) {
echo "<option name=score value=\"$i\">$i</option>\n";
}
echo "</select><br><br>"
."<b>"._YOURCOMMENT."</b><br>"
."<textarea name=comments rows=10 cols=70></textarea><br>"
._ALLOWEDHTML."<br>";
while (list($key,)= each($AllowableHTML)) echo " <".$key.">";
echo "<br><br>"
."<input type=\"hidden\" name=\"op\" value=\"savecomment\">"
."<input type=\"submit\" value=\""._IO_SUBMIT."\">"
."</form>";
}
CloseTable();
module_footer();
}
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-06, 09:28:37 Mesaj konusu: Re: Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
tesekkurler dostum peki bu yorum ekleyi yasakladi peki url eklemeyi video onermeyi nasil engelleriz?
Başa dön
shahan Mesaj: 50+
Kayıt: Feb 29, 2008 Mesajlar: 79
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-06, 15:14:53 Mesaj konusu:
tesekkurler dostum peki eski modulde sadece link eklemeyi yasakamak icin nereyi editlemem gerekir?
Başa dön
shahan Mesaj: 50+
Kayıt: Feb 29, 2008 Mesajlar: 79
Tarih: 2008-03-06, 16:52:59 Mesaj konusu: Re: Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
Aynı dosyada
Bul:
Kod:
function write_text() {
global $admin, $user, $c o o k i e, $user_prefix, $currentlang, $module_name, $module_url, $io_db;
module_header();
OpenTable();
title(_OI_SEND_TEXT);
echo "<center>";
if (is_admin($admin)) {
echo ""._IO_WRITE_TEXT_ADMIN."";
}
echo "<form method=\"post\" action=\"$module_url\">";
echo "<table border=\"0\" cellspacing=\"2\" cellpaddign=\"4\" align=\"center\">"
."<tr><td><b>"._IO_TITLE.":</b></td><td><input type=\"text\" name=\"title\" size=\"30\" maxlength=\"50\"> ("._IO_REQUIRED.")</td></tr><br>";
echo "<tr><td><b>"._IO_TEXT22.":</b></td><td><input type=\"text\" name=\"text\" size=\"30\" maxlength=\"255\"> (Örnek : http://www.youtube.com/v/u7abTPwFw6s)</td></tr><br>"
. "</td></tr>";
echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"hidden\" name=\"op\" value=\"send_text\"><input type=\"submit\" value=\""._IO_SEND."\"> <input type=\"button\" onClick=\"history.go(-1)\" value=\""._IO_CLEAR."\"></td></tr></form>";
echo "</table></center>";
CloseTable();
module_footer();
}
Değiştir:
Kod:
function write_text() {
global $admin, $user, $c o o k i e, $user_prefix, $currentlang, $module_name, $module_url, $vdo_db;
module_header();
OpenTable();
if (!is_user($user) AND !is_admin($admin)) {
$pagetitle = "- "._ACCESSDENIED;
title($sitename.": "._ACCESSDENIED);
echo "<center><strong>"._RESTRICTEDAREA."</strong><br><br>"._MODULEUSERS;
echo _GOBACK;
}
else {
title(_OI_SEND_TEXT);
echo "<center>";
if (is_admin($admin)) {
echo ""._IO_WRITE_TEXT_ADMIN."";
}
echo "<form method=\"post\" action=\"$module_url\">";
echo "<table border=\"0\" cellspacing=\"2\" cellpaddign=\"4\" align=\"center\">"
."<tr><td><b>"._IO_TITLE.":</b></td><td><input type=\"text\" name=\"title\" size=\"30\" maxlength=\"50\"> ("._IO_REQUIRED.")</td></tr><br>";
echo "<tr><td><b>"._IO_TEXT22.":</b></td><td><input type=\"text\" name=\"text\" size=\"30\" maxlength=\"255\"> (Örnek : http://www.youtube.com/v/u7abTPwFw6s)</td></tr><br>"
. "</td></tr>";
echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"hidden\" name=\"op\" value=\"send_text\"><input type=\"submit\" value=\""._IO_SEND."\"> <input type=\"button\" onClick=\"history.go(-1)\" value=\""._IO_CLEAR."\"></td></tr></form>";
echo "</table></center>";
}
CloseTable();
module_footer();
}
Başa dön
Bu Site Google Adsense ile Gelir Elde Ediyor
Tarih: 2024-09-28, 20:44:54 Mesaj konusu: Forum Arası Reklamlar
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-06, 17:12:40 Mesaj konusu: Re: Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
hocam cok tesekkurler ya buda halloldu.nukec için yardımci olabilirmisiniz? onada link ekleme icin engel koyabilirmiyiz.?
index.php
Kod:
<?php
global $prefix;
######################################################################
# Nuke-C : Advanced Classifieds Addon For PHP-Nuke
# ===============================================
#
# Copyright (c) 2002 by Sudirman (nukecpower@yahoo.com)
# http://nukec.org
#
# This module is the main file of NukeC Module
#
#################################################################
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!eregi("modules.php", $_SERVER['script_NAME'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include ("modules/".$module_name."/functions.php");
$pagetitle = "- ". $ModuleTitle;
$index = 0;
function Index() {
global $nukecprefix,$dbi,$module_name,$multilingual,$currentlang,$MemberRequired,$PerPage,$UseImgCatg;
include("header.php");
$NowUnixTime = GetUnixTimeNow();
MenuNukeC(0);
echo "<BR>";
OpenTable();
echo "<center><font class=\"title\"><b>"._NUKECADSMAINCAT."</b></font></center><br>";
$sql = "select id_catg,catg,catg_desc,image from ".$nukecprefix."_ads_catg where parentid=0 ";
$applylanguage = sqlapplylanguage();
$sql .= "and".$applylanguage."order by catg";
$resultcatg = sql_query($sql,$dbi);
echo "<table align=\"center\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\"><tr>";
while (list($id_catg,$catg,$cdesc,$imagecatg) = sql_fetch_row($resultcatg,$dbi)) {
$i = 0;
if ($count == 2) {
echo "<tr>\n";
$count = 0;
}
$listchild = "";
echo "<td width=\"50%\" valign=\"top\">";
echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" border=\"0\">";
echo "<TR><TD width=\"10\" valign=\"top\">";
if ($UseImgCatg) {
if ($imagecatg == "") {
$imagecatgsrc= "noimage.gif";
} else {
$imagecatgsrc = $imagecatg;
}
$imgdimension = @getimagesize("modules/".$module_name."/imagecatg/".$imagecatgsrc);
if ($imgdimension) {
$imgcatgwidth = $imgdimension[0];
$imgcatgheight = $imgdimension[1];
}
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$id_catg."\" >";
echo "<img src=\"modules/".$module_name."/imagecatg/".$imagecatgsrc."\" width=\"".$imgcatgwidth."\" height=\"".$imgcatgheight."\" alt=\"".$catg."\" border=\"0\"></a>";
echo "</a>";
}
echo "</td>";
echo "<TD>";
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$id_catg."\"><b>".$catg."";
echo " (";
$listchild = getchildcategories($id_catg);
$listchild = $id_catg."_".$listchild;
echo countads_incategory($listchild);
echo ")";
echo "</b></a>";
if ($cdesc != "") {
echo "<BR>".$cdesc;
}
echo "<BR>";
echo "";
$sql = "select id_catg,catg from ".$nukecprefix."_ads_catg where parentid='".$id_catg."' order by id_catg";
$resultsub = sql_query($sql,$dbi);
$jmlsub = sql_num_rows($resultsub);
$sql .= " limit 0,10";
$resultsublimit = sql_query($sql,$dbi);
$jmlsublimit = sql_num_rows($resultsublimit,$dbi);
$i = 0;
$bts = 3;
while (list($id_catg2,$catg2) = sql_fetch_row($resultsublimit,$dbi)) {
$i++;
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$id_catg2."\" >";
echo $catg2." ";
echo " (";
$listchild2 = "";
$listchild2 = getchildcategories($id_catg2);
$listchild2 = "$id_catg2"."_".$listchild2;
echo countads_incategory($listchild2);
echo ")";
echo "</a> ";
if ($i != $jmlsublimit){
echo ", ";
}
}
if ($jmlsub > 10) {
echo ", <a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$id_catg."\">"._NUKECMORE."</a>";
}
sql_free_result($resultsub);
echo "</td></tr></table>";
echo "</td>\n";
/* Thanks to John Hoffmann from softlinux.org for the next 5 lines ;) */
$count++;
if ($count == 2) {
echo "</tr>\n";
}
}
if ($count == 2) {
echo "</table>\n";
} else {
echo "</tr></table>\n";
}
$sql = "select * from ".$nukecprefix."_ads_ads where";
$applylanguage = sqlapplylanguage();
$sql .= $applylanguage."and ";
$sql .= " validuntil > '".$NowUnixTime."' and active='1'";
$result = sql_query($sql, $dbi);
$numrows = sql_num_rows($result, $dbi);
$sql = "select * from ".$nukecprefix."_ads_catg where";
$sql .= $applylanguage;
$result = sql_query($sql, $dbi);
$catnum = sql_num_rows($result, $dbi);
echo "<BR><center><font class=\"content\">"._NUKECTHEREARE." <b>".$numrows."</b> "._NUKECADS." "._NUKECAND." <b>".$catnum."</b> "._NUKECCATEGORIES." "._NUKECINDB."</font></center>";
CloseTable();
echo "<BR>";
ShowCustomContent();
OpenTable();
$sql = "select id_ads,id_catg,title,ads_desc,imageads,curr,price,submitter,email,website,dateposted,hits from ".$nukecprefix."_ads_ads where";
$applylanguage = sqlapplylanguage();
$sql .= $applylanguage." and (validuntil > '".$NowUnixTime."') and active = '1' ";
$sql .= "order by dateposted DESC limit 0,".$PerPage."";
$res = sql_query($sql,$dbi);
if (!$res) {
die(mysql_error());
}
$jml = sql_num_rows($res);
if ($jml > 0) {
echo _NUKECTHEREARE;
if ($jml >= $PerPage) {
echo "<b> ".$PerPage." </b>";
} else {
echo "<b> ".$jml." </b>";
}
echo _NUKECLASTPOSTED."<BR><BR>";
while (list($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$submitter,$email,$website,$dateposted,$hits) = sql_fetch_row($res,$dbi)) {
themeads($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$submitter,$email,$website,$dateposted,$hits);
echo "<BR>";
}
sql_free_result($res);
} else {
echo "<CENTER>"._NUKECNOADS."</center>";
}
CloseTable();
include("footer.php");
}
function ViewDetail($id_ads) {
global $c o o k i e,$nukecprefix,$dbi,$module_name,$AdsComment, $AnonyComment,$user,$anonymous,$admin;
global $Date_Format_code;
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
$NowUnixTime = GetUnixTimeNow();
$sql = "select id_catg,title,ads_desc,imageads,curr,price,submitter,email,website,dateposted,validuntil,hits,active from ".$nukecprefix."_ads_ads where id_ads='".$id_ads."'";
$res = sql_query($sql,$dbi);
list($id_catg,$title,$ads_desc,$imageads,$curr,$price,$email,$submitter,$website,$dateposted,$validuntil,$hits, $adsstatus) = sql_fetch_row($res,$dbi);
if (($adsstatus == 1) or (is_admin($admin))) {
if ($NowUnixTime > $validuntil) { /* Expired */
echo "<CENTER><FONT class=\"title\">"._NUKECADSEXPIRED1."</font><BR><BR>";
echo _NUKECADSEXPIRED2." ".FormatDateAds($validuntil,$Date_Format_code);
echo "<BR><BR><a href=\"modules.php?name=".$module_name."\">"._NUKECBACK."</a>";
echo "</center>";
} else {
sql_query("update ".$nukecprefix."_ads_ads set hits=hits+1 where id_ads='".$id_ads."'",$dbi);
if ($id_catg != "") {
echo "<CENTER>".pathcatg($id_catg)."</center>";
echo "<BR>\n";
}
echo "<center><font class=\"title\">"._NUKECADSDETAIL."</font></center><BR>\n";
themeadsdetail($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$email,$submitter,$website,$dateposted,$validuntil,$hits);
if ($AdsComment or (is_admin($admin))) {
echo "<BR>";
OpenTable();
if (is_user($user) || ($AnonyComment == 1)) {
if (is_user($user)) {
$by = $c o o k i e[0];
} else {
$by = 1;
}
echo "<CENTER><b>.:: "._NUKECPOSTCOMMENT." ::.</b></center><BR>";
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">\n"
."<form action=\"modules.php?name=".$module_name."&op=SubmitComment\" method=\"post\">"
."<input type=\"hidden\" name=\"xid_ads\" value=\"".$id_ads."\">\n"
."<input type=\"hidden\" name=\"commentby\" value=\"".$by."\">\n"
."<TR><TD width=\"25%\"><b>"._NUKECYOURNAME."</b></td><TD width=\"5\">:</td>\n"
."<TD>";
if (is_user($user)) {
c o o k i edecode($user);
echo "<a href=\"modules.php?name=Your_Account\">".$c o o k i e[1]."</a> <font class=\"content\">[ <a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUT."</a> ]</font>";
} else {
echo "<font class=\"content\">".$anonymous."";
echo " [ <a href=\"modules.php?name=Your_Account\">"._NUKECNEWUSER."</a> ]";
}
echo "</td></tr>\n"
."<TR><TD><b>"._NUKECCOMMENTSUBJECT."</b></td><TD width=\"5\">:</td>\n"
."<TD><input type=\"text\" name=\"commsubject\" size=\"35\"></td></tr>"
."<TR><TD valign=\"top\"><b>"._NUKECCOMMENTSDESC."</b></td><TD width=\"5\" valign=\"top\">:</td>\n"
."<TD><textarea name=\"commentdesc\" cols=\"50\" rows=\"10\"></textarea></td></tr>"
."<TR><TD colspan=\"3\"><input type=\"submit\" value=\""._NUKECSUBMITCOMM."\"></td></tr>"
."</form>"
."</table>";
} else {
echo "<center>"._NUKECCOMMENTNOTALLOWED."</center>";
}
CloseTable();
}
}
} else {
echo "<CENTER>"._NUKEC_ADS_NOT_ACTIVEYET."</CENTER>";
}
CloseTable();
include("footer.php");
}
function SubmitComment($xid_ads,$commentby,$commsubject,$commentdesc) {
global $nukecprefix,$dbi,$module_name;
if (($commsubject == "") || ($commentdesc == "")) {
include ("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
echo "<CENTER><font class=\"title\">"._NUKECPOSTCOMMENTERROR."</font>";
echo "<BR><BR>"._NUKECCOMMENTALERT;
echo "<BR><BR><a href=\"j a v a s c r i p t:history.go(-1);\">"._NUKECGOBACK."</a>";
echo "</center>";
CloseTable();
include ("footer.php");
} else {
global $REMOTE_ADDR;
$commsubject = FixQuotes(filter_text($commsubject, "nohtml"));
$commentdesc = FixQuotes(nl2br(filter_text($commentdesc)));
$sqlinsert = sql_query("insert into ".$nukecprefix."_ads_comments values(NULL,'".$xid_ads."','".$commentby."','".$commsubject."','".$commentdesc."','".$REMOTE_ADDR."',NOW())",$dbi);
header("Location:modules.php?name=".$module_name."&op=ViewDetail&id_ads=$xid_ads");
}
}
function ViewCatg() {
global $UseImgCatg,$page,$id_catg,$days,$module_name,$nukecprefix,$dbi,$currentlang,$PerPage,$multilingual;
include ("header.php");
MenuNukeC(1);
echo "<BR>";
$NowUnixTime = GetUnixTimeNow();
OpenTable();
if (!isset($page) || ($page == "")) {
$page = 1;
}
echo "<center>";
if ($id_catg != "") {
echo pathcatg($id_catg);
echo "<BR>\n";
$resultdesccatg = sql_query("select catg_desc from ".$nukecprefix."_ads_catg where id_catg='".$id_catg."'",$dbi);
list ($catg_desc) = sql_fetch_row($resultdesccatg,$dbi);
if ($catg_desc != "") {
echo $catg_desc;
echo "<BR>";
}
} else {
$id_catg = 0;
}
$resultsubcatg = sql_query("select id_catg,catg,image from ".$nukecprefix."_ads_catg where parentid='".$id_catg."'",$dbi);
$jmlcatg =sql_num_rows($resultsubcatg,$dbi);
$i = 0;
if ($jmlcatg > 0) {
if (!$UseImgCatg) {
echo "[ ";
} else {
echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"2\"><TR>\n";
}
while (list($id_catgsub,$catgsub,$imagecatg) = sql_fetch_row($resultsubcatg,$dbi)) {
$i++;
if ($UseImgCatg) {
if ($imagecatg == "") {
$imgcatgsrc = "noimage.gif";
} else {
$imgcatgsrc = $imagecatg;
}
if (!file_exists("modules/".$module_name."/imagecatg/".$imgcatgsrc)) {
$imgcatgsrc = "noimage.gif";
}
$imgdimension = @getimagesize("modules/".$module_name."/imagecatg/".$imgcatgsrc."");
if ($imgdimension) {
$imgcatgwidth = $imgdimension[0];
$imgcatgheight = $imgdimension[1];
}
if ($count == 8) {
echo "<tr>\n";
$count = 0;
}
echo "<td align=\"center\" valign=\"bottom\">\n"
."<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$id_catgsub."\">\n"
."<img src=\"modules/".$module_name."/imagecatg/".$imgcatgsrc."\" width=\"".$imgcatgwidth."\" height=\"".$imgcatgheight."\" alt=\"".$catgsub."\" border=\"0\"></a><br>\n"
."<font class=\"content\"><b>".$catgsub."</b></font>\n"
."</td>\n";
$count++;
if ($count == 8) {
echo "</tr>\n";
}
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$id_catgsub."\" class=\"redlink\"><b>".$catgsub."</b></a> ";
if ($i != $jmlcatg) {
echo " | ";
}
}
}
if (!$UseImgCatg) {
echo " ]";
} else {
if ($count == 8) {
echo "</table>\n";
} else {
echo "</tr></table>\n";
}
}
}
echo "</center>";
CloseTable();
echo "<br>";
OpenTable();
$headermsg = "<CENTEr><font class=\"title\">";
$headermsg .= " "._NUKECADSINCATG." <b>".getcategoryname($id_catg)."</b>";
$headermsg .= "</font></CENTEr><br>";
echo $headermsg;
$sqltotal = "select id_ads,id_catg,title,ads_desc,imageads,curr,price,submitter,email,website,dateposted,validuntil,hits from ".$nukecprefix."_ads_ads where";
if ($id_catg != "") {
$categorystring = getchildcategories($id_catg);
$categoryarray = explode("_",$categorystring);
if (sizeof($categoryarray) - 1 > 0) {
$sqltotal .= " (";
}
for ($i = 0;$i<=sizeof($categoryarray)-2;$i++) {
$sqltotal .= " id_catg = '".$categoryarray[$i]."' ";
if ($i != sizeof($categoryarray)-2) {
$sqltotal .= " or ";
}
}
if (sizeof($categoryarray) - 1 > 0) {
$sqltotal .= " or id_catg='".$id_catg."') and ";
} else {
$sqltotal .= " id_catg='".$id_catg."' and ";
}
}
$sqltotal .= " validuntil > '".$NowUnixTime."' and";
$applylanguage = sqlapplylanguage();
$sqltotal .= $applylanguage."and";
$sqltotal .= " active = 1 order by dateposted DESC";
$start = ($page-1)*$PerPage;
$sqliklan = $sqltotal." limit ".$start.",".$PerPage;
$resulttotaliklan = sql_query($sqltotal,$dbi);
$totaliklan = sql_num_rows($resulttotaliklan,$dbi);
$jmlhalaman = ceil($totaliklan/$PerPage);
$resultiklan = sql_query($sqliklan,$dbi);
if ($jmlhalaman > 1) {
echo "<center>[ ";
if ($page > 1) {
$previouspage =$page-1;
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg";
if ($id_catg != "") {
echo "&id_catg=".$id_catg."";
}
if ($days != "") {
echo "&days=".$days;
}
echo "&page=".$previouspage."\" CLASS=\"redlink\">"._NUKECPREVIOUS."</a> | ";
}
for ($hlm = 1;$hlm <= $jmlhalaman;$hlm++) {
if ($hlm == $page) {
echo "<b>".$hlm."</b>";
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg";
if ($id_catg != "") {
echo "&id_catg=".$id_catg."";
}
if ($days != "") {
echo "&days=".$days;
}
echo "&page=".$hlm."\" CLASS=\"redlink\">".$hlm."</a> ";
}
if ($hlm != $jmlhalaman) {
echo " | ";
}
}
if ($page+1 <= $jmlhalaman) {
$nextpage = $page +1;
echo " | <a href=\"modules.php?name=".$module_name."&op=ViewCatg";
if ($id_catg != "") {
echo "&id_catg=".$id_catg."";
}
if ($days != "") {
echo "&days=".$days;
}
echo "&page=".$nextpage."\" CLASS=\"redlink\">"._NUKECNEXT."</a>";
}
echo " ]<BR>";
}
echo "</center>";
$catgname = getcategoryname($id_catg);
if ($totaliklan == 0) {
echo "<center>"._NUKECNOADSIN." ";
if ($id_catg != "") echo _NUKECINCATG." ".$catgname."</center>";
} else {
echo "<BR>";
$listchild = "";
$listchild = getchildcategories($id_catg);
$listchild = $id_catg."_".$listchild;
$jmladsin = countads_incategory($listchild);
$pre = (($page-1) * $PerPage) + 1;
if ($pre < 0) {
$pre = 1;
}
$suf = ($pre-1) + $PerPage;
if ($suf >= $totaliklan) {
$suf = $totaliklan;
}
echo _NUKECVIEWING." <b>".$pre."</b> - <b>".$suf."</b> (<b>".$totaliklan."</b> "._NUKECTOTAL.") "._NUKECADSINCATG." <b>".$catgname."</b><BR><BR>";
while (list($xid_ads,$xid_catg,$xtitle,$xads_desc,$ximageads,$xcurr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xvaliduntil,$xhits) = sql_fetch_row($resultiklan,$dbi)) {
themeads ($xid_ads,$xid_catg,$xtitle,$xads_desc,$ximageads,$xcurr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xhits);
echo "<BR>";
}
}
if ($jmlhalaman > 1) {
echo "<center>[ ";
if ($page > 1) {
$previouspage =$page-1;
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg";
if ($id_catg != "") {
echo "&id_catg=".$id_catg."";
}
if ($days != "") {
echo "&days=".$days;
}
echo "&page=".$previouspage."\">"._NUKECPREVIOUS."</a> | ";
}
for ($hlm = 1;$hlm <= $jmlhalaman;$hlm++) {
if ($hlm == $page) {
echo "<b>".$hlm."</b>";
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg";
if ($id_catg != "") {
echo "&id_catg=".$id_catg."";
}
if ($days != "") {
echo "&days=".$days;
}
echo "&page=".$hlm."\" CLASS=\"redlink\">".$hlm."</a> ";
}
if ($hlm != $jmlhalaman) {
echo " | ";
}
}
if ($page+1 <= $jmlhalaman) {
$nextpage = $page +1;
echo " | <a href=\"modules.php?name=".$module_name."&op=ViewCatg";
if ($id_catg != "") {
echo "&id_catg=".$id_catg."";
}
if ($days != "") {
echo "&days=".$days;
}
echo "&page=".$nextpage."\" CLASS=\"redlink\">"._NUKECNEXT."</a>";
}
echo " ]<BR>";
}
echo "</center>";
CloseTable();
include ("footer.php");
}
function viewads($days) {
global $page,$id_catg,$module_name,$nukecprefix,$dbi,$currentlang,$PerPage,$multilingual;
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
if ((!$days) or ($days == "")) {
$days = 1;
}
$nowdate = date("Y-m-d");
$datetemp = date("H i s m d Y");
$datearray = explode(" ",$datetemp);
$HourtoFormat = $datearray[0];
$MinutetoFormat = $datearray[1];
$SecondtoFormat = $datearray[2];
$MonthtoFormat = $datearray[3];
$DaytoFormat = $datearray[4] - $days ;
$YeartoFormat = $datearray[5];
$UnixTimeNow = GetUnixTimeNow();
if ($days == 1) {
$DaytoFormat = $datearray[4];
}
$StartTimeUnix = GetTimeUnix(0, 0, 0, $MonthtoFormat, $DaytoFormat, $YeartoFormat, 0, 0 , 0);
$sql_result = "select id_ads,id_catg,title,ads_desc,imageads,curr,price,submitter,email,website,dateposted,hits from ".$nukecprefix."_ads_ads";
$sql_result .= " where (dateposted > '".$StartTimeUnix."' and dateposted < '".$UnixTimeNow."') ";
$applylanguage = sqlapplylanguage();
$sql_result .= "and".$applylanguage;
$sql_result .= "and active='1' order by dateposted DESC";
$resulttotalads = sql_query($sql_result,$dbi);
$totalads = sql_num_rows($resulttotalads);
if ($totalads > 0) {
$pre = (($page-1) * $PerPage) + 1;
if ($pre < 0) {
$pre = 1;
}
$suf = ($pre-1) + $PerPage;
if ($suf >= $totalads) {
$suf = $totalads;
}
echo "<CENTER>\n"
."<b>".$totalads."</b> "._NUKECADSFOUND." ";
if (($days == 1) || ($days == 2)) {
echo "For ";
if ($days == 1) {
echo _TODAY;
} else {
echo _YESTERDAY;
}
} else {
echo _NUKECFORLAST." <b>".$days."</b> "._NUKECADSDAYS." <BR>( "._NUKECFROM." <b>".FormatDateAds($StartTimeUnix,0)."</b> - <b>".FormatDateAds($UnixTimeNow,0)."</b> )";
}
echo "<BR>"._NUKECVIEWING." <b>".$pre."</b> - <b>".$suf."</b> (<b>".$totalads."</b> "._NUKECTOTAL.")</center>";
$totalpages = ceil($totalads/$PerPage);
if (!$page) {
$page = 1;
}
$start = ($page - 1) * $PerPage;
$sql_result .= " limit ".$start.",".$PerPage;
if ($totalpages >= 2) {
echo "<BR><center>";
echo "[ ";
$back = $page - 1;
if ($back >= 1 ) {
echo "<a href=\"modules.php?name=".$module_name."&op=viewads&days=".$days."&page=".$back."\" class=\"content\"><< "._NUKECPREVIOUS."</a> | ";
}
for ($i = 1;$i <= $totalpages;$i++) {
if ($page == $i) {
echo "<b>".$page."</b>";
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=viewads&days=".$days."&page=".$i."\" class=\"content\">".$i."</a>";
}
if ($i != $totalpages) {
echo " | ";
}
}
$next = $page + 1;
if ($next <= $totalpages) {
echo " | <a href=\"modules.php?name=".$module_name."&op=viewads&days=".$days."&page=".$next."\" class=\"content\">"._NUKECNEXT." >></a>";
}
echo " ]";
echo "</center>";
}
echo "<BR>";
$j = 0;
$resultads = sql_query($sql_result,$dbi);
while (list($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$submitter,$email,$website,$dateposted,$hits) = sql_fetch_row($resultads,$dbi)) {
themeads ($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$submitter,$email,$website,$dateposted,$hits);
echo "<BR>";
}
sql_free_result($resultads,$dbi);
if ($totalpages >= 2) {
echo "<center>";
echo "[ ";
$back2 = $page - 1;
if ($back2 >= 1 ) {
echo "<a href=\"modules.php?name=".$module_name."&op=viewads&days=".$days."&page=".$back2."\" class=\"content\"><< "._NUKECPREVIOUS."</a> ";
}
for ($i = 1;$i <= $totalpages;$i++) {
if ($page == $i) {
echo "<b>".$page."</b>";
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=viewads&days=".$days."&page=".$i."\" class=\"content\">$i</a>";
}
if ($i != $totalpages) {
echo " | ";
}
}
$next = $page + 1;
if ($next <= $totalpages) {
echo " | <a href=\"modules.php?name=".$module_name."&op=viewads&days=".$days."&page=".$next."\" class=\"content\">"._NUKECNEXT." >></a> ]";
}
echo "</center>";
}
} else {
echo "<CENTER><b>"._NUKECNOADSFOUND."</b></center>";
}
CloseTable();
include ("footer.php");
}
function MostPop() {
global $PopAds,$HitsPopular,$page,$id_catg,$module_name,$nukecprefix,$dbi,$currentlang,$PerPage,$multilingual;
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
if (($PerPage * $page) > $PopAds) {
echo "<CENTER><img src=\"modules/".$module_name."/images/getout.gif\" width=\"27\" height=\"27\" alt=\"\"><BR>\n"
."<b>"._NUKECOPS."</b></center>";
} else {
$nowdate = date("Y-m-d");
$sql_result = "select id_ads,id_catg,title,ads_desc,imageads,curr,price,submitter,email,website,dateposted,hits from ".$nukecprefix."_ads_ads";
$sql_result .= " where active = '1' ";
$applylanguage = sqlapplylanguage();
$sql_result .= "and".$applylanguage;
$sql_result .= " order by hits DESC";
$resulttotalads = sql_query($sql_result,$dbi);
if (!$resulttotalads) {
echo mysql_error();
}
$totalads = sql_num_rows($resulttotalads);
if ($totalads > 0) {
$pre = (($page-1) * $PerPage) + 1;
if ($pre <= $totalads) {
$pre = $totalads;
}
$suf = ($pre-1) + $PerPage;
if ($suf >= $totalads) {
$suf = $totalads;
}
echo "<CENTER><b>.:: ".$PopAds." "._NUKECMOSTPOPTITLE." ::.</b></center><BR>";
if ($totalads > $PerPage) {
$totalpages = ceil($PopAds/$PerPage);
} else {
$totalpage = 1;
}
if (!$page) {
$page = 1;
}
$start = ($page - 1) * $PerPage;
$sql_result .= " limit ".$start.",".$PerPage;
if ($totalpages >= 2) {
echo "<BR><center>";
echo "[ ";
$back = $page - 1;
if ($back >= 1 ) {
echo "<a href=\"modules.php?name=".$module_name."&op=mostpop&page=".$back."\" class=\"content\"><< "._NUKECPREVIOUS."</a> | ";
}
for ($i = 1;$i <= $totalpages;$i++) {
if ($page == $i) {
echo "<b>".$page."</b>";
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=mostpop&page=".$i."\" class=\"content\">".$i."</a>";
}
if ($i != $totalpages) {
echo " | ";
}
}
$next = $page + 1;
if ($next <= $totalpages) {
echo " | <a href=\"modules.php?name=".$module_name."&op=mostpop&page=".$next."\" class=\"content\">"._NUKECNEXT." >></a>";
}
echo " ]";
echo "</center>";
}
echo "<BR>";
$j = 0;
$resultads = sql_query($sql_result,$dbi);
while (list($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$submitter,$email,$website,$dateposted,$hits) = sql_fetch_row($resultads,$dbi)) {
themeads ($id_ads,$id_catg,$title,$ads_desc,$imageads,$curr,$price,$submitter,$email,$website,$dateposted,$hits);
echo "<BR>";
}
sql_free_result($resultads,$dbi);
if ($totalpages >= 2) {
echo "<center>";
echo "[ ";
$back2 = $page - 1;
if ($back2 >= 1 ) {
echo "<a href=\"modules.php?name=".$module_name."&op=mostpop&page=".$back2."\" class=\"content\"><< "._NUKECPREVIOUS."</a> ";
}
for ($i = 1;$i <= $totalpages;$i++) {
if ($page == $i) {
echo "<b>".$page."</b>";
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=mostpop&page=".$i."\" class=\"content\">".$i."</a>";
}
if ($i != $totalpages) {
echo " | ";
}
}
$next = $page + 1;
if ($next <= $totalpages) {
echo " | <a href=\"modules.php?name=".$module_name."&op=mostpop&page=".$next."\" class=\"content\">"._NUKECNEXT." >></a> ]";
}
echo "</center>";
}
} else {
echo "<CENTER><b>"._NUKECNOADSFOUND."</b></center>";
}
}
CloseTable();
include ("footer.php");
}
function Disclaimer($no) {
global $nukecprefix,$dbi;
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
$re = sql_query("select title,content from ".$nukecprefix."_ads_disclaimer where no='".$no."'",$dbi);
list($title,$content) = sql_fetch_row($re,$dbi);
echo "\n"
."<font class=\"title\">".$title."</font><BR><BR>"
."<font class=\"content \">".$content."</font>"
."<BR><BR><a href=\"j a v a s c r i p t:history.go(-1);\">"._NUKECGOBACK."</a>"
."";
CloseTable();
include("footer.php");
}
switch($op) {
case "mostpop":MostPop();break;
case "viewads": viewads($days);break;
case "ViewCatg":ViewCatg();break;
case "SubmitComment":SubmitComment($xid_ads,$commentby,$commsubject,$commentdesc);break;
case "ViewDetail": ViewDetail($id_ads);break;
case "Disclaimer":Disclaimer($no);break;
default : Index(); break;
}
?>
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-06, 17:36:01 Mesaj konusu: Re: Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
function.php
[code:1:80931b491c]<?
######################################################################
# Nuke-C : Advanced Classifieds Addon For PHP-Nuke
# ===============================================
#
# Copyright (c) 2002 by Sudirman (nukecpower@yahoo.com)
# http://nukec.org
#
# This file contains functions commonly used in NukeC module
#
#################################################################
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("functions.php",$_SERVER['script_NAME'])) {
Header("Location: index.php");
die();
}
$module_name = basename(dirname(__FILE__));
include("modules/".$module_name."/config.php");
function MenuNukeC($home=0) { /*1 = print link to home ; 0= dont print homelink*/
global $days,$user,$nukecprefix,$dbi,$module_name,$sitename,$bgcolor2,$bgcolor3,$bgcolor4,$MemberorNot;
global $id_catg,$multilingual,$currentlang;
OpenTable();
echo "<CENTER><a href=\"modules.php?name=".$module_name."\"><img border=\"0\" src=\"modules/".$module_name."/images/logo.gif\" alt=\"".$sitename."-".$module_name."\" vspace=\"10\"></a></center>";
include('sponsor.html');
echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\">";
echo "<TR >";
if ($home == 1) {
echo "<TD align=\"center\">\n"
."<a href=\"modules.php?name=".$module_name."\" class=\"bluelink\">\n"
."<img src=\"modules/".$module_name."/images/adsmain.gif\" alt=\""._NUKECHOME."\" border=\"0\"></a>\n"
."</td>";
}
$postlink = "modules.php?name=".$module_name."&file=postads";
if ($id_catg != "") {
$postlink .= "&id_catg=".$id_catg;
}
echo "<TD align=\"center\">"
."<a href=\"$postlink\" class=\"bluelink\">\n"
."<img src=\"modules/".$module_name."/images/postads.gif\" alt=\""._NUKECPOSTNEWADS."\" border=\"0\"></a>\n"
."</td>";
echo "<TD align=\"center\">\n"
."<a href=\"modules.php?name=".$module_name."&file=adsbox\" class=\"bluelink\">\n"
."<img src=\"modules/".$module_name."/images/adsbox.gif\" alt=\""._NUKECYOURADSBOX."\" border=\"0\"></a>\n"
."</td>";
echo "<TD align=\"center\">\n"
."<a href=\"modules.php?name=".$module_name."&op=mostpop\" class=\"bluelink\">\n"
."<img src=\"modules/".$module_name."/images/mostpop.gif\" alt=\""._NUKECMOSTPOP."\" border=\"0\"></a>\n"
."</td>";
echo "</tr>";
echo "</table>";
echo "<table align=\"center\" cellspacing=\"3\" cellpadding=\"1\" border=\"0\">";
echo "";
echo "<TR><form action=\"modules.php?name=".$module_name."&op=viewads\" method=\"post\"><TD>";
echo "<b>"._NUKECVIEWADSFOR."</b> <select name=\"days\" onChange=\"submit();\">\n"
."<option value=\"1\" ";
if ($days == 1) echo "selected";
echo ">"._TODAY."</option>\n";
echo "<option value=\"3\" ";
if ($days == 3) echo "selected";
echo ">"._LAST3DAYS."</option>\n"
."<option value=\"5\" ";
if ($days == 5) echo "selected";
echo ">"._LAST5DAYS."</option>\n"
."<option value=\"7\" ";
if ($days == 7) echo "selected";
echo ">"._LAST7DAYS."</option>\n"
."<option value=\"9\" ";
if ($days == 9) echo "selected";
echo ">"._LAST9DAYS."</option>\n"
."<option value=\"14\" ";
if ($days == 14) echo "selected";
echo ">"._LAST14DAYS."</option>\n"
."</select> <input type=\"submit\" value=\""._NUKECVIEW."\">";
echo "</td></tr><TR></form>\n"
." <input type=\"submit\" value=\""._NUKECSEARCH."\"> [ <a href=\"modules.php?name=".$module_name."&file=search&op=adv_search\">"._."</a> ]</td></form>"
."</tr></table>";
$sqldisc = "select no from ".$nukecprefix."_ads_disclaimer";
if ($multilingual) {
$sqldisc .= " where language='".$currentlang."'";
} else {
$sqldisc .= " where language=''";
}
$re = sql_query($sqldisc,$dbi);
if (sql_num_rows($re) > 0) {
list ($no) = sql_fetch_row($re);
echo "<BR><CENTER>"._NUKECAGREE1."<a href=\"modules.php?name=".$module_name."&op=Disclaimer&no=".$no."\">"._NUKECAGREE2."</a></CENTER>";
}
CloseTable();
}
function printnotallowforanonymouse() {
echo "<center>"._NUKECNOTUSER1."<br>"
.""._NUKECNOTUSER2."<br><BR>"
.""._NUKECNOTUSER21."<br>"
.""._NUKECNOTUSER22."<br>"
.""._NUKECNOTUSER23."<br><BR><BR>"
.""._NUKECNOTUSER3."<br>"
.""._NUKECNOTUSER4."<br>"
.""._NUKECNOTUSER5."<br>"
.""._NUKECNOTUSER6."<br>"
.""._NUKECNOTUSER7."<br><br>"
.""._NUKECNOTUSER8.""
."</center>";
}
function printnotallowlimitreached() {
global $MaxAllowedAds,$module_name;
echo "<CENTER>"
."<font class=\"title\">"._NUKECADSBOXFULL."</font><BR><BR>"
._NUKECALLOWEDADS1." ".$MaxAllowedAds." "._NUKECALLOWEDADS2."<BR>"
._NUKECALLOWEDADS3." ".$MaxAllowedAds." "._NUKECALLOWEDADS4
."<BR><BR>"
."<a href=\"modules.php?name=".$module_name."&file=adsbox\">"._NUKECGOTOADSBOX."</a>"
."</center>";
}
function getparent($parentid,$title) {
global $nukecprefix, $dbi;
$result = sql_query("select id_catg, catg, parentid from ".$nukecprefix."_ads_catg where id_catg='".$parentid."'", $dbi);
list($cid, $ptitle, $pparentid) = sql_fetch_row($result, $dbi);
if ($ptitle!="") $title=$ptitle." » ".$title;
if ($pparentid!=0) {
$title=getparent($pparentid,$title);
}
return $title;
}
function FormatDateAdsShort($strDate){
$arrayfulldate = explode(" ",$strDate);
$Adob = explode ("-",$arrayfulldate[0]);
$newdob = $Adob[2];
if ($Adob[1] == 1)$month = _JANUARYSHRT;
if ($Adob[1] == 2)$month = _FEBRUARYSHRT;
if ($Adob[1] == 3)$month = _MARCHSHRT;
if ($Adob[1] == 4)$month = _APRILSHRT;
if ($Adob[1] == 5)$month = _MAYSHRT;
if ($Adob[1] == 6)$month = _JUNESHRT;
if ($Adob[1] == 7)$month = _JULYSHRT;
if ($Adob[1] == 8)$month = _AUGUSTSHRT;
if ($Adob[1] == 9)$month = _SEPTEMBERSHRT;
if ($Adob[1] == 10)$month = _OCTOBERSHRT;
if ($Adob[1] == 11)$month = _NOVEMBERSHRT;
if ($Adob[1] == 12)$month = _DECEMBERSHRT;
$newdob = "$month"." ".$newdob.", ".$Adob[0];
return $newdob." ".$arrayfulldate[1];
}
function getcategoryname($id_catgtemp){
global $nukecprefix,$dbi;
$resultcatgname = sql_query("select catg from ".$nukecprefix."_ads_catg where id_catg='".$id_catgtemp."'",$dbi);
list($title) = sql_fetch_row($resultcatgname,$dbi);
return $title;
}
function getcategoryimage($id_catg){
global $module_name,$dbi,$nukecprefix,$currentlang;
$resultpic = sql_query("select image from ".$nukecprefix."_ads_catg where id_catg='".$id_catg."'",$dbi);
list ($catgpic) = sql_fetch_row($resultpic,$dbi);
return $catgpic;
}
function getchildcategories($id_catg) {
global $module_name,$dbi,$nukecprefix,$currentlang;
$child_categories = sql_query("select id_catg from ".$nukecprefix."_ads_catg where parentid = '".$id_catg."'",$dbi);
if (sql_num_rows($child_categories,$dbi) > 0) {
while ($child_categories_values = sql_fetch_array($child_categories,$dbi)) {
$childcatg = getchildcategories($child_categories_values['id_catg']).$child_categories_values['id_catg']."_".$childcatg;
}
} else {
$childcatg = $child_categories_values['id_catg'];
}
return $childcatg;
}
function countads_incategory($listchildx){
global $module_name,$dbi,$nukecprefix,$currentlang,$multilingual;
$NowUnixTime = GetUnixTimeNow();
$catg_array = explode("_",$listchildx);
$parent = $catg_array[0];
$sql_ads = "select count(*) as total from ".$nukecprefix."_ads_ads where ";
if ($multilingual) {
$where .= " language='".$currentlang."' and ";
}
$jml = sizeof($catg_array) - 1;
if ($jml > 1) {
$where .= "(";
}
$where .= " id_catg='".$parent."' ";
if ($jml > 1) {
$where .= " or ";
}
if ($jml > 1) {
$k = 0;
for ($i = 1;$i<= $jml;$i++) {
$where .= "id_catg='".$catg_array[$i]."' ";
if ($i != $jml) {
$where .= "or ";
}
if ($i == $jml) {
$where .= ")";
}
$k++;
}
}
$where .= " and validuntil > '".$NowUnixTime."' and active = '1'";
$resultads = sql_query($sql_ads.$where,$dbi);
if (!$resultads) {
return "<BR>".$sql_ads.$where."<BR>".mysql_error();
} else {
$totalads = sql_fetch_array($resultads,$dbi);
//return $sql_ads.$where;
return $totalads['total'];
}
}
function themeads ($xid_ads,$xid_catg,$xtitle,$xads_desc,$ximageads,$curr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xhits) {
global $session_id,$module_name,$bgcolor1,$bgcolor2,$nukecprefix,$dbi,$UseImgCatg ,$UploadPathRev,$CatgPathRev;
global $Price_Format_code,$Date_Format_code,$ListImgLocation;
$memberinfo = MemberInfo($xsubmitter);
if ($ximageads != "") {
$ximageads_thumb = getThumbName($ximageads);
$gbrsize = @getimagesize($UploadPathRev.$ximageads_thumb);
$gbr_width = $gbrsize[0];
$gbr_height = $gbrsize[1];
$img = "<img src=\"".$UploadPathRev.$ximageads."\" width=\"".$gbr_width."\" height=\"".$gbr_height."\"";
$img .= " alt=\"".$xtitle."\"";
if ($ListImgLocation == "LEFT") {
$img .= " align=\"left\"";
} elseif ($ListImgLocation == "RIGHT") {
$img .= " align=\"right\"";
}
$img .= ">";
if (($ListImgLocation == "UP") or ($ListImgLocation == "DOWN")) {
$img = "<CENTER>".$img."</CENTER>";
}
} elseif ($UseImgCatg) {
$sql = "select catg,image from ".$nukecprefix."_ads_catg where id_catg='".$xid_catg."'";
$rescatgimg = sql_query($sql,$dbi);
list($catg,$imagecatgsrc) = sql_fetch_row($rescatgimg,$dbi);
if ($imagecatgsrc != "") {
$imgdimension = @getimagesize($CatgPathRev.$imagecatgsrc);
if ($imgdimension) {
$imgcatgwidth = $imgdimension[0];
$imgcatgheight = $imgdimension[1];
}
$img = "<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$xid_catg."\" >";
$img .= "<img src=\"".$CatgPathRev.$imagecatgsrc."\" width=\"".$imgcatgwidth."\" height=\"".$imgcatgheight."\" alt=\"".$catg."\" border=\"0\"></a>";
$img .= "</a><BR><b>".$catg."</b>";
} else {
$img = "";
}
}
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"".$bgcolor2."\">\n";
echo "<tr > \n";
echo "<td height=\"8\" bgcolor=\"".$bgcolor2."\"> \n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "<TR><TD> </td>\n"
."<TD><font color=\"".$adstitlecolor."\"><b>".$xtitle."</b><br>"._NUKECPOSTEDON." <b>".FormatDateAds($xdateposted,$Date_Format_code)."</b> "._NUKECBY." <b>".$memberinfo[username]."</b> </font></td>\n"
."<TD>";
$imagemenu = "<table cellspacing=\"2\" cellpadding=\"0\" border=\"0\">";
$imagemenu .= "<TR>";
if ($xsubmitter != 1) {
$imagemenu .= "<TD><a href=\"modules.php?name=Private_Messages&file=index&mode=post&u=".$xsubmitter."\"><img src=\"modules/".$module_name."/images/contactbypv.gif\" alt=\""._NUKECALTSENDPV."\" width=\"25\" height=\"25\" border=\"0\"></a></td>";
}
if ($xemail != "") {
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=contact&id_ads=".$xid_ads."\"><img src=\"modules/".$module_name."/images/contactbyemail.gif\" alt=\""._NUKECCONTACTBYMAIL."\" width=\"24\" height=\"25\" border=\"0\"></a></td>";
}
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&op=ViewDetail&id_ads=".$xid_ads."\"><img border=\"0\" src=\"modules/".$module_name."/images/comment.gif\" alt=\""._NUKECALTCOMMENT."\" width=\"25\" height=\"26\"></A></td>";
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=adsbox&op=SaveAds&id_ads=".$xid_ads."\"><img border=\"0\" src=\"modules/".$module_name."/images/hotlist.gif\" alt=\""._NUKECALTPUTINHOTADSBOX."\" width=\"22\" height=\"25\"></a></td>";
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=friend&id_ads=".$xid_ads."\"><img src=\"modules/".$module_name."/images/friend.gif\" alt=\""._NUKECALTREFERTOFRIEND."\" width=\"34\" height=\"25\" border=\"0\"></a></td>";
$imagemenu .= "</tr>";
$imagemenu .= "</table>";
echo "<div align=\"right\">".$imagemenu."</div>\n";
echo "</td>"
."</tr></table>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr> \n";
echo "<td bgcolor=\"".$bgcolor1."\"> \n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\">\n";
echo "<tr valign=\"top\"> \n";
echo " <td height=\"18\" width=\"93%\">";
if ($ListImgLocation == "UP"){
echo "$img ";
}
if (($ListImgLocation != "UP") and ($ListImgLocation != "DOWN")) {
echo $img;
}
echo $xads_desc."\n";
if ($ListImgLocation == "DOWN") {
echo "<BR> $img";
}
if (($xprice != "") and ($xprice != 0)) {
echo "<BR><b>"._NUKECADSPRICE."</b> : ".formatPrice($curr,$xprice,$Price_Format_code);
}
echo "</td>\n";
echo "</tr>\n";
echo "<tr> \n";
echo "<td height=\"18\" colspan=\"2\"> \n";
$ads_detail = "<a href=\"modules.php?name=".$module_name."&op=ViewDetail&id_ads=".$xid_ads."\"><b>"._NUKECVIEWDETAIL."</b></a>";
echo "<div align=\"center\">[ "._NUKECADSCATG." : <a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$xid_catg."\"><b>".getcategoryname($xid_catg)."</b></a> ";
if ($xwebsite != "") {
echo "| "._NUKECADSURL." : <a href=\"j a v a s c r i p t:;\" onmouseover=\"window.status='http://".$xwebsite."';return true;\" onmouseout=\"window.status='';return true;\" onClick=\"window.open('http://".$xwebsite."','','toolbar=1,location=1,statusbar=1,resizable=yes,width=500,height=500');\"><b>".$xwebsite."</b></a> ";
}
echo "| <font class=\"whitetext\">".$xhits." \n";
echo ""._NUKECREAD."</font> | ".$ads_detail." ]</div>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
function themeadsdetail ($xid_ads,$xid_catg,$xtitle,$xads_desc,$ximageads,$xcurr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xvaliduntil,$xhits) {
global $SID,$usecatgimg,$module_name,$bgcolor1,$bgcolor2,$nukecprefix,$dbi,$admin;
global $UseImgCatg ,$UploadPathRev,$CatgPathRev,$user;
global $Price_Format_code,$Date_Format_code, $DetailsImglocation;
$memberinfo = MemberInfo($xsubmitter);
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"".$bgcolor2."\">\n";
echo "<tr bgcolor=\"".$bgcolor2."\"> \n";
echo "<td> \n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "<TR><TD width=\"10\"> </td>\n"
."<TD><font class=\"content\"><b>".$xtitle."</b>";
if (is_admin($admin)) {
echo "<BR>[ <a href=\"admin.php?op=NukeC30EditAds&id_ads=".$xid_ads."\">"._NUKECEDIT."</a> |
<a href=\"admin.php?op=NukeC30DeleteAds&id_ads=".$xid_ads."\">"._NUKECDELETECOMM."</a> ]";
}
echo "</td>\n"
."<TD>";
$imagemenu = "<table cellspacing=\"2\" cellpadding=\"0\" border=0>";
$imagemenu .= "<TR><TD>";
if (($xsubmitter == 0) or ($xsubmitter == 1)) {
$imagemenu .= _NUKECANONYMOUS;
}
if ($xsubmitter != 1) {
$imagemenu .= "<a href=\"modules.php?name=Private_Messages&file=index&mode=post&u=".$xsubmitter."\"><img src=\"modules/".$module_name."/images/contactbypv.gif\" alt=\""._NUKECALTSENDPV."\" width=\"25\" height=\"25\" border=\"0\"></a>";
}
$imagemenu .= "</td>";
if ($xemail != "") {
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=contact&id_ads=".$xid_ads."\"><img src=\"modules/".$module_name."/images/contactbyemail.gif\" alt=\""._NUKECCONTACTBYMAIL."\" width=\"24\" height=\"25\" border=\"0\"></a></td>";
}
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=adsbox&op=SaveAds&id_ads=".$xid_ads."\"><img border=\"0\" src=\"modules/".$module_name."/images/hotlist.gif\" alt=\""._NUKECALTPUTINHOTADSBOX."\" width=\"22\" height=\"25\"></a></td>";
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=friend&id_ads=$xid_ads\"><img src=\"modules/".$module_name."/images/friend.gif\" alt=\""._NUKECALTREFERTOFRIEND."\" width=\"34\" height=\"25\" border=\"0\"></a></td>";
$imagemenu .= "</tr>";
$imagemenu .= "</table>";
echo "<div align=\"right\">".$imagemenu."</div>\n";
echo "</td>"
."</tr></table>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr> \n";
echo "<td bgcolor=\"".$bgcolor1."\"> \n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\">\n";
echo "<tr valign=\"top\"> \n";
echo " <td height=\"18\" width=\"100%\">";
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">";
if ($ximageads != "") {
$gbrsize = @getimagesize($UploadPathRev.$ximageads);
$gbr_width = $gbrsize[0];
$gbr_height = $gbrsize[1];
$img = "";
$img .= "<img src=\"".$UploadPathRev.$ximageads."\" width=\"".$gbr_width."\" height=\"".$gbr_height."\" alt=\"".$xtitle."\">";
$img .= "";
} elseif ($UseImgCatg) {
$sql = "select catg,image from ".$nukecprefix."_ads_catg where id_catg='".$xid_catg."'";
$rescatgimg = sql_query($sql,$dbi);
list($catg,$imagecatgsrc) = sql_fetch_row($rescatgimg,$dbi);
if ($imagecatgsrc != "") {
$imgdimension = @getimagesize($CatgPathRev.$imagecatgsrc);
if ($imgdimension) {
$imgcatgwidth = $imgdimension[0];
$imgcatgheight = $imgdimension[1];
}
$img = "";
$img .= "<img src=\"".$CatgPathRev.$imagecatgsrc."\" width=\"".$imgcatgwidth."\" height=\"".$imgcatgheight."\" alt=\"".$catg."\" border=\"0\"></a>";
$img .= "</a><BR><b>".$catg."</b>";
} else {
$img = "";
}
}
if ($DetailsImglocation == "UP") echo "<TR><TD align=\"center\">".$img."</TD></TR>\n";
echo "<TR><TD>".$xads_desc."</td></tr>";
if ($DetailsImglocation == "DOWN") echo "<TR><TD align=\"center\">".$img."</TD></TR>\n";
echo "<TR><TD><b>"._NUKECBY." </b>: ".$memberinfo[username]."</td>";
echo "</tr>\n";
echo "<TR><TD><b>"._NUKECPOSTEDON." : </b>".FormatDateAds($xdateposted,$Date_Format_code)."</td></tr>";
echo "<TR><TD><b>"._NUKECEXPDON." :</b> ".FormatDateAds($xvaliduntil,$Date_Format_code)."</td></tr>";
if (($xprice != "") and ($xprice != 0)) {
echo "<TR><TD><b>"._NUKECADSPRICE." :</b> ".formatPrice($xcurr,$xprice,$Price_Format_code)."</td></tr>";
}
$daysremain = countremaindays($xvaliduntil);
echo "<TR><TD><b>"._NUKECDAYSREMAIN." :</b> ".$daysremain." "._NUKECADSDAYS."</td></tr>";
echo "<TR><TD><b>"._NUKECREAD." :</b> ".$xhits." "._NUKECREAD."</td></tr>";
echo "<TR><TD><b>"._NUKECADSCOMMENT." :</b>\n";
$rescomment = sql_query("select no_comment,commentby,subject,comment,hostname,date from ".$nukecprefix."_ads_comments where id_ads='".$xid_ads."'",$dbi);
$jmlcomment = sql_num_rows($rescomment,$dbi);
if ($jmlcomment > 0) {
$k = 0;
if (is_admin($admin)) {
$adm = 1;
}
while (list($xno_comment,$xcommentby,$xsubject,$xcomment,$xhostname,$xdate) = sql_fetch_row($rescomment)) {
$k++;
$memberinfocomm = MemberInfo($xcommentby);
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" border=\"0\">\n"
."<TR><TD width=\"5\"> </td><TD>"._NUKECBY." <b>".$memberinfocomm[uname]."</b> "._NUKECON." ".FormatDateAds($xdate,$Date_Format_code)." ";
echo "[ <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=".$xsubmitter."\">"._NUKECUSERINFO."</a> | ";
echo " <a href=\"modules.php?name=Private_Messages&file=index&mode=post&u=".$xsubmitter."\">"._NUKECSENDMSG."</a> | IP : <b>".$xhostname."</b>] ";
if ($adm == 1) {
echo " [ <a href=\"admin.php?op=NukeC30DeleteComment&commentid=".$xno_comment."\" onClick=\"return confirm('"._NUKECDELETECOMMENTCONFIRM."');\">"._NUKECDELETECOMM."</a> ]";
}
echo "<BR></td></tr>"
."<TR><TD width=\"5\"> </td><TD><b>".$xsubject."</b></td></tr>"
."<TR><TD width=\"5\"> </td><TD>".$xcomment."</td></tr>"
."</table>";
if ($k != $jmlcomment) {
echo "<BR>";
}
}
sql_free_result($rescomment);
} else {
echo "<BR> "._NUKECNOCOMMENT."";
}
echo "</td></tr>";
echo "</table>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr> \n";
echo "<td height=\"18\" colspan=\"2\"> \n";
$ads_detail = "<a href=\"modules.php?name=".$module_name."&op=ViewDetail&id_ads=".$xid_ads."\"><b>"._NUKECVIEWDETAIL."</b></a>";
echo "<div align=\"center\">[ "._NUKECADSCATG." : <a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$xid_catg."\"><b>".getcategoryname($xid_catg)."</b></a> ";
if ($xwebsite != "") {
echo "| "._NUKECADSURL." : <a href=\"j a v a s c r i p t:;\" onmouseover=\"window.status='http://".$xwebsite."';return true;\" onmouseout=\"window.status='';return true;\" onClick=\"window.open('http://".$xwebsite."','','toolbar=1,location=1,statusbar=1,resizable=yes,width=500,height=500');\"><b>".$xwebsite."</b></a> ";
}
echo " ]</div>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<TR><TD align=\"center\" colspan=\"2\">";
echo "[ <a href=\"modules.php?name=".$module_name."&file=adsbox&op=SaveAds&id_ads=".$xid_ads."\">"._NUKECSAVE2ADSBOX."</a> ";
if ($xsubmitter != 1) {
echo " | ".PrivMsgslink($xsubmitter);
}
if ($xemail != "") {
echo " | <a href=\"modules.php?name=".$module_name."&file=contact&id_ads=".$xid_ads."\">"._NUKECCONTACTBYMAIL."</a>";
}
echo " | <a href=\"modules.php?name=".$module_name."&file=friend&id_ads=".$xid_ads."\">"._NUKEREFER2FRIEND."</a>";
echo " ]";
echo "<BR>";
echo "<BR>";
echo "</td></tr>";
echo "</table>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
function PrivMsgslink($MsgsDest) {
$PrivmsgsLink = "<a href=\"modules.php?name=Private_Messages&file=index&mode=post&u=".$MsgsDest."\">"._NUKECSENDMSG."</a>";
return $PrivmsgsLink;
}
function savedadsdetail ($xid_save,$xid_ads,$xowner,$xid_catg,$xtitle,$xads_desc,$ximageads,$xcurr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xvaliduntil) {
global $module_name,$bgcolor1,$bgcolor2,$bgcolor3,$nukecprefix,$dbi,$admin;
global $UseImgCatg ,$UploadPathRev,$CatgPathRev,$user;
global $Price_Format_code,$Date_Format_code;
$memberinfo = MemberInfo($xsubmitter);
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"".$bgcolor2."\">\n";
echo "<tr bgcolor=\"".$bgcolor2."\"> \n";
echo "<td height=\"8\" width=\"76%\" nowrap> \n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">\n";
echo "<tr> \n";
echo "<td width=\"99%\" height=\"5\"><font class=\"whitetext\"><b>".$xtitle."\n";
echo "</font></td>\n";
echo "</tr>\n";
echo " </table>\n";
echo "</td>\n";
echo "<td height=\"8\" width=\"10%\"> \n";
$imagemenu = "<table cellspacing=\"2\" cellpadding=\"0\">";
$imagemenu .= "<TR>";
if ($xsubmitter != 1) {
$imagemenu .= "<TD><a href=\"modules.php?name=Private_Messages&file=index&mode=post&u=".$xsubmitter."\"><img src=\"modules/".$module_name."/images/contactbypv.gif\" alt=\""._NUKECALTSENDPV."\" width=\"25\" height=\"25\" border=\"0\"></a></td>";
}
if ($xemail != "") {
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=adsbox&op=Contact&id_ads=$xid_save\"><img src=\"modules/".$module_name."/images/contactbyemail.gif\" alt=\""._NUKECCONTACTBYMAIL."\" width=\"24\" height=\"25\" border=\"0\"></a></td>";
}
$imagemenu .= "<TD><a href=\"modules.php?name=".$module_name."&file=adsbox&op=SendToFriend&id_ads=$xid_save\"><img src=\"modules/".$module_name."/images/friend.gif\" alt=\""._NUKECALTREFERTOFRIEND."\" width=\"34\" height=\"25\" border=\"0\"></a></td>";
$imagemenu .= "</tr>";
$imagemenu .= "</table>";
echo "<div align=\"right\">".$imagemenu."</div>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr> \n";
echo "<td colspan=\"2\" bgcolor=\"".$bgcolor1."\"> \n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\">\n";
echo "<tr valign=\"top\"> \n";
echo " <td height=\"18\" width=\"100%\">";
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" border=\"0\">";
echo "<TR><TD>".$xads_desc."</td>";
if ($ximageads != "") {
$gbrsize = getimagesize("modules/".$module_name."/imageads/".$ximageads);
$gbr_width = $gbrsize[0];
$gbr_height = $gbrsize[1];
} elseif ($usecatgimg) {
$sql = "select catg,image from ".$nukecprefix."_ads_catg where id_catg='".$xid_catg."'";
$rescatgimg = sql_query($sql,$dbi);
list($catg,$imagecatgsrc) = sql_fetch_row($rescatgimg,$dbi);
if ($imagecatgsrc != "") {
$imgdimension = @getimagesize("modules/".$module_name."/imagecatg/".$imagecatgsrc);
if ($imgdimension) {
$imgcatgwidth = $imgdimension[0];
$imgcatgheight = $imgdimension[1];
}
$img = "<TD rowspan=\"8\" width=\"10%\" valign=\"top\" align=\"center\"><a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=".$xid_catg."\" >";
$img .= "<img src=\"modules/".$module_name."/imagecatg/".$imagecatgsrc."\" width=\"".$imgcatgwidth."\" height=\"".$imgcatgheight."\" alt=\"".$catg."\" border=\"0\"></a>";
$img .= "</a><BR><b>".$catg."</b></td>";
} else {
$img = "";
}
}
echo $img;
echo "</tr>\n";
echo "<TR><TD><b>"._NUKECBY." </b>: ".$memberinfo[uname]."</td></tr>\n";
echo "<TR><TD><b>"._NUKECPOSTEDON." : </b>".FormatDateAds($xdateposted,$Date_Format_code)."</td></tr>";
echo "<TR><TD><b>"._NUKECEXPDON." :</b> ".FormatDateAds($xvaliduntil,$Date_Format_code)."</td></tr>";
if (($xprice != "") and ($xprice != 0)) {
echo "<TR><TD><b>"._NUKECADSPRICE." :</b> ".formatPrice($xcurr,$xprice,$Price_Format_code)."</td></tr>";
}
echo "<TR><TD><b>"._NUKECADSCOMMENT." :</b>\n";
$rescomment = sql_query("select no_comment,commentby,subject,comment,hostname,date from ".$nukecprefix."_ads_comments where id_ads='".$xid_ads."'",$dbi);
$jmlcomment = sql_num_rows($rescomment,$dbi);
if ($jmlcomment > 0) {
$k = 0;
if (is_admin($admin)) {
$adm = 1;
}
while (list($xno_comment,$xcommentby,$xsubject,$xcomment,$xhostname,$xdate) = sql_fetch_row($rescomment)) {
$k++;
$memberinfocomm = MemberInfo($xcommentby);
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" border=\"0\">\n"
."<TR><TD width=\"5\"> </td><TD>"._NUKECBY." <b>".$memberinfocomm[uname]."</b> "._NUKECON." ".FormatDateAds($xdate,$Date_Format_code)." ";
echo "[ <a href=\"modules.php?name=Your_Account&op=userinfo&uname=".$memberinfocomm[uname]."\">"._NUKECUSERINFO."</a> | ";
echo " <a href=\"modules.php?name=Private_Messages&file=reply&send=1&uname=".$memberinfocomm[uname]."\">"._NUKECSENDMSG."</a> | IP : <b>".$xhostname."</b> ] ";
if ($adm == 1) {
echo " [ <a href=\"admin.php?op=NukeC30DeleteComment&comment&id_ads=$xno_comment\" onClick=\"return confirm('"._NUKECDELETECOMMENTCONFIRM."');\">"._NUKECDELETECOMM."</a> ]";
}
echo "<BR></td></tr>"
."<TR><TD width=\"5\"> </td><TD><b>".$xsubject."</b></td></tr>"
."<TR><TD width=\"5\"> </td><TD>".$xcomment."</td></tr>"
."</table>";
if ($k != $jmlcomment) {
echo "<BR>";
}
}
sql_free_result($rescomment);
} else {
echo "<BR> "._NUKECNOCOMMENT."";
}
echo "</td></tr>";
echo "</table>";
echo "</td>\n";
if ($ximageads != "") {
$ads_img = "<img src=\"modules/".$module_name."/imageads/".$ximageads."\" width=\"".$gbr_width."\" height=\"".$gbr_height."\" alt=\"".$xtitle."\">";
}
echo "<td height=\"18\" width=\"7%\">".$ads_img."</td>\n";
echo "</tr>\n";
echo "<tr> \n";
echo "<td height=\"18\" colspan=\"2\"> \n";
$ads_detail = "<a href=\"modules.php?name=".$module_name."&op=ViewDetail&id_ads=".$xid_ads."\"><b>"._NUKECVIEWDETAIL."</b></a>";
echo "<div align=\"center\">[ "._NUKECADSCATG." : <a href=\"modules.php?name=".$module_name."&op=ViewAds&id_catg=".$xid_catg."\"><b>".getcategoryname($xid_catg)."</b></a> ";
if ($xwebsite != "") {
echo "| "._NUKECADSURL." : <a href=\"j a v a s c r i p t:;\" onmouseover=\"window.status='http://".$xwebsite."';return true;\" onmouseout=\"window.status='';return true;\" onClick=\"window.open('http://".$xwebsite."','','toolbar=1,location=1,statusbar=1,resizable=yes,width=500,height=500');\"><b>".$xwebsite."</b></a> ";
}
echo " ]</div>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<TR><TD align=\"center\" colspan=\"2\">";
echo "[ ";
if ($xsubmitter != 1) {
echo "".PrivMsgslink($xsubmitter)." | ";
}
if ($xemail != "") {
echo " <a href=\"modules.php?name=".$module_name."&file=adsbox&op=Contact&id_ads=".$xid_save."\">"._NUKECCONTACTBYMAIL."</a> | ";
}
echo " <a href=\"modules.php?name=".$module_name."&file=adsbox&op=SendToFriend&id_ads=".$xid_save."\">"._NUKEREFER2FRIEND."</a>";
echo " ]";
echo "<BR>";
echo "<BR>";
echo "</td></tr>";
echo "</table>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
function AdsInfo($xid_ads) {
global $nukecprefix,$dbi,$user_prefix;
$sql = "select * from ".$nukecprefix."_ads_ads where id_ads='".$xid_ads."'";
$res = sql_query($sql,$dbi);
return $AdsInfo = sql_fetch_array($res,$dbi);
}
function MemberInfo($xuid) {
global $nukecprefix,$dbi,$user_prefix;
$sql = "select name,username from ".$user_prefix."_users where user_id='".$xuid."'";
$res = sql_query($sql,$dbi);
if (!$res) {
echo mysql_error();
}
return $memberinfo = sql_fetch_array($res,$dbi);
}
function pathcatg($id_catg){
global $nukecprefix,$dbi,$module_name;
if (($id_catg != "") || (isset($id_catg))) {
$resultpath = sql_query("select catg,parentid from ".$nukecprefix."_ads_catg where id_catg=".$id_catg."", $dbi);
list($catg, $parentid)=sql_fetch_row($resultpath, $dbi);
$path=getparentlink($parentid,$catg);
$path = "<a href=modules.php?name=".$module_name.">"._NUKECMAIN."</a> » ".$path;
$path = "<b>".$path."</b>";
} else {
$path= "";
}
return $path;
}
function getparentlink($parentid,$title) {
global $nukecprefix, $dbi,$module_name;
$result=sql_query("select id_catg, catg, parentid from ".$nukecprefix."_ads_catg where id_catg='".$parentid."'", $dbi);
list($cid, $ptitle, $pparentid) = sql_fetch_row($result, $dbi);
if ($ptitle!="") $title="<a href=modules.php?name=".$module_name."&file=index&op=ViewCatg&id_catg=".$cid.">".$ptitle."</a> » ".$title;
if ($pparentid!=0) {
$title=getparentlink($pparentid,$title);
}
return $title;
}
function countremaindays($valid_until) {
global $nukecprefix,$dbi;
$nowdate = strtotime(date("Y-m-d"));
$enddate = strtotime(date("Y-m-d",$valid_until));
$sisa = ceil(($enddate-$nowdate)/86400);
return $sisa;
}
function datesub($enddate,$begindate) {
global $nukecprefix,$dbi;
$sisa = ($enddate-$begindate)/86400;
return $sisa;
}
function GetCurrency($currencycode){
global $nukecprefix,$dbi;
$resultcurr = sql_query("select curr from ".$nukecprefix."_ads_currency where no='".$currencycode."'",$dbi);
list($currencyname) = sql_fetch_row($resultcurr,$dbi);
return $currencyname;
}
function formatPrice($currency,$valueprice,$formatcode) {
$currencyname = GetCurrency($currency);
if ((!$formatcode ) or ($formatcode == "")) {
$formatcode = 0;
}
if ($formatcode == 0) { /* e.g : US$ 1,234.56 */
$FormattedPrice = $currencyname." ".number_format($valueprice,2);
}
if ($formatcode == 1) { /* e.g : 1,234.56 US$ */
$FormattedPrice = number_format($valueprice,2)." ".$currencyname;
}
if ($formatcode == 2) { /* e.g : US$ 1 234,56*/
$FormattedPrice = $currencyname." ".number_format($valueprice,2,',',' ');
}
if ($formatcode == 3) { /* e.g : 1 234,56 US$ */
$FormattedPrice = number_format($valueprice,2,',',' ')." ".$currencyname;
}
if ($formatcode == 4) { /* e.g : US$ 1 234.56*/
$FormattedPrice = $currencyname." ".number_format($valueprice,2,'.',' ');
}
if ($formatcode == 5) { /* e.g : 1 234.56 US$ */
$FormattedPrice = number_format($valueprice,2,'.',' ')." ".$currencyname;
}
return $FormattedPrice;
}
function buildcurrency($sel = "") {
global $nukecprefix,$dbi;
$rescurr = sql_query("select no,curr,country from ".$nukecprefix."_ads_currency",$dbi);
while (list($nocurr,$curr,$country) = sql_fetch_row($rescurr,$dbi)) {
echo "<option value=\"".$nocurr."\"";
if ($sel == $nocurr) {
echo " selected";
}
echo ">".$curr ."(".$country.")</option>\n";
}
sql_free_result($res);
}
function buildduration($sel = "") {
global $nukecprefix,$dbi;
$resduration = sql_query("select id_duration, duration_value, duration_alias from ".$nukecprefix."_ads_duration order by duration_value",$dbi);
while (list ($id_duration ,$duration_value, $duration_alias ) = sql_fetch_row($resduration,$dbi)) {
echo "<option value=\"".$duration_value."\" ";
if ($sel == $duration_value) {
echo " selected";
}
echo ">".$duration_alias."</option>";
}
sql_free_result($resduration);
}
function NukeCAdminDone($msgid) {
global $adsbgcolor1,$adsbgcolor2,$adsbgcolor3;
include ("header.php");
GraphicAdmin();
OpenTable();
NukeCAdminMenu();
echo "<BR>";
echo "<table width=\"95%\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\" bgcolor=\"".$adsbgcolor1."\"><TR><TD bgcolor=\"".$adsbgcolor3."\">";
echo "<table cellpadding=\"2\" cellspacing=\"1\" align=\"center\" width=\"100%\"><TR><TD align=\"center\" bgcolor=\"".$adsbgcolor2."\">";
echo "<CENTER><font><b>";
switch($msgid) {
case "PreferencesSaved": echo _NUKECMSGPREFSAVED; break;
case "NewCatgDone": echo _NUKECMSGCATGADDED; break;
case "WaitingAdsDeleted": echo _NUKECWAITINGADSDELETED;break;
case "WaitingAdsPosted": echo _NUKECWAITINGADSPOSTED;break;
case "AdsDeleted": echo _NUKECADSDELETEDSUCC;break;
case "EditDone": echo _NUKECADSUPDATED;break;
case "CommentDeleted": echo _NUKECCOMMENTDELETED;break;
}
echo "</b></font></center>";
echo "</td></tr></table>";
echo "</td></tr></table>";
CloseTable();
include ("footer.php");
}
function NukeCAdminMenu(){
global $adsbgcolor1, $adsbgcolor2, $adsbgcolor3,$adsbgcolor5;
$a = "<strong><BIG><b>·</b></BIG></strong>";
echo "<table width=\"95%\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\" bgcolor=\"".$adsbgcolor1."\"><TR><TD bgcolor=\"".$adsbgcolor3."\">";
echo "<table cellpadding=\"2\" cellspacing=\"1\" align=\"center\" width=\"100%\"><TR><TD colspan=\"3\" bgcolor=\"".$adsbgcolor5."\" align=\"center\" >";
echo "<font class=\"title\"><A HREF=\"admin.php?op=NukeC30\"><b>"._NUKECADMINTITLE."</b></a></font><BR>\n";
echo "</td></tr>";
echo "<TR bgcolor=\"".$adsbgcolor2."\">
<TD>".$a." <a href=\"admin.php?op=NukeC30AdminCatg\"> "._NUKECADMINCATG."</a></TD>
<TD>".$a." <a href=\"admin.php?op=NukeC30AdminWaiting\"> "._NUKECADMINMAINTENANCEADS."</a></TD>
<TD>".$a." <a href=\"admin.php?op=NukeC30Setting\"> "._NUKECSETTING."</a></td>
</tr>
<TR bgcolor=\"".$adsbgcolor2."\">
<TD>".$a." <a href=\"admin.php?op=NukeC30currency\"> "._NUKECADMINCURR."</a></TD>
<TD>".$a." <a href=\"admin.php?op=NukeC30Disclaimer\"> "._NUKECADMINDISCLAIM."</a></TD>
<TD>".$a." <a href=\"admin.php?op=NukeC30Doc\"> "._NUKECDOCUMENTATION."</a></td>
</tr>
<TR bgcolor=\"".$adsbgcolor2."\">
<TD>".$a." <a href=\"admin.php?op=NukeC30AdsWordFilter\"> "._NUKECWORDFILTER."</a></TD>
<TD>".$a." <a href=\"admin.php?op=NukeC30AdsDuration\"> "._NUKECADSDURATION."</a></TD>
<TD>".$a." <a href=\"admin.php?op=NukeC30CustomContent\"> "._NUKECCUSTOMCONTENT."</a></td>
</tr>";
echo "</table>";
echo "</td></tr></table>";
}
function buildOptionSelectAllow($selectname,$valueradio,$JScript="",$Text1="",$Text2="") {
$selectopt = "<input ";
if ($JScript != "") {
$selectopt .= " ".$JScript;
}
$selectopt .= "type=\"radio\" value=\"1\" name=\"".$selectname."\"";
if (($valueradio == "") or ($valueradio == 1)) {
$selectopt .= " checked";
}
$selectopt .= ">";
if ($Text1 != "") {
$selectopt .= $Text1." ";
} else {
$selectopt .= "Allowed ";
}
$selectopt .= " <input ";
if ($JScript != "") {
$selectopt .= " ".$JScript;
}
$selectopt .= "type=\"radio\" value=\"0\" name=\"".$selectname."\"";
if ($valueradio == 0) {
$selectopt .= " checked";
}
$selectopt .= ">";
if ($Text2 != "") {
$selectopt .= $Text2." ";
} else {
$selectopt .= "Denied";
}
return $selectopt;
}
function getImgType() {
global $nukecprefix,$dbi;
$sql = "select typeimg from ".$nukecprefix."_ads_imgtype where status='1'";
$resultimgtype = sql_query($sql,$dbi);
while (list ($typeimg) = sql_fetch_row($resultimgtype,$dbi)) {
$AdsImgType[] = $typeimg;
}
return $AdsImgType;
}
function sqlapplylanguage() {
global $multilingual,$currentlang;
if ($multilingual) {
$applylanguage = " language='".$currentlang."' ";
} else {
$applylanguage = " language='' ";
}
return $applylanguage;
}
function ShowCustomContent() {
global $nukecprefix,$dbi;
$sqlcustomcontent = "select custom_id, custom_title, content, weight, time from ".$nukecprefix."_ads_custom where active='1'";
$sqlapplylanguage = sqlapplylanguage();
$sqlcustomcontent .= " and ".$sqlapplylanguage." order by weight";
$resultcustomcontent = sql_query($sqlcustomcontent,$dbi);
if (!$resultcustomcontent) {
die(mysql_error());
}
$jmlcustomcontent = sql_num_rows($resultcustomcontent);
if ($jmlcustomcontent > 0) {
$i = 0;
while (list($custom_id, $custom_title, $content, $weight, $time) = sql_fetch_row($resultcustomcontent,$dbi)) {
themeCustomContent($custom_id, $custom_title, $content, $weight, $time);
if ($i < $jmlcustomcontent - 1) {
echo "<BR>";
}
$i++;
}
sql_free_result($resultcustomcontent);
echo "<BR>";
}
}
function themeCustomContent($custom_id, $custom_title, $content, $weight, $time) {
global $adsbgcolor1,$adsbgcolor2,$adsbgcolor3,$adsbgcolor4,$adsbgcolor5;
echo "<Table width=\"100%\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"".$adsbgcolor1."\">\n"
."<TR><TD bgcolor=\"".$adsbgcolor2."\">\n";
echo "<Table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">\n"
."<TR><TD bgcolor=\"".$adsbgcolor5."\">\n";
echo "<b>".$custom_title."</b>";
echo "</td></tr>\n"
."<TR><TD>".$content."</td></tr>"
."<TR><TD bgcolor=\"".$adsbgcolor3."\"><i>"._NUKECLASTUPDATED." : ".$time."</i></td></tr>"
."</table>";
echo "</td></tr>\n"
."</table>";
}
function AllowedForPosting() {
global $nukecprefix,$dbi, $user,$MemberRequired, $MaxAllowedAds;
if (is_user($user) || ($MemberRequired != 1)){
return 1;
} else {
return 0;
}
}
function GetTimeUnix($currhour, $currminute, $currsecond, $currmonth, $currday, $curryear, $chgmonth, $chgday , $chgyear){
$mktimeUnix = mktime($currhour, $currminute, $currsecond, $currmonth + $chgmonth, $currday + $chgday, $curryear + $chgyear);
return $mktimeUnix;
}
function GetUnixTimeNow() {
$nowdatetmp = date("H i s m d Y");
$datearraytmp = explode (" ", $nowdatetmp);
return GetTimeUnix($datearraytmp[0],$datearraytmp[1],$datearraytmp[2],$datearraytmp[3],$datearraytmp[4],$datearraytmp[5],0,0,0);
}
function FormatStrMonthShort($monthvalue) {
if ($monthvalue == 1)$month = _JANUARYSHRT;
if ($monthvalue == 2)$month = _FEBRUARYSHRT;
if ($monthvalue == 3)$month = _MARCHSHRT;
if ($monthvalue == 4)$month = _APRILSHRT;
if ($monthvalue == 5)$month = _MAYSHRT;
if ($monthvalue == 6)$month = _JUNESHRT;
if ($monthvalue == 7)$month = _JULYSHRT;
if ($monthvalue == 8)$month = _AUGUSTSHRT;
if ($monthvalue == 9)$month = _SEPTEMBERSHRT;
if ($monthvalue == 10)$month = _OCTOBERSHRT;
if ($monthvalue == 11)$month = _NOVEMBERSHRT;
if ($monthvalue == 12)$month = _DECEMBERSHRT;
return $month;
}
function FormatStrMonth($monthvalue) {
if ($monthvalue == 1)$month = _JANUARY;
if ($monthvalue == 2)$month = _FEBRUARY;
if ($monthvalue == 3)$month = _MARCH;
if ($monthvalue == 4)$month = _APRIL;
if ($monthvalue == 5)$month = _MAY;
if ($monthvalue == 6)$month = _JUNE;
if ($monthvalue == 7)$month = _JULY;
if ($monthvalue == 8)$month = _AUGUST;
if ($monthvalue == 9)$month = _SEPTEMBER;
if ($monthvalue == 10)$month = _OCTOBER;
if ($monthvalue == 11)$month = _NOVEMBER;
if ($monthvalue == 12)$month = _DECEMBER;
return $month;
}
function FormatDateAds($datetoformat,$formatcode) {
if ((!$formatcode) || ($formatcode == "")) {
$formatcode = 0;
}
$datetemp = date("H i s m d Y",$datetoformat);
$datearray = explode(" ",$datetemp);
$HourtoFormat = $datearray[0];
$MinutetoFormat = $datearray[1];
$SecondtoFormat = $datearray[2];
$MonthtoFormat = $datearray[3];
$DaytoFormat = $datearray[4];
$YeartoFormat = $datearray[5];
switch($formatcode) {
case 0 : return FormatDate0($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat);break;
case 1 : return FormatDate1($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat);break;
case 2 : return FormatDate2($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat);break;
case 3 : return FormatDate3($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat);break;
case 4 : return FormatDate4($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat);break;
case 5 : return FormatDate5($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat);break;
}
}
function FormatDate0($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat) {
/* sample : Jan 12, 2003 */
$monthstr = FormatStrMonthShort($MonthtoFormat);
return $monthstr." ". $DaytoFormat." ".$YeartoFormat;
}
function FormatDate1($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat) {
/* sample : HH:MM:SS Jan 12, 2003 */
$monthstr = FormatStrMonthShort($MonthtoFormat);
return $HourtoFormat.":".$MinutetoFormat.":".$SecondtoFormat." ".$monthstr." ". $DaytoFormat." ".$YeartoFormat;
}
function FormatDate2($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat) {
/* sample : January 12, 2003 */
$monthstr = FormatStrMonth($MonthtoFormat);
return $monthstr." ". $DaytoFormat." ".$YeartoFormat;
}
function FormatDate3($HourtoFormat,$MinutetoFormat, $SecondtoFormat, $MonthtoFormat,$DaytoFormat, $YeartoFormat) {
/* sample : HH:MM:SS January 12, 2003 */
$monthstr = FormatStrMonth($MonthtoFormat);
return $HourtoFormat.":".$MinutetoFormat.":".$SecondtoFormat." ".$monthstr." ". $DaytoFormat." ".$YeartoFormat;
}
function For
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-06, 17:38:05 Mesaj konusu: Re: Youtube modülünde misafir ler yorum yapamasın.ama nasıl?
ilan eklede sayfa postads.php ye gidiyor normalde postads.php
Kod:
<?php
global $prefix;
######################################################################
# Nuke-C : Advanced Classifieds Addon For PHP-Nuke
# ===============================================
#
# Copyright (c) 2002 by Sudirman (nukecpower@yahoo.com)
# http://nukec.org
#
# This module is to process ads postings
#
#################################################################
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!eregi("modules.php", $_SERVER['script_NAME'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include ("modules/".$module_name."/config.php");
include ("modules/".$module_name."/functions.php");
$index = 0;
function Index($id_catg="") {
global $nukecprefix,$dbi,$folder_name, $module_name, $multilingual, $currentlang;
global $AdsTitleLength, $AdsContentLength, $MemberRequired, $PostInMainCatg, $c o o k i e,$user, $UploadImg, $MaxAllowedAds;
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
if (is_user($user) || ($MemberRequired == 0)) {
if (is_user($user)) {
$submitter = "<a href=\"modules.php?name=Your_Account\">".$c o o k i e[1]."</a>";
$submitteruid = $c o o k i e[0];
$jmladsposted = AdsPostedByUser($submitteruid,0,0,0);
if ($jmladsposted >= $MaxAllowedAds) {
$NotAllowedByJml = 1;
} else {
$NotAllowedByJml = 0;
}
} else {
$submitter = $anonymous." [ <a href=\"modules.php?name=Your_Account\">"._NUKECNEWUSER."</a> ]";
$submitteruid = 1;
}
if ($NotAllowedByJml) {
printnotallowlimitreached();
} else {
echo "<center><font class=\"title\"><b>"._NUKECPOSTNEWADS."</b></font><BR>"
."<font class=\"graytext\"><b><a href=\"modules.php?name=$module_name\">"._NUKECMAIN."</a>/"._NUKECPOSTNEWADS."</font></b></center><br>\n";
echo "<form enctype=\"multipart/form-data\" action=\"modules.php?name=".$module_name."&file=postads\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"submitteruid\" value=\"$submitteruid\">";
echo "<font class=\"redtext\"><b>*</b> -> <b>"._NUKECREQUIRED."</b></font>";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"1\">\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECYOURNAME."</b></td><td width=\"5\">:</td><td><font><b>";
echo "$submitter</b></font></td></tr>\n";
echo "<tr><td width=\"25%\"><b>"._NUKECADSTITLE." (".$AdsTitleLength." "._NUKECADSMAXCHARS.")<font class=\"redtext\">*</font></b></td>"
."<td width=\"5\">:</td><td><input type=\"text\" name=\"title\" size=\"40\" maxlength=\"200\"></td></tr>\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECADSDESC ." <font class=\"redtext\">*</font> \n"
."<BR>(".$AdsContentLength." "._NUKECADSMAXCHARS.")</b></td><td width=\"5\" valign=\"top\">:</td>\n"
."<td><textarea name=\"cdesc\" cols=\"60\" rows=\"8\"></textarea></td></tr>\n";
echo "<tr><td width=\"25%\"><b>"._NUKECADSCATG." </b></td><td width=\"5\">:</td><td>\n"
."<select name=\"catgforprocess\">";
$applylanguage = sqlapplylanguage();
$sql = "select id_catg,catg,parentid from ".$nukecprefix."_ads_catg ";
$sql .= "where ".$applylanguage;
$sql .= " order by parentid,catg";
$result2=sql_query($sql, $dbi);
$i = 0;
while(list($id_catg2, $ccatg2, $parentid2) = sql_fetch_row($result2, $dbi)) {
if ($parentid2!=0) $ccatg2=getparent($parentid2,$ccatg2);
if ($postinmaincatg) {
echo "<option value=\"$id_catg2\" ";
if (($id_catg == $id_catg2) or ($id_catg == $parentid2)) {
if ($id_catg == $id_catg2) {
echo "selected";
}
if ($id_catg == $parentid2) {
if ($i == 0) {
echo "selected";
}
$i++;
}
}
echo ">$ccatg2</option>\n";
} else {
if ($parentid2 != 0) {
echo "<option value=\"$id_catg2\" ";
if (($id_catg == $id_catg2) or ($id_catg == $parentid2)) {
if ($id_catg == $id_catg2) {
echo "selected";
}
if ($id_catg == $parentid2) {
if ($i == 0) {
echo "selected";
}
$i++;
}
}
echo ">$ccatg2</option>\n";
}
}
}
echo "</select>\n"
."</td></tr>\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECADSPRICE."</b></td><td width=\"5\">:</td>\n"
."<td>"
."<select name=\"AdsCurr\">";
buildcurrency($sel = "");
echo "</select>"
."<input type=\"text\" name=\"price\" size=\"15\"> "._NUKECCURRSAMPLE."</td></tr>\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECADSURL." </b></td><td width=\"5\">:</td><td><input type=\"text\" name=\"website\" size=\"30\"> <i>"._NUKECEGURL."</i></td></tr>\n";
echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECADSEMAIL."</b></td><td width=\"5\">:</td><td><input type=\"text\" name=\"email\" size=\"25\"> <i>"._NUKECEGEMAIL."</i></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, $postfor, $fileupload, $adslanguage, $fileupload, $fileupload_name, $fileupload_type, $fileupload_size) {
global $nukecprefix,$dbi,$folder_name, $module_name, $multilingual, $currentlang;
global $AdsTitleLength, $AdsContentLength, $MemberRequired, $PostInMainCatg, $c o o k i e, $user, $UploadImg,$Waiting;
global $anonymous;
global $UploadPath,$c o o k i e,$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 ($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();
if (!in_array($imageadstype,$UploadImageType)) $errorImageType = 1;
if (($imageadstype != "jpeg") && ($imageadstype != "jpg") && ($imageadstype != "pjpeg")) {
$ImageUkuran = @getimagesize($fileupload);
if ($ImageUkuran) {
if ($ImageUkuran[0] > $MaxImgWidth) {
$ErrorUkuranImage = 1;
$ErrorUkuranImageWidth = 1;
}
if ($ImageUkuran[1] > $MaxImgHeight) {
$ErrorUkuranImage = 1;
$ErrorUkuranImageHeight = 1;
}
} else {
$ErrorUkuranImage = 1;
}
}
}
if ($ErrorUkuranImage || $errorTitle || $errorCdesc || $errorPrice || $erroremailanony || $errorEmail || $errorImageSize || $errorImageDimension || $errorImageType) {
include ("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
echo "<CENTER><FONT CLASS=\"title\">"._NUKECSUBMITERROR."</font></center><BR>";
echo "<CENTER>";
if ($errorTitle) {
if ($title == "") {
echo "<BR>"._NUKECERRORTITLE."<BR>";
}
if (($title != "") && (strlen($title) > $TitleLength)) {
echo "<BR>"._NUKECERRORCTITLEMAX." $TitleLength "._NUKECCHARS."<BR>";
}
}
if ($errorCdesc) {
if ($cdesc == "") {
echo "<BR>"._NUKECERRORCDESCEMPTY."<BR>";
}
if (($cdesc != "") && (strlen($cdesc) > $DescLength)) {
echo "<BR>"._NUKECERRORCDESCMAX." $DescLength "._NUKECCHARS."<BR>";
}
}
if ($erroremailanony) {
echo "<BR>"._NUKECANONYEMAILREQ."<BR>";
}
if ($errorEmail) {
echo "<BR>"._NUKECERROREMAIL."<BR>";
}
if ($errorImageSize) {
echo "<BR>"._NUKECERRORMAXSIZEALLOWED." $UploadImageSize "._NUKECKB." <BR>";
}
if ($ErrorUkuranImage) {
echo "<BR>"._NUKECERRORMAXDIMENSION." $MaxImgHeight x $MaxImgWidth "._NUKECPIXEL." <BR>";
}
if ($errorImageType) {
echo "<BR><b>$imageadstype</b>"._NUKECALLOWEDFILETYPE.": ";
for ($i = 0;$i<= sizeof($UploadImageType)-1;$i++) {
echo "<b>'.".$UploadImageType[$i]."'</b>";
if ($j != sizeof($UploadImageType)-1) {
echo ", ";
}
$j++;
}
echo "<BR>";
}
echo "<BR><BR>"._NUKECPLEASEGOBACK."";
echo "<BR><a href=\"j a v a s c r i p t:history.go(-1);\"><< <b>"._NUKECGOBACK."</b></a>";
echo "</center>";
CloseTable();
include("footer.php");
} else {
$ads_title = FixQuotes(filter_text($title, "nohtml"));
$ads_content = FixQuotes(nl2br(filter_text($cdesc)));
$nowdate = date("H i s m d Y");
$datearray = explode(" ",$nowdate);
$currhour = $datearray[0];
$currminute = $datearray[1];
$currsecond = $datearray[2];
$currmonth = $datearray[3];
$currday = $datearray[4];
$curryear = $datearray[5];
$posted_on = GetTimeUnix($currhour, $currminute, $currsecond, $currmonth, $currday, $curryear, $chgmonth=0, $chgday=0 , $chgyear=0);
if ($postfor == 0) {
$validuntil = 0;
} else {
$validuntil = GetTimeUnix($currhour, $currminute, $currsecond, $currmonth, $currday, $curryear, $chgmonth=0, $chgday+$postfor , $chgyear=0);
}
$price = FixQuotes(filter_text($price, "nohtml"));
$resultnextidads = sql_query("select max(id_ads) as maxnumber from ".$nukecprefix."_ads_ads",$dbi);
list ($nextidads) = sql_fetch_row($resultnextidads,$dbi);
$nextidads++;
if ($fileupload != "") {
$type = basename($fileupload_type);
if (($type == "jpeg") || ($type == "jpg") || ($type == "pjpeg")) {
$type= "jpeg";
}
if ($type == "x-png") {
$type = "png";
}
$filename = $UploadPath."$nextidads.".$type;
$filename_thumb = $UploadPath.$nextidads."_thumb.".$type;
copy ($fileupload, $filename);
copy ($fileupload, $filename_thumb);
$imguploadname = $nextidads.".".$type;
$imgsize = @getimagesize($fileupload);
$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);
}
}
} else {
$imguploadname = "";
}
if ($website != "") {
$website = str_replace("http://","",$website);
}
if ($Waiting) {
$active = 0;
} else {
$active = 1;
}
echo $sql = "insert into ".$nukecprefix."_ads_ads values"
."('','$catgforprocess','$ads_title','$ads_content','$imguploadname','$AdsCurr','$price','$submitteruid','$email','$website','$posted_on','$validuntil','0','$adslanguage','$active')";
$res = sql_query($sql,$dbi);
header("Location:modules.php?name=".$module_name."&file=postads&op=Done&id_catg=$catgforprocess");
}
} else {
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
echo "<center><font class=\"title\">"._NUKECPOSTNEWADS."</font></center><BR>\n";
printnotallowforanonymouse();
CloseTable();
include("footer.php");
}
}
function Done($id_catg) {
global $Waiting,$module_name,$nukecprefix,$dbi;
include("header.php");
MenuNukeC(1);
echo "<BR>";
OpenTable();
echo "<center><font class=\"title\">";
if ($Waiting == 1) {
echo _NUKECADSWAITINGRECEIVED."";
} else {
echo _NUKECADSPOSTED;
}
echo "</font><BR>\n";
echo "<BR><b>"._NUKECADSTHX."</b>";
echo "<BR><BR>";
if ($Waiting == 1) {
$res = sql_query("select count(*) as ttl from ".$nukecprefix."_ads_ads where active = 0",$dbi);
list ($jmlwaiting) = sql_fetch_row($res,$dbi);
echo _NUKECADSWAITINGMSG."<BR>"._NUKECADSWAITINGMSG1." $jmlwaiting "._NUKECADSWAITINGMSG2;
} else {
echo "<a href=\"modules.php?name=".$module_name."&op=ViewCatg&id_catg=$id_catg\">"._NUKECADSCLICKHERE."</a>";
}
echo "</center>";
CloseTable();
include("footer.php");
}
switch($op) {
case "Done":Done($id_catg);break;
case "SubmitAds": SubmitAds($submitteruid, $title, $cdesc, $catgforprocess, $AdsCurr, $price, $website, $email, $postfor, $fileupload, $adslanguage, $fileupload, $fileupload_name, $fileupload_type, $fileupload_size);break;
default : Index($id_catg); break;
}
?>
Başa dön
shahan Mesaj: 50+
Kayıt: Feb 29, 2008 Mesajlar: 79
Tarih: 2008-03-06, 17:40:31 Mesaj konusu:
Bunun hakkında bilgim yok maalesef
Verdiğin kodlarda link eklemeyle alakalı bir fonksiyon bulamadım. Diğer functions.php dosyasında olabilir belki...
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Başa dön
shahan Mesaj: 50+
Kayıt: Feb 29, 2008 Mesajlar: 79
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-07, 16:45:59 Mesaj konusu:
site kimin acaba sanırım sorunu ocozmus ?
Başa dön
shahan Mesaj: 50+
Kayıt: Feb 29, 2008 Mesajlar: 79
Tarih: 2008-03-07, 17:09:26 Mesaj konusu:
Bu arkadaş:
prens1
Başa dön
prens1 Mesaj: 300+
Kayıt: Jan 02, 2007 Mesajlar: 407
Tarih: 2008-03-07, 19:09:56 Mesaj konusu:
juglanin :
site kimin acaba sanırım sorunu ocozmus ?
Arkadaşım ben Nukec yi aynen kurdum hiç bir değişiklik yapmış değilim kurduğum gibi duruyor hala dosyayı nuketur'ten indirdim istersen sende ordan alıp bir dene
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-08, 15:19:41 Mesaj konusu:
Sanirm 2.0 i kurdunz?
Başa dön
juglanin Mesaj: 500+
Kayıt: Dec 09, 2005 Mesajlar: 880
Tarih: 2008-03-09, 14:06:56 Mesaj konusu:
prens1 :
juglanin :
site kimin acaba sanırım sorunu ocozmus ?
Arkadaşım ben Nukec yi aynen kurdum hiç bir değişiklik yapmış değilim kurduğum gibi duruyor hala dosyayı nuketur'ten indirdim istersen sende ordan alıp bir dene
su indirdiginiz linki yazrmisiniz
?bende neden guestler ilan birakabiliyor cozemedim.
Başa dön
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız