","
"),' *** ',$tekstuit); $tekstuit = preg_replace('=<([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4}))>=','$1',$tekstuit); $strs = explode('<',$tekstuit); $res = $strs[0]; for ($i=1;$i<() \n*.+&,_-]=i","",$tekstuit); $tekstuit = trim($tekstuit); return $tekstuit; } /* Fy-Fy Top List ver. 1.01. Author: Szymon Kosok E-Mail: szymon.kosok@music-game.net WWW: http://toplist.fy-fy.net */ session_start(); if(!ISSET($_SESSION['usercp-ini'])) $_SESSION['usercp-ini'] = 1; if($_GET['a'] == "log" && $_GET['act'] == "in"){ if($_POST['remembermeforever'] == 1){ $cexp = 365*24*60; setcookie(session_name(),session_id(), time()+$cexp); } } include "header.php"; if($cfg['toplist_offline'] == "1" && $_SESSION['top_mode'] <> 10){ $misc->error($misc->lang("misc_toplistoff") . "

" . $cfg['toplist_offline_reason']); } if($_GET['a'] == ""){ if($_GET['o'] == ""){ $_GET['o'] = 0; } if($_GET['sort'] && $_GET['c'] && $cfg['toplist_enable_cat'] == 1){ $DB->query("SELECT count(id) FROM " . $db['prefix'] . "sites WHERE cat_id='" . $_GET['c'] . "' && active='1' && (vin + lvin) > 0 ", "sin"); if($_GET['sort'] == "in") $orderg = "vin"; if($_GET['sort'] == "out") $orderg = "vout"; if($_GET['sort'] == "comments") $orderg = "comments"; if($_GET['sort'] == "rating") $orderg = "(rating/votes)"; if($_GET['c'] == '1') $DB->query("SELECT id, name, url, banner, vin, vout, lvin, lvout, description, comments, rating, votes FROM " . $db['prefix'] . "sites WHERE active='1' && (vin + lvin) > 0 ORDER BY " . $orderg . " DESC, tvin DESC LIMIT " . $_GET['o'] . ", " . $cfg['toplist_sites_pp'] . "", "sites"); if($_GET['c'] != '1') $DB->query("SELECT id, name, url, banner, vin, vout, lvin, lvout, description, comments, rating, votes FROM " . $db['prefix'] . "sites WHERE active='1' && cat_id='" . $_GET['c'] . "' && (vin + lvin) > 0 ORDER BY " . $orderg . " DESC, tvin DESC LIMIT " . $_GET['o'] . ", " . $cfg['toplist_sites_pp'] . "", "sites"); } elseif($_GET['sort']){ $DB->query("SELECT count(id) FROM " . $db['prefix'] . "sites WHERE active='1' && (vin + lvin) > 0 ", "sin"); if($_GET['sort'] == "in") $orderg = "vin"; if($_GET['sort'] == "out") $orderg = "vout"; if($_GET['sort'] == "comments") $orderg = "comments"; if($_GET['sort'] == "rating") $orderg = "(rating/votes)"; $DB->query("SELECT id, name, url, banner, vin, vout, lvin, lvout, description, comments, rating, votes FROM " . $db['prefix'] . "sites WHERE active='1' && (vin + lvin) > 0 ORDER BY " . $orderg . " DESC, tvin DESC LIMIT " . $_GET['o'] . ", " . $cfg['toplist_sites_pp'] . "", "sites"); } elseif($_GET['c'] && $cfg['toplist_enable_cat'] == 1){ $DB->query("SELECT count(id) FROM " . $db['prefix'] . "sites WHERE cat_id='" . $_GET['c'] . "' && (vin + lvin) > 0 ", "sin"); if($_GET['c'] == '1') $DB->query("SELECT id, name, url, banner, vin, vout, lvin, lvout, u_ip, description, comments, rating, votes, tadded, u_id FROM " . $db['prefix'] . "sites WHERE active='1' && (vin + lvin) > 0 ORDER BY vin DESC, tvin DESC LIMIT " . $_GET['o'] . ", " . $cfg['toplist_sites_pp'] . "", "sites"); if($_GET['c'] != '1') $DB->query("SELECT id, name, url, banner, vin, vout, lvin, lvout, u_ip, description, comments, rating, votes, tadded, u_id FROM " . $db['prefix'] . "sites WHERE active='1' && cat_id='" . $_GET['c'] . "' && (vin + lvin) > 0 ORDER BY vin DESC, tvin DESC LIMIT " . $_GET['o'] . ", " . $cfg['toplist_sites_pp'] . "", "sites"); } else { $DB->query("SELECT count(id) FROM " . $db['prefix'] . "sites WHERE (vin + lvin) > 0", "sin"); $DB->query("SELECT id, name, url, banner, vin, vout, lvin, lvout, u_ip, description, comments, rating, votes, tadded, u_id FROM " . $db['prefix'] . "sites WHERE active='1' && (vin + lvin) > 0 ORDER BY vin DESC, tvin DESC LIMIT " . $_GET['o'] . ", " . $cfg['toplist_sites_pp'] . "", "sites"); } $info = mysql_fetch_array($sin); $pages = $info[0]/$cfg['toplist_sites_pp']; for($i=1;$i<=ceil($pages);$i++){ //for($i=1;$i<=5;$i++){ if($_GET['c'] && $cfg['toplist_enable_cat'] == 1){ $catp = "&c=" . $_GET['c']; } if($_GET['sort']){ $sortp = "&sort=" . $_GET['sort']; } $page .= "| " . $i . " "; $offset = $offset + $cfg['toplist_sites_pp']; } $page .= "|"; $pos = $_GET['o']; while($st = mysql_fetch_array($sites)){ $pos++; $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("sites"); $tpl->change("{st_pos}", $pos); if($st['id'] == '100') $tpl->change("{partner}", "wij werken samen met
"); else $tpl->change("{partner}", ""); $tpl->change("{st_title}", stripslashes($st['name'])); $tpl->change("{st_desc}", stripslashes($st['description'])); if($st['tadded'] > $reset['last']){ $change = "new.gif"; $tita = $misc->lang("index_ns"); } elseif($st['vin'] == $st['lvin']){ $change = "nc.gif"; $tita = $misc->lang("index_nc"); } elseif($st['vin'] > $st['lvin']){ $change = "up.gif"; $tita = $misc->lang("index_mv"); } else { $change = "down.gif"; $tita = $misc->lang("index_lv"); } $tpl->change("{st_in}", $st['vin']); if($st['tadded'] > $reset['last']){ $change = "new.gif"; $tita = $misc->lang("index_ns"); } elseif($st['vout'] == $st['lvout']){ $change = "nc.gif"; $tita = $misc->lang("index_nc"); } elseif($st['vout'] > $st['lvout']){ $change = "up.gif"; $tita = $misc->lang("index_mvis"); } else { $change = "down.gif"; $tita = $misc->lang("index_lvis"); } $tpl->change("{st_out}", $st['vout']); $tpl->change("{comments}", $st['comments']); $tpl->change("{st_url}", "traffic.php?a=out&id=" . $st['id'] . "&url=" . urlencode($st['url'])); $tpl->change("{st_id}", $st['id']); if($st['banner'] <> "" && $pos <= $cfg['toplist_max_banners']){ $tpl->change("{st_banner}", ""); } else { $tpl->change("{st_banner}", ""); } $tpl->change("{rating}", $misc->rating($st['rating'], $st['votes'])); if($_SESSION['top_mode'] == 10){ $tpl->change("{admin}", $misc->jsmenu("am" . $st['id'], "
Vermelding verwijderen | Toon alle vermeldingen | Gebruiker afsluiten", "[ ]")); } else { $tpl->change("{admin}", ""); } $sitesy .= $tpl->jr(); } if($_SESSION['top_logged'] <> "1"){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("umenu-nl"); $umenu = $tpl->jr(); } if($_SESSION['top_logged'] == "1"){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("umenu-l"); $umenu = $tpl->jr(); } $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("index"); if($cfg['toplist_enable_cat'] == 1){ $DB->query("SELECT * FROM " . $db['prefix'] . "cat"); while($c = mysql_fetch_array($mysql)){ $cats .= ""; } $tpl->change("{cats}", $cats); } $tpl->show(); } elseif($_GET['s'] == "2"){ if($_POST['sitename'] == "" OR $_POST['sitedesc'] == "" OR $_POST['siteurl'] == ""){ $misc->error($misc->lang("cp_forgot")); } if($cfg['toplist_enable_upload'] == 1){ if($cfg['upload_type'] == "hdd"){ $misc->upload("hdd"); } if($cfg['upload_type'] == "mysql"){ $misc->upload("mysql"); } } if($cfg['toplist_auth_type'] == "1"){ $auth = 0; } else { $auth = 1; } if($fn){ if($cfg['upload_type'] == "hdd"){ $bupload = $cfg['upload_path'] . $fn; $btype = "hdd"; } if($cfg['upload_type'] == "mysql"){ $bupload = $fn; $btype = "mysql"; } } else { $bupload = $_POST['sitebanner']; } $misc->check_image($bupload); if($bupload && $szerokosc > $cfg['toplist_banner_width'] OR $bupload && $wysokosc > $cfg['toplist_banner_height']){ $misc->error($misc->lang("cp_banisbig")); } if($bupload AND $szerokosc == 0 AND $wysokosc == 0){ $misc->error($misc->lang("cp_banerror")); } if(!preg_match("|http://(.+?)|i", $_POST['siteurl'])){ $_POST['siteurl'] = "http://" . $_POST['siteurl']; } if($cfg['toplist_enable_cat'] == 1){ $DB->query("INSERT INTO " . $db['prefix'] . "sites VALUES('', '" . $misc->prepare($_POST['sitename']) . "', '" . $misc->prepare($_POST['sitedesc']) . "', '" . $misc->prepare($_POST['siteurl']) . "', '" . $bupload . "', '" . $hashfile . "', '" . $btype . "', '" . $_SESSION['top_uid'] . "', '" . $_SESSION['top_uname'] . "', '" . $misc->getip() . "', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '" . $_POST['sitecat'] . "', '" . $auth . "', '" . time() . "')"); } else { $DB->query("INSERT INTO " . $db['prefix'] . "sites VALUES('', '" . $misc->prepare($_POST['sitename']) . "', '" . $misc->prepare($_POST['sitedesc']) . "', '" . $misc->prepare($_POST['siteurl']) . "', '" . $bupload . "', '" . $hashfile . "', '" . $btype . "', '" . $_SESSION['top_uid'] . "', '" . $_SESSION['top_uname'] . "', '" . $misc->getip() . "', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '" . $auth . "', '" . time() . "')"); } $mlid = mysql_insert_id(); $misc->msg($misc->lang("cp_added")); } } if($_GET['act'] == "editsite"){ if($_GET['s'] == ""){ $DB->query("SELECT * FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "' AND u_id='" . $_SESSION['top_uid'] . "'"); if(mysql_num_rows($mysql) == 0) $misc->error($misc->lang("cp_nosed")); $es = mysql_fetch_array($mysql); $tpl->open("templates/" . $s['tempdir'] . "/index.html"); if($cfg['toplist_enable_cat'] == 1){ $tpl->choose("usercp-editsite-wcat"); } else { $tpl->choose("usercp-editsite-wocat"); } if($cfg['toplist_enable_upload'] == 1){ $tpl->change("{sitebanner}", ""); $tpl->change("{rembantext}", $misc->lang("edit_remban")); $tpl->change("{remban}", ""); } else { $tpl->change("{sitebanner}", ""); } if($cfg['toplist_enable_cat'] == 1){ $DB->query("SELECT * FROM " . $db['prefix'] . "cat"); while($c = mysql_fetch_array($mysql)){ if($c['id'] == $es['cat_id']){ $cats .= ""; } else { $cats .= ""; } } $tpl->change("{cats}", $cats); } $tpl->change("{sname}", stripslashes($es['name'])); $tpl->change("{surl}", $es['url']); $tpl->change("{sdesc}", stripslashes($es['description'])); $tpl->change("{id}", $es['id']); $tpl->show(); } elseif($_GET['s'] == "2"){ // $misc->error($misc->lang("cp_forgot") . " - " . print_r($_POST)); if($_POST['sitename'] == "" OR $_POST['sitedesc'] == "" OR $_POST['siteurl'] == ""){ $misc->error($misc->lang("cp_forgot")); } $DB->query("SELECT id, bhash, btype, banner FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "' AND u_id='" . $_SESSION['top_uid'] . "'"); if(mysql_num_rows($mysql) == 0) $misc->error($misc->lang("cp_nosed")); $ub = mysql_fetch_array($mysql); if($cfg['toplist_enable_upload'] == 1){ if(($_FILES['sitebanner']['name'] && $ub['btype'] == "hdd") OR ($_POST['banrem'] == 1 && $ub['btype'] == "hdd")){ unlink($ub['banner']); } if(($_FILES['sitebanner']['name'] && $ub['btype'] == "mysql") OR ($_POST['banrem'] == 1 && $ub['btype'] == "mysql")){ $res = str_replace($cfg['toplist_url'] . "sb.php?id=", "", $ub['banner']); $DB->query("DELETE FROM " . $db['prefix'] . "banners WHERE id='" . $res . "' AND hash='" . $ub['bhash'] . "'"); } if($cfg['upload_type'] == "hdd"){ $misc->upload("hdd"); } if($cfg['upload_type'] == "mysql"){ $misc->upload("mysql"); } } if($cfg['toplist_auth_type'] == "1"){ $auth = 0; } else { $auth = 1; } if($fn){ if($cfg['upload_type'] == "hdd") $bupload = $cfg['upload_path'] . $fn; if($cfg['upload_type'] == "mysql") $bupload = $fn; } else { $bupload = $ub['banner']; } if($cfg['toplist_enable_upload'] == 0){ $bupload = $_POST['sitebanner']; } if($bupload){ $misc->check_image($bupload); if($szerokosc == 0 AND $wysokosc == 0){ $misc->error($misc->lang("cp_banerror")); } if($szerokosc > $cfg['toplist_banner_width'] OR $wysokosc > $cfg['toplist_banner_height']){ $misc->error($misc->lang("cp_banisbig")); } } if($_POST['banrem'] == 1){ $bupload = ""; } if($cfg['toplist_enable_cat'] == 1){ $DB->query("UPDATE " . $db['prefix'] . "sites SET name='" . $misc->prepare($_POST['sitename']) . "', description='" . $misc->prepare($_POST['sitedesc']) . "', url='" . $misc->prepare($_POST['siteurl']) . "', cat_id='" . $_POST['sitecat'] . "', banner='" . $bupload . "' WHERE id='" . $_GET['id'] . "'"); } else { $DB->query("UPDATE " . $db['prefix'] . "sites SET name='" . $misc->prepare($_POST['sitename']) . "', description='" . $misc->prepare($_POST['sitedesc']) . "', url='" . $misc->prepare($_POST['siteurl']) . "', banner='" . $bupload . "' WHERE id='" . $_GET['id'] . "'"); } $misc->msg($misc->lang("cp_siteed")); } } if($_GET['act'] == "listsites"){ $DB->query("SELECT * FROM " . $db['prefix'] . "sites WHERE u_id='" . $_SESSION['top_uid'] . "'"); while($d = mysql_fetch_array($mysql)){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("usercp-listsites-list"); $tpl->change("{sitetitle}", stripslashes($d['name'])); $tpl->change("{sitedesc}", stripslashes($d['description'])); $tpl->change("{cin}", $d['vin']); $tpl->change("{cout}", $d['vout']); $tpl->change("{tin}", $d['tvin']); $tpl->change("{tout}", $d['tvout']); $tpl->change("{st_url}", $d['url']); $tpl->change("{siteid}", $d['id']); $tpl->change("{vc}", ""); $us .= $tpl->jr(); } $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("usercp-listsites"); $tpl->change("{us}", $us); $tpl->show(); } if($_GET['act'] == "ce"){ if($_GET['s'] == ""){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("usercp-ce"); $tpl->show(); } else { if($misc->validate_email($_POST['ne']) == FALSE) $misc->error($misc->lang("cp_mnv")); $DB->query("UPDATE " . $db['prefix'] . "users SET email='" . $_POST['ne'] . "' WHERE id='" . $_SESSION['top_uid'] . "'"); $misc->msg($misc->lang("cp_mupd")); } } if($_GET['act'] == "cpass"){ if($_GET['s'] == ""){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("usercp-cpass"); $tpl->show(); } else { if($_POST['passa'] != $_POST['passb']) $misc->error($misc->lang("cp_passmis")); $DB->query("UPDATE " . $db['prefix'] . "users SET password='" . md5($_POST['passa']) . "' WHERE id='" . $_SESSION['top_uid'] . "'"); $misc->msg($misc->lang("cp_passupd")); } } if($_GET['act'] == "clang"){ if($_GET['s'] == ""){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $dir_handle = @opendir("lang/") or die($misc->error("direrror")); while($file = readdir($dir_handle)) { if (substr($file, -3) == 'php') { $langs .= ""; } } closedir($dir_handle); $tpl->choose("usercp-clang"); $tpl->change("{langs}", $langs); $tpl->show(); } else { $DB->query("UPDATE " . $db['prefix'] . "users SET lang='" . $misc->prepare($_POST['ulang']) . "' WHERE id='" . $_SESSION['top_uid'] . "'"); $_SESSION['top_ulang'] = $_POST['ulang']; $misc->msg($misc->lang("langchanged")); } } if($_GET['act'] == "cskin"){ if($_GET['s'] == ""){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("usercp-cskin"); $DB->query("SELECT id, name FROM " . $db['prefix'] . "skins"); while($skin = mysql_fetch_array($mysql)){ $skins .= ""; } $tpl->change("{skins}", $skins); $tpl->show(); } else { $DB->query("UPDATE " . $db['prefix'] . "users SET user_style='" . $_POST['skin'] . "' WHERE id='" . $_SESSION['top_uid'] . "'"); $_SESSION['tpl_skin'] = $_POST['skin']; $misc->msg($misc->lang("cp_skinupd")); } } if($_GET['act'] == "del"){ $DB->query("DELETE FROM " . $db['prefix'] . "sites WHERE u_id='" . $_SESSION['top_uid'] . "' AND id='" . $_GET['id'] . "'"); if(mysql_affected_rows() == 0){ $misc->error($misc->lang("cp_sitend")); } else { $misc->msg($misc->lang("cp_sited"), "index.php?a=usercp&act=listsites"); } } $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("usercp-footer"); $tpl->change("{cp_uname}", $_SESSION['top_uname']); $tpl->show(); } if($_GET['a'] == "mi"){ $DB->query("SELECT * FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "'"); $si = mysql_fetch_array($mysql); $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("mi"); $tpl->change("{cin}", $si['vin']); $tpl->change("{cout}", $si['vout']); $tpl->change("{tin}", $si['tvin']); $tpl->change("{tout}", $si['tvout']); $tpl->change("{cuin}", $si['rvin']); $tpl->change("{cuout}", $si['rvout']); $tpl->change("{tuin}", $si['rvint']); $tpl->change("{tuout}", $si['rvoutt']); $tpl->change("{lin}", $si['lvin']); $tpl->change("{lout}", $si['lvout']); $tpl->change("{sitetitle}", stripslashes($si['name'])); $tpl->change("{sitedesc}", stripslashes($si['description'])); $tpl->change("{siteid}", $si['id']); $tpl->change("{rating}", $misc->rating($si['rating'], $si['votes'])); $tpl->change("{comments}", $si['comments']); if($si['banner'] == ""){ $tpl->change("{sitebanner}", "" . $misc->lang("mi_nb") . ""); } else { $tpl->change("{sitebanner}", ""); } $tpl->change("{siteowner}", "" . $si['u_name'] . ""); $tpl->show(); } if($_GET['a'] == "up"){ $DB->query("SELECT * FROM " . $db['prefix'] . "sites WHERE u_id='" . $_GET['id'] . "'"); while($usi = mysql_fetch_array($mysql)){ $si['vin'] = $si['vin'] + $usi['vin']; $si['vout'] = $si['vout'] + $usi['vout']; $si['tvin'] = $si['tvin'] + $usi['tvin']; $si['tvout'] = $si['tvout'] + $usi['tvout']; $si['rvin'] = $si['rvin'] + $usi['rvin']; $si['rvout'] = $si['rvout'] + $usi['rvout']; $si['rvint'] = $si['rvint'] + $usi['rvint']; $si['rvoutt'] = $si['rvoutt'] + $usi['rvoutt']; $si['lvin'] = $si['lvin'] + $usi['lvin']; $si['lvout'] = $si['lvout'] + $usi['lvout']; $si['uname'] = $usi['u_name']; $si['sites'] = $si['sites'] . " " . stripslashes($usi['name']) . " [ " . $misc->lang("mi_mi") . " ]
" . $usi['description'] . "

"; } $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("up"); $tpl->change("{cin}", $si['vin']); $tpl->change("{cout}", $si['vout']); $tpl->change("{tin}", $si['tvin']); $tpl->change("{tout}", $si['tvout']); $tpl->change("{cuin}", $si['rvin']); $tpl->change("{cuout}", $si['rvout']); $tpl->change("{tuin}", $si['rvint']); $tpl->change("{tuout}", $si['rvoutt']); $tpl->change("{lin}", $si['lvin']); $tpl->change("{lout}", $si['lvout']); $tpl->change("{uname}", $si['uname']); $tpl->change("{sites}", $si['sites']); $tpl->show(); } if($_GET['a'] == "rc"){ if($_GET['act'] == ""){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("reportcheat"); $tpl->change("{id}", $_GET['id']); $tpl->show(); } elseif($_GET['act'] == "send"){ if (strlen($_POST['reason']) > 150) echo ""; else { if($_GET['id'] == "") $misc->error($misc->lang("rc_noid")); if($_POST['reason'] == "") $misc->error($misc->lang("rc_noreas")); else $_POST['reason'] = txtclean($_POST['reason']); $DB->query("SELECT name, url FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "'"); $site = mysql_fetch_array($mysql); $DB->query("INSERT INTO " . $db['prefix'] . "reports VALUES('', '" . $misc->prepare($_POST['reason']) . "', '" . $misc->getip() . "', '" . $_GET['id'] . "', '" . $misc->prepare($site['name']) . "', '" . $site['url'] . "')"); $misc->msg($misc->lang("rc_submited")); } } } if($_GET['a'] == "comm"){ if($cfg['toplist_enable_comments'] == 0) $misc->error($misc->lang("com_dis")); if($_GET['act'] == ""){ if($_GET['o'] == ""){ $_GET['o'] = 0; } $DB->query("SELECT count(id) FROM " . $db['prefix'] . "comments WHERE siteid='" . $_GET['id'] . "'", "ts"); $info = mysql_fetch_array($ts); $pages = $info[0]/$cfg['toplist_comments_pp']; for($i=1;$i<=ceil($pages);$i++){ $page .= "| " . $i . " "; $offset = $offset + $cfg['toplist_comments_pp']; } if($page > "") $page .= "|"; $DB->query("SELECT * FROM " . $db['prefix'] . "comments WHERE siteid='" . $_GET['id'] . "' ORDER BY id DESC LIMIT " . $_GET['o'] . ", 10"); while($c = mysql_fetch_array($mysql)){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("comment-one"); $tpl->change("{dt}", date("d M Y H:i", $c['dt'])); $tpl->change("{uname}", $c['uname']); $tpl->change("{urating}", $c['urating']); $tpl->change("{comment}", $misc->smilies($c['comment'])); if($_SESSION['top_mode'] == "10"){ $tpl->change("{admin}", "
Verwijderen | IP: " . $c['uip'] . " [ IP adres afsluiten ]"); } else { $tpl->change("{admin}", ""); } $comment .= $tpl->jr(); } $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("comments"); $tpl->change("{comments}", $comment); $tpl->change("{pages}", $page); $tpl->change("{id}", $_GET['id']); $tpl->show(); } elseif($_GET['act'] == "2"){ if(!$_POST['un']) $misc->error($misc->lang("com_nameforg")); if($_POST['uem'] && $misc->validate_email($_POST['uem']) == FALSE) $misc->error($misc->lang("reg_mailnv")); if(!$_POST['uc']) $misc->error($misc->lang("com_forgetcomm")); if(strlen($_POST['uc']) > $cfg['toplist_comments_long']) $misc->error($misc->lang("com_toolong")); else $_POST['uc'] = txtclean($_POST['uc']); //$DB->query("INSERT INTO " . $db['prefix'] . "comments VALUES('', '" . $misc->prepare($_POST['uc']) . "', '" . $misc->prepare($_POST['un']) . "', '" . $_POST['uem'] . "', '" . $misc->prepare($_POST['uwww']) . "', '" . $misc->getip() . "', '" . time() . "', '" . $_GET['id'] . "')"); $DB->query("INSERT INTO " . $db['prefix'] . "comments VALUES('', '" . $misc->prepare($_POST['uc']) . "', '" . $misc->prepare($_POST['un']) . "', '" . $_POST['uem'] . "', '" . $_POST['uem'] . "', '" . $misc->getip() . "', '" . time() . "', '" . $_GET['id'] . "')"); $DB->query("UPDATE " . $db['prefix'] . "sites SET comments=comments+1 WHERE id='" . $_GET['id'] . "'"); $misc->msg($misc->lang("com_added"), "index.php?a=comm&id=" . $_GET['id']); } } if($_GET['a'] == "search"){ if($cfg['toplist_enable_cat'] == 1){ $DB->query("SELECT * FROM " . $db['prefix'] . "cat"); while($c = mysql_fetch_array($mysql)){ $cats .= ""; } $tpl->change("{catopts}", $cat); if($cfg['toplist_enable_cat'] == 1){ $DB->query("SELECT * FROM " . $db['prefix'] . "cat"); while($c = mysql_fetch_array($mysql)){ $cats .= "