Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 9th June 2022, 05:26
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Wink AdminCp With News + Access 2 Index Chat :)
INDEX:
Click the image to open in full size.

ADMINCP NOW:

Click the image to open in full size.

CODE REQUIRED 2 REPLACE

Replacement parts for lang/en/lang_ad_index.php
Code:
<?php
$lang = array(
'index_active' => "Active users",
'index_noactive' => "Sorry - No users active presently",


#News
'news_title'	=> "Recent News",
'news_link' => "News Page",
'news_edit' 		    => "Edit",
'news_delete' 			=> "Delete",

'index_shoutbox_refresh'   => "[ Refresh ]",
'index_shoutbox_commands'   => "[ Commands ]",
'index_shoutbox_smilies'   => "[ More Smilies ]",
'index_shoutbox_csmilies' => "[ Custom Smilies ]",
'index_shout'   => "Shoutbox",
'index_shoutbox'   => "ShoutBox",
'index_shoutbox_shout'   => "Shout!:",
'index_shoutbox_send'   => "Send",
'index_shoutbox_close'   => "Close",
'index_shoutbox_open'   => "Open",

'index_active24' => "Active users in the last 24hrs",
'index_most24' => "Most ever visited in 24 hours was",
'index_member24' => "Member",

#Stats
'stats_title' 			=> "Stats",
'stats_regusers' 			=> "Registered Users",
'stats_unverified' 				=> "Unconfirmed Users",
'stats_torrents' 			=> "Torrents",
'stats_peers' => "Peers",
'stats_seed' 			=> "Seeders",
'stats_leech' 			=> "Leechers",
'stats_sl_ratio' 				=> "Seeder/leecher ratio (%)",

#disclaimer
'foot_disclaimer' 			=> "Disclaimer: None of the files shown here are actually hosted on this server. The links are provided solely by this site's users.
The administrator of this site (%s) cannot be held responsible for what its users post, or any other actions of its users.
You may not use this site to distribute or download any material when you do not have the legal rights to do so.
It is your own responsibility to adhere to these terms.",


//admin index lang file

'index_bans' => 'Bans',
'index_new_user' => 'Add user',
'index_log' => 'Logs',
'index_mcleanup' => 'Manual cleanup',
'index_user_list' => 'Users list',
'index_tags' => 'Tags',
'index_emoticons' => 'Emoticons',
'index_delacct' => 'Delete account',
'index_stats' => 'Tracker stats',
'index_testip' => 'Test Ip',
'index_user_search' => 'User search',
'index_mysql_overview' => 'Mysql Overview',
'index_mysql_stats' => 'Mysql Stats',
'index_stats_extra' => 'Stats Extra',
'index_forummanage' => 'Forum manage',
'index_categories' => 'Edit categories',
'index_newusers' => 'New users',
'index_resetpassword' => 'Reset password',
'index_rep_system' => 'Reputation system',
'index_rep_settings' => 'Reputation settings',
'index_news' => 'Add/Delete News'
);
?>
Replacement parts for admin/admin.php
Code:
<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
if ( ! defined( 'IN_TBDEV_ADMIN' ) )
{
	print "<h1>Incorrect access</h1>You cannot access this file directly.";
	exit();
}

require_once "include/html_functions.php";
require_once "include/user_functions.php";


    $lang = array_merge( $lang, load_language('ad_index') );

    $HTMLOUT = '';

$HTMLOUT.="
<style>
.mybar3 {

    display: block;
    background-color: #151515;
    background-repeat: repeat-x;
    background-position: top;
    height: 2px;
    width: 99%;
    border: 1px solid #222;
    margin-top: 30px;
    margin-left: 3px;
    padding: 0px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);         
}
</style>";


$HTMLOUT.= "<div class='mybar3'></div><br/>";






    $adminbutton = '';
    
    if (get_user_class() >= UC_ADMINISTRATOR)
          $adminbutton = "&nbsp;<span style='float:right;'><a href='admin.php?action=news'>News page</a></span>\n";
          
    $HTMLOUT .= "<div style='text-align:left;width:80%;border:1px solid blue;padding:5px;'>
    <div style='background:lightgrey;height:25px;'><span style='font-weight:bold;font-size:12pt;'>{$lang['news_title']}</span>{$adminbutton}</div><br />";
      
    $res = mysql_query("SELECT * FROM news WHERE added + ( 3600 *24 *45 ) >
					".time()." ORDER BY added DESC LIMIT 10") or sqlerr(__FILE__, __LINE__);
					
    if (mysql_num_rows($res) > 0)
    {
      require_once "include/bbcode_functions.php";

      $button = "";
      
      while($array = mysql_fetch_assoc($res))
      {
        if (get_user_class() >= UC_ADMINISTRATOR)
        {
          $button = "<div style='float:right;'><a href='admin.php?action=news&amp;mode=edit&amp;newsid={$array['id']}'>{$lang['news_edit']}</a>&nbsp;<a href='admin.php?action=news&amp;mode=delete&amp;newsid={$array['id']}'>{$lang['news_delete']}</a></div>";
        }
        
        $HTMLOUT .= "<div style='background:lightgrey;height:20px;'><span style='font-weight:bold;font-size:10pt;'>{$array['headline']}</span></div>\n";
        
        $HTMLOUT .= "<span style='color:grey;font-weight:bold;text-decoration:underline;'>".get_date( $array['added'],'DATE') . "</span>{$button}\n";
        
        $HTMLOUT .= "<div style='margin-top:10px;padding:5px;'>".format_comment($array['body'])."</div><hr />\n";
        
      
      }
     
    }

    $HTMLOUT .= "</div>\n";

$HTMLOUT.="
<style>
.mybar3 {

    display: block;
    background-color: #151515;
    background-repeat: repeat-x;
    background-position: top;
    height: 2px;
    width: 99%;
    border: 1px solid #222;
    margin-top: 30px;
    margin-left: 3px;
    padding: 0px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);         
}
</style>";


$HTMLOUT.= "<div class='mybar3'></div>";



// === shoutbox 09
   if ($CURUSER['show_shout'] === "yes") {
   $commandbutton = '';
   $refreshbutton = '';
   $smilebutton = '';
   $custombutton = '';
   if(get_smile() != '0')
   $custombutton .="<span style='float:right;'><a href=\"javascript:PopCustomSmiles('shbox','shbox_text')\">{$lang['index_shoutbox_csmilies']}</a></span>";
   if ($CURUSER['class'] >= UC_ADMINISTRATOR){
   $commandbutton = "<span style='float:right;'><a href=\"javascript:popUp('shoutbox_commands.php')\">{$lang['index_shoutbox_commands']}</a></span>\n";}
   $refreshbutton = "<span style='float:right;'><a href='shoutbox.php' target='sbox'>{$lang['index_shoutbox_refresh']}</a></span>\n";
   $smilebutton = "<span style='float:right;'><a href=\"javascript:PopMoreSmiles('shbox','shbox_text')\">{$lang['index_shoutbox_smilies']}</a></span>\n";
   $HTMLOUT .= "<form action='shoutbox.php' method='get' target='sbox' name='shbox' onsubmit='mysubmit()'>
   <div class='roundedCorners' style='margin-top: 15px;text-align:left;width:80%;border:1px solid black;padding:5px;'>
      <div style='background:transparent;height:25px;'><span style='font-weight:bold;font-size:12pt;'>{$lang['index_shout']}</span></div>
         <br />
   <b>{$lang['index_shoutbox']}</b> [ <a href='shoutbox.php?show_shout=1&show=no'><b>{$lang['index_shoutbox_close']}</b></a> ]
   <iframe src='shoutbox.php' width='100%' height='200' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe>
   <br />
   <br />
   <script type=\"text/javascript\" src=\"scripts/shout.js\"></script>   
   <div align='center'>
   <b>{$lang['index_shoutbox_shout']}</b>
   <input type='text' maxlength='180' name='shbox_text' size='100' />
   <input class='button' type='submit' value='{$lang['index_shoutbox_send']}' />
   <input type='hidden' name='sent' value='yes' /></div></div>";
   
   
//==09 users on index
     $owners      = get_row_count('users', "WHERE owners='yes'");
     $admins      = get_row_count('users', "WHERE admin='yes'");
     $moderator   = get_row_count('users', "WHERE moderator='yes'");     
     $donors      = get_row_count('users', "WHERE donor='yes'");
     $power       = get_row_count('users', "WHERE poweruser='yes'");
     $members     = get_row_count('users', "WHERE members='yes'");
     $unverified = number_format(get_row_count("users", "WHERE status='pending'"));
 $HTMLOUT.="    
<style>     
     .myBlock {
    display: block;
    background-color: #151515;
    background-repeat: repeat-x;
    background-position: top;
    width: 100%;
    border: 1px solid #222;
    margin: 20px;
    margin-left: 80px;
    padding: 0px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);         
}
.myBlock-cap {
    display: block;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 6px;
    font-weight: bold;
    color: #FFF;
    margin-left: 0px;
    background-color: #333333;
    line-height: 200%;
    position: relative;
    bottom: 4px
}
.myBlock-con {
    display: block;
    padding: 7px;
}
</style>";

    $active3 ="";
    $file = "./cache/active.txt";
    $expire = 30; // 30 seconds
    if (file_exists($file) && filemtime($file) > (time() - $expire)) {
    $active3 = unserialize(file_get_contents($file));
    } else {
    $dt = sqlesc(time() - 180);
    $active1 = mysql_query("SELECT id, username, class, warned, donor FROM users WHERE last_access >= $dt ORDER BY class DESC") or sqlerr(__FILE__, __LINE__);
        while ($active2 = mysql_fetch_assoc($active1)) {
            $active3[] = $active2;
        }
        $OUTPUT = serialize($active3);
        $fp = fopen($file, "w");
        fputs($fp, $OUTPUT);
        fclose($fp);
    } // end else
    $activeusers = "";
    if (is_array($active3))
    foreach ($active3 as $arr) {
        if ($activeusers) $activeusers .= ",\n";
        $activeusers .= "<span style=\"white-space: nowrap;\">"; 
        $arr["username"] = "<font color='#" . get_user_class_color($arr['class']) . "'> " . htmlspecialchars($arr['username']) . "</font>";
        $donator = $arr["donor"] === "yes";
        $warned = $arr["warned"] === "yes";
     
        if ($CURUSER)
            $activeusers .= "<a href='{$TBDEV['baseurl']}/userdetails.php?id={$arr["id"]}'><b>{$arr["username"]}</b></a>";
        else
            $activeusers .= "<b>{$arr["username"]}</b>";
        if ($donator)
             $activeusers .= "<img src='{$TBDEV['pic_base_url']}star.gif' alt='Donated' />";
        if ($warned)
            $activeusers .= "<img src='{$TBDEV['pic_base_url']}warned.gif' alt='Warned' />";
        $activeusers .= "</span>";
    }
     
    if (!$activeusers)
        $activeusers = "{$lang['index_noactive']}";
 
      $HTMLOUT .= "<div style='margin-top: -20px;margin-left: -405px;text-align:left;max-width: 400px;padding: 1em;' class='mCol'>
            <div class='myBlock'><div style='margin-top:  5px;'>
            <div class='myBlock-cap'><span style='font-weight:bold;font-size:6pt;'>{$lang['index_active']}</span></div></div>
            <div style='padding: 5px;margin-top: -3px;margin-left: 0px;max-width:  900px;box-shadow: inset 0 1px 0 rgba(255, 255, 255,  0.2);'></div>
            <div style='margin-top: -5px;text-align: center;color: #b9b9b9;'>
Owners ({$owners}) | Administrators ({$admins}) | Moderators ({$moderator}) | V.I.P ({$donors}) | Power Users ({$power}) | Members ({$members}) | Validating ({$unverified})
</div>";
    $HTMLOUT .= "<table style='margin-top: 5px;border: 1px solid  #222;color: #b9b9b9;' border='0' cellpadding='10' cellspacing='0' width='100%'>
            <tr class='table'>
            <td class='text'>{$activeusers}</td>
            </tr></table></div><div style='margin-top:  -17px;'></div>";            
   
   
$HTMLOUT .= "   
   
   <div style='padding: 0.2em;border:1px solid red;height: 100px;width: 340px;margin-top: -115px;margin-left: 440px;padding: 4px;'>
    <a href=\"javascript:SmileIT(':-)','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/smile1.gif' alt='Smile' title='Smile' /></a><a href=\"javascript:SmileIT(':smile:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/smile2.gif' alt='Smiling' title='Smiling' /></a>
   <a href=\"javascript:SmileIT(':-D','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/grin.gif' alt='Grin' title='Grin' /></a>
   <a href=\"javascript:SmileIT(':lol:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/laugh.gif' alt='Laughing' title='Laughing' /></a>
   <a href=\"javascript:SmileIT(':w00t:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/w00t.gif' alt='W00t' title='W00t' /></a>
   <a href=\"javascript:SmileIT(':blum:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/blum.gif' alt='Rasp' title='Rasp' /></a>
   <a href=\"javascript:SmileIT(';-)','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/wink.gif' alt='Wink' title='Wink' /></a>
   <a href=\"javascript:SmileIT(':devil:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/devil.gif' alt='Devil' title='Devil' /></a>
   <a href=\"javascript:SmileIT(':yawn:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/yawn.gif' alt='Yawn' title='Yawn' /></a>
   <a href=\"javascript:SmileIT(':-/','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/confused.gif' alt='Confused' title='Confused' /></a>
   <a href=\"javascript:SmileIT(')','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/clown.gif' alt='Clown' title='Clown' /></a>
   <a href=\"javascript:SmileIT(':innocent:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/innocent.gif' alt='Innocent' title='innocent' /></a>
   <a href=\"javascript:SmileIT(':whistle:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/whistle.gif' alt='Whistle' title='Whistle' /></a>
   <a href=\"javascript:SmileIT(':unsure:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/unsure.gif' alt='Unsure' title='Unsure' /></a>
   <a href=\"javascript:SmileIT(':blush:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/blush.gif' alt='Blush' title='Blush' /></a>
   <a href=\"javascript:SmileIT(':hmm:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/hmm.gif' alt='Hmm' title='Hmm' /></a>
   <a href=\"javascript:SmileIT(':hmmm:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/hmmm.gif' alt='Hmmm' title='Hmmm' /></a>
   <a href=\"javascript:SmileIT(':huh:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/huh.gif' alt='Huh' title='Huh' /></a>
   <a href=\"javascript:SmileIT(':look:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/look.gif' alt='Look' title='Look' /></a>
   <a href=\"javascript:SmileIT(':rolleyes:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/rolleyes.gif' alt='Roll Eyes' title='Roll Eyes' /></a>
   <a href=\"javascript:SmileIT(':kiss:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/kiss.gif' alt='Kiss' title='Kiss' /></a>
   <a href=\"javascript:SmileIT(':blink:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/blink.gif' alt='Blink' title='Blink' /></a>
   <a href=\"javascript:SmileIT(':baby:','shbox','shbox_text')\"><img border='0' src='{$TBDEV['pic_base_url']}smilies/baby.gif' alt='Baby' title='Baby' /></a><br/>
   </div>
   
   
   <div style='background:#1f1f1f;height:25px;'><span style='font-weight:bold;font-size:8pt;'>{$refreshbutton}</span></div>
   <div style='background:#1f1f1f;height:25px;'><span style='font-weight:bold;font-size:8pt;'>{$commandbutton}</span></div>
   <div style='background:#1f1f1f;height:25px;'><span style='font-weight:bold;font-size:8pt;'>{$smilebutton}</span></div>
   <div style='background:#1f1f1f;height:25px;'><span style='font-weight:bold;font-size:8pt;float:right'>{$custombutton}</span></div>
    </div>
   </form><br />\n";
   }
   if ($CURUSER['show_shout'] === "no") {
   $HTMLOUT .="<div class='roundedCorners' style='text-align:left;width:80%;border:1px solid black;padding:5px;'><div style='background:transparent;height:25px;'><b>{$lang['index_shoutbox']} </b>[ <a href='{$TBDEV['baseurl']}/shoutbox.php?show_shout=1&show=yes'><b>{$lang['index_shoutbox_open']} ]</b></a></div></div>";
   }
   //==end 09 shoutbox

// bar devider
$HTMLOUT.="
<style>
.mybar {

    display: block;
    background-color: #151515;
    background-repeat: repeat-x;
    background-position: top;
    height: 2px;
    width: 100%;
    border: 1px solid #222;
    margin-top: -20px;
    padding: 0px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);         
}
</style>

<div class='mybar'></div>";
  
  
  
  $HTMLOUT .= "<br />

    <br />
		<table width='75%' cellpadding='10px'>
		<tr><td class='colhead'>Staff Tools</td></tr>
		<!-- row 1 -->
		<tr><td>
	
	
        
        
        
        
			
			<span class='btn'><a href='admin.php?action=bans'>{$lang['index_bans']}</a></span>
			
			<span class='btn'><a href='admin.php?action=adduser'>{$lang['index_new_user']}</a></span>
			
			<span class='btn'><a href='admin.php?action=log'>{$lang['index_log']}</a></span>
			
			<span class='btn'><a href='admin.php?action=docleanup'>{$lang['index_mcleanup']}</a></span>
			
			<span class='btn'><a href='users.php'>{$lang['index_user_list']}</a></span>
			
			</td></tr>
			<!-- row 2 -->
			<tr><td>
			
			<span class='btn'><a href='tags.php'>{$lang['index_tags']}</a></span>
			

			<span class='btn'><a href='smilies.php'>{$lang['index_emoticons']}</a></span>
			
			<span class='btn'><a href='admin.php?action=delacct'>{$lang['index_delacct']}</a></span>
			

			<span class='btn'><a href='admin.php?action=stats'>{$lang['index_stats']}</a></span>
			
			</td></tr>
			<!-- roow 3 -->
			<tr><td>
			
			<span class='btn'><a href='admin.php?action=testip'>{$lang['index_testip']}</a></span>
			

			<span class='btn'><a href='admin.php?action=usersearch'>{$lang['index_user_search']}</a></span>
			

			<span class='btn'><a href='admin.php?action=mysql_overview'>{$lang['index_mysql_overview']}</a></span>
			

			<span class='btn'><a href='admin.php?action=mysql_stats'>{$lang['index_mysql_stats']}</a></span>
			
			
			</td></tr>
			<!-- row 4 -->
			<tr><td>
			
			<span class='btn'><a href='admin.php?action=forummanage'>{$lang['index_forummanage']}</a></span>
			

			<span class='btn'><a href='admin.php?action=categories'>{$lang['index_categories']}</a></span>
			
			</td></tr>
			<!-- row 5 -->
			<tr><td>
			
			<span class='btn'><a href='reputation_ad.php'>{$lang['index_rep_system']}</a></span>
			
			<span class='btn'><a href='reputation_settings.php'>{$lang['index_rep_settings']}</a></span>
			
			<span class='btn'><a href='admin.php?action=news'>{$lang['index_news']}</a></span>
			
			
		</td></tr></table>";
 

    print stdhead("Staff") . $HTMLOUT . stdfoot();

?>
Bump: Click the image to open in full size. Click the image to open in full size.
Attached Files
File Type: php index.php (16.8 KB, 2 views)
File Type: php admincp_shoutbox.php (18.4 KB, 3 views)

Last edited by BamBam0077; 9th June 2022 at 10:33.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 07:31. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.