[ Príspevok: 1 ] 
AutorSpráva
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Advance Admin Index Stats

Registrovaný: 01.05.05
Príspevky: 12425
Témy: 1447 | 1447
Bydlisko: Bratislava
Vek: 32
NapísalOffline : 14.10.2006 14:59 | Advance Admin Index Stats

Kód:
##############################################################
## MOD Title: Advance Admin Index Stats
## MOD Author: Civphp < civphpbb@civphpbb.net > (Charles Kays) http://www.civphpbb.net
## MOD Description: This Mod adds more statistics to your Admin Index Page
##                  Adds features like:
##                  - All the standard phpbb stats
##                  - Version of phpbb
##                  - Version of PHP
##                  - Version of MySQL
##                  - Number of non-active members
##                  - Members in need of Activatation
##                  - Number of Moderators
##                  - Members with moderator privileges
##                  - Number of Administrators
##                  - Members with administrator privileges
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 minutes
## Files To Edit: admin/index.php
##                language/lang_english/lang_admin.php
##                templates/subSilver/admin/index_body.tpl
## Included Files:
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:  Codes in this mod are used (with permission) from PhilippK's DB Maintenance Mod
##
##############################################################
## MOD History:
##
##   2005-03-26 - Version 1.0.0
##
##                       - First Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
admin/index.php
#
#-----[ FIND ]------------------------------------------
#
      "L_GZIP_COMPRESSION" => $lang['Gzip_compression'])
#
#-----[ BEFORE, ADD ]------------------------------------------
#
      "L_NUMBER_DEACTIVATED_USERS" => $lang['Thereof_deactivated_users'],
      "L_NAME_DEACTIVATED_USERS" => $lang['Deactivated_Users'],
      "L_NUMBER_MODERATORS" => $lang['Thereof_Moderators'],
      "L_NAME_MODERATORS" => $lang['Users_with_Mod_Privileges'],
      "L_NUMBER_ADMINISTRATORS" => $lang['Thereof_Administrators'],
      "L_NAME_ADMINISTRATORS" => $lang['Users_with_Admin_Privileges'],
      "L_DB_SIZE" => $lang['DB_size'],
      "L_PHPBB_VERSION" => $lang['Version_of_board'],
      "L_PHP_VERSION" => $lang['Version_of_PHP'],
      "L_MYSQL_VERSION" => $lang['Version_of_MySQL'],
#
#-----[ FIND ]------------------------------------------
#
$total_topics = get_db_stat('topiccount');
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = "SELECT COUNT(user_id) AS total
               FROM " . USERS_TABLE . "
               WHERE user_active = 0
                  AND user_id <> " . ANONYMOUS;
            if ( !($result = $db->sql_query($sql)) )
         {
               throw_error("Couldn't get statistic data!", __LINE__, __FILE__, $sql);
         }
            if ( $row = $db->sql_fetchrow($result) )
         {
               $total_deactivated_users = $row['total'];
         }
            else
         {
               throw_error("Couldn't update pending information!", __LINE__, __FILE__, $sql);
         }
            $db->sql_freeresult($result);
            $deactivated_names = '';
$sql = "SELECT username
               FROM " . USERS_TABLE . "
               WHERE user_active = 0
                  AND user_id <> " . ANONYMOUS . "
               ORDER BY username";
            if ( !($result = $db->sql_query($sql)) )
         {
               throw_error("Couldn't get statistic data!", __LINE__, __FILE__, $sql);
         }
            while ( $row = $db->sql_fetchrow($result) )
         {
               $deactivated_names .= (($deactivated_names == '') ? '' : ', ') . $row['username'];
         }
            $db->sql_freeresult($result);
$sql = "SELECT COUNT(user_id) AS total
               FROM " . USERS_TABLE . "
               WHERE user_level = " . MOD . "
                  AND user_id <> " . ANONYMOUS;
            if ( !($result = $db->sql_query($sql)) )
         {
               throw_error("Couldn't get statistic data!", __LINE__, __FILE__, $sql);
         }
            if ( $row = $db->sql_fetchrow($result) )
         {
               $total_moderators = $row['total'];
         }
            else
         {
               throw_error("Couldn't update pending information!", __LINE__, __FILE__, $sql);
         }
            $db->sql_freeresult($result);
            $moderator_names = '';
$sql = "SELECT username
               FROM " . USERS_TABLE . "
               WHERE user_level = " . MOD . "
                  AND user_id <> " . ANONYMOUS . "
               ORDER BY username";
            if ( !($result = $db->sql_query($sql)) )
         {
               throw_error("Couldn't get statistic data!", __LINE__, __FILE__, $sql);
         }
            while ( $row = $db->sql_fetchrow($result) )
         {
               $moderator_names .= (($moderator_names == '') ? '' : ', ') . $row['username'];
         }
            $db->sql_freeresult($result);
$sql = "SELECT COUNT(user_id) AS total
               FROM " . USERS_TABLE . "
               WHERE user_level = " . ADMIN . "
                  AND user_id <> " . ANONYMOUS;
            if ( !($result = $db->sql_query($sql)) )
         {
               throw_error("Couldn't get statistic data!", __LINE__, __FILE__, $sql);
         }
            if ( $row = $db->sql_fetchrow($result) )
         {
               $total_administrators = $row['total'];
         }
            else
         {
               throw_error("Couldn't update pending information!", __LINE__, __FILE__, $sql);
         }
            $db->sql_freeresult($result);
            $administrator_names = '';
$sql = "SELECT username
               FROM " . USERS_TABLE . "
               WHERE user_level = " . ADMIN . "
                  AND user_id <> " . ANONYMOUS . "
               ORDER BY username";
            if ( !($result = $db->sql_query($sql)) )
         {
               throw_error("Couldn't get statistic data!", __LINE__, __FILE__, $sql);
         }
            while ( $row = $db->sql_fetchrow($result) )
         {
               $administrator_names .= (($administrator_names == '') ? '' : ', ') . $row['username'];
         }
#
#-----[ FIND ]------------------------------------------
#
else
      {
         $dbsize = sprintf("%.2f Bytes", $dbsize);
      }
   }
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = "SELECT VERSION() AS mysql_version";
            $result = $db->sql_query($sql);
            if ( !$result )
         {
               throw_error("Couldn't obtain MySQL Version", __LINE__, __FILE__, $sql);
         }
            $row = $db->sql_fetchrow($result);
            $mysql_version = $row['mysql_version'];
            $db->sql_freeresult($result);
#
#-----[ FIND ]------------------------------------------
#
      "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'])
#
#-----[ BEFORE, ADD ]------------------------------------------
#
      "PHPBB_VERSION" => '2' . $board_config['version'],
      "PHP_VERSION" => phpversion(),
      "MYSQL_VERSION" => $mysql_version,
      "NUMBER_OF_DEACTIVATED_USERS" => $total_deactivated_users,
      "NUMBER_OF_MODERATORS" => $total_moderators,
      "NUMBER_OF_ADMINISTRATORS" => $total_administrators,
      "NAMES_OF_ADMINISTRATORS" => htmlspecialchars($administrator_names),
      "NAMES_OF_MODERATORS" => htmlspecialchars($moderator_names),
      "NAMES_OF_DEACTIVATED" => htmlspecialchars($deactivated_names),
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Version_information'] = 'Version Information';
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
//Advance Admin Index
//
$lang['Board_statistic'] = 'Board statistics';
$lang['Database_statistic'] = 'Database statistics';
$lang['Version_info'] = 'Version information';
$lang['Thereof_deactivated_users'] = 'Number of non-active members';
$lang['Thereof_Moderators'] = 'Number of Moderators';
$lang['Thereof_Administrators'] = 'Number of Administrators';
$lang['Deactivated_Users'] = 'Members in need of Activatation';
$lang['Users_with_Admin_Privileges'] = 'Members with administrator privileges';
$lang['Users_with_Mod_Privileges'] = 'Members with moderator privileges';
$lang['DB_size'] = 'Size of the database';
$lang['Version_of_board'] = 'Version of <a href="http://www.phpbb.com">phpbb</a>';
$lang['Version_of_PHP'] = 'Version of <a href="http://www.php.net/">PHP</a>';
$lang['Version_of_MySQL'] = 'Version of <a href="http://www.mysql.com/">MySQL</a>';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
   <th width="25%" nowrap height="25" class="thCornerL">{L_STATISTIC}</th>
   <th width="25%" height="25" class="thTop">{L_VALUE}</th>
   <th width="25%" nowrap height="25" class="thTop">{L_STATISTIC}</th>
   <th width="25%" height="25" class="thCornerR">{L_VALUE}</th>
  </tr>
  <tr>
   <td class="row1" nowrap>{L_NUMBER_POSTS}:</td>
   <td class="row2"><b>{NUMBER_OF_POSTS}</b></td>
   <td class="row1" nowrap>{L_POSTS_PER_DAY}:</td>
   <td class="row2"><b>{POSTS_PER_DAY}</b></td>
  </tr>
  <tr>
   <td class="row1" nowrap>{L_NUMBER_TOPICS}:</td>
   <td class="row2"><b>{NUMBER_OF_TOPICS}</b></td>
   <td class="row1" nowrap>{L_TOPICS_PER_DAY}:</td>
   <td class="row2"><b>{TOPICS_PER_DAY}</b></td>
  </tr>
  <tr>
   <td class="row1" nowrap>{L_NUMBER_USERS}:</td>
   <td class="row2"><b>{NUMBER_OF_USERS}</b></td>
   <td class="row1" nowrap>{L_USERS_PER_DAY}:</td>
   <td class="row2"><b>{USERS_PER_DAY}</b></td>
  </tr>
  <tr>
   <td class="row1" nowrap>{L_BOARD_STARTED}:</td>
   <td class="row2"><b>{START_DATE}</b></td>
   <td class="row1" nowrap>{L_AVATAR_DIR_SIZE}:</td>
   <td class="row2"><b>{AVATAR_DIR_SIZE}</b></td>
  </tr>
  <tr>
   <td class="row1" nowrap>{L_DB_SIZE}:</td>
   <td class="row2"><b>{DB_SIZE}</b></td>
   <td class="row1" nowrap>{L_GZIP_COMPRESSION}:</td>
   <td class="row2"><b>{GZIP_COMPRESSION}</b></td>
  </tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#

  <tr>
    <th width="25%" nowrap height="25" class="thCornerL" colspan="3">{L_STATISTIC}</th>
    <th width="25%" height="25" class="thTop">{L_VALUE}</th>
    <th width="25%" nowrap height="25" class="thTop">{L_STATISTIC}</th>
    <th width="25%" height="25" class="thCornerR">{L_VALUE}</th>
  </tr>
  <tr>
     <td class="row1" nowrap colspan="3">{L_PHPBB_VERSION}:</td>
    <td class="row2" colspan="3"><b>{PHPBB_VERSION}</b></td>
  </tr>
  <tr>
    <td class="row1" nowrap colspan="3">{L_PHP_VERSION}:</td>
    <td class="row2"><b>{PHP_VERSION}</b></td>
    <td class="row1" nowrap>{L_MYSQL_VERSION}:</td>
    <td class="row2"><b>{MYSQL_VERSION}</b></td>
  </tr>
  <tr>
    <td class="row1" nowrap colspan="3">{L_BOARD_STARTED}:</td>
    <td class="row2"><b>{START_DATE}</b></td>
    <td class="row1" nowrap>{L_AVATAR_DIR_SIZE}:</td>
    <td class="row2"><b>{AVATAR_DIR_SIZE}</b></td>
  </tr>
  <tr>
    <td class="row1" nowrap colspan="3">{L_DB_SIZE}:</td>
    <td class="row2"><b>{DB_SIZE}</b></td>
    <td class="row1" nowrap>{L_GZIP_COMPRESSION}:</td>
    <td class="row2"><b>{GZIP_COMPRESSION}</b></td>
  </tr>
  <tr>
    <td class="row1" nowrap colspan="3">{L_NUMBER_POSTS}:</td>
    <td class="row2"><b>{NUMBER_OF_POSTS}</b></td>
    <td class="row1" nowrap>{L_POSTS_PER_DAY}:</td>
    <td class="row2"><b>{POSTS_PER_DAY}</b></td>
  </tr>
  <tr>
    <td class="row1" nowrap colspan="3">{L_NUMBER_TOPICS}:</td>
    <td class="row2"><b>{NUMBER_OF_TOPICS}</b></td>
    <td class="row1" nowrap>{L_TOPICS_PER_DAY}:</td>
    <td class="row2"><b>{TOPICS_PER_DAY}</b></td>
  </tr>
  <tr>
    <td class="row1" nowrap colspan="3">{L_NUMBER_USERS}:</td>
    <td class="row2"><b>{NUMBER_OF_USERS}</b></td>
    <td class="row1" nowrap>{L_USERS_PER_DAY}:</td>
    <td class="row2"><b>{USERS_PER_DAY}</b></td>
  </tr>
  <tr>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row1" nowrap colspan="2">{L_NUMBER_DEACTIVATED_USERS}:</td>
    <td class="row2" colspan="3">{NUMBER_OF_DEACTIVATED_USERS}</td>
  </tr>
  <tr>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row1" nowrap>{L_NAME_DEACTIVATED_USERS}:</td>
    <td class="row2"  colspan="3">{NAMES_OF_DEACTIVATED}</td>
  </tr>
  <tr>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row1" nowrap colspan="2">{L_NUMBER_MODERATORS}:</td>
    <td class="row2" colspan="3">{NUMBER_OF_MODERATORS}</td>
  </tr>
  <tr>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row1" nowrap>{L_NAME_MODERATORS}:</td>
    <td class="row2"  colspan="3">{NAMES_OF_MODERATORS}</td>
  </tr>
  <tr>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row1" nowrap colspan="2">{L_NUMBER_ADMINISTRATORS}:</td>
    <td class="row2"  colspan="3">{NUMBER_OF_ADMINISTRATORS}</td>
  </tr>
  <tr>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row3" nowrap width="10">&nbsp;</td>
    <td class="row1" nowrap>{L_NAME_ADMINISTRATORS}:</td>
    <td class="row2"  colspan="3">{NAMES_OF_ADMINISTRATORS}</td>
  </tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


_________________
SilverStone SST CS01 | Corsair SF600 600W SFX | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 (16 Cores / 32 Threads) & Noctua NH-U9DX i4 | Kingston HyperX Savage 32 GB DDR4 2400 MHz | PNY NVIDIA Quadro K1200 DP 4 GB DDR5 | Intel SSD 750 1.2 TB NVMe & Intel SSD 730 240 GB SATA & Seagate BackUp Plus Portable 12 TB USB | 31.5" 4K LCD EIZO FlexScan EV3237 & 2 x 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech Wireless G700s | Harman Kardon Nova | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 - Intel Core i7 5600U, 8 GB DDR3 1600 MHz, Intel HD Graphics 5500, SanDisk SSD 512 GB, 12.5 FHD LED IPS, WWAN 3G 4G LTE, Microsoft Windows 7 Ultimate | Nintendo Classic Mini | BlackBerry Passport 96 GB
 [ Príspevok: 1 ] 


Advance Admin Index Stats



Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy.

Stats

v Redakčné systémy

3

1064

10.07.2006 22:07

andrej02

V tomto fóre nie sú ďalšie neprečítané témy.

joomla stats

v Redakčné systémy

0

365

18.10.2007 21:22

t0ki

V tomto fóre nie sú ďalšie neprečítané témy.

Keep Main Admin Admin

v Redakčné systémy

0

412

14.10.2006 14:54

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Advance Links Mod

v PHP, ASP

2

361

29.07.2007 19:28

kajill

V tomto fóre nie sú ďalšie neprečítané témy.

QDI Advance 9

v AMD čipové sady

19

1610

02.04.2007 19:00

Jaro

V tomto fóre nie sú ďalšie neprečítané témy.

Advance Links Mod

v Redakčné systémy

0

285

30.07.2007 17:33

kajill

V tomto fóre nie sú ďalšie neprečítané témy.

Samsung galaxy s advance

v Smartfóny a tablety

2

181

02.10.2012 19:35

fico10000

V tomto fóre nie sú ďalšie neprečítané témy.

Samsung Galaxy S Advance

v Smartfóny a tablety

6

2665

13.01.2013 10:33

fico10000

V tomto fóre nie sú ďalšie neprečítané témy.

Samusng ADVANCE Problém s KIES

v Smartfóny a tablety

5

121

15.12.2012 15:58

KocuR

V tomto fóre nie sú ďalšie neprečítané témy.

Samsung galaxy ACE2 vs S ADVANCE

v Smartfóny a tablety

1

152

04.09.2012 14:29

MilanYX

V tomto fóre nie sú ďalšie neprečítané témy.

P: Samsung I9070 Galaxy S Advance

v Predám

0

84

03.04.2014 13:52

LaLi87

V tomto fóre nie sú ďalšie neprečítané témy.

Advance System Care 7 PRO - Problém !!

v Antivíry a antispywary

4

178

28.01.2014 15:36

lukasSVK1

V tomto fóre nie sú ďalšie neprečítané témy.

Galaxy S Advance android 4.1.2

v Smartfóny a tablety

6

141

28.07.2013 11:03

Connor

V tomto fóre nie sú ďalšie neprečítané témy.

Ako spravne nastavit Nvidia control panel - advance settings

v nVidia grafické karty

6

1853

21.05.2013 18:19

BOBO415

V tomto fóre nie sú ďalšie neprečítané témy.

Orange santa barbara vs samsung galaxy s advance

v Smartfóny a tablety

14

586

08.11.2012 12:14

GhosT11

V tomto fóre nie sú ďalšie neprečítané témy.

QDI Advance 10BM/M a nastavení paměti v biosu.

v AMD čipové sady

24

2085

08.07.2005 23:06

Pufo Callo



© 2005 - 2017 PCforum, edited by JanoF