Anasayfa FORUMLAR Üye Girişi Dosyalar Dersler İpuçları Yardımcı Araçlar Hakkımızda
KİMLER BAĞLI
Toplam Üye: 32638
Aktif Üye: 0
Aktif Ziyaretçi: 653
Üye Adı
Şifre
Beni Hatırla
          Yeni Üye KayıtYeni Üye Kayıt
          Şifremi UnuttumŞifremi Unuttum
FORUMLAR
 ME_Haber 2.3..
(111511 okuma, 145 yanıt)
 Resim Galerisi Modülü 2.0..
(124203 okuma, 173 yanıt)
 Ustalardan Bir Ricam Olac..
(13866 okuma, 6 yanıt)
 nukecode.com will close..
(11391 okuma, 5 yanıt)
 super youtube player a lo..
(6461 okuma, 1 yanıt)
 Need good PHP Haber port..
(5703 okuma, 0 yanıt)
 Forum Nasil Tam Sayfa Olu..
(35746 okuma, 40 yanıt)
 Php nuke Forumu Düzenleme..
(10089 okuma, 6 yanıt)
 Yeni Üyelik Aktivasyon Li..
(11150 okuma, 6 yanıt)
 Aşk Flashları Modülü..
(7157 okuma, 2 yanıt)
 resim galeri 2.0 da kateg..
(11633 okuma, 9 yanıt)
 Yeni iki modul: Merhumlar..
(32875 okuma, 36 yanıt)
 ürün tanıtım modülü..
(25615 okuma, 23 yanıt)
 PHP Nuke is out..
(15319 okuma, 13 yanıt)
 MSN Video Bing Video oldu..
(5304 okuma, 0 yanıt)
 haberhit.com..
(5898 okuma, 1 yanıt)
 Bilgi Yarışması 1.0 tama..
(53003 okuma, 72 yanıt)
 Musıc Box elinde olan var..
(6834 okuma, 2 yanıt)
 Online Okey , Batak , Tav..
(177289 okuma, 340 yanıt)
 Emlak Modül ve Blockları ..
(12527 okuma, 8 yanıt)
 WM who ist shampions..
(5162 okuma, 1 yanıt)
 coppermine resim galerisi..
(5585 okuma, 1 yanıt)
 Forumda Teşekkür Eklentis..
(9210 okuma, 7 yanıt)
 free wordpress themes..
(5681 okuma, 1 yanıt)
 JW image rotator for nsn ..
(7792 okuma, 4 yanıt)
 need Iletisim module..
(11216 okuma, 8 yanıt)
 Yeni modul: İletişim modu..
(28179 okuma, 33 yanıt)
 Başvuru Modulu ve Etkinli..
(5953 okuma, 1 yanıt)
 world cup flash..
(5129 okuma, 0 yanıt)
 ..:: Php Nuke FTP link Ha..
(5024 okuma, 0 yanıt)
 yeni phpnuke youtube 2.0..
(5268 okuma, 1 yanıt)
 Content Plus Önceki Konu ..
(4861 okuma, 0 yanıt)
 Php nuke Tickets Modülü..
(8120 okuma, 5 yanıt)
 need help to news time..
(4633 okuma, 0 yanıt)
 NSN News v3.0 new plugin..
(4916 okuma, 0 yanıt)
 how to save flash as imag..
(6157 okuma, 2 yanıt)
 Video Blok Yardım Lütfen...
(6097 okuma, 2 yanıt)
 gazete ara..
(9945 okuma, 5 yanıt)
 Bizim Yazarlar ve Bizim Ş..
(15199 okuma, 14 yanıt)
 Nuke Reflections v2 Türkç..
(14841 okuma, 14 yanıt)
 CNB Your Account 750 442 ..
(14493 okuma, 13 yanıt)
 Admin panelindeki simge ç..
(12536 okuma, 9 yanıt)
 Hosting Modülü..
(14270 okuma, 13 yanıt)
 Bizim şairler Modülü..
(5299 okuma, 1 yanıt)
 new plugin for nsn news v..
(4842 okuma, 1 yanıt)
 php nuke 8.0 türkce dil s..
(7050 okuma, 3 yanıt)
 Kan Bankası Modül istek..
(6289 okuma, 2 yanıt)
 Haber Konulari Sayfasinda..
(5877 okuma, 2 yanıt)
 Kan Bankası Modülünde İsi..
(7201 okuma, 3 yanıt)
 sonhaberler flash block ..
(6760 okuma, 4 yanıt)
Netopsiyon Online: Forums
Netopsiyon Online :: Başlık görüntüleniyor - BU MODULUN MODİFİKASYONU
 AramaArama   RütbelerRütbeliler   ProfilProfil   GirişGiriş 


BU MODULUN MODİFİKASYONU

 
Bu forum kilitlendi: mesaj gönderemez, cevap yazamaz ya da başlıkları değiştiremezsiniz   Bu başlık kilitlendi: mesajları değiştiremez ya da cevap yazamazsınız    Netopsiyon Online Forum Ana Sayfa -> Php-Nuke -> Php Nuke Modülleri
Önceki başlık :: Sonraki başlık  
Yazar Mesaj
juglanin
Mesaj: 500+
Mesaj: 500+





Kayıt: Dec 09, 2005
Mesajlar: 880

MesajTarih: 2008-02-27, 16:47:34    Mesaj konusu: BU MODULUN MODİFİKASYONU Alıntıyla Cevap Gönder

merhaba web links modulunde guestlerin link eklemesini engellemek icin hangi kodu eklemeliyim?tum ziyaretcilere actim daha iyi indexlenmesi icin
config.php si modulun
Kod:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2005 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Based on Journey Links Hack                                          */
/* Copyright (c) 2000 by James Knickelbein                              */
/* Journey Milwaukee (http://www.journeymilwaukee.com)                  */
/*                                                                      */
/* 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.       */
/************************************************************************/

######################################################################
# Web Links Preferences (Some variables are valid also for Downloads)
#
# $perpage:                How many links to show on each page?
# $popular:                How many hits need a link to be listed as popular?
# $newlinks:               How many links to display in the New Links Page?
# $toplinks:               How many links to display in The Best Links Page? (Most Popular)
# $linksresults:           How many links to display on each search result page?
# $links_anonaddlinklock:      Lock Unregistered users from Suggesting New Links? (0=Yes 1=No)
# $anonwaitdays:           Number of days anonymous users need to wait to vote on a link
# $outsidewaitdays:        Number of days outside users need to wait to vote on a link (checks IP)
# $useoutsidevoting:           Allow Webmasters to put vote links on their site (1=Yes 0=No)
# $anonweight:             How many Unregistered User vote per 1 Registered User Vote?
# $outsideweight:          How many Outside User vote per 1 Registered User Vote?
# $detailvotedecimal:          Let Detailed Vote Summary Decimal out to N places. (no max)
# $mainvotedecimal:        Let Main Vote Summary Decimal show out to N places. (max 4)
# $toplinkspercentrigger:      1 to Show Top Links as a Percentage (else # of links)
# $toplinks:               Either # of links OR percentage to show (percentage as whole number. #/100)
# $mostpoplinkspercentrigger:   1 to Show Most Popular Links as a Percentage (else # of links)
# $mostpoplinks:           Either # of links OR percentage to show (percentage as whole number. #/100)
# $featurebox:             1 to Show Feature Link Box on links Main Page? (1=Yes 0=No)
# $linkvotemin:            Number votes needed to make the 'top 10' list
# $blockunregmodify:           Block unregistered users from suggesting links changes? (1=Yes 0=No)
######################################################################

$perpage = 10;
$popular = 5000;
$newlinks = 10;
$toplinks = 25;
$linksresults = 10;
$links_anonaddlinklock = 1;
$anonwaitdays = 1;
$outsidewaitdays = 1;
$useoutsidevoting = 1;
$anonweight = 10;
$outsideweight = 20;
$detailvotedecimal = 2;
$mainvotedecimal = 1;
$toplinkspercentrigger = 0;
$toplinks = 25;
$mostpoplinkspercentrigger = 0;
$mostpoplinks = 25;
$featurebox = 1;
$linkvotemin = 5;
$blockunregmodify = 1;

?>






index.php side
Kod:

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2005 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Based on Journey Links Hack                                          */
/* Copyright (c) 2000 by James Knickelbein                              */
/* Journey Milwaukee (http://www.journeymilwaukee.com)                  */
/*                                                                      */
/* 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 (!defined('MODULE_FILE')) {
   die ("You can't access this file directly...");
}

if (isset($min)) {
    $min = intval($min);
}

if (isset($show)) {
    $show = intval($show);
}

define('INDEX_FILE', true);
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._WEBLINKS."";
require_once("modules/Web_Links/l_config.php");

function getparent($parentid,$title) {
   global $prefix, $db;
   $parentid = intval($parentid);
   $row = $db->sql_fetchrow($db->sql_query("SELECT cid, title, parentid from ".$prefix."_links_categories where cid='$parentid'"));
   $cid = intval($row['cid']);
   $ptitle = stripslashes(check_html($row['title'], "nohtml"));
   $pparentid = intval($row['parentid']);
   if ($ptitle=="$title") $title=$title;
   elseif (!empty($ptitle)) $title=$ptitle."/".$title;
   if ($pparentid!=0) {
      $title=getparent($pparentid,$title);
   }
   return $title;
}

function getparentlink($parentid,$title) {
   global $prefix, $db, $module_name;
   $parentid = intval($parentid);
   $row = $db->sql_fetchrow($db->sql_query("SELECT cid, title, parentid from ".$prefix."_links_categories where cid='$parentid'"));
   $cid = intval($row['cid']);
   $ptitle = stripslashes(check_html($row['title'], "nohtml"));
   $pparentid = intval($row['parentid']);
   if (!empty($ptitle)) $title="<a href=modules.php?name=$module_name&l_op=viewlink&cid=$cid>$ptitle</a>/".$title;
   if ($pparentid!=0) {
      $title=getparentlink($pparentid,$ptitle);
   }
   return $title;
}

function menu($mainlink) {
   global $module_name, $query;
   OpenTable();
   $ThemeSel = get_theme();
   if (file_exists("themes/$ThemeSel/images/link-logo.gif")) {
      echo "<br><center><a href=\"modules.php?name=$module_name\"><img src=\"themes/$ThemeSel/images/link-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
   } else {
      echo "<br><center><a href=\"modules.php?name=$module_name\"><img src=\"modules/$module_name/images/link-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
   }
include('sponsor.html');
   echo "<form action=\"modules.php?name=$module_name&amp;l_op=search&amp;query=$query\" method=\"post\">"
   ."<font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\""._SEARCH."\"></font>"
   ."</form>";
   echo "<font class=\"content\">[ ";
   if ($mainlink>0) {
      echo "<a href=\"modules.php?name=$module_name\">"._LINKSMAIN."</a> | ";
   }
   echo "<a href=\"modules.php?name=$module_name&l_op=AddLink\">"._ADDLINK."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=NewLinks\">"._NEW."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=MostPopular\">"._POPULAR."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=TopRated\">"._TOPRATED."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=RandomLink\">"._RANDOM."</a> ]"
   ."</font></center>";
   CloseTable();
}

function SearchForm() {
   echo "<form action=\"modules.php?name=$module_name&amp;l_op=search&amp;query=$query\" method=\"post\">"
   ."<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">"
   ."<tr><td><font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\""._SEARCH."\"></td></tr>"
   ."</table>"
   ."</form>";
}

function linkinfomenu($lid, $ttitle) {
   global $module_name, $user;
   echo "<br><font class=\"content\">[ "
   ."<a href=\"modules.php?name=$module_name&l_op=viewlinkcomments&lid=$lid&ttitle=$ttitle\">"._LINKCOMMENTS."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=viewlinkdetails&lid=$lid&ttitle=$ttitle\">"._ADDITIONALDET."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=viewlinkeditorial&lid=$lid&ttitle=$ttitle\">"._EDITORREVIEW."</a>"
   ." | <a href=\"modules.php?name=$module_name&l_op=modifylinkrequest&lid=$lid\">"._MODIFY."</a>";
   if (is_user($user)) {
      echo " | <a href=\"modules.php?name=$module_name&l_op=brokenlink&lid=$lid\">"._REPORTBROKEN."</a>";
   }
   echo " ]</font>";
}

function index() {
   global $prefix, $db;
   include("header.php");
   $mainlink = 0;
   menu($mainlink);
   echo "<br>";
   OpenTable();
   echo "<center><font class=\"title\"><b>"._LINKSMAINCAT."</b></font></center><br>";
   echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>";
   $result = $db->sql_query("select cid, title, cdescription from ".$prefix."_links_categories where parentid=0 order by title");
   $dum = 0;
   $count = 0;
   while ($row = $db->sql_fetchrow($result)) {
      $cid = intval($row['cid']);
      $title = stripslashes(check_html($row['title'], "nohtml"));
      $cdescription = stripslashes($row['cdescription']);
      echo "<td><font class=\"option\"><strong><big>&middot;</big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid\"><b>$title</b></a></font>";
      categorynewlinkgraphic($cid);
      if ($cdescription) {
         echo "<br><font class=\"content\">$cdescription</font><br>";
      } else {
         echo "<br>";
      }
      $result2 = $db->sql_query("SELECT cid, title from ".$prefix."_links_categories where parentid='$cid' order by title limit 0,3");
      $space = 0;
      while ($row2 = $db->sql_fetchrow($result2)) {
         $cid = intval($row2['cid']);
         $stitle = stripslashes(check_html($row2['title'], "nohtml"));
         if ($space>0) {
            echo ",&nbsp;";
         }
         echo "<font class=\"content\"><a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid\">$stitle</a></font>";
         $space++;
      }
      if ($count<1) {
         echo "</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td>";
         $dum = 1;
      }
      $count++;
      if ($count==2) {
         echo "</td></tr><tr>";
         $count = 0;
         $dum = 0;
      }
   }
   if ($dum == 1) {
      echo "</tr></table>";
   } elseif ($dum == 0) {
      echo "<td></td></tr></table>";
   }
   $result3 = $db->sql_query("SELECT * from ".$prefix."_links_links");
   $numrows = $db->sql_numrows($result3);
   $result4 = $db->sql_query("SELECT * from ".$prefix."_links_categories");
   $catnum = $db->sql_numrows($result4);
   $numrows = intval($numrows);
   $catnum = intval($catnum);
   echo "<br><br><center><font class=\"content\">"._THEREARE." <b>$numrows</b> "._LINKS." "._AND." <b>$catnum</b> "._CATEGORIES." "._INDB."</font></center>";
   CloseTable();
   include("footer.php");
}

function AddLink() {
   global $prefix, $db, $user, $links_anonaddlinklock, $module_name;
   include("header.php");
   $mainlink = 1;
   menu(1);
   echo "<br>";
   OpenTable();
   echo "<center><font class=\"title\"><b>"._ADDALINK."</b></font></center><br><br>";
   if (is_user($user) || $links_anonaddlinklock == 1) {  /* 06-24-01 Bug fix : changed $links_anonaddlinklock != 1 to $links_anonaddlinklock == 1 */
   echo "<b>"._INSTRUCTIONS.":</b><br>"
   ."<strong><big>&middot;</big></strong> "._SUBMITONCE."<br>"
   ."<strong><big>&middot;</big></strong> "._POSTPENDING."<br>"
   ."<strong><big>&middot;</big></strong> "._USERANDIP."<br>"
   ."<form method=\"post\" action=\"modules.php?name=$module_name&amp;l_op=Add\">"
   .""._PAGETITLE.": <input type=\"text\" name=\"title\" size=\"50\" maxlength=\"100\"><br>"
   .""._PAGEURL.": <input type=\"text\" name=\"url\" size=\"50\" maxlength=\"100\" value=\"http://\"><br>";
   echo ""._CATEGORY.": <select name=\"cat\">";
   $result = $db->sql_query("SELECT cid, title, parentid from ".$prefix."_links_categories order by parentid,title");
   while ($row = $db->sql_fetchrow($result)) {
      $cid2 = intval($row['cid']);
      $ctitle2 = stripslashes(check_html($row['title'], "nohtml"));
      $parentid2 = intval($row['parentid']);
      if ($parentid2!=0) $ctitle2=getparent($parentid2,$ctitle2);
      echo "<option value=\"$cid2\">$ctitle2</option>";
   }
   echo "</select><br><br>"
   .""._LDEscriptION."<br><textarea name=\"description\" cols=\"70\" rows=\"15\"></textarea><br><br><br>"
   .""._YOURNAME.": <input type=\"text\" name=\"auth_name\" size=\"30\" maxlength=\"60\"><br>"
   .""._YOUREMAIL.": <input type=\"text\" name=\"email\" size=\"30\" maxlength=\"60\"><br><br>"
   ."<input type=\"hidden\" name=\"l_op\" value=\"Add\">"
   ."<input type=\"submit\" value=\""._ADDURL."\"> "._GOBACK."<br><br>"
   ."</form>";
   }else {
      echo "<center>"._LINKSNOTUSER1."<br>"
      .""._LINKSNOTUSER2."<br><br>"
      .""._LINKSNOTUSER3."<br>"
      .""._LINKSNOTUSER4."<br>"
      .""._LINKSNOTUSER5."<br>"
      .""._LINKSNOTUSER6."<br>"
      .""._LINKSNOTUSER7."<br><br>"
      .""._LINKSNOTUSER8."";
   }
   CloseTable();
   include("footer.php");
}

function Add($title, $url, $auth_name, $cat, $description, $email) {
   global $prefix, $db, $user;
   $result = $db->sql_query("SELECT url from ".$prefix."_links_links where url='$url'");
   $numrows = $db->sql_numrows($result);
   if ($numrows>0) {
      include("header.php");
      menu(1);
      echo "<br>";
      OpenTable();
      echo "<center><b>"._LINKALREADYEXT."</b><br><br>"
      .""._GOBACK."";
      CloseTable();
      include("footer.php");
   } else {
      if(is_user($user)) {
         $user2 = base64_decode($user);
         $user2 = addslashes($user2);
         $c o o k i e = explode(":", $user2);
         c o o k i edecode($user);
         $submitter = $c o o k i e[1];
      }
      // Check if Title exist
      if (empty($title)) {
         include("header.php");
         menu(1);
         echo "<br>";
         OpenTable();
         echo "<center><b>"._LINKNOTITLE."</b><br><br>"
         .""._GOBACK."";
         CloseTable();
         include("footer.php");
      }
      // Check if URL exist
      if (empty($url)) {
         include("header.php");
         menu(1);
         echo "<br>";
         OpenTable();
         echo "<center><b>"._LINKNOURL."</b><br><br>"
         .""._GOBACK."";
         CloseTable();
         include("footer.php");
      }
      // Check if Description exist
      if (empty($description)) {
         include("header.php");
         menu(1);
         echo "<br>";
         OpenTable();
         echo "<center><b>"._LINKNODESC."</b><br><br>"
         .""._GOBACK."";
         CloseTable();
         include("footer.php");
      }
      $cat = explode("-", $cat);
      if (empty($cat[1])) {
         $cat[1] = 0;
      }
      $title = stripslashes(check_html(FixQuotes($title, "nohtml")));
      $url = stripslashes(check_html($url, "nohtml"));
      $description = stripslashes(check_html(FixQuotes($description), "html"));
      $auth_name = stripslashes(check_html($auth_name, "nohtml"));
      if (!empty($email)) {
         if (($email = validate_mail(stripslashes(check_html($email, "nohtml")))) === false)
         {
            die();
         }
      }
      $cat[0] = intval($cat[0]);
      $cat[1] = intval($cat[1]);
      $num_new = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_newlink WHERE title='$title' OR url='$url' OR description='$description'"));
      if ($num_new == 0) {
         $db->sql_query("insert into ".$prefix."_links_newlink values (NULL, '$cat[0]', '$cat[1]', '".addslashes($title)."', '".addslashes($url)."', '".addslashes($description)."', '".addslashes($auth_name)."', '".addslashes($email)."', '".addslashes($submitter)."')");
      }
      include("header.php");
      menu(1);
      echo "<br>";
      OpenTable();
      echo "<center><b>"._LINKRECEIVED."</b><br>";
      if (!empty($email)) {
         echo _EMAILWHENADD;
      } else {
         echo _CHECKFORIT;
      }
      CloseTable();
      include("footer.php");
   }
}

function NewLinks($newlinkshowdays) {
   global $prefix, $db, $module_name;
   include("header.php");
    $newlinkshowdays = intval(trim($newlinkshowdays));
   menu(1);
   echo "<br>";
   OpenTable();
   echo "<center><font class=\"option\"><b>"._NEWLINKS."</b></font></center><br>";
   $counter = 0;
   $allweeklinks = 0;
   while ($counter <= 7-1){
      $newlinkdayRaw = (time()-(86400 * $counter));
      $newlinkday = date("d-M-Y", $newlinkdayRaw);
      $newlinkView = date("F d, Y", $newlinkdayRaw);
      $newlinkDB = Date("Y-m-d", $newlinkdayRaw);
      $totallinks = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_links WHERE date LIKE '%$newlinkDB%'"));
      $counter++;
      $allweeklinks = $allweeklinks + $totallinks;
   }
   $counter = 0;
   $allmonthlinks = 0;
   while ($counter <=30-1){
      $newlinkdayRaw = (time()-(86400 * $counter));
      $newlinkDB = Date("Y-m-d", $newlinkdayRaw);
      $totallinks = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_links WHERE date LIKE '%$newlinkDB%'"));
      $allmonthlinks = $allmonthlinks + $totallinks;
      $counter++;
   }
   echo "<center><b>"._TOTALNEWLINKS.":</b> "._LASTWEEK." - $allweeklinks \ "._LAST30DAYS." - $allmonthlinks<br>"
   .""._SHOW.": <a href=\"modules.php?name=$module_name&l_op=NewLinks&newlinkshowdays=7\">"._1WEEK."</a> - <a href=\"modules.php?name=$module_name&l_op=NewLinks&newlinkshowdays=14\">"._2WEEKS."</a> - <a href=\"modules.php?name=$module_name&l_op=NewLinks&newlinkshowdays=30\">"._30DAYS."</a>"
   ."</center><br>";
   /* List Last VARIABLE Days of Links */
   if ($newlinkshowdays <= 0) $newlinkshowdays = 7;
   echo "<br><center><b>"._TOTALFORLAST." $newlinkshowdays "._DAYS.":</b><br><br>";
   $counter = 0;
   $allweeklinks = 0;
   while ($counter <= $newlinkshowdays-1) {
      $newlinkdayRaw = (time()-(86400 * $counter));
      $newlinkday = date("d-M-Y", $newlinkdayRaw);
      $newlinkView = date("F d, Y", $newlinkdayRaw);
      $newlinkDB = Date("Y-m-d", $newlinkdayRaw);
      $totallinks = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_links WHERE date LIKE '%$newlinkDB%'"));
      $counter++;
      $allweeklinks = $allweeklinks + $totallinks;
      echo "<strong><big>&middot;</big></strong> <a href=\"modules.php?name=Web_Links&l_op=NewLinksDate&selectdate=$newlinkdayRaw\">$newlinkView</a>&nbsp;($totallinks)<br>";
   }
   $counter = 0;
   $allmonthlinks = 0;
   echo "</center>";
   CloseTable();
   include("footer.php");
}

function NewLinksDate($selectdate) {
   global $prefix, $db, $module_name, $admin, $user, $admin_file, $locale, $mainvotedecimal, $datetime;
   $admin = base64_decode($admin);
   $admin = addslashes($admin);
   $admin = explode(":", $admin);
   $aid = "$admin[0]";
   $row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper from ".$prefix."_authors where aid='$aid'"));
   $radminsuper = intval($row['radminsuper']);
   $dateDB = (date("d-M-Y", $selectdate));
   $dateView = (date("F d, Y", $selectdate));
   include("header.php");
   menu(1);
   echo "<br>";
   OpenTable();
   $newlinkDB = Date("Y-m-d", $selectdate);
   $totallinks = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_links WHERE date LIKE '%$newlinkDB%'"));
   echo "<font class=\"option\"><b>$dateView - $totallinks "._NEWLINKS."</b></font>"
   ."<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">";
   $result2 = $db->sql_query("SELECT lid, cid, sid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from ".$prefix."_links_links where date LIKE '%$newlinkDB%' order by title ASC");
   while ($row2 = $db->sql_fetchrow($result2)) {
      $lid = intval($row2['lid']);
      $cid = intval($row2['cid']);
      $sid = intval($row2['sid']);
      $title = stripslashes(check_html($row2['title'], "nohtml"));
      $description = stripslashes($row2['description']);
      $time = $row2['date'];
      $hits = intval($row2['hits']);
      $linkratingsummary = $row2['linkratingsummary'];
      $totalvotes = intval($row2['totalvotes']);
      $totalcomments = intval($row2['totalcomments']);
      $linkratingsummary = number_format($linkratingsummary, $mainvotedecimal);
      echo "<a href=\"modules.php?name=$module_name&l_op=visit&lid=$lid\" target=\"new\">$title</a>";
      newlinkgraphic($datetime, $time);
      popgraphic($hits);
      echo "<br>"._DEscriptION.": $description<br>";
      setlocale (LC_TIME, $locale);
      /* INSERT code for *editor review* here */
      ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
      $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      echo ""._ADDEDON.": <b>$datetime</b> "._HITS.": $hits";
      $transfertitle = str_replace (" ", "_", $title);
      /* voting & comments stats */
      if ($totalvotes == 1) {
         $votestring = _VOTE;
      } else {
         $votestring = _VOTES;
      }
      if ($linkratingsummary!="0" || $linkratingsummary!="0.0") {
         echo " "._RATING.": $linkratingsummary ($totalvotes $votestring)";
      }
      echo "<br>";
      if ($radminsuper == 1) {
         echo "<a href=\"".$admin_file.".php?op=LinksModLink&lid=$lid\">"._EDIT."</a> | ";
      }
      echo "<a href=\"modules.php?name=$module_name&l_op=ratelink&lid=$lid&ttitle=$transfertitle\">"._RATESITE."</a>";
      if (is_user($user)) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=brokenlink&lid=$lid\">"._REPORTBROKEN."</a>";
      }
      if ($totalvotes != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkdetails&lid=$lid&ttitle=$transfertitle\">"._DETAILS."</a>";
      }
      if ($totalcomments != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkcomments&lid=$lid&ttitle=$transfertitle\">"._SCOMMENTS." ($totalcomments)</a>";
      }
      detecteditorial($lid, $transfertitle);
      echo "<br>";
      $row3 = $db->sql_fetchrow($db->sql_query("SELECT title from ".$prefix."_links_categories where cid='$cid'"));
      $ctitle = stripslashes(check_html($row3['title'], "nohtml"));
      $ctitle=getparent($cid,$ctitle);
      echo ""._CATEGORY.": $ctitle";
      echo "<br><br>";
   }
   echo "</font></td></tr></table>";
   CloseTable();
   include("footer.php");
}

function TopRated($ratenum, $ratetype) {
   global $prefix, $db, $admin, $module_name, $user, $locale, $mainvotedecimal, $datetime, $admin_file;
   include("header.php");
   include("modules/$module_name/l_config.php");
   menu(1);
   echo "<br>";
   OpenTable();
   echo "<table border=\"0\" width=\"100%\"><tr><td align=\"center\">";
   if (!empty($ratenum) && !empty($ratetype)) {
      $ratenum = intval($ratenum);
      $ratetype = htmlentities($ratetype);
      $toplinks = $ratenum;
      if ($ratetype == "percent") {
         $toplinkspercentrigger = 1;
      }
   }
   if ($toplinkspercentrigger == 1) {
      $toplinkspercent = $toplinks;
      $totalratedlinks = $db->sql_numrows($db->sql_query("SELECT * from ".$prefix."_links_links where linkratingsummary != '0'"));
      $toplinks = $toplinks / 100;
      $toplinks = $totalratedlinks * $toplinks;
      $toplinks = round($toplinks);
   }
   if ($toplinkspercentrigger == 1) {
      echo "<center><font class=\"option\"><b>"._BESTRATED." $toplinkspercent% ("._OF." $totalratedlinks "._TRATEDLINKS.")</b></font></center><br>";
   } else {
      echo "<center><font class=\"option\"><b>"._BESTRATED." ".htmlentities($toplinks)." </b></font></center><br>";
   }
   echo "</td></tr>"
   ."<tr><td><center>"._NOTE." $linkvotemin "._TVOTESREQ."<br>"
   .""._SHOWTOP.":  [ <a href=\"modules.php?name=$module_name&l_op=TopRated&ratenum=10&ratetype=num\">10</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=TopRated&ratenum=25&ratetype=num\">25</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=TopRated&ratenum=50&ratetype=num\">50</a> | "
   ."<a href=\"modules.php?name=$module_name&l_op=TopRated&ratenum=1&ratetype=percent\">1%</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=TopRated&ratenum=5&ratetype=percent\">5%</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=TopRated&ratenum=10&ratetype=percent\">10%</a> ]</center><br><br></td></tr>";
   $result = $db->sql_query("SELECT lid, cid, sid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from ".$prefix."_links_links where linkratingsummary != 0 and totalvotes >= $linkvotemin order by linkratingsummary DESC limit 0,$toplinks");
   echo "<tr><td>";
   while ($row = $db->sql_fetchrow($result)) {
      $lid = intval($row['lid']);
      $cid = intval($row['cid']);
      $sid = intval($row['sid']);
      $title = stripslashes(check_html($row['title'], "nohtml"));
      $description = stripslashes($row['description']);
      $time = $row['date'];
      $hits = intval($row['hits']);
      $linkratingsummary = $row['linkratingsummary'];
      $totalvotes = intval($row['totalvotes']);
      $totalcomments = intval($row['totalcomments']);
      $linkratingsummary = number_format($linkratingsummary, $mainvotedecimal);
      echo "<a href=\"modules.php?name=$module_name&l_op=visit&lid=$lid\" target=\"new\">$title</a>";
      newlinkgraphic($datetime, $time);
      popgraphic($hits);
      echo "<br>";
      echo ""._DEscriptION.": $description<br>";
      setlocale (LC_TIME, $locale);
      ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
      $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      echo ""._ADDEDON.": $datetime "._HITS.": $hits";
      $transfertitle = str_replace (" ", "_", $title);
      /* voting & comments stats */
      if ($totalvotes == 1) {
         $votestring = _VOTE;
      } else {
         $votestring = _VOTES;
      }
      if ($linkratingsummary!="0" || $linkratingsummary!="0.0") {
         echo " "._RATING.": <b> $linkratingsummary </b> ($totalvotes $votestring)";
      }
      echo "<br><a href=\"modules.php?name=$module_name&l_op=ratelink&lid=$lid&ttitle=$transfertitle\">"._RATESITE."</a>";
      if (is_user($user)) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=brokenlink&lid=$lid\">"._REPORTBROKEN."</a>";
      }
      if ($totalvotes != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkdetails&lid=$lid&ttitle=$transfertitle\">"._DETAILS."</a>";
      }
      if ($totalcomments != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkcomments&lid=$lid&ttitle=$transfertitle\">"._SCOMMENTS." ($totalcomments)</a>";
      }
      detecteditorial($lid, $transfertitle);
      echo "<br>";
      $row2 = $db->sql_fetchrow($db->sql_query("SELECT title from ".$prefix."_links_categories where cid='$cid'"));
      $ctitle = $row2['title'];
      $ctitle = getparent($cid,$ctitle);
      echo ""._CATEGORY.": $ctitle";
      echo "<br><br>";
      echo "<br><br>";
   }
   echo "</font></td></tr></table>";
   CloseTable();
   include("footer.php");
}

function MostPopular($ratenum, $ratetype) {
   global $prefix, $db, $admin, $module_name, $user, $admin_file, $locale, $mainvotedecimal, $datetime;
   $admin = base64_decode($admin);
   $admin = addslashes($admin);
   $admin = explode(":", $admin);
   $aid = "$admin[0]";
   $row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper from ".$prefix."_authors where aid='$aid'"));
   $radminsuper = intval($row['radminsuper']);
   include("header.php");
   include("modules/$module_name/l_config.php");
   menu(1);
   echo "<br>";
   OpenTable();
   echo "<table border=\"0\" width=\"100%\"><tr><td align=\"center\">";
   if (!empty($ratenum) && !empty($ratetype)) {
      $ratenum = intval($ratenum);
      $ratetype = htmlentities($ratetype);
      $mostpoplinks = $ratenum;
      if ($ratetype == "percent") $mostpoplinkspercentrigger = 1;
   }
   if ($mostpoplinkspercentrigger == 1) {
      $toplinkspercent = $mostpoplinks;
      $result2 = $db->sql_query("SELECT * from ".$prefix."_links_links");
      $totalmostpoplinks = $db->sql_numrows($result2);
      $mostpoplinks = $mostpoplinks / 100;
      $mostpoplinks = $totalmostpoplinks * $mostpoplinks;
      $mostpoplinks = round($mostpoplinks);
   }
   if ($mostpoplinkspercentrigger == 1) {
      echo "<center><font class=\"option\"><b>"._MOSTPOPULAR." $toplinkspercent% ("._OFALL." $totalmostpoplinks "._LINKS.")</b></font></center>";
   } else {
      echo "<center><font class=\"option\"><b>"._MOSTPOPULAR." ".htmlentities($mostpoplinks)."</b></font></center>";
   }
   echo "<tr><td><center>"._SHOWTOP.": [ <a href=\"modules.php?name=$module_name&l_op=MostPopular&ratenum=10&ratetype=num\">10</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=MostPopular&ratenum=25&ratetype=num\">25</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=MostPopular&ratenum=50&ratetype=num\">50</a> | "
   ."<a href=\"modules.php?name=$module_name&l_op=MostPopular&ratenum=1&ratetype=percent\">1%</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=MostPopular&ratenum=5&ratetype=percent\">5%</a> - "
   ."<a href=\"modules.php?name=$module_name&l_op=MostPopular&ratenum=10&ratetype=percent\">10%</a> ]</center><br><br></td></tr>";
   if(!is_numeric($mostpoplinks)) {
   $mostpoplinks=10;
   }
   $result3 = $db->sql_query("SELECT lid, cid, sid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from ".$prefix."_links_links order by hits DESC limit 0,$mostpoplinks");
   echo "<tr><td>";
   while($row3 = $db->sql_fetchrow($result3)) {
      $lid = intval($row3['lid']);
      $cid = intval($row3['cid']);
      $sid = intval($row3['sid']);
      $title = stripslashes(check_html($row3['title'], "nohtml"));
      $description = stripslashes($row3['description']);
      $time = $row3['date'];
      $hits = intval($row3['hits']);
      $linkratingsummary = $row3['linkratingsummary'];
      $totalvotes = intval($row3['totalvotes']);
      $totalcomments = intval($row3['totalcomments']);
      $linkratingsummary = number_format($linkratingsummary, $mainvotedecimal);
      echo "<font class=\"content\"><a href=\"modules.php?name=$module_name&l_op=visit&lid=$lid\" target=\"new\">$title</a>";
      newlinkgraphic($datetime, $time);
      popgraphic($hits);
      echo "<br>";
      echo ""._DEscriptION.": $description<br>";
      setlocale (LC_TIME, $locale);
      ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
      $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      echo ""._ADDEDON.": $datetime "._HITS.": <b>$hits</b>";
      $transfertitle = str_replace (" ", "_", $title);
      /* voting & comments stats */
      if ($totalvotes == 1) {
         $votestring = _VOTE;
      } else {
         $votestring = _VOTES;
      }
      if ($linkratingsummary!="0" || $linkratingsummary!="0.0") {
         echo " "._RATING.": $linkratingsummary ($totalvotes $votestring)";
      }
      echo "<br>";
      if ($radminsuper == 1) {
         echo "<a href=\"".$admin_file.".php?op=LinksModLink&lid=$lid\">"._EDIT."</a> | ";
      }
      echo "<a href=\"modules.php?name=$module_name&l_op=ratelink&lid=$lid&ttitle=$transfertitle\">"._RATESITE."</a>";
      if (is_user($user)) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=brokenlink&lid=$lid\">"._REPORTBROKEN."</a>";
      }
      if ($totalvotes != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkdetails&lid=$lid&ttitle=$transfertitle\">"._DETAILS."</a>";
      }
      if ($totalcomments != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkcomments&lid=$lid&ttitle=$transfertitle\">"._SCOMMENTS." ($totalcomments)</a>";
      }
      detecteditorial($lid, $transfertitle);
      echo "<br>";
      $row4 = $db->sql_fetchrow($db->sql_query("SELECT title from ".$prefix."_links_categories where cid='$cid'"));
      $ctitle = stripslashes(check_html($row4['title'], "nohtml"));
      $ctitle=getparent($cid,$ctitle);
      echo ""._CATEGORY.": $ctitle";
      echo "<br><br>";
      echo "<br><br></font>";
   }
   echo "</font></td></tr></table>";
   CloseTable();
   include("footer.php");
}

function RandomLink() {
   global $prefix, $db;
   $result = $db->sql_query("SELECT * from ".$prefix."_links_links");
   $numrows = $db->sql_numrows($result);
   if ($numrows == 1) {
      $random = 1;
   } else {
      srand((double)microtime()*1000000);
      $random = rand(1,$numrows);
      $random = intval($random);
   }
   $row2 = $db->sql_fetchrow($db->sql_query("SELECT url from ".$prefix."_links_links where lid='$random'"));
   $url = stripslashes($row2['url']);
   $db->sql_query("update ".$prefix."_links_links set hits=hits+1 where lid='$random'");
   Header("Location: $url");
}

function viewlink($cid, $min, $orderby, $show) {
   global $prefix, $db, $admin, $perpage, $module_name, $user, $admin_file, $locale, $mainvotedecimal, $datetime;
   $show = intval($show);
   if (empty($show))
   {
      $show = '';
   }
   if (!empty($orderby)) {
      $orderby = htmlspecialchars($orderby);
   }
   $admin = base64_decode($admin);
   $admin = addslashes($admin);
   $admin = explode(":", $admin);
   $aid = "$admin[0]";
   $row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper from ".$prefix."_authors where aid='$aid'"));
   $radminsuper = intval($row['radminsuper']);
   include("header.php");
   if (!isset($min)) $min=0;
   if (!isset($max)) $max=$min+$perpage;
   if(!empty($orderby)) {
      $orderby = convertorderbyin($orderby);
   } else {
      $orderby = "title ASC";
   }
   if (!empty($show)) {
      $perpage = $show;
   } else {
      $show=$perpage;
   }
   menu(1);
   echo "<br>";
   OpenTable();
   $cid = intval($cid);
   $row_two = $db->sql_fetchrow($db->sql_query("SELECT title,parentid FROM ".$prefix."_links_categories WHERE cid='$cid'"));
   $title = stripslashes(check_html($row_two['title'], "nohtml"));
   $parentid = intval($row_two['parentid']);
   $title=getparentlink($parentid,$title);
   $title="<a href=modules.php?name=$module_name>"._MAIN."</a>/$title";
   echo "<center><font class=\"option\"><b>"._CATEGORY.": $title</b></font></center><br>";
   echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>";
   $cid = intval($cid);
   $result2 = $db->sql_query("SELECT cid, title, cdescription from ".$prefix."_links_categories where parentid='$cid' order by title");
   $dum = 0;
   $count = 0;
   while($row2 = $db->sql_fetchrow($result2)) {
      $cid2 = intval($row2['cid']);
      $title2 = stripslashes(check_html($row2['title'], "nohtml"));
      $cdescription2 = stripslashes($row2['cdescription']);
      echo "<td><font class=\"option\"><strong><big>&middot;</big></strong> <a href=\"modules.php?name=Web_Links&l_op=viewlink&cid=$cid2\"><b>$title2</b></a></font>";
      categorynewlinkgraphic($cid2);
      if ($description) {
         echo "<font class=\"content\">$cdescription2</font><br>";
      } else {
         echo "<br>";
      }
      $result3 = $db->sql_query("SELECT cid, title from ".$prefix."_links_categories where parentid='$cid2' order by title limit 0,3");
      $space = 0;
      while($row3 = $db->sql_fetchrow($result3)) {
         $cid3 = intval($row3['cid']);
         $title3 = stripslashes(check_html($row3['title'], "nohtml"));
         if ($space>0) {
            echo ",&nbsp;";
         }
         echo "<font class=\"content\"><a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid3\">$title3</a></font>";
         $space++;
      }
      if ($count<1) {
         echo "</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td>";
         $dum = 1;
      }
      $count++;
      if ($count==2) {
         echo "</td></tr><tr>";
         $count = 0;
         $dum = 0;
      }
   }
   if ($dum == 1) {
      echo "</tr></table>";
   } elseif ($dum == 0) {
      echo "<td></td></tr></table>";
   }

   echo "<hr noshade size=\"1\">";
   $orderbyTrans = convertorderbytrans($orderby);
   echo "<center><font class=\"content\">"._SORTLINKSBY.": "
   .""._TITLE." (<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=titleA\">A</a>\<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=titleD\">D</a>) "
   .""._DATE." (<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=dateA\">A</a>\<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=dateD\">D</a>) "
   .""._RATING." (<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=ratingA\">A</a>\<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=ratingD\">D</a>) "
   .""._POPULARITY." (<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=hitsA\">A</a>\<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&orderby=hitsD\">D</a>)"
   ."<br><b>"._SITESSORTED.": $orderbyTrans</b></font></center><br><br>";
   if(!is_numeric($min)){
   $min=0;
   }
   $result4 = $db->sql_query("SELECT lid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from ".$prefix."_links_links where cid='$cid' order by $orderby limit $min,$perpage");
   $fullcountresult = $db->sql_query("SELECT lid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from ".$prefix."_links_links where cid='$cid'");
   $totalselectedlinks = $db->sql_numrows($fullcountresult);
   echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">";
   $x=0;
   while($row4 = $db->sql_fetchrow($result4)) {
      $lid = intval($row4['lid']);
      $title = stripslashes(check_html($row4['title'], "nohtml"));
      $description = stripslashes($row4['description']);
      $time = $row4['date'];
      $hits = intval($row4['hits']);
      $linkratingsummary = $row4['linkratingsummary'];
      $totalvotes = intval($row4['totalvotes']);
      $totalcomments = intval($row4['totalcomments']);
      $linkratingsummary = number_format($linkratingsummary, $mainvotedecimal);
      echo "<a href=\"modules.php?name=$module_name&l_op=visit&lid=$lid\" target=\"new\"><b>$title</b></a>";
      newlinkgraphic($datetime, $time);
      popgraphic($hits);
      /* INSERT code for *editor review* here */
      echo "<br>";
      echo ""._DEscriptION.": $description<br>";
      setlocale (LC_TIME, $locale);
      ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
      $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
      $datetime = ucfirst($datetime);
      echo ""._ADDEDON.": $datetime "._HITS.": $hits";
      $transfertitle = str_replace (" ", "_", $title);
      /* voting & comments stats */
      if ($totalvotes == 1) {
         $votestring = _VOTE;
      } else {
         $votestring = _VOTES;
      }
      if ($linkratingsummary!="0" || $linkratingsummary!="0.0") {
         echo " "._RATING.": $linkratingsummary ($totalvotes $votestring)";
      }
      echo "<br>";
      if ($radminsuper == 1) {
         echo "<a href=\"".$admin_file.".php?op=LinksModLink&lid=$lid\">"._EDIT."</a> | ";
      }
      echo "<a href=\"modules.php?name=$module_name&l_op=ratelink&lid=$lid&ttitle=$transfertitle\">"._RATESITE."</a>";
      if (is_user($user)) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=brokenlink&lid=$lid\">"._REPORTBROKEN."</a>";
      }
      if ($totalvotes != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkdetails&lid=$lid&ttitle=$transfertitle\">"._DETAILS."</a>";
      }
      if ($totalcomments != 0) {
         echo " | <a href=\"modules.php?name=$module_name&l_op=viewlinkcomments&lid=$lid&ttitle=$transfertitle\">"._SCOMMENTS." ($totalcomments)</a>";
      }
      detecteditorial($lid, $transfertitle);
      echo "<br><br>";
      $x++;
   }
   echo "</font>";
   $orderby = convertorderbyout($orderby);
   /* Calculates how many pages exist. Which page one should be on, etc... */
   $linkpagesint = ($totalselectedlinks / $perpage);
   $linkpageremainder = ($totalselectedlinks % $perpage);
   if ($linkpageremainder != 0) {
      $linkpages = ceil($linkpagesint);
      if ($totalselectedlinks < $perpage) {
         $linkpageremainder = 0;
      }
   } else {
      $linkpages = $linkpagesint;
   }
   /* Page Numbering */
   if ($linkpages!=1 && $linkpages!=0) {
      echo "<br><br>";
      echo ""._SELECTPAGE.": ";
      $prev=$min-$perpage;
      if ($prev>=0) {
         echo "&nbsp;&nbsp;<b>[ <a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&min=$prev&orderby=$orderby&show=$show\">";
         echo " &lt;&lt; "._PREVIOUS."</a> ]</b> ";
      }
      $counter = 1;
      $currentpage = ($max / $perpage);
      while ($counter<=$linkpages ) {
         $cpage = $counter;
         $mintemp = ($perpage * $counter) - $perpage;
         if ($counter == $currentpage) {
            echo "<b>$counter</b>&nbsp;";
         } else {
            echo "<a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&min=$mintemp&orderby=$orderby&show=$show\">$counter</a> ";
         }
         $counter++;
      }
      $next=$min+$perpage;
      if ($x>=$perpage) {
         echo "&nbsp;&nbsp;<b>[ <a href=\"modules.php?name=$module_name&l_op=viewlink&cid=$cid&min=$max&orderby=$orderby&show=$show\">";
         echo " "._NEXT." &gt;&gt;</a> ]</b> ";
      }
   }
   echo "</td></tr></table>";
   CloseTable();
   include("footer.php");
}

function newlinkgraphic($datetime, $time) {
   global $module_name, $locale;
   echo "&nbsp;";
   setlocale (LC_TIME, $locale);
   ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
   $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
   $startdate = time();
   $count = 0;
   while ($count <= 7) {
      $daysold = date("d-M-Y", $startdate);
      if ("$daysold" == "$datetime") {
         if ($count<=1) {
            echo "<img src=\"modules/$module_name/images/newred.gif\" alt=\""._NEWTODAY."\">";
         }
         if ($count<=3 && $count>1) {
            echo "<img src=\"modules/$module_name/images/newgreen.gif\" alt=\""._NEWLAST3DAYS."\">";
         }
         if ($count<=7 && $count>3) {
            echo "<img src=\"modules/$module_name/images/newblue.gif\" alt=\""._NEWTHISWEEK."\">";
         }
      }
      $count++;
      $startdate = (time()-(86400 * $count));
   }
}

function categorynewlinkgraphic($cat) {
   global $prefix, $db, $module_name, $locale;
   $cat = intval(trim($cat));
   $row = $db->sql_fetchrow($db->sql_query("SELECT date from ".$prefix."_links_links where cid='$cat' order by date desc limit 1"));
   $time = $row['date'];
   echo "&nbsp;";
   setlocale (LC_TIME, $locale);
   ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
   $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   $datetime = ucfirst($datetime);
   $startdate = time();
   $count = 0;
   while ($count <= 7) {
      $daysold = date("d-M-Y", $startdate);
      if ("$daysold" == "$datetime") {
         if ($count<=1) {
            echo "<img src=\"modules/$module_name/images/newred.gif\" alt=\""._CATNEWTODAY."\">";
         }
         if ($count<=3 && $count>1) {
            echo "<img src=\"modules/$module_name/images/newgreen.gif\" alt=\""._CATLAST3DAYS."\">";
         }
         if ($count<=7 && $count>3) {
            echo "<img src=\"modules/$module_name/images/newblue.gif\" alt=\""._CATTHISWEEK."\">";
         }
      }
      $count++;
      $startdate = (time()-(86400 * $count));
   }
}

function popgraphic($hits) {
   global $module_name;
   include("modules/$module_name/l_config.php");
   if ($hits>=$popular) {
      echo "&nbsp;<img src=\"modules/$module_name/images/pop.gif\" alt=\""._POPULAR."\">";
   }
}

function convertorderbyin($orderby) {
   if ($orderby != "titleA" AND $orderby != "dateA" AND $orderby != "hitsA" AND $orderby != "ratingA" AND $orderby != "titleD" AND $orderby != "dateD" AND $orderby != "hitsD" AND $orderby != "ratingD") {
       Header("Location: index.php");
       die();
   }
   if ($orderby == "titleA")   $orderby = "title ASC";
   if ($orderby == "dateA")   $orderby = "date ASC";
   if ($orderby == "hitsA")   $orderby = "hits ASC";
   if ($orderby == "ratingA")   $orderby = "linkratingsummary ASC";
   if ($orderby == "titleD")   $orderby = "title DESC";
   if ($orderby == "dateD")   $orderby = "date DESC";
   if ($orderby == "hitsD")   $orderby = "hits DESC";
   if ($orderby == "ratingD")   $orderby = "linkratingsummary DESC";
   return $orderby;
}

function convertorderbytrans($orderby) {
   if ($orderby != "hits ASC" AND $orderby != "hits DESC" AND $orderby != "title ASC" AND $orderby != "title DESC" AND $orderby != "date ASC" AND $orderby != "date DESC" AND $orderby != "linkratingsummary ASC" AND $orderby != "linkratingsummary DESC") {
       Header("Location: index.php");
       die();
   }
   if ($orderby == "hits ASC")         $orderbyTrans = ""._POPULARITY1."";
   if ($orderby == "hits DESC")      $orderbyTrans = ""._POPULARITY2."";
   if ($orderby == "title ASC")      $orderbyTrans = ""._TITLEAZ."";
   if ($orderby == "title DESC")      $orderbyTrans = ""._TITLEZA."";
   if ($orderby == "date ASC")         $orderbyTrans = ""._DATE1."";
   if ($orderby == "date DESC")      $orderbyTrans = ""._DATE2."";
   if ($orderby == "linkratingsummary ASC")   $orderbyTrans = ""._RATING1."";
   if ($orderby == "linkratingsummary DESC")   $orderbyTrans = ""._RATING2."";
   return $orderbyTrans;
}

function convertorderbyout($orderby) {
   if ($orderby != "title ASC" AND $orderby != &q
Başa dön
Kullanıcının profilini görüntüle Özel mesaj gönder
Bu Site Google Adsense ile Gelir Elde Ediyor









Tarih: 2024-06-29, 04:10:05    Mesaj konusu: Forum Arası Reklamlar


Başa dön
Haylandir
Mesaj: 1+
Mesaj: 1+





Kayıt: Mar 25, 2004
Mesajlar: 22
Konum: ADANA [Canim Sehrim]

MesajTarih: 2008-03-02, 16:22:50    Mesaj konusu: Alıntıyla Cevap Gönder

Assagidaki fonction bolumunu...

Kod:
function Add($title, $url, $auth_name, $cat, $description, $email) {
global $prefix, $db, $user;
$result = $db->sql_query("SELECT url from ".$prefix."_links_links where url='$url'");
$numrows = $db->sql_numrows($result);
if ($numrows>0) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKALREADYEXT."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
} else {
if(is_user($user)) {
$user2 = base64_decode($user);
$user2 = addslashes($user2);
$c o o k i e = explode(":", $user2);
c o o k i edecode($user);
$submitter = $c o o k i e[1];
}
// Check if Title exist
if (empty($title)) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKNOTITLE."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
}
// Check if URL exist
if (empty($url)) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKNOURL."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
}
// Check if Description exist
if (empty($description)) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKNODESC."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
}
$cat = explode("-", $cat);
if (empty($cat[1])) {
$cat[1] = 0;
}
$title = stripslashes(check_html(FixQuotes($title, "nohtml")));
$url = stripslashes(check_html($url, "nohtml"));
$description = stripslashes(check_html(FixQuotes($description), "html"));
$auth_name = stripslashes(check_html($auth_name, "nohtml"));
if (!empty($email)) {
if (($email = validate_mail(stripslashes(check_html($email, "nohtml")))) === false)
{
die();
}
}
$cat[0] = intval($cat[0]);
$cat[1] = intval($cat[1]);
$num_new = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_newlink WHERE title='$title' OR url='$url' OR description='$description'"));
if ($num_new == 0) {
$db->sql_query("insert into ".$prefix."_links_newlink values (NULL, '$cat[0]', '$cat[1]', '".addslashes($title)."', '".addslashes($url)."', '".addslashes($description)."', '".addslashes($auth_name)."', '".addslashes($email)."', '".addslashes($submitter)."')");
}
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKRECEIVED."</b><br>";
if (!empty($email)) {
echo _EMAILWHENADD;
} else {
echo _CHECKFORIT;
}
CloseTable();
include("footer.php");
}
}



Bu sekilde degis................................................

Kod:

function Add($title, $url, $auth_name, $cat, $description, $email) {
global $prefix, $db, $user;

if(is_user($user)) {

$result = $db->sql_query("SELECT url from ".$prefix."_links_links where url='$url'");
$numrows = $db->sql_numrows($result);
if ($numrows>0) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKALREADYEXT."</b><br><br>"._GOBACK."";
CloseTable();
include("footer.php");
} else {
if(is_user($user)) {
$user2 = base64_decode($user);
$user2 = addslashes($user2);
$c o o k i e = explode(":", $user2);
c o o k i edecode($user);
$submitter = $c o o k i e[1];
}
// Check if Title exist
if (empty($title)) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKNOTITLE."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
}
// Check if URL exist
if (empty($url)) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKNOURL."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
}
// Check if Description exist
if (empty($description)) {
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKNODESC."</b><br><br>"
.""._GOBACK."";
CloseTable();
include("footer.php");
}
$cat = explode("-", $cat);
if (empty($cat[1])) {
$cat[1] = 0;
}
$title = stripslashes(check_html(FixQuotes($title, "nohtml")));
$url = stripslashes(check_html($url, "nohtml"));
$description = stripslashes(check_html(FixQuotes($description), "html"));
$auth_name = stripslashes(check_html($auth_name, "nohtml"));
if (!empty($email)) {
if (($email = validate_mail(stripslashes(check_html($email, "nohtml")))) === false)
{
die();
}
}
$cat[0] = intval($cat[0]);
$cat[1] = intval($cat[1]);
$num_new = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_newlink WHERE title='$title' OR url='$url' OR description='$description'"));
if ($num_new == 0) {
$db->sql_query("insert into ".$prefix."_links_newlink values (NULL, '$cat[0]', '$cat[1]', '".addslashes($title)."', '".addslashes($url)."', '".addslashes($description)."', '".addslashes($auth_name)."', '".addslashes($email)."', '".addslashes($submitter)."')");
}
include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._LINKRECEIVED."</b><br>";
if (!empty($email)) {
echo _EMAILWHENADD;
} else {
echo _CHECKFORIT;
}
CloseTable();
include("footer.php");
}

} else {

include("header.php");
menu(1);
echo "<br>";
OpenTable();
echo "<center><b>"._SADECEUYELEREKLEYEBILIR."</b><br>";
CloseTable();
include("footer.php");

}
}


En son Haylandir tarafından 2008-03-02, 23:41:48 tarihinde değiştirildi, toplam 1 kere değiştirildi
Başa dön
Kullanıcının profilini görüntüle Özel mesaj gönder
dehsetweb
Mesaj: 300+
Mesaj: 300+





Kayıt: Aug 17, 2004
Mesajlar: 468
Konum: Samsun

MesajTarih: 2008-03-02, 21:30:03    Mesaj konusu: Alıntıyla Cevap Gönder

bu codeleri
Kod:
 kısımlarına ekleyerek düzeltirseniz hoş olur :)
Başa dön
Kullanıcının profilini görüntüle Özel mesaj gönder Yazarın web sitesini ziyaret et MSN Messenger
juglanin
Mesaj: 500+
Mesaj: 500+





Kayıt: Dec 09, 2005
Mesajlar: 880

MesajTarih: 2008-03-03, 17:13:47    Mesaj konusu: Re: BU MODULUN MODİFİKASYONU Alıntıyla Cevap Gönder

cok tesekkurler pek umudum yoktu ama oldu.peki nukec ilan modulunde nasil yapariz. function.php kodu burada[code:1:c0e693531d]<?
######################################################################
# 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."&amp;file=postads";
if ($id_catg != "") {
$postlink .= "&amp;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."&amp;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." &raquo; ".$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>&nbsp;</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\">&nbsp;</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\">&nbsp;</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&amp;commentid=".$xno_comment."\" onClick=\"return confirm('"._NUKECDELETECOMMENTCONFIRM."');\">"._NUKECDELETECOMM."</a> ]";
}
echo "<BR></td></tr>"
."<TR><TD width=\"5\">&nbsp;</td><TD><b>".$xsubject."</b></td></tr>"
."<TR><TD width=\"5\">&nbsp;</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\">&nbsp;</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&amp;comment&amp;id_ads=$xno_comment\" onClick=\"return confirm('"._NUKECDELETECOMMENTCONFIRM."');\">"._NUKECDELETECOMM."</a> ]";
}
echo "<BR></td></tr>"
."<TR><TD width=\"5\">&nbsp;</td><TD><b>".$xsubject."</b></td></tr>"
."<TR><TD width=\"5\">&nbsp;</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> &raquo; ".$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> &raquo; ".$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>&middot;</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 .= "&nbsp;&nbsp;&nbsp;<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." &quo
Başa dön
Kullanıcının profilini görüntüle Özel mesaj gönder
Haylandir
Mesaj: 1+
Mesaj: 1+





Kayıt: Mar 25, 2004
Mesajlar: 22
Konum: ADANA [Canim Sehrim]

MesajTarih: 2008-03-04, 03:27:57    Mesaj konusu: Alıntıyla Cevap Gönder

Galiba yanlis dosyayi gonderdin, burda oyle eklenme yeri goremedim ben...
Başa dön
Kullanıcının profilini görüntüle Özel mesaj gönder
juglanin
Mesaj: 500+
Mesaj: 500+





Kayıt: Dec 09, 2005
Mesajlar: 880

MesajTarih: 2008-03-04, 11:19:07    Mesaj konusu: Re: BU MODULUN MODİFİKASYONU Alıntıyla Cevap Gönder

index.php ye bakarmısınız
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."&amp;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>&nbsp;| ";
                        }
                        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>&nbsp;";
                        }
                        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>&nbsp;| ";
                        }
                        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>&nbsp;";
                        }
                        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
Kullanıcının profilini görüntüle Özel mesaj gönder
juglanin
Mesaj: 500+
Mesaj: 500+





Kayıt: Dec 09, 2005
Mesajlar: 880

MesajTarih: 2008-03-04, 11:22:37    Mesaj konusu: Re: BU MODULUN MODİFİKASYONU Alıntıyla Cevap Gönder

buda mesaj gonder satırındaki cikan dosya 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."&amp;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."&amp;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
Kullanıcının profilini görüntüle Özel mesaj gönder
juglanin
Mesaj: 500+
Mesaj: 500+





Kayıt: Dec 09, 2005
Mesajlar: 880

MesajTarih: 2008-03-05, 17:47:19    Mesaj konusu: Re: BU MODULUN MODİFİKASYONU Alıntıyla Cevap Gönder

bu modul icin nasil ilave yapabiliri?z
Başa dön
Kullanıcının profilini görüntüle Özel mesaj gönder
Bu Site Google Adsense ile Gelir Elde Ediyor









Tarih: 2024-06-29, 04:10:05    Mesaj konusu: Forum Arası Reklamlar


Başa dön
Önceki mesajları göster:   
Bu forum kilitlendi: mesaj gönderemez, cevap yazamaz ya da başlıkları değiştiremezsiniz   Bu başlık kilitlendi: mesajları değiştiremez ya da cevap yazamazsınız    Netopsiyon Online Forum Ana Sayfa -> Php-Nuke -> Php Nuke Modülleri Tüm zamanlar GMT + 3 Saat
1. sayfa (Toplam 1 sayfa)

 
Geçiş Yap:  
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

Benzer Konular

Başlık Yazar Forum Cevaplar Tarih
Yeni mesaj yok herhangi bir modulun icine ajax yerle... cengiz46 Php Nuke Modülleri 2 2009-01-25, 18:24:56 Son Mesajı Görüntüle
Yeni mesaj yok Bu Blocku Bos Modulun ıcıne koynca ca... ramazanemrullah Php Nuke Sorunlarınız 13 2008-11-03, 15:32:31 Son Mesajı Görüntüle
Yeni mesaj yok Kullandigim Modulun Titlesini Oto Ken... zeed Php-Nuke 5 2007-06-04, 21:05:29 Son Mesajı Görüntüle
Yeni mesaj yok AEG ziyaretçi defteri modulun nasıl t... ultrAslanYavuz Php Nuke Modülleri 3 2007-02-26, 20:18:02 Son Mesajı Görüntüle
Yeni mesaj yok Eklenen modulun admin hatası lütfen y... gezginciler Php-Nuke 3 2005-10-17, 09:37:02 Son Mesajı Görüntüle

Copyright © 2002-2024 Netopsiyon Bilişim Teknolojileri San. Tic. Ltd.Şti. - Bütün hakları saklıdır!
Bu site Netopsiyon.com.tr Sunucularında Barındırılmaktadır.
Netopsiyon Bilişim Teknolojileri San. Tic. Ltd.Şti. Netopsiyon Copyright