[ Príspevok: 1 ] 
AutorSpráva
Offline

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

Registrovaný: 01.05.05
Príspevky: 13414
Témy: 1496 | 1496
Bydlisko: Bratislava
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


_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 11 Enterprise | APC Back-UPS BE-850 VA | Lenovo ThinkPad X250 & Microsoft Windows 11 Professional | iPhone 15 Pro 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu 24.04.1 LTS
 [ 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

1294

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

577

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

656

14.10.2006 14:54

JanoF

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

Advance Links Mod

v Redakčné systémy

0

540

30.07.2007 17:33

kajill

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

Advance Links Mod

v PHP, ASP

2

577

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

1909

02.04.2007 19:00

Jaro

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

Samsung galaxy s advance

v Smartfóny a tablety

2

481

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

3031

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

336

15.12.2012 15:58

KocuR

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

P: Samsung I9070 Galaxy S Advance

v Predám

0

387

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

498

28.01.2014 15:36

lukasSVK1

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

Samsung galaxy ACE2 vs S ADVANCE

v Smartfóny a tablety

1

438

04.09.2012 14:29

MilanYX

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

482

28.07.2013 11:03

Connor

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

979

08.11.2012 12:14

GhosT11

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

2310

21.05.2013 18:19

BOBO415

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

Celeron 1200 (SL5Y5) na Legend QDI Advance 9 P6V693A ?

v Intel - Integrated Electronics

3

1088

02.03.2009 19:22

opytajsa



© 2005 - 2024 PCforum, edited by JanoF