Home » Support Forums for PMBT 2.X » PMBT 2.X Themes » EI
| | | | |
| Re: EI [message #5301 is a reply to message #3647] |
Sat, 29 January 2011 05:10   |
|
updated main.php for 2.0.4 release
<?php
/*
*----------------------------phpMyBitTorrent V 2.0-----------------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*-------------- Created By Antonio Anzivino (aka DJ Echelon) --------------*
*------------- http://www.p2pmania.it -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*------------- http://www.bittorrent.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, or --*
*-- (at your option) any later version. --*
*-- --*
*-- This program is distributed in the hope that it will be useful, --*
*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*
*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*
*-- GNU General Public License for more details. --*
*-- --*
*-- You should have received a copy of the GNU General Public License --*
*-- along with this program; if not, write to the Free Software --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --*
*-- --*
*------------------------------------------------------------------------------*
*------ ©2005 phpMyBitTorrent Development Team ------*
*----------- http://phpmybittorrent.com -----------*
*------------------------------------------------------------------------------*
*----------------- Sunday, September 27, 2008 8:37 PM ---------------------*
*/
if (eregi("main.php",$_SERVER["PHP_SELF"])) die ("You can't access this file directly");
$tableopen = false;
$errtableopen = false;
$table2open = false;
$btback1 = "333333";
$btback2 = "666666";
$btback3 = "999999";
function OpenTable($title = "title", $tablewidth = "") {
global $tableopen, $siteurl;
if ($tableopen) return;
if($tablewidth !="") $stylewidth = "style=\"width: ".$tablewidth."px;\"";
else $stylewidth = '';
?>
<table width=100% height="26" <?php echo $stylewidth; ?> border="0" align="center" cellpadding="2" cellspacing="4">
<tr>
<table border="0" cellpadding="0" align=center cellspacing="0" width="100%">
<tr>
<td width="37" height="36" valign="top"><img src="themes/EI/pics/ttl.jpg" width="37" height="36"></td>
<td width="100%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="themes/EI/pics/tt.jpg">
<!--DWLayoutTable-->
<tr>
<td width="100%" height="34" align="left" valign="middle"><br><font color="#ff0000" size="3" face="Arial, Helvetica, sans-serif"><strong><?php echo $title;?></strong></font></br></td>
</tr>
</td>
</table>
<td width="37" valign="top"><img src="themes/EI/pics/ttr.jpg" width="37" height="36"></td>
</tr>
<tr>
<td height="24" valign="top" background="themes/EI/pics/tl.jpg"><img name="leftside" src="themes/EI/pics/spacer.gif" width="1" height="1" border="0" alt=""></td>
<td width="100%" height="14" valign="top"> <table class="main" border="0" cellpadding="3" cellspacing="0" width="100%">
</td>
<?php
echo "<tr><td>";
$tableopen = true;
}
function CloseTable() {
global $tableopen, $siteurl;
if (!$tableopen) return;
?>
</table>
<td valign="top" background="themes/EI/pics/tr.jpg"><img name="rightside" src="themes/EI/pics/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="36" valign="top"><img src="themes/EI/pics/tbl.jpg" width="37" height="36"></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="themes/EI/pics/tb.jpg">
</td>
<tr>
<td width="100%" height="36" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
<td valign="right"><img src="themes/EI/pics/tbr.jpg" width="37" height="36"></td>
</table>
<?php
$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;
//header("Content-Type: text/html; charset=utf-8");
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($btuser)."";
$timestamp=time();
$timeout=$timestamp-$timeoutseconds=86400;
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
echo "<head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\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"<script type=\"text/javascript\" language=\"JavaScript\" src=\"$siteurl/bbcode.js\"></script>";
echo "<!--[if lt IE 7]>
<script defer type=\"text/javascript\" language=\"JavaScript\" src=\"$siteurl/pngfix.js\"></script><![endif]-->\n";
echo "<meta name=\"description\" content=\"".$sitename."\"/>\n";
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']; ?>";
</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 "</head>\n\n";
$themepage = false;
if($user->user)echo "<body onload=\"shoutthis_ajax()\">\n";
else
echo "<body>";
echo"<noscript>
<center><h1><font class=warntext>Javascript is not available!</font></h1></center>
<center><h1><font class=warntext>This website cannot function correctly without JavaScript!</font></h1></center>
</noscript>\n";
echo "<div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div>\n";
echo "<div id=\"1\">\n";
echo'<table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr><td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="themes/EI/pics/hmm.jpg" align="center">
<tr>
<td width="328" height="359" valign="top"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="328" height="359" id="hl" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="themes/EI/pics/hl.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="themes/EI/pics/hl.swf" quality="high" bgcolor="#000000" width="328" height="359" name="hl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></td>
<td width="100%" align="center" valign="top"><img src="themes/EI/pics/hm.jpg" width="195" height="359"></td>
<td width="320" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="320" height="359" valign="top"><img src="themes/EI/pics/hr.jpg" width="320" height="359"></td>
</tr>
</table></td>
</tr>
</table>
';
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
."<tr valign=\"top\">\n"
."<td width=\"79\" valign=\"top\" background=\"themes/EI/pics/left.jpg\"><img src=\"themes/EI/pics/left.jpg\" width=\"79\" height=\"200\" border=\"0\"></td>\n"
."<td width=\"165\" valign=\"top\">\n";
echo "</td>\n"
."<td width=\"0\" valign=\"top\" background=\"themes/EI/pics/spacer2.gif\"><img src=\"themes/EI/pics/spacer2.gif\" width=\"0\" height=\"1\" border=\"0\"></td>\n"
."<td width=\"100%\">\n";
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td></td>
</tr></table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td valign="top" align="center" width="10" ></tr>
<tr>
<td valign="top" height="100%">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<td valign="top" width="165>
<?php
$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();
}
$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);
$has_newpm = ($db->sql_numrows($res) > 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>";
}
echo "<table width=\"100%\">\n";
echo "<tr>\n";
echo "<td width=\"2%\" valign=\"top\">\n";
echo "<div >";
if(!eregi("phpBB.php",$_SERVER["PHP_SELF"]))
{
OpenTable('Theme Change');
echo "<p align=\"center\"><b>Theme</b></p>\n";
echo "<form id=\"acp_styles\" type=\"hidden\" method=\"post\" action=\"#\">";
echo "<p><select id=\"template_file\" name=\"theme_change\" onchange=\"if (this.options[this.selectedIndex].value != '') this.form.submit();\">".themechange()."</select></p>";
echo "<p align=\"center\"><b>Language</b></p>\n";
echo "<p><select id=\"language_file\" name=\"language_change\" onchange=\"if (this.options[this.selectedIndex].value != '') this.form.submit();\">".languagechange()."</select></p>";
echo " <input class=\"button2\" type=\"submit\" value=\"SELECT\" /></form>";
CloseTable();
include("./blocks/usercp.php");
// invite block
if ($user->user AND $INVITEONLY)
{
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();
}
if ($donations){
include("./blocks/donation_block.php");
}
if (!$onlysearch OR $user->admin) include_once("./blocks/catlist.php");
//include("blocks/shoutbox.php");
if (!$onlysearch) include("./blocks/syndicate.php"); #Deactivated until RSS syndication is complete
OpenTable("HTML");
echo "<p align=\"center\"><a href=\"http://validator.w3.org/check?uri=referer\"><img src=\"http://www.w3.org/Icons/valid-html401\" alt=\"Valid HTML 4.01 Transitional\" height=\"31\" width=\"88\" border=\"0\"></a></p>\n";
CloseTable();
}
echo' </td>
<td width="100%" valign="top">';
}
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;
?></tr>
</td>
</tr>
</table>
</table>
<?php
echo"</td>"
. " <td width=\"72\" valign=\"top\" background=\"themes/EI/pics/right.jpg\"><img src=\"themes/EI/pics/right.jpg\" width=\"72\" height=\"30\"></td>"
. " </tr>"
. "</table>"
."";
echo"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"themes/EI/pics/fmm.jpg\" align=\"center\" >"
. " <!--DWLayoutTable-->"
. " <tr> "
. " <td width=\"328\" height=\"368\" valign=\"top\"><table width=\"328\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"themes/EI/pics/fl.jpg\" width=\"328\" height=\"368\">"
. " <!--DWLayoutTable-->"
. " <tr> "
. " <td width=\"58\" height=\"180\"> </td>"
. " <td width=\"250\"> </td>"
. " <td width=\"156\"> </td>"
. " </tr>"
. " <tr>"
. " <td height=\"102\"> </td>"
//------------------------------------------------edit links-------------------------------------------
. " <td width=\"100%\" valign=\"top\" align=\"center\"><br><br><font color=\"#FF9900\"><!-- 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 --></font></td>"
//-----------------------------------------------------------------------------------------------------
. " <td> </td>"
. " </tr>"
. " <tr>"
. " <td height=\"77\"> </td>"
. " <td> </td>"
. " <td> </td>"
. " </tr>"
. " </table></td>"
. " <td width=\"100%\" align=\"center\" valign=\"top\"><p></p>"
. " <p> </p>"
. " <p> </p>"
. " <br></br>"
. " <br></br>"
//----------------------do not remove this line if you whant support from TorrentStrike------------------
. " <p><br /><br /><br /><br /><br /><br /><br />
<!-- Feel free to add you custom disclaimer or copyright notice here -->
<!-- YOU ARE NOT ALLOWED TO EDIT THE FOLLOWING COPYRIGHT NOTICE!!! -->
phpMyBitTorrent © 2005-2006 <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
</p>"
//-------------------------------------------------------------------------------------------------------
. " </td>"
. " <td width=\"320\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
. " <!--DWLayoutTable-->"
. " <tr> "
. " <td width=\"320\" height=\"368\" valign=\"top\"><img src=\"themes/EI/pics/fr.jpg\" width=\"320\" height=\"368\"></td>"
. " </tr>"
. " </table></td>"
. " </tr>"
. " <tr> "
. " <td height=\"0\"></td>"
. " <td></td>"
. " <td></td>"
. " </tr>"
. " <tr> "
. " <td height=\"1\"><img src=\"spacer.gif\" alt=\"\" width=\"355\" height=\"1\"></td>"
. " <td></td>"
. " <td><img src=\"spacer.gif\" alt=\"\" width=\"320\" height=\"1\"></td>"
. " </tr>"
. "</table>"
."";
echo'
</div>
</body>
</html>';
}
function help($name,$help,$title = "") {
echo "<span onmouseover=\"return overlib('".addslashes(str_replace(Array("\n","\""),Array("","'"),$help)),"'";
if ($title != "") echo ",CAPTION, '".addslashes(str_replace(Array("\n","\""),Array("","'"),$title))."'";
echo ",FGCOLOR,'#ffffaa',CAPICON,'themes/pmbt/pics/help.png',SHADOW,SHADOWOPACITY,40,SHADOWCOLOR,'#000000',SHADOWX,2,SHADOWY,2,HAUTO,VAUTO);\" onmouseout=\"return nd();\" style=\"cursor:help\">".$name."</span>";
}
?>
|
|
| |
Goto Forum:
Current Time: Wed Feb 08 05:13:48 GMT 2012
Total time taken to generate the page: 0.01093 seconds
|