query("SELECT * FROM " . $db['prefix'] . "conf", "config"); while($c = mysql_fetch_row($config)){ $cfg[$c[0]] = $c[1]; } if($_SESSION['top_ulang'] == ""){ include "lang/" . $cfg['toplist_def_lang'] . ".php"; } else { include "lang/" . $_SESSION['top_ulang'] . ".php"; } $misc->checkban(); if($_SESSION['tpl_skin'] == ""){ $DB->query("SELECT * FROM " . $db['prefix'] . "skins WHERE id='" . $cfg['toplist_default_style'] . "'", "skin"); } else { $DB->query("SELECT * FROM " . $db['prefix'] . "skins WHERE id='" . $_SESSION['tpl_skin'] . "'", "skin"); } $s = mysql_fetch_array($skin); if(!$s['tempdir']){ $DB->query("SELECT * FROM " . $db['prefix'] . "skins WHERE id='" . $cfg['toplist_default_style'] . "'", "skin"); $s = mysql_fetch_array($skin); } if($_GET['a'] == "out"){ $DB->query("SELECT id, old FROM " . $db['prefix'] . "logs WHERE siteid='" . $_GET['id'] . "' AND ip='" . $misc->getip() . "' AND tt='2' ORDER BY id DESC LIMIT 1", "sinfo"); $si = mysql_fetch_array($sinfo); if($si['old'] == 1 OR !isset($si['old'])){ $DB->query("UPDATE " . $db['prefix'] . "sites SET vout=vout+1, tvout=tvout+1, rvout=rvout+1, rvoutt=rvoutt+1 WHERE id='" . $_GET['id'] . "'"); $DB->query("INSERT INTO " . $db['prefix'] . "logs VALUES('', '" . $_GET['id'] . "', '" . $misc->getip() . "', '" . $_SERVER['HTTP_USER_AGENT'] . "', '" . time() . "', '0', '2')"); } else { $DB->query("UPDATE " . $db['prefix'] . "sites SET vout=vout+1, tvout=tvout+1 WHERE id='" . $_GET['id'] . "'"); $DB->query("INSERT INTO " . $db['prefix'] . "logs VALUES('', '" . $_GET['id'] . "', '" . $misc->getip() . "', '" . $_SERVER['HTTP_USER_AGENT'] . "', '" . time() . "', '0', '2')"); } if($cfg['toplist_out_frame'] == "1"){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("outframe"); $tpl->change("{siteurl}", urldecode($_GET['url'])); $tpl->change("{siteid}", urldecode($_GET['id'])); $tpl->show(); } else { header("Location: " . urldecode($_GET['url'])); } } if($_GET['a'] == "ul"){ $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("outframe-link"); $tpl->change("{stylename}", $s['stylename']); $tpl->change("{st_id}", $_GET['id']); $tpl->change("{st_url}", urldecode($_GET['url'])); $DB->query("SELECT comments, rating, votes FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "'"); $st = mysql_fetch_array($mysql); $tpl->change("{comments}", $st['comments']); $tpl->change("{rating}", $misc->rating($st['rating'], $st['votes'])); $tpl->show(); } if($_GET['a'] == "in"){ if($_GET['act'] == ""){ if($cfg['toplist_enable_gate'] == 1){ $maand = date(m); $tpl->open("templates/" . $s['tempdir'] . "/index.html"); $tpl->choose("chgate" . $maand); $tpl->change("{title}", $cfg['toplist_name']); $tpl->change("{stylename}", $s['stylename']); $tpl->change("{tpltitle}", "Vote"); $DB->query("SELECT name FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "'"); $sajt = mysql_fetch_array($mysql); $tpl->change("{stitle}" , stripslashes($sajt['name'])); $tpl->change("{sid}" , $_GET['id']); $hid = md5(time()) . md5($misc->getip()) . md5(rand(1,1000)); $_SESSION['tpl_hid'] = $hid; $tpl->change("{hid}", $hid); $tpl->show(); } elseif($cfg['toplist_enable_gate'] == 0){ $readable_time = round($cfg['toplist_block_time'] / 60 / 60, 0); if($_COOKIE[$cfg['toplist_cookie_prefix'] . '_' . $_GET['id'] . '_lv'] > time()){ $misc->msg_v($misc->lang("traf_lock"), $misc->lang("traf_gtt"), "yes"); } elseif($cfg['toplist_ip_block'] == 1){ $DB->query("SELECT dt FROM " . $db['prefix'] . "logs WHERE ip='" . $misc->getip() . "' AND siteid='" . $_GET['id'] . "' AND tt='1' ORDER BY id DESC LIMIT 1"); $last = mysql_fetch_array($mysql); $blockedfor = $last['dt'] + $cfg['toplist_block_time']; if($blockedfor > time()){ $misc->msg_v($misc->lang("traf_lock"), $misc->lang("traf_gtt"), "yes"); } } setcookie($cfg['toplist_cookie_prefix'] . "_" . $_GET['id'] . "_lv", time() + $cfg['toplist_block_time'], time() + $cfg['toplist_block_time'], $cfg['toplist_cookie_path']); $DB->query("SELECT id, old FROM " . $db['prefix'] . "logs WHERE siteid='" . $_GET['id'] . "' AND ip='" . $misc->getip() . "' AND tt='1' ORDER BY id DESC LIMIT 1", "sinfo"); $si = mysql_fetch_array($sinfo); if ($_GET['id'] == '1') { $DB->query("SELECT vin FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "'", "aantal"); $numin = mysql_fetch_array($aantal); } if($si['old'] == 1 OR !isset($si['old'])){ $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1, rvin=rvin+1, rvint=rvint+1 WHERE id='" . $_GET['id'] . "'"); if ($_GET['id'] == '1' && $num['vin'] > '5') $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1, rvin=rvin+1, rvint=rvint+1 WHERE id='100'"); } else { $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1 WHERE id='" . $_GET['id'] . "'"); if ($_GET['id'] == '1' && $num['vin'] > '5') $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1 WHERE id='100'"); } $DB->query("INSERT INTO " . $db['prefix'] . "logs VALUES('', '" . $_GET['id'] . "', '" . $misc->getip() . "', '" . $_SERVER['HTTP_USER_AGENT'] . "', '" . time() . "', '0', '1')"); header("Location: http://www.frankrijklinks.com/"); } } if($_GET['act'] == "gate"){ $DB->query("UPDATE " . $db['prefix'] . "poll SET waarde" . $_GET['keuze'] . "=waarde" . $_GET['keuze'] . "+1 WHERE code='" . $jaarnu . $_GET['pollid'] . "'"); if($_SESSION['tpl_hid'] <> $_GET['hid']){ $misc->msg_v($misc->lang("traf_cheat"), $misc->lang("traf_gtt"), "yes"); } $readable_time = round($cfg['toplist_block_time'] / 60 / 60, 0); if($_COOKIE[$cfg['toplist_cookie_prefix'] . '_' . $_GET['id'] . '_lv'] > time()){ $misc->msg_v($misc->lang("traf_lock"), $misc->lang("traf_gtt"), "yes"); } elseif($cfg['toplist_ip_block'] == 1){ $DB->query("SELECT dt FROM " . $db['prefix'] . "logs WHERE ip='" . $misc->getip() . "' AND siteid='" . $_GET['id'] . "' AND tt='1' ORDER BY id DESC LIMIT 1"); $last = mysql_fetch_array($mysql); $blockedfor = $last['dt'] + $cfg['toplist_block_time']; if($blockedfor > time()){ $misc->msg_v($misc->lang("traf_lock"), $misc->lang("traf_gtt"), "yes"); } } setcookie($cfg['toplist_cookie_prefix'] . "_" . $_GET['id'] . "_lv", time() + $cfg['toplist_block_time'], time() + $cfg['toplist_block_time'], $cfg['toplist_cookie_path']); $DB->query("SELECT id, old FROM " . $db['prefix'] . "logs WHERE siteid='" . $_GET['id'] . "' AND ip='" . $misc->getip() . "' AND tt='1' ORDER BY id DESC LIMIT 1", "sinfo"); $si = mysql_fetch_array($sinfo); if ($_GET['id'] == '1') { $DB->query("SELECT vin FROM " . $db['prefix'] . "sites WHERE id='" . $_GET['id'] . "'", "aantal"); $numin = mysql_fetch_array($aantal); } if($si['old'] == 1 OR !isset($si['old'])){ $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1, rvin=rvin+1, rvint=rvint+1 WHERE id='" . $_GET['id'] . "'"); if ($_GET['id'] == '1' && $numin['vin'] > '5') $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1, rvin=rvin+1, rvint=rvint+1 WHERE id='100'"); } else { $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1 WHERE id='" . $_GET['id'] . "'"); if ($_GET['id'] == '1' && $numin['vin'] > '5') $DB->query("UPDATE " . $db['prefix'] . "sites SET vin=vin+1, tvin=tvin+1 WHERE id='100'"); } $DB->query("INSERT INTO " . $db['prefix'] . "logs VALUES('', '" . $_GET['id'] . "', '" . $misc->getip() . "', '" . $_SERVER['HTTP_USER_AGENT'] . "', '" . time() . "', '0', '1')"); header("Location: http://www.frankrijklinks.com/"); } } ?>