Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   AdminCp With News + Access 2 Index Chat :) (http://www.bvlist.com/showthread.php?t=12538)

BamBam0077 9th June 2022 05:26

AdminCp With News + Access 2 Index Chat :)
 
2 Attachment(s)
INDEX:
https://images2.imgbox.com/48/fe/gg481xAu_o.png

ADMINCP NOW:

https://images2.imgbox.com/5b/1c/WNteF7XE_o.png

CODE REQUIRED 2 REPLACE

Replacement parts for lang/en/lang_ad_index.php
Code:

$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:

/*
+------------------------------------------------
|  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 "

Incorrect access

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.="
";


$HTMLOUT.= "

";






    $adminbutton = '';
   
    if (get_user_class() >= UC_ADMINISTRATOR)
          $adminbutton = " News page\n";
         
    $HTMLOUT .= "

   
{$lang['news_title']}{$adminbutton}
";
     
    $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 = "";
        }
       
        $HTMLOUT .= "
{$array['headline']}
\n";
       
        $HTMLOUT .= "".get_date( $array['added'],'DATE') . "{$button}\n";
       
        $HTMLOUT .= "
".format_comment($array['body'])."

\n";
       
     
      }
   
    }

    $HTMLOUT .= "
\n";

$HTMLOUT.="
";


$HTMLOUT.= "
";



// === shoutbox 09
  if ($CURUSER['show_shout'] === "yes") {
  $commandbutton = '';
  $refreshbutton = '';
  $smilebutton = '';
  $custombutton = '';
  if(get_smile() != '0')
  $custombutton .=":PopCustomSmiles('shbox','shbox_text')\">{$lang['index_shoutbox_csmilies']}";
  if ($CURUSER['class'] >= UC_ADMINISTRATOR){
  $commandbutton = ":popUp('shoutbox_commands.php')\">{$lang['index_shoutbox_commands']}\n";}
  $refreshbutton = "{$lang['index_shoutbox_refresh']}\n";
  $smilebutton = ":PopMoreSmiles('shbox','shbox_text')\">{$lang['index_shoutbox_smilies']}\n";
  $HTMLOUT .= "

 

     
{$lang['index_shout']}

       
  {$lang['index_shoutbox']} [ {$lang['index_shoutbox_close']} ]
 
 
 
   
 

  {$lang['index_shoutbox_shout']}
 
 
 
";
 
 
//==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.="   
";

    $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 .= "";
        $arr["username"] = " " . htmlspecialchars($arr['username']) . "";
        $donator = $arr["donor"] === "yes";
        $warned = $arr["warned"] === "yes";
   
        if ($CURUSER)
            $activeusers .= "{$arr["username"]}";
        else
            $activeusers .= "{$arr["username"]}";
        if ($donator)
            $activeusers .= "Donated";
        if ($warned)
            $activeusers .= "Warned";
        $activeusers .= "
";
    }
   
    if (!$activeusers)
        $activeusers = "{$lang['index_noactive']}";
 
      $HTMLOUT .= "

           

           
{$lang['index_active']}

           

           

Owners ({$owners}) | Administrators ({$admins}) | Moderators ({$moderator}) | V.I.P ({$donors}) | Power Users ({$power}) | Members ({$members}) | Validating ({$unverified})
";
    $HTMLOUT .= "
           
           
           
{$activeusers}
";           
 
 
$HTMLOUT .= " 
 
 

    :SmileIT(':-)','shbox','shbox_text')\">Smile:SmileIT(':smile:','shbox','shbox_text')\">Smiling
  :SmileIT(':-D','shbox','shbox_text')\">Grin
  :SmileIT(':lol:','shbox','shbox_text')\">Laughing
  :SmileIT(':w00t:','shbox','shbox_text')\">W00t
  :SmileIT(':blum:','shbox','shbox_text')\">Rasp
  :SmileIT(';-)','shbox','shbox_text')\">Wink
  :SmileIT(':devil:','shbox','shbox_text')\">Devil
  :SmileIT(':yawn:','shbox','shbox_text')\">Yawn
  :SmileIT(':-/','shbox','shbox_text')\">Confused
  :SmileIT(')','shbox','shbox_text')\">Clown
  :SmileIT(':innocent:','shbox','shbox_text')\">Innocent
  :SmileIT(':whistle:','shbox','shbox_text')\">Whistle
  :SmileIT(':unsure:','shbox','shbox_text')\">Unsure
  :SmileIT(':blush:','shbox','shbox_text')\">Blush
  :SmileIT(':hmm:','shbox','shbox_text')\">Hmm
  :SmileIT(':hmmm:','shbox','shbox_text')\">Hmmm
  :SmileIT(':huh:','shbox','shbox_text')\">Huh
  :SmileIT(':look:','shbox','shbox_text')\">Look
  :SmileIT(':rolleyes:','shbox','shbox_text')\">Roll Eyes
  :SmileIT(':kiss:','shbox','shbox_text')\">Kiss
  :SmileIT(':blink:','shbox','shbox_text')\">Blink
  :SmileIT(':baby:','shbox','shbox_text')\">Baby

 

 
 
 
{$refreshbutton}

 
{$commandbutton}

 
{$smilebutton}

 
{$custombutton}

   

 
\n";
  }
  if ($CURUSER['show_shout'] === "no") {
  $HTMLOUT .="
{$lang['index_shoutbox']} [ {$lang['index_shoutbox_open']} ]
";
  }
  //==end 09 shoutbox

// bar devider
$HTMLOUT.="


";
 
 
 
  $HTMLOUT .= "

   
               
               
               
               
                       
                       
                       
                       
                       
                       
                       
                       
Staff Tools

       
       
       
       
       
       
                       
                        {$lang['index_bans']}
                       
                        {$lang['index_new_user']}
                       
                        {$lang['index_log']}
                       
                        {$lang['index_mcleanup']}
                       
                        {$lang['index_user_list']}
                       
                       

                       
                        {$lang['index_tags']}
                       

                        {$lang['index_emoticons']}
                       
                        {$lang['index_delacct']}
                       

                        {$lang['index_stats']}
                       
                       

                       
                        {$lang['index_testip']}
                       

                        {$lang['index_user_search']}
                       

                        {$lang['index_mysql_overview']}
                       

                        {$lang['index_mysql_stats']}
                       
                       
                       

                       
                        {$lang['index_forummanage']}
                       

                        {$lang['index_categories']}
                       
                       

                       
                        {$lang['index_rep_system']}
                       
                        {$lang['index_rep_settings']}
                       
                        {$lang['index_news']}
                       
                       
               
";
 

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

?>

Bump: https://images2.imgbox.com/72/2c/Bca1EZiE_o.png https://images2.imgbox.com/25/cd/E0AHpKP3_o.png


All times are GMT +2. The time now is 20:06.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.