/** * http://btdev.net:1337/svn/test/Installer09_Beta * Licence Info: GPL * Copyright (C) 2010 BTDev Installer v.1 * A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. * Project Leaders: Mindless,putyn. **/ function stdhead($title = "", $msgalert = true, $stdhead = false) { global $CURUSER, $TBDEV, $lang, $free, $_NO_COMPRESS, $mc; if (!$TBDEV['site_online']) { die("Site is down for maintenance, please check back again later... thanks<br />"); } header('Content-Type: text/html; charset=utf-8'); header('Content-Language content="en-us"'); if ($title == "") { $title = $TBDEV['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : ''); } else { $title = $TBDEV['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '') . " :: " . htmlspecialchars($title); } if ($CURUSER) { $TBDEV['stylesheet'] = isset($CURUSER['stylesheet']) ? "{$CURUSER['stylesheet']}.css" : $TBDEV['stylesheet']; } if ($TBDEV['msg_alert'] && $msgalert && $CURUSER) { $res = sql_query("SELECT count(id) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or sqlerr(__FILE__, __LINE__); $arr = mysql_fetch_row($res); $unread = $arr[0]; } /** ZZZZZZZZZZZZZZZZZZZZZZZZZZip it! **/ if (!isset($_NO_COMPRESS)) { if (!ob_start('ob_gzhandler')) { ob_start(); } } /** include js files needed only for the page being used by pdq **/ $js_incl = '<!-- javascript goes here or in footer -->'; if ($stdhead['js'] != false) { foreach ($stdhead['js'] as $JS) { $js_incl .= "<script type='text/javascript' src='" . $TBDEV['baseurl'] . "/scripts/" . $JS . ".js'></script>"; } } $htmlout = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \t \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n \t <html xmlns='http://www.w3.org/1999/xhtml'>\n \t <head>\n \t\t<meta name='generator' content='TBDev.net' />\n \t\t<meta http-equiv='Content-Language' content='en-us' />\n \t\t<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\n \t\t<meta name='MSSmartTagsPreventParsing' content='TRUE' />\n <title>{$title}</title>\n\t <link rel='stylesheet' href='templates/1/itunes.css' type='text/css' />\n \t<script type='text/javascript' src='./scripts/jquery.js'></script>\n\t\t<script type='text/javascript' src='image-resize/core-resize.js'></script>\n <link type='text/css' rel='stylesheet' href='image-resize/resize.css' />\n\t\t<link rel='alternate' type='application/rss+xml' title='Latest Torrents' href='./rss.php?passkey={$CURUSER['passkey']}' />\n\t\t" . $js_incl . "\n\t\t</head> \n <body>\n <div class='itunes'>\n\t <table class='maincont'>\n\t <tr><td class='haus' colspan='2'>\n\t <div class='play'>\n\t <div class='play1'></div>\n\t <div class='play3'></div>\n\t <div class='play2'>{$TBDEV['site_name']}</div>\n\t </div>\n\t </td></tr>"; $htmlout .= StatusBar(); $htmlout .= "\n\t <tr valign='top'><td class='hlid'>"; if ($CURUSER) { $htmlout .= "<ul class='nav'>\n\t <li><a href='index.php'>{$lang['gl_home']}</a></li>\n\t <li><a href='browse.php'>{$lang['gl_browse']}</a></li>\n\t <li><a href='upload.php'>{$lang['gl_upload']}</a></li>\n\t <li><a href='getrss.php'>{$lang['gl_getrss']}</a></li>\n\t " . (isset($CURUSER) ? "<li><a href='usercp.php'>{$lang['gl_profile']}</a></li>" : "<li><a href='login.php'>{$lang['gl_login']}</a></li><li><a href='signup.php'>{$lang['gl_signup']}</a></li>") . "\n\t <li><a href='forums.php'>{$lang['gl_forums']}</a></li>\n\t <li><a href='staff.php'>{$lang['gl_staff']}</a></li>\n\t <li><a href='contactstaff.php'>{$lang['gl_help']}</a></li>\n\t <li><a href='donate.php'>{$lang['gl_donate']}</a></li>\n\t <li><a href='topten.php'>{$lang['gl_top_10']}</a></li>\n\t <li><a href='catalogue.php'>{$lang['gl_catalogue']}</a></li>\n\t <li><a href='viewrequests.php'>{$lang['gl_request']}</a></li>\n\t " . (isset($CURUSER) && $CURUSER['class'] >= UC_MODERATOR ? "<li><a href='staffpanel.php'>{$lang['gl_admin']}</a></li>" : "") . "\n\t </ul>"; } $htmlout .= "</td><td class='sida' align='center'>"; //=== free addon start if ($CURUSER) { if (isset($free)) { foreach ($free as $fl) { switch ($fl['modifier']) { case 1: $mode = 'All Torrents Free'; break; case 2: $mode = 'All Double Upload'; break; case 3: $mode = 'All Torrents Free and Double Upload'; break; default: $mode = 0; } $htmlout .= $fl['modifier'] != 0 && $fl['expires'] > TIME_NOW ? '<table width="50%"><tr> <td class="colhead" colspan="3" align="center">' . $fl['title'] . '<br />' . $mode . '</td> </tr> <tr> <td width="42" align="center"> <img src="' . $TBDEV['baseurl'] . '/pic/cat_free.gif" alt="FREE!" /></td> <td align="center">' . $fl['message'] . ' set by ' . $fl['setby'] . '<br />' . ($fl['expires'] != 1 ? 'Until ' . get_date($fl['expires'], 'DATE') . ' (' . mkprettytime($fl['expires'] - time()) . ' to go)' : '') . '</td> <td width="42" align="center"> <img src="' . $TBDEV['baseurl'] . '/pic/cat_free.gif" alt="FREE!" /></td> </tr></table> <br />' : ''; } } } //=== free addon end //==Temp demotion if ($CURUSER['override_class'] != 255 && $CURUSER) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10' bgcolor='green'>\n <tr><td style='padding: 10px; background: green'><b><a href='./restoreclass.php'>\n <font color='white'>{$lang['gl_tempdemotion']}</font></a></b></td></tr></table><br />\n"; } //==End if ($TBDEV['msg_alert'] && isset($unread) && !empty($unread)) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10' bgcolor='red'>\n <tr><td style='padding: 10px; background: red'>\n\n <b><a href='./messages.php'><font color='white'>" . sprintf($lang['gl_msg_alert'], $unread) . ($unread > 1 ? "s" : "") . "!</font></a></b>\n </td></tr></table><br />\n"; } //==Big red staffmess thingy box: if ($TBDEV['staffmsg_alert'] && $CURUSER['class'] >= UC_MODERATOR) { $num = mysql_result(sql_query('SELECT count(id) FROM staffmessages WHERE answeredby = 0'), 0); if ($num > 0) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10'>\n <tr><td style='padding: 10px; background: #ccc'>\n\n <b><a href='staffbox.php'>" . sprintf($lang['gl_staffmsg_alert'], $num) . "!</a></b>\n </td></tr></table><br />"; } } //==End //==Big red report thingy box: if ($TBDEV['report_alert'] && $CURUSER['class'] >= UC_MODERATOR) { $num = mysql_result(sql_query('SELECT COUNT(id) FROM reports WHERE delt_with = 0'), 0); if ($num > 0) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10'>\n <tr><td style='padding: 10px; background: #ccc'>\n\n <b><a href='admin.php?action=reports'>" . sprintf($lang['gl_reportmsg_alert'], $num) . "!</a></b>\n </td></tr></table><br />"; } } //==End //Big red uploadapp thingy box: if ($TBDEV['uploadapp_alert'] && $CURUSER['class'] >= UC_MODERATOR) { $num = mysql_result(sql_query('SELECT count(id) FROM uploadapp WHERE status = "pending"'), 0); if ($num > 0) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10'>\n <tr><td style='padding: 10px; background: #ccc'>\n\n <b><a href='uploadapps.php'>" . sprintf($lang['gl_uploadapp_alert'], $num) . "!</a></b>\n </td></tr></table><br />"; } } //==End // happy hour if ($CURUSER) { if (happyHour("check")) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10' ><tr><td align='center' style=\"background:#CCCCCC;color:#222222; padding:10px\">\n\n <b>Hey its now happy hour ! " . (happyCheck("check") == 255 ? "Every torrent downloaded in the happy hour is free" : "Only <a href=\"browse.php?cat=" . happyCheck("check") . "\">this category</a> is free this happy hour") . "<br /><font color='red'>" . happyHour("time") . " </font> remaining from this happy hour!</b>"; $htmlout .= "</td></tr></table><br />\n"; } } //==pdq crazyhour if (isset($CURUSER)) { $transfer_filename = $TBDEV['cache'] . '/transfer_crazyhour.txt'; $crazyhour_filename = $TBDEV['cache'] . '/crazy_hour.txt'; $crazyhour_cache = fopen($crazyhour_filename, 'r+'); $crazyhour_var = fread($crazyhour_cache, filesize($TBDEV['cache'] . '/crazy_hour.txt')); fclose($crazyhour_cache); $cimg = '<img src=\'' . $TBDEV["pic_base_url"] . 'cat_free.gif\' alt=\'FREE!\' />'; if ($crazyhour_var >= TIME_NOW && $crazyhour_var < TIME_NOW + 3600) { // is crazyhour $htmlout .= "<table width='50%'><tr><td class='colhead' colspan='3' align='center'>\n " . $TBDEV['crazy_title'] . " Ends in " . mkprettytime($crazyhour_var - TIME_NOW) . "</td></tr>\n <tr><td width='42px' align='center' valign='middle'>" . $cimg . "</td>\n <td><div align='center'>" . $TBDEV['crazy_message'] . "</div></td>\n <td width='42px' align='center' valign='middle'>" . $cimg . "</td></tr></table><br />"; if (is_file($transfer_filename)) { unlink($transfer_filename); } } elseif ($crazyhour_var < TIME_NOW + 3600 && !is_file($transfer_filename)) { //== crazyhour over $transfer_file_created = fopen($transfer_filename, 'w') or die('no perms?'); fclose($transfer_file_created); $crazyhour['crazyhour_new'] = mktime(23, 59, 59, date('m'), date('d'), date('y')); $crazyhour['crazyhour']['var'] = mt_rand($crazyhour['crazyhour_new'], $crazyhour['crazyhour_new'] + 86400); $fp = fopen($crazyhour_filename, 'w'); fwrite($fp, $crazyhour['crazyhour']['var']); fclose($fp); write_log('Next Crazyhour is at ' . date('F j, g:i a T', $crazyhour['crazyhour']['var'])); $htmlout .= "<table cellpadding='3'><tr><td class='colhead' colspan='3' align='center'>" . " Crazyhour will be " . get_date($crazyhour['crazyhour']['var'], '') . " " . mkprettytime($crazyhour['crazyhour']['var'] - TIME_NOW) . " remaining till Crazyhour</td></tr></table><br />"; } else { // make date look prettier with countdown etc even :] $htmlout .= "<table cellpadding='3'><tr><td class='colhead' colspan='3' align='center'>" . " Crazyhour will be " . get_date($crazyhour_var, '') . " " . mkprettytime($crazyhour_var - TIME_NOW) . " remaining till Crazyhour</td></tr></table><br />"; } } // crazyhour end return $htmlout; }
<!-- top announcements code --> <?php if (isset($unread) && !empty($unread)) { echo "<table align=center border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style=\"padding: 10px; background-image: url(pic/back_newpm.gif)\">\n"; echo "<b><a href={$BASEURL}/messages.php?action=viewmailbox><font color=white>You have {$unread} new message" . ($unread > 1 ? "s" : "") . "!</font></a></b>"; echo "</td></tr></table></p>\n"; } if ($CURUSER) { echo "<br/>"; echo "<table align=center border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style=\"padding: 10px; background-image: url(pic/back_newpm.gif)\">\n"; echo "<b><a href={$BASEURL}/upload.php><font color=white>Upload and get 15 bonus points!</font></a></b>"; echo "</td></tr></table></p>\n"; // happy hour if (happyHour("check")) { echo "<table align=center border=0 cellspacing=0 cellpadding=10 ><tr><td align=center style=\"background:#CCCCCC;color:#222222; padding:10px\">\n"; echo "<b>Hey its now happy hour ! " . (happyCheck("check") == 255 ? "Every torrent downloaded in the happy hour is free" : "Only <a href=\"browse.php?cat=" . happyCheck("check") . "\">this category</a> is free this happy hour") . "<br/><font color=red>" . happyHour("time") . " </font> remaining from this happy hour!</b>"; echo "</td></tr></table>\n"; } } // //////////////// if ($CURUSER["tenpercent"] == "no") { ?> <script language=javascript type="text/javascript"> function enablesubmit() { document.tenpercent.submit.disabled = document.tenpercent.submit.checked; } function disablesubmit() { document.tenpercent.submit.disabled = !document.tenpercent.submit.checked; } </script> <?php
if (function_exists('parked')) { parked(); } $id = isset($_GET['torrent']) ? (int) $_GET['torrent'] : 0; $ssluse = isset($_GET['ssl']) && $_GET['ssl'] == 1 || $CURUSER['ssluse'] == 3 ? 1 : 0; $zipuse = isset($_GET['zip']) && $_GET['zip'] == 1 ? true : false; if (!is_valid_id($id)) { stderr($lang['download_user_error'], $lang['download_no_id']); } $res = sql_query('SELECT name, owner, vip, category, filename FROM torrents WHERE id = ' . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $row = mysqli_fetch_assoc($res); $fn = $INSTALLER09['torrent_dir'] . '/' . $id . '.torrent'; if (!$row || !is_file($fn) || !is_readable($fn)) { stderr('Err', 'There was an error with the file or with the query, please contact staff'); } if (happyHour('check') && happyCheck('checkid', $row['category'])) { $multiplier = happyHour('multiplier'); happyLog($CURUSER['id'], $id, $multiplier); sql_query('INSERT INTO happyhour (userid, torrentid, multiplier ) VALUES (' . sqlesc($CURUSER['id']) . ',' . sqlesc($id) . ',' . sqlesc($multiplier) . ')') or sqlerr(__FILE__, __LINE__); $mc1->delete_value($CURUSER['id'] . '_happy'); } if (($CURUSER['downloadpos'] == 0 || $CURUSER['downloadpos'] > 1 || $CURUSER['suspended'] == 'yes') && !($CURUSER['id'] == $row['owner'])) { stderr("Error", "Your download rights have been disabled."); } if ($row['vip'] == 1 && $CURUSER['class'] < UC_VIP) { stderr('VIP Access Required', 'You must be a VIP In order to view details or download this torrent! You may become a Vip By Donating to our site. Donating ensures we stay online to provide you more Vip-Only Torrents!'); } sql_query("UPDATE torrents SET hits = hits + 1 WHERE id = " . sqlesc($id)); /** free mod by pdq **/ /** freeslots/doubleseed by pdq **/ if (isset($_GET['slot'])) {
parked(); } $id = isset($_GET['torrent']) ? (int) $_GET['torrent'] : 0; $ssluse = isset($_GET['ssl']) && $_GET['ssl'] == 1 || $CURUSER['ssluse'] == 3 ? 1 : 0; $zipuse = isset($_GET['zip']) && $_GET['zip'] == 1 ? true : false; $text = isset($_GET['text']) && $_GET['text'] == 1 ? true : false; if (!is_valid_id($id)) { stderr($lang['download_user_error'], $lang['download_no_id']); } $res = sql_query('SELECT name, owner, vip, category, filename, info_hash FROM torrents WHERE id = ' . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $row = mysqli_fetch_assoc($res); $fn = $INSTALLER09['torrent_dir'] . '/' . $id . '.torrent'; if (!$row || !is_file($fn) || !is_readable($fn)) { stderr('Err', 'There was an error with the file or with the query, please contact staff'); } if (happyHour('check') && happyCheck('checkid', $row['category']) && XBT_TRACKER == false && $INSTALLER09['happy_hour'] == true) { $multiplier = happyHour('multiplier'); happyLog($CURUSER['id'], $id, $multiplier); sql_query('INSERT INTO happyhour (userid, torrentid, multiplier ) VALUES (' . sqlesc($CURUSER['id']) . ',' . sqlesc($id) . ',' . sqlesc($multiplier) . ')') or sqlerr(__FILE__, __LINE__); $mc1->delete_value($CURUSER['id'] . '_happy'); } if ($INSTALLER09['seedbonus_on'] == 1 && $row['owner'] != $CURUSER['id']) { //===remove karma sql_query("UPDATE users SET seedbonus = seedbonus-" . sqlesc($INSTALLER09['bonus_per_download']) . " WHERE id = " . sqlesc($CURUSER["id"])) or sqlerr(__FILE__, __LINE__); $update['seedbonus'] = $CURUSER['seedbonus'] - $INSTALLER09['bonus_per_download']; $mc1->begin_transaction('userstats_' . $CURUSER['id']); $mc1->update_row(false, array('seedbonus' => $update['seedbonus'])); $mc1->commit_transaction($INSTALLER09['expires']['u_stats']); $mc1->begin_transaction('user_stats_' . $CURUSER['id']); $mc1->update_row(false, array('seedbonus' => $update['seedbonus'])); $mc1->commit_transaction($INSTALLER09['expires']['user_stats']);
$id = 0 + $matches[1]; if (!$id) { httperr(); } $res = mysql_query("SELECT name, filename, vip FROM torrents WHERE id = {$id}") or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_assoc($res); $fn = "{$torrent_dir}/{$id}.torrent"; if (!$row || !is_file($fn) || !is_readable($fn)) { httperr(); } if (strlen($CURUSER['passkey']) != 32) { $CURUSER['passkey'] = md5($CURUSER['username'] . get_date_time() . $CURUSER['passhash']); mysql_query("UPDATE users SET passkey='{$CURUSER['passkey']}' WHERE id={$CURUSER['id']}"); } mysql_query("UPDATE torrents SET hits = hits + 1 WHERE id = {$id}"); if (happyHour("check") && happyCheck("checkid", $row["category"])) { $multiplier = happyHour("multiplier"); $time = time(); happyLog($CURUSER["id"], $id, $multiplier); mysql_query("INSERT INTO happyhour (userid, torrentid, multiplier ) VALUES (" . sqlesc($CURUSER["id"]) . " , " . sqlesc($id) . ", " . sqlesc($multiplier) . " )") or sqlerr(__FILE__, __LINE__); } // Passkey Mod require_once "include/benc.php"; if ($row["vip"] == 'yes' && get_user_class() < UC_VIP) { stdmsg("Sorry...", "You are not allowed to download this torrent"); exit; } $dict = bdec_file($fn, 1024 * 1024); $dict['value']['announce']['value'] = "{$BASEURL}/announce.php?passkey={$CURUSER['passkey']}"; $dict['value']['announce']['string'] = strlen($dict['value']['announce']['value']) . ":" . $dict['value']['announce']['value']; $dict['value']['announce']['strlen'] = strlen($dict['value']['announce']['string']);
<?php /** |--------------------------------------------------------------------------| | https://github.com/Bigjoos/ | |--------------------------------------------------------------------------| | Licence Info: GPL | |--------------------------------------------------------------------------| | Copyright (C) 2010 U-232 V5 | |--------------------------------------------------------------------------| | A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. | |--------------------------------------------------------------------------| | Project Leaders: Mindless, Autotron, whocares, Swizzles. | |--------------------------------------------------------------------------| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ // happy hour if (XBT_TRACKER == false or $INSTALLER09['happy_hour'] == true) { if ($CURUSER) { require_once INCL_DIR . 'function_happyhour.php'; if (happyHour("check")) { $htmlout .= "\n <li>\n <a class='sa-tooltip' href='browse.php?cat=" . happyCheck("check") . "'><b class='btn btn-success btn-sm'>{$lang['gl_happyhour']}</b>\n\t\t<span class='custom info alert alert-success'>\n {$lang['gl_happyhour1']}<br /> " . (happyCheck("check") == 255 ? "{$lang['gl_happyhour2']}" : "{$lang['gl_happyhour3']}") . "<br /><font color='red'><b> " . happyHour("time") . " </b></font> {$lang['gl_happyhour4']}</span></a></li>"; } } } //== // End Class // End File
<?php // happy hour if ($CURUSER) { require_once INCL_DIR . 'function_happyhour.php'; if (happyHour("check")) { $htmlout .= "\r\n <li>\r\n <a class='tooltip' href='browse.php?cat=" . happyCheck("check") . "'><b><font color='red'>{$lang['gl_happyhour']}</font></b><span class='custom info'><img src='./templates/1/images/Info.png' alt='Happy Hour' height='48' width='48' /><em>{$lang['gl_happyhour']}</em>\r\n {$lang['gl_happyhour1']} " . (happyCheck("check") == 255 ? "{$lang['gl_happyhour2']}" : "{$lang['gl_happyhour3']}") . "<br /><font color='red'><b> " . happyHour("time") . " </b></font> {$lang['gl_happyhour4']}</span></a></li>"; } } //== // End Class // End File
function stdhead($title = "", $msgalert = true, $stdhead = false) { global $CURUSER, $TBDEV, $lang, $free, $_NO_COMPRESS, $querytime, $query_stat, $q, $mc; if (!$TBDEV['site_online']) { die("We are making updates, please check back again later... thanks<br />"); } header('Content-Type: text/html; charset=utf-8'); header('Content-Language content="en-us"'); if ($title == "") { $title = $TBDEV['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : ''); } else { $title = $TBDEV['site_name'] . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '') . " :: " . htmlspecialchars($title); } if ($CURUSER) { $TBDEV['stylesheet'] = isset($CURUSER['stylesheet']) ? "{$CURUSER['stylesheet']}.css" : $TBDEV['stylesheet']; } if ($TBDEV['msg_alert'] && $msgalert && $CURUSER) { $res = sql_query("SELECT count(id) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or sqlerr(__FILE__, __LINE__); $arr = mysql_fetch_row($res); $unread = $arr[0]; } /** ZZZZZZZZZZZZZZZZZZZZZZZZZZip it! **/ if (!isset($_NO_COMPRESS)) { if (!ob_start('ob_gzhandler')) { ob_start(); } } /** include js files needed only for the page being used by pdq **/ $js_incl = '<!-- javascript goes here or in footer -->'; if ($stdhead['js'] != false) { foreach ($stdhead['js'] as $JS) { $js_incl .= "<script type='text/javascript' src='" . $TBDEV['baseurl'] . "/scripts/" . $JS . ".js'></script>"; } } $htmlout = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <!-- ************************************************************************** -->\r\n <!-- THIS WEBSITE IS POWERED BY TBDEV.NET 2009 (FINAL) SOURCECODE -->\r\n <!-- DESIGN IS MADE UNIQUE FOR THIS TRACKER, BY KIDVISION FROM TBDEV.NET TEAM -->\r\n <!-- HTTP://WWW.KIDVISION.ME | HTTP://WWW.TBDEV.NET -->\r\n <!-- ************************************************************************** -->\r\n <head>\r\n <meta name='generator' content='TBDev.net' />\r\n <meta http-equiv='Content-Language' content='en-us' />\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <meta name='MSSmartTagsPreventParsing' content='TRUE' />\r\n <title>{$title}</title>\r\n <link rel='alternate' type='application/rss+xml' title='Latest Torrents' href='./rss.php?passkey={$CURUSER['passkey']}' />\r\n <link rel='stylesheet' href='templates/6/6.css' type='text/css' />\r\n <link rel='stylesheet' href='templates/6/bbcode.css' type='text/css' />\r\n <script type='text/javascript' src='scripts/jquery.js'></script>\r\n <script type='text/javascript' src='image-resize/core-resize.js'></script>\r\n <link type='text/css' rel='stylesheet' href='image-resize/resize.css' />\r\n " . $js_incl . "\r\n </head>\r\n <body>"; if ($CURUSER) { $htmlout .= "\r\n <div id='container'>\r\n <!-- Header settings -->\r\n <div id='logo'><!-- Css - Change logo @ css --></div>\r\n <div id='userstats'>\r\n <!-- Status bar -->"; $htmlout .= StatusBar(); $htmlout .= "\r\n </div>\r\n \r\n <!-- Main menu --> \r\n \r\n <div id='globalmenu'>\r\n <ul id='menu2'>\r\n <li class='home'><a href='./index.php'><b>home</b></a></li>\r\n <li class='browse'><a href='./browse.php'><b>browse</b></a></li>\r\n <li class='forums'><a href='./forums.php'><b>forums</b></a></li>\r\n <li class='faq'><a href='./faq.php'><b>faq</b></a></li>\r\n <li class='rules'><a href='./rules.php'><b>rules</b></a></li>\r\n <li class='staff'><a href='./staff.php'><b>support</b></a></li>\r\n <li class='logout'><a href='./logout.php'><b>logout</b></a></li>\r\n </ul>\r\n </div>\r\n <div id='infomenu'>"; $htmlout .= "\r\n <form method='post' action='browse.php'>\r\n <input type='text' name='search' size='30' value='' />\r\n <input type='submit' value='GO' class='btn1' />\r\n </form>\r\n </div>\r\n <div class='clear'></div>\r\n <!-- menu --> \r\n <div id='globalundermenu'>\r\n <img src='templates/6/gfx/small-ar.png' alt=''/><a href='./topten.php'>top10</a> \r\n <img src='templates/6/gfx/small-ar.png' alt=''/><a href='./chat.php'>chat</a> \r\n <img src='templates/6/gfx/small-ar.png' alt=''/><a href='./bitbucket.php'>bitbucket</a> \r\n <img src='templates/6/gfx/small-ar.png' alt=''/><a href='./getrss.php'>get rss</a> \r\n <img src='templates/6/gfx/small-ar.png' alt=''/><a href='./donate.php'>donate</a> "; if ($CURUSER['class'] >= UC_UPLOADER) { $htmlout .= "<img src='templates/6/gfx/small-ar.png' alt=''/><a href='./upload.php'>upload</a> "; } else { $htmlout .= "<img src='templates/6/gfx/small-ar.png' alt=''/><a href='./uploadapp.php'>uploader-application</a> "; } $htmlout .= "<img src='templates/6/gfx/small-ar.png' alt=''/><a href='./usercp.php'>profile</a> "; if ($CURUSER['class'] >= UC_MODERATOR) { $htmlout .= "<img src='templates/6/gfx/small-ar.png' alt=''/><a href='./staffpanel.php'>staffpanel</a> "; } $htmlout .= "</div>"; } $htmlout .= "\r\n <!-- Main content -->\r\n <table class='mainouter' width='900px' align='center' border='0' cellspacing='0' cellpadding='0'>\r\n <tr><td align='center' class='outer' style='padding-top: 20px; padding-bottom: 5px'>"; //=== free addon start if ($CURUSER && isset($free)) { foreach ($free as $fl) { switch ($fl['modifier']) { case 1: $mode = 'All Torrents Free'; break; case 2: $mode = 'All Double Upload'; break; case 3: $mode = 'All Torrents Free and Double Upload'; break; default: $mode = 0; } $htmlout .= $fl['modifier'] != 0 && $fl['expires'] > TIME_NOW ? '<img src="' . $TBDEV['baseurl'] . '/pic/cat_free.gif" alt="FREE!" title="' . $fl['title'] . ' | ' . $mode . ' ' . $fl['message'] . ' | set by ' . $fl['setby'] . ' | ' . ($fl['expires'] != 1 ? 'Until ' . get_date($fl['expires'], 'DATE') . ' (' . mkprettytime($fl['expires'] - time()) . ' to go)' : '') . ' <br />' : ''; } } // happy hour if ($CURUSER) { if (happyHour("check")) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10' ><tr><td align='center' style=\"background:#CCCCCC;color:#222222; padding:10px\">\n\r\n <b>Hey its now happy hour ! " . (happyCheck("check") == 255 ? "Every torrent downloaded in the happy hour is free" : "Only <a href=\"browse.php?cat=" . happyCheck("check") . "\">this category</a> is free this happy hour") . "<br /><font color='red'>" . happyHour("time") . " </font> remaining from this happy hour!</b>"; $htmlout .= "</td></tr></table><br />\n"; } } //==Big red staffmess thingy box: if ($TBDEV['staffmsg_alert'] && $CURUSER['class'] >= UC_MODERATOR) { $num = mysql_result(sql_query('SELECT count(id) FROM staffmessages WHERE answeredby = 0'), 0); if ($num > 0) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10'>\r\n <tr><td style='padding: 10px; background: #ccc'>\n\r\n <b><a href='staffbox.php'>" . sprintf($lang['gl_staffmsg_alert'], $num) . "!</a></b>\r\n </td></tr></table><br />"; } } //==End //==Big red report thingy box: if ($TBDEV['report_alert'] && $CURUSER['class'] >= UC_MODERATOR) { $num = mysql_result(sql_query('SELECT COUNT(id) FROM reports WHERE delt_with = 0'), 0); if ($num > 0) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10'>\r\n <tr><td style='padding: 10px; background: #ccc'>\n\r\n <b><a href='admin.php?action=reports'>" . sprintf($lang['gl_reportmsg_alert'], $num) . "!</a></b>\r\n </td></tr></table><br />"; } } //==End //Big red uploadapp thingy box: if ($TBDEV['uploadapp_alert'] && $CURUSER['class'] >= UC_MODERATOR) { $num = mysql_result(sql_query('SELECT count(id) FROM uploadapp WHERE status = "pending"'), 0); if ($num > 0) { $htmlout .= "<table border='0' cellspacing='0' cellpadding='10'>\r\n <tr><td style='padding: 10px; background: #ccc'>\n\r\n <b><a href='uploadapps.php'>" . sprintf($lang['gl_uploadapp_alert'], $num) . "!</a></b>\r\n </td></tr></table><br />"; } } //==End //==Temp demotion if ($CURUSER['override_class'] != 255 && $CURUSER) { $htmlout .= "<b><a href='./restoreclass.php'>\r\n <img src='templates/6/gfx/tool.png' alt='Your running under lower class, restore here' title='Your running under lower class, restore here' /><font color='white'></font></a></b> "; } //==End if ($TBDEV['msg_alert'] && isset($unread) && !empty($unread)) { $htmlout .= "<b><a href='./messages.php'><img src='templates/6/gfx/new-mail.png' alt='You got mail' title='You got mail' /></a></b>"; } //==pdq crazyhour if (isset($CURUSER)) { $transfer_filename = $TBDEV['cache'] . '/transfer_crazyhour.txt'; $crazyhour_filename = $TBDEV['cache'] . '/crazy_hour.txt'; $crazyhour_cache = fopen($crazyhour_filename, 'r+'); $crazyhour_var = fread($crazyhour_cache, filesize($TBDEV['cache'] . '/crazy_hour.txt')); fclose($crazyhour_cache); $cimg = '<img src=\'' . $TBDEV["pic_base_url"] . 'cat_free.gif\' alt=\'FREE!\' />'; if ($crazyhour_var >= TIME_NOW && $crazyhour_var < TIME_NOW + 3600) { // is crazyhour $htmlout .= "<table width='50%'><tr><td class='colhead' colspan='3' align='center'>\r\n " . $TBDEV['crazy_title'] . " Ends in " . mkprettytime($crazyhour_var - TIME_NOW) . "</td></tr>\r\n <tr><td width='42px' align='center' valign='middle'>" . $cimg . "</td>\r\n <td><div align='center'>" . $TBDEV['crazy_message'] . "</div></td>\r\n <td width='42px' align='center' valign='middle'>" . $cimg . "</td></tr></table><br />"; if (is_file($transfer_filename)) { unlink($transfer_filename); } } elseif ($crazyhour_var < TIME_NOW + 3600 && !is_file($transfer_filename)) { //== crazyhour over $transfer_file_created = fopen($transfer_filename, 'w') or die('no perms?'); fclose($transfer_file_created); $crazyhour['crazyhour_new'] = mktime(23, 59, 59, date('m'), date('d'), date('y')); $crazyhour['crazyhour']['var'] = mt_rand($crazyhour['crazyhour_new'], $crazyhour['crazyhour_new'] + 86400); $fp = fopen($crazyhour_filename, 'w'); fwrite($fp, $crazyhour['crazyhour']['var']); fclose($fp); write_log('Next Crazyhour is at ' . date('F j, g:i a T', $crazyhour['crazyhour']['var'])); $htmlout .= "<table cellpadding='3'><tr><td class='colhead' colspan='3' align='center'>" . " Crazyhour will be " . get_date($crazyhour['crazyhour']['var'], '') . " " . mkprettytime($crazyhour['crazyhour']['var'] - TIME_NOW) . " remaining till Crazyhour</td></tr></table><br />"; } else { // make date look prettier with countdown etc even :] $htmlout .= "<table cellpadding='3'><tr><td class='colhead' colspan='3' align='center'>" . " Crazyhour will be " . get_date($crazyhour_var, '') . " " . mkprettytime($crazyhour_var - TIME_NOW) . " remaining till Crazyhour</td></tr></table><br />"; } } // crazyhour end return $htmlout; }
<?php // happy hour if ($CURUSER) { if (happyHour("check")) { $htmlout .= "\r\n <li>\r\n <a class='tooltip' href='browse.php?cat=" . happyCheck("check") . "'><b>HappyHour</b><span class='custom info'><img src='./templates/1/images/Info.png' alt='Happy Hour' height='48' width='48' /><em>HappyHour</em>\r\n Hey its now happy hour ! " . (happyCheck("check") == 255 ? "Every torrent downloaded in the happy hour is free" : "Only in the selected Category, click on HappyHour above here to go to it") . "<br /><font color='red'><b> " . happyHour("time") . " </b></font> remaining from this happy hour!\r\n </span></a></li>"; } }