Here it is Daffy. I hope you can help. :D
PHP Code:
<?php
/*
-----
*/
if (eregi("main.php",$_SERVER["PHP_SELF"])) die ("You can't access this file directly");
$tableopen = false;
$errtableopen = false;
$table2open = false;
$btback1 = "191919";
$btback2 = "242424";
$btback3 = "2C2C2C";
function OpenTable($title = "title", $tablewidth = "") {
global $tableopen, $siteurl, $theme;
if ($tableopen) return;
global $tableopen, $extitle;
$img2 = 'minus';
if ($tableopen) return;
if (isset($id_pedido) AND $id_pedido == $title) $mostrartable = '';
$extitle = strip_tags($title);
$extitle = str_replace(' ','_',$extitle);
$extitle = str_replace('/','_',$extitle);
$extitle = str_replace("'",'_',$extitle);
$extitle = str_replace("?",'_',$extitle);
if (!isset($id_pedido) AND $_COOKIE['nn'.$extitle] !='') $mostrartable = 'style="display: '.$_COOKIE['nn'.$extitle].';';
else $mostrartable = '';
echo "<table class=\"tablebg\" width=\"100%\" cellspacing=\"0\">
<caption><div class=\"cap-left\"><div class=\"cap-right\"><a class=\"c4\" style=\"cursor: pointer;\" onclick=\"toggle2('nn".$extitle."');\"><img title=\"Expand item\" id=\"nn".$extitle."img\" src=\"themes/$theme/pics/".$img2.".gif\" alt=\"+\"></a> ".$title." </div></div></caption>";
echo" <tr valign=\"middle\">
<td class=\"row3\" ><div id=\"nn".$extitle."\" ".$mostrartable."\">";
$tableopen = true;
}
function CloseTable() {
global $tableopen, $siteurl;
if (!$tableopen) return;
echo "</div></td></tr>
<tr>
<td class=\"cat\" colspan=\"7\" valign=\"middle\" align=\"center\"></td>
</tr>
</table>\n<br clear=\"all\" />";
$tableopen = false;
}
function OpenTable2($title = "") {
global $tableopen2, $siteurl;
if ($tableopen2) return;
echo "<div id=\"messagebox\" > ";
echo "<span class=\"messagebox-title\">".$title."</span><div style=\"margin: 0 auto;\">";
$tableopen2 = true;
}
function CloseTable2() {
global $tableopen2, $siteurl;
if (!$tableopen2) return;
echo "</div></div>";
$tableopen2 = false;
}
function OpenNewsTable($title = "") {
global $OpenNewsTable, $siteurl;
if ($OpenNewsTable) return;
echo "<div id=\"newsbox\" > ";
$OpenNewsTable = true;
}
function CloseNewsTable() {
global $OpenNewsTable, $siteurl;
if (!OpenNewsTable) return;
echo "</div>";
$OpenNewsTable = false;
}
function OpenMessTable($title = "") {
global $OpenMessTable, $siteurl;
if ($OpenMessTable) return;
echo "<div id=\"messagebox\"> ";
echo "<span class=\"messagebox-title\">".$title."</span>";
$OpenMessTable = true;
}
function CloseMessTable() {
global $OpenMessTable, $siteurl;
if (!$OpenMessTable) return;
echo "</div>";
$OpenMessTable = false;
}
function OpenSuccTable($title = "") {
global $OpenSuccTable, $siteurl;
if ($OpenSuccTable) return;
echo "<div id=\"successbox\" > ";
echo "<span class=\"successbox-title\">".$title."</span>";
$OpenSuccTable = true;
}
function CloseSuccTable() {
global $OpenSuccTable, $siteurl;
if (!$OpenSuccTable) return;
echo "</div>";
$OpenSuccTable = false;
}
function OpenErrTable($title) {
global $OpenErrTable, $siteurl;
if ($OpenErrTable) return;
echo "<div id=\"errorbox\" > ";
echo "<span class=\"errorbox-title\">".$title."</span>";
$OpenErrTable = true;
}
function CloseErrTable() {
global $OpenErrTable, $siteurl;
if (!$OpenErrTable) return;
echo "</div>";
$OpenErrTable = false;
}
function themechange(){
{
global $bttheme;
$themes = Array();
$thememaindir = "themes";
$themehandle = opendir($thememaindir);
while ($themedir = readdir($themehandle)) {
if (is_dir($thememaindir."/".$themedir) AND $themedir != "." AND $themedir != ".." AND $themedir != "CVS")
$themes[$themedir] = $themedir;
}
closedir($themehandle);
unset($thememaindir,$themedir);
}
$change = '';
foreach ($themes as $key=>$val) {
$change .= "<option ";
if ($bttheme == $key) $change .="selected ";
$change .= "value=\"".$key."\">".$val."</option>\n";
}
unset($themes);
return $change;
}
function languagechange(){
{
global $language;
$languages = Array();
$langdir = "language";
$langhandle = opendir($langdir);
while ($langfile = readdir($langhandle)) {
if (eregi("\.php$",$langfile) AND strtolower($langfile) != "mailtexts.php")
$languages[str_replace(".php","",$langfile)] = ucwords(str_replace(".php","",$langfile));
}
closedir($langhandle);
unset($langdir,$langfile);
}
$change = '';
foreach ($languages as $key=>$val) {
$change .="<option ";
if ($language == $key) $change .="selected";
$change .=" value=\"".$key."\">".$val."</option>\n";
}
unset($languages);
return $change;
}
function themeheader() {
global $db, $db_prefix, $theme, $siteurl, $user, $upload_level, $sitename, $gfx_check, $donations, $INVITEONLY,$onlysearch, $pivate_mode, $forumshare, $PHP_SELF, $shout_config;
if ($user->user) {
//Update online user list
$pagename = substr($_SERVER["PHP_SELF"],strrpos($_SERVER["PHP_SELF"],"/")+1);
$sqlupdate = "UPDATE ".$db_prefix."_online_users SET page = '".addslashes($pagename)."', last_action = NOW() WHERE id = ".$user->id.";";
$sqlinsert = "INSERT INTO ".$db_prefix."_online_users VALUES ('".$user->id."','".addslashes($pagename)."', NOW(), NOW())";
$res = $db->sql_query($sqlupdate);
if (!$db->sql_affectedrows($res)) $db->sql_query($sqlinsert);
}
$who = "".getusername($user)."";
$timestamp=time();
$timeout=$timestamp-$timeoutseconds=86400;
$vtd = "INSERT INTO 24hourvist VALUES ('$who','$timestamp','".getip()."','".$PHP_SELF."')";
$vtdud = "UPDATE 24hourvist SET user = '$who', timestamp = '$timestamp', file = '".$PHP_SELF."' WHERE ip = '".getip()."'";
$restd = $db->sql_query($vtdud);
if (!$db->sql_affectedrows($restd)) $db->sql_query($vtd);
$db->sql_query("DELETE FROM 24hourvist WHERE timestamp<$timeout");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n";
echo "<meta name=\"generator\" content=\"PMBT 2.0.2\" />\n";
echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
echo "<meta http-equiv=\"Expires\" content=\"-1\" />\n";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
echo '<link rel="search" type="application/opensearchdescription+xml" title="' . $sitename . '" href="'.$siteurl.'/opensearch.php" />';
echo "<!--[if lt IE 7]>
<script defer type=\"text/javascript\" src=\"$siteurl/pngfix.js\"></script><![endif]-->";
echo "<title>".$sitename."</title>\n";
?>
<script type="text/javascript">
pmbtsite_url = "<?php echo $siteurl; ?>";
tag_prompt = "<?php echo _bb_tag_prompt; ?>";
img_prompt = "<?php echo _bb_img_prompt; ?>";
font_formatter_prompt = "<?php echo _bb_font_formatter_prompt; ?>";
link_text_prompt = "<?php echo _bb_link_text_prompt; ?>";
link_url_prompt = "<?php echo _bb_link_url_prompt; ?>";
link_email_prompt = "<?php echo _bb_link_email_prompt; ?>";
list_type_prompt = "<?php echo _bb_list_type_prompt; ?>";
list_item_prompt = "<?php echo _bb_list_item_prompt; ?>";
_btshoutnowprivate = "<?php echo _btshoutnowprivate; ?>";
shoutrefresht = "<?php echo $shout_config['refresh_time']; ?>";
shoutidle = "<?php echo $shout_config['idle_time']; ?>";
function change_bg(img, state)
{
if (state == "1")
img.src = img.src.replace(".gif","_over.gif");
else if (state == "0")
img.src = img.src.replace("_over.gif",".gif");
else if (state == "2")
img.src = img.src.replace("_over.gif",".gif");
else if (state == "3")
img.src = img.src.replace("_over.gif",".gif");
}
var pd = new Date();
var last_reload = pd.getTime();
function do_breload() {
if (document.location.href.match(/\/torrents\.php/)) {
var d = new Date();
if (last_reload && last_reload > (d.getTime() - "4000")) return;
last_reload = d.getTime();
bparam('page=1')
}
}
function toggle2(nome) {
if(document.getElementById(nome).style.display=='none')
{
SetCookie(nome,'');
document.getElementById(nome).style.display = '';
} else {
SetCookie(nome,'none',200);
document.getElementById(nome).style.display = 'none';
}
}
function SetCookie(cookieName,cookieValue,nDays) {
var today = new Date();
var expire = new Date();
if (nDays==null || nDays==0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString();
}
function bparam(){
document.getElementById('myAnchor').href="torrents.php"
}
</script>
<?php
if (is_readable("themes/$theme/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"$siteurl/themes/".$theme."/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
if (!$onlysearch) {
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Last Torrents\" href=\"$siteurl/backend.php?op=last\">\n";
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Best Torrents\" href=\"$siteurl/backend.php?op=best\">\n";
}
if (is_readable("themes/$theme/style.css")) {
echo "<link rel=\"StyleSheet\" href=\"$siteurl/themes/$theme/style.css\" type=\"text/css\">\n<script type=\"text/javascript\" src=\"$siteurl/global.js\"></script>\n";
}
overlib_init();
echo"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-9\" />\n";
echo "</head>\n\n";
$has_newpm = false;
$sql = "SELECT id FROM ".$db_prefix."_private_messages WHERE recipient = '".$user->id."' AND is_read = 'false' LIMIT 1;";
$res = $db->sql_query($sql) or btsqlerror($sql);
$pmcount = $db->sql_numrows($res);
$has_newpm = ($pmcount > 0) ? true : false;
$db->sql_freeresult($res);
if ($has_newpm)
{
echo "<script type=\"text/javascript\" language=\"JavaScript\">";
echo "sPath = window.location.pathname;";
echo "sPage = sPath.substring(sPath.lastIndexOf('/') + 1);";
echo "if (sPage != \"pm.php\"){ var answer = confirm (\""._jscriptconfirmtext."\");";
echo "if (answer) window.location=\"pm.php?op=inbox\";";
echo "}";
echo "</script>";
}
$themepage = false;
?><!--[if lt IE 7]><link rel="stylesheet" type="text/css" media="screen" href="themes/eVo_blue/iestyle.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" media="screen" href="themes/eVo_blue/iestyle.css">
<![endif]-->
<?php
if($user->user)echo "<body class=\"ltr\" onload=\"shoutthis_ajax()\">\n";
else
echo "<body class=\"ltr\">";
echo"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"80%\" id=\"maintable\" align=\"center\">\n";
echo"<tr>\n";
echo"<td id=\"logorow\" align=\"center\"><div id=\"logo-left\"><div id=\"logo-right\">\n";
echo"</div></div></td>\n";
echo"</tr>\n";
echo"<tr>\n";
echo"<td class=\"navrow\">\n";
echo" \n";
echo"</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "<td align=\"center\" class=\"topbuttons\" nowrap=\"nowrap\" width=\"100%\" colspan=\"6\">\n";
echo "<a href=\"index.php\" ><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_home.gif\" border=\"0\" alt=\"\" title=\"Home\" id=\"home\"></a>\n";
//echo "<a id=\"myAnchor\" href=\"".((preg_match("/torrents.php/",$_SERVER["PHP_SELF"]))? "#" : "torrents.php")."\" onclick=\"do_breload();\"><img onclick=\"do_breload();\" onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_browse.gif\" border=\"0\" alt=\"\" title=\"Browse\" id=\"browse\"></a>\n";
help("<img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_browse.gif\" border=\"0\" alt=\"\" title=\"Browse\" id=\"help\">","<table width=\"100%\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" class=\"tableinborder\"><tr><td class=\"tabletitle\"><div align=\"center\"><a href=\"javascript:;\" onclick=\"return nd();\">Browse Menu</a></div></td><tr><td class=\"tableb\"><div align=\"center\"><a href=\"torrents.php\">Browse</a></div></td></tr></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"viewrequests.php\">View Requests</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"offers.php\">Torrents Offered</a></div></td></tr></table>",'eVo_blue','eVo_blue');
//echo "<a href=\"user.php?op=profile&id=".$user->id."\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_profile.gif\" border=\"0\" alt=\"\" title=\"Profile\" id=\"profile\"></a>\n";
if($user->user) help("<img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_profile.gif\" border=\"0\" alt=\"\" title=\"Profile\" id=\"help\">","<table width=\"100%\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" class=\"tableinborder\"><tr><td class=\"tabletitle\"><div align=\"center\"><a href=\"javascript:;\" onclick=\"return nd();\">Profile Menu</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"pm.php\">Messages</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"mytorrents.php\">Your Torrents</a></div></td></tr></table>",'eVo_blue','eVo_blue');
//if($user->user)echo "<a href=\"mytorrents.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_yourtorrents.gif\" border=\"0\" alt=\"\" title=\"Your Torrents\" id=\"yourtorrents\"></a>\n";
//echo "<a href=\"pm.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_messages.gif\" border=\"0\" alt=\"mess\" title=\"Messages\" id=\"msg\"></a>\n";
echo "<a href=\"upload.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_upload.gif\" border=\"0\" alt=\"\" title=\"Upload\" id=\"upload\"></a>\n";
//echo "<a href=\"viewrequests.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_viewrequests.gif\" border=\"0\" alt=\"\" title=\"View Requests\" id=\"requests\"></a>\n";
//echo "<a href=\"offers.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_offers.gif\" border=\"0\" alt=\"\" title=\"Offers\" id=\"requests\"></a>\n";
echo "<a href=\"memberslist.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_memberslist.gif\" border=\"0\" alt=\"\" title=\"Members List\" id=\"memberslist\"></a>\n";
echo "<a href=\"games.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_games.gif\" border=\"0\" alt=\"\" title=\"Games\" id=\"games\"></a>\n";
if($forumshare)echo "<a href=\"phpBB.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_forum.gif\" border=\"0\" alt=\"\" title=\"Forum\" id=\"forums\"></a>\n";
echo "<a href=\"chat.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_chat.gif\" border=\"0\" alt=\"\" title=\"IRC Chat\" id=\"chat\"></a>\n";
help("<img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_help.gif\" border=\"0\" alt=\"\" title=\"Help\" id=\"help\">","<table width=\"100%\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" class=\"tableinborder\"><tr><td class=\"tabletitle\"><div align=\"center\"><a href=\"javascript:;\" onclick=\"return nd();\">Help Menu</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"rules.php\">Rules</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"faq.php\">F.A.Q</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"staff.php\">Staff</a></div></td></tr></table>",'eVo_blue','eVo_blue');
if($user->admin)echo "<a href=\"admin.php\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_administration.gif\" border=\"0\" alt=\"\" title=\"Administration\" id=\"administration\"></a>\n";
if($user->user)echo "\n<a onclick=\"if(!confirm('Are you sure do you want to logout?')){return false;};\" href=\"user.php?op=logout\" r=\"0\" alt=\"\" title=\"Logout\"><img onmouseover=\"change_bg(this,'1')\" onmouseout=\"change_bg(this,'0')\" src=\"themes/eVo_blue/pics/top_logout.gif\" border=\"0\" title=\"Logout\" alt=\"\" id=\"logout\"></a>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td id=\"contentrow\">\n";
if($pivate_mode AND !$user->user AND !preg_match("/user.php/",$_SERVER["PHP_SELF"])) loginrequired("user", true);
//echo "<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"/w/opensearch_desc.php\" title=\"Wikipedia (English)\" />";
$reason = "";
if (is_banned($user, $reason)) {
echo "<p> </p>\n";
echo "<p> </p>\n";
echo "<h3 align=\"center\">".str_replace("**reason**",htmlspecialchars($reason),_btbannedmsg)."</p>\n";
echo "<p> </p>\n";
echo "<p> </p>\n";
include("footer.php");
die();
}
echo "<table width=\"100%\">\n";
echo "<tr>\n";
if(!preg_match("/phpBB.php/",$_SERVER["PHP_SELF"]))
{
echo "<td width=\"15%\" valign=\"top\">\n";
echo "<div >";
{
OpenTable("General");
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\" class=\"forumline\" align=\"center\">\n";
if ($user->user)
{
// echo "<tr><td class=\"row2\" width=\"100%\"><a href=\"index.php\">"._btindex."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"rules.php\">Rules</a></td></tr>\n";
// echo "<tr><td class=\"row2\" width=\"100%\"><a href=\"faq.php\">"._btfaqs."</a></td></tr>\n";
// if($forumshare)echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"phpBB.php\">Forum</a></td></tr>\n";
// if (file_exists("include/irc.ini"))echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"chat.php\">"._btircchat."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"mytorrents.php\">"._btpersonal."</a></td></tr>\n";
// if ($upload_level == "all")echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"upload.php\">"._btupload."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"torrents.php\">Browse</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"pm.php\"><span id=\"nopm_notif\">"._btpm."</span></a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"user.php?op=profile&id=".$user->id."\">"._btuserprofile."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"memberslist.php\">"._btmemlist."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"user.php?op=logout\">"._btlogout."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"games.php\">"._btgames."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"viewrequests.php\">"._btviewrqst."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"offers.php\">"._bttorofferd."</a></td></tr>\n";
// if ($user->admin)echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"admin.php\">"._btadmin."</a></td></tr>\n";
// }else{
// echo "<tr><td class=\"row2\" width=\"100%\"><a href=\"index.php\">"._btindex."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"rules.php\">Rules</a></td></tr>\n";
// echo "<tr><td class=\"row2\" width=\"100%\"><a href=\"faq.php\">"._btfaqs."</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"phpBB.php\">Forum</a></td></tr>\n";
// echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"chat.php\">"._btircchat."</a></td></tr>\n";
// if ($upload_level == "all") echo "<tr><td class=\"row1\" width=\"100%\"><a href=\"upload.php\">"._btupload."</a></td></tr>\n";
}
echo "</table>\n";
include("./blocks/usercp.php");
if (!$user->user) {
echo "<HR SIZE=1 NOSHADE>";
echo "<p align=\"center\"><b>"._btlogin."</b></p>\n";
echo "<p> </p>\n";
echo "<form method=\"POST\" action=\"user.php\"><input type=\"hidden\" name=\"op\" value=\"login\" />\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr><td align=\"center\"><p>"._btusername."</p></td>\n</tr><tr><td align=\"center\"><input type=\"text\" name=\"username\" size=\"10\"></td></tr><tr><td align=\"center\"><p>"._btpassword."</p></td></tr><tr><td align=\"center\"><input type=\"password\" name=\"password\" size=\"10\"></td></tr><tr><td align=\"center\"><p>"._btremember."</p></td></tr><tr><td align=\"center\"><input type=\"checkbox\" name=\"remember\" value=\"yes\"></td></tr>";
if ($gfx_check) {
$rnd_code = strtoupper(RandomAlpha(5));
echo "<p align=\"center\">"._btsecuritycode."<br><img src=\"gfxgen.php?code=".base64_encode($rnd_code)."\" alt=\"Security Code\"><br>\n<input type=\"text\" name=\"gfxcode\" size=\"10\" maxlength=\"6\">";
echo "<input type=\"hidden\" name=\"gfxcheck\" value=\"".md5($rnd_code)."\">\n\n";
}
echo "<tr><td><p align=\"center\"><input type=\"submit\" value=\""._btlogin."\"></p></td></tr></table></form>";
echo "<p><a href=\"user.php?op=register\">"._btsignup."</a><br />\n\n";
echo "<a href=\"user.php?op=lostpassword\">"._btlostpassword."</a></p>\n\n";
}
CloseTable();
}
if ($donations){
include("./blocks/donation_block.php");
}
if (!$onlysearch OR $user->admin)
{
OpenTable(_bttypes);
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n<tr>\n<td nowrap>\n";
echo "<p class=\"categories\">";
foreach (catlist() as $c) {
if (file_exists("themes/".$theme."/pics/cat_pics/".$c["image"])) {
echo "<a href=\"torrents.php?cat=".$c["id"]."\">";
echo "<img width=\"30px\" src=\"themes/".$theme."/pics/cat_pics/".$c["image"]."\" title=\"".$c["name"]."\" border=\"0\" alt=\"".$c["name"]."\" > ".$c["name"];
echo "</a>";
echo "<br>";
}elseif (file_exists("cat_pics/".$c["image"])) {
echo "<a href=\"torrents.php?cat=".$c["id"]."\">";
echo "<img width=\"30px\" src=\"cat_pics/".$c["image"]."\" border=\"0\" title=\"".$c["name"]."\" alt=\"".$c["name"]."\" > ".$c["name"];
echo "</a>";
echo "<br>";
}
}
echo "</p>";
echo "</td>\n</tr>\n</table>\n";
CloseTable();
}
//if($user->user){
//OpenTable(_btinvites);
// echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n";
// echo "<tr><td align=\"center\">"._btinfituh."<br></td></tr>\n";
// if ($user->invites > 0 ){
// echo "<tr><td align=\"center\"><a href=invite.php>"._btsendiv."</a><br></td></tr>\n";
// }
// echo "</table>";
//
// CloseTable();
// }
echo "</div></td>\n";
}
echo "<td width=\"65%\" valign=\"top\">\n";
echo "<div id=\"center\">";
$sql_profile = "SELECT * FROM ".$db_prefix."_users where id = '".$user->id."' ;";
$res_profile = $db->sql_query($sql_profile);
$userrow = $db->sql_fetchrow($res_profile);
$db->sql_freeresult($res_profile);
// WARN things START
if ($user->user) {
if ($user->downloaded > 0){
include ("./ratiowarn.php");
}
}
if ($userrow["warned"])
{
$warn_kapta = $userrow["warn_kapta"];
$warn_hossz = $userrow["warn_hossz"];
$modcomment = $userrow["modcomment"];
if ($warn_hossz != -1) {
$warn = $warn_kapta + $warn_hossz;
$time_now = strtotime(gmdate("Y-m-d H:i:s", time()));
if ($warn < $time_now)
{
$modcomment = "[ " . gmdate("Y-m-d H:i:s", time()) . " - WARN time expired ]\n" . $modcomment;
$msg = ("Your WARN time expired, so we deleted it!");
@$db->sql_query("INSERT INTO ".$db_prefix."_private_messages (sender, recipient, subject, text, sent) VALUES(1, " .$user->id. ",'WARNING' '" . $msg ."', NOW())") or die(mysql_error());
$modcomment = $modcomment;
$frissites = $db->sql_query("UPDATE ".$db_prefix."_users SET modcomment=$modcomment, warned='0', warn_kapta='0', warn_hossz='0' WHERE id='".$user->id."'") or die(mysql_error());
}
}
}
// WARN things END
//////////////////// Kommentera modd ////////////////////////
$res = $db->sql_query("SELECT torrent FROM ".$db_prefix."_peers WHERE uid='".$user->id."'")or print(mysql_error());
while($row = $db->sql_fetchrow($res)){
$kom = $db->sql_fetchrow( $db->sql_query("SELECT count(*) FROM ".$db_prefix."_comments WHERE user= '".$user->id."' AND torrent='$row[torrent]'"))or print(mysql_error());
$tor = $db->sql_fetchrow( $db->sql_query("SELECT name,owner FROM ".$db_prefix."_torrents WHERE id='$row[torrent]'"))or print(mysql_error());
if(!$kom[0] && $tor[owner] != $user->id){
$komment .= "<a href=details.php?id=".$row[torrent].">".$tor[name]."</a><br>";
}
}
/////////////////////////////////////////////////////////////
if ($user->user) {
if ($komment){
print("<p><table border=0 cellspacing=0 cellpadding=10 bgcolor=green><tr><td style='padding: 50px; background: green'>\n");
print("Please leave a comment on:<br>$komment");
print("</td></tr></table></p>\n");
}
}
}
function overlib_init() {
echo "<script type=\"text/javascript\" src=\"overlib/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>\n";
echo "<script type=\"text/javascript\" src=\"overlib/overlib_shadow.js\"><!-- overLIB (c) Erik Bosrup --></script>\n";
}
function themefooter(){
global $startpagetime, $db, $db_prefix, $user,$INVITEONLY;//y can move them now ?should
echo"</div></td>";
if(!preg_match("/phpBB.php/",$_SERVER["PHP_SELF"])){
echo"<td id=\"rightcolumn\" valign=\"top\">";
#right side here
if ($donations){
include("./blocks/donation_block.php");
}
if($user->user){
OpenTable(_btinvites);
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo "<tr><td align=\"center\">"._btinfituh."<br></td></tr>\n";
if ($user->invites > 0 ){
echo "<tr><td align=\"center\"><a href=invite.php>"._btsendiv."</a><br></td></tr>\n";
}
echo "</table>";
CloseTable();
}
echo"</td>";
}
echo"</tr></table>";
echo"";
echo'<div id="wrapfooter">
<span class="gensmall"> <!-- Feel free to add you custom disclaimer or copyright notice here -->
<!-- YOU ARE NOT ALLOWED TO EDIT THE FOLLOWING COPYRIGHT NOTICE!!! -->
Theme By Evolution Torrent 2010 © <br />
Powered by phpMyBitTorrent © 2005-2010 <a href="http://phpmybittorrent.com">phpMyBitTorrent Team</a>.<br>
This is free software and contains source code version of GNU/LGPL distributed libraries.<br>
You may redistribute the whole package and its source code according to the GNU/GPL license.<br>
The Development Team cannot be held responsible in any way for the results of the use of this software.<br>
<!-- END OF COPYRIGHT NOTICE -->
Generated in ' . abs(round(microtime()-$startpagetime,2)) . ' seconds
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=2789089;
var sc_invisible=0;
var sc_partition=28;
var sc_security="7d0a2fe3";
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c29.statcounter.com/2789089/0/7d0a2fe3/0/" alt="web metrics" ></a></div></noscript>
<!-- End of StatCounter Code --></span><br /><br /> <span class="copyright">
</span>
</div>
</td>
</tr>
</table>
</body>
</html>';
//die();
}
function help($name,$help,$title = "",$link = "") {
if ($link != "") echo "<span class=\"overlib\" onclick=\"return overlib('".addslashes(str_replace(Array("\n","\""),Array("","'"),$help)),"'";
if ($link == "") echo "<span class=\"overlib\" onmouseover=\"return overlib('".addslashes(str_replace(Array("\n","\""),Array("","'"),$help)),"'";
if ($title != "" AND $link == "") echo ",CAPTION, '".addslashes(str_replace(Array("\n","\""),Array("","'"),$title))."'";
// if ($title != "" AND $link != "") echo ",CAPTION, '".addslashes(str_replace(Array("\n","\""),Array("","'"),$title))."'";
if ($link == "") echo ",TEXTFONT,'Verdana',TEXTCOLOR,'#FFFFFF',CAPTIONFONT,'Lucida Console, Verdana',CENTER,FGCOLOR,'#000000',BGCOLOR,'#6F7578',CAPICON,'themes/eVo_blue/pics/help.png',BORDER,2,SHADOW,SHADOWOPACITY,40,SHADOWCOLOR,'#030303',SHADOWX,2,SHADOWY,2);\" onmouseout=\"return nd();\" style=\"cursor:help\">".$name."</span>";
if ($link != "") echo ",CELLPAD,'0',FOLLOWMOUSE,'0',TEXTFONT,'Verdana',TEXTCOLOR,'#FFFFFF',CAPTIONFONT,'Lucida Console, Verdana',CENTER,FGCOLOR,'#000000',BGCOLOR,'#6F7578',CAPICON,'themes/eVo_blue/pics/help.png',SHADOW,SHADOWOPACITY,40,SHADOWCOLOR,'#030303',SHADOWX,2,SHADOWY,2);\" >".$name."</span>";
}
?>