Quote:
|
Originally Posted by griffin p.s. always backup your database before attempting 2 install mods, which i hope u do |
i do now...lol
ok read me is as follows
################################################## ################################################## #########
## MOD Title: Super Moderators Expanded
## MOD Author: Carlo Claessen <vraag-en-antwoord@vraag-en-antwoord.nl>
http://www.vraag-en-antwoord.nl
## MOD Author Original: Rawly <rawly@jrawly.co.uk>
http://www.jrawly.co.uk
## gatekeep2 (Bryan B.) <gatekeep@circlesoftus.org>
http://www.circlesoftus.org:83/
## MOD Description: Allows the Administrator to add a 'Super Moderator' with
## restricted administrative controls, also it adds more usertypes to the dbase with all his own ## colours
## adjustable in the admin panel.
## also there is the possibility to add for each type user an restricted admin
## Every usertype is now selectable through the admin panel
##
## MOD Version: 1.0.6
##
## Installation Level: Advanced
## Installation Time: 60 Minutes
## Files to Edit: [10]
## includes/constants.php,
## language/lang_english/lang_main.php,
## includes/page_tail.php,
## viewonline.php,
## includes/page_header.php,
## admin/admin_styles.php,
## language/lang_english/lang_admin.php,
## {TEMPLATES DIR}/index_body.tpl,
## {TEMPLATES DIR}/admin/styles_edit_body.tpl
## admin/admin_ug_auth.php,
## Included Files: [180]
## templates/SubSilver/adm/category_edit_body.tpl
## templates/SubSilver/adm/disallow_body.tpl
## templates/SubSilver/adm/forum_admin_body.tpl
## templates/SubSilver/adm/forum_delete_body.tpl
## templates/SubSilver/adm/forum_edit_body.tpl
## templates/SubSilver/adm/forum_prune_body.tpl
## templates/SubSilver/adm/forum_prune_result_body.tpl
## templates/SubSilver/adm/forum_prune_select_body.tpl
## templates/SubSilver/adm/index_body.tpl
## templates/SubSilver/adm/index_frameset.tpl
## templates/SubSilver/adm/index_navigate.tpl
## templates/SubSilver/adm/page_footer.tpl
## templates/SubSilver/adm/page_header.tpl
## templates/SubSilver/adm/user_avatar_gallery.tpl
## templates/SubSilver/adm/user_edit_body.tpl
## templates/SubSilver/adm/user_email_body.tpl
## templates/SubSilver/adm/user_select_body.tpl
## templates/SubSilver/adm/words_edit_body.tpl
## templates/SubSilver/adm/words_list_body.tpl
## templates/SubSilver/adm/index.htm (blank security)
## adm/admin_disallow.php
## adm/admin_forum_prune.php
## adm/admin_forums.php
## adm/admin_mass_email.php
## adm/admin_users.php
## adm/admin_words.php
## adm/index.php
## adm/page_footer_admin.php
## adm/page_header_admin.php
## adm/pagestart.php
## templates/SubSilver/junior/category_edit_body.tpl
## templates/SubSilver/junior/disallow_body.tpl
## templates/SubSilver/junior/forum_admin_body.tpl
## templates/SubSilver/junior/forum_delete_body.tpl
## templates/SubSilver/junior/forum_edit_body.tpl
## templates/SubSilver/junior/forum_prune_body.tpl
## templates/SubSilver/junior/forum_prune_result_body.tpl
## templates/SubSilver/junior/forum_prune_select_body.tpl
## templates/SubSilver/junior/index_body.tpl
## templates/SubSilver/junior/index_frameset.tpl
## templates/SubSilver/junior/index_navigate.tpl
## templates/SubSilver/junior/page_footer.tpl
## templates/SubSilver/junior/page_header.tpl
## templates/SubSilver/junior/user_avatar_gallery.tpl
## templates/SubSilver/junior/user_edit_body.tpl
## templates/SubSilver/junior/user_email_body.tpl
## templates/SubSilver/junior/user_select_body.tpl
## templates/SubSilver/junior/words_edit_body.tpl
## templates/SubSilver/junior/words_list_body.tpl
## templates/SubSilver/junior/index.htm (blank security)
## junior/admin_disallow.php
## junior/admin_forum_prune.php
## junior/admin_forums.php
## junior/admin_mass_email.php
## junior/admin_users.php
## junior/admin_words.php
## junior/index.php
## junior/page_footer_admin.php
## junior/page_header_admin.php
## junior/pagestart.php
## templates/SubSilver/super/category_edit_body.tpl
## templates/SubSilver/super/disallow_body.tpl
## templates/SubSilver/super/forum_admin_body.tpl
## templates/SubSilver/super/forum_delete_body.tpl
## templates/SubSilver/super/forum_edit_body.tpl
## templates/SubSilver/super/forum_prune_body.tpl
## templates/SubSilver/super/forum_prune_result_body.tpl
## templates/SubSilver/super/forum_prune_select_body.tpl
## templates/SubSilver/super/index_body.tpl
## templates/SubSilver/super/index_frameset.tpl
## templates/SubSilver/super/index_navigate.tpl
## templates/SubSilver/super/page_footer.tpl
## templates/SubSilver/super/page_header.tpl
## templates/SubSilver/super/user_avatar_gallery.tpl
## templates/SubSilver/super/user_edit_body.tpl
## templates/SubSilver/super/user_email_body.tpl
## templates/SubSilver/super/user_select_body.tpl
## templates/SubSilver/super/words_edit_body.tpl
## templates/SubSilver/super/words_list_body.tpl
## templates/SubSilver/super/index.htm (blank security)
## super/admin_disallow.php
## super/admin_forum_prune.php
## super/admin_forums.php
## super/admin_mass_email.php
## super/admin_users.php
## super/admin_words.php
## super/index.php
## super/page_footer_admin.php
## super/page_header_admin.php
## super/pagestart.php
## templates/SubSilver/mod/category_edit_body.tpl
## templates/SubSilver/mod/disallow_body.tpl
## templates/SubSilver/mod/forum_admin_body.tpl
## templates/SubSilver/mod/forum_delete_body.tpl
## templates/SubSilver/mod/forum_edit_body.tpl
## templates/SubSilver/mod/forum_prune_body.tpl
## templates/SubSilver/mod/forum_prune_result_body.tpl
## templates/SubSilver/mod/forum_prune_select_body.tpl
## templates/SubSilver/mod/index_body.tpl
## templates/SubSilver/mod/index_frameset.tpl
## templates/SubSilver/mod/index_navigate.tpl
## templates/SubSilver/mod/page_footer.tpl
## templates/SubSilver/mod/page_header.tpl
## templates/SubSilver/mod/user_avatar_gallery.tpl
## templates/SubSilver/mod/user_edit_body.tpl
## templates/SubSilver/mod/user_email_body.tpl
## templates/SubSilver/mod/user_select_body.tpl
## templates/SubSilver/mod/words_edit_body.tpl
## templates/SubSilver/mod/words_list_body.tpl
## templates/SubSilver/mod/index.htm (blank security)
## mod/admin_disallow.php
## mod/admin_forum_prune.php
## mod/admin_forums.php
## mod/admin_mass_email.php
## mod/admin_users.php
## mod/admin_words.php
## mod/index.php
## mod/page_footer_admin.php
## mod/page_header_admin.php
## mod/pagestart.php
## templates/SubSilver/sponsor/category_edit_body.tpl
## templates/SubSilver/sponsor/disallow_body.tpl
## templates/SubSilver/sponsor/forum_admin_body.tpl
## templates/SubSilver/sponsor/forum_delete_body.tpl
## templates/SubSilver/sponsor/forum_edit_body.tpl
## templates/SubSilver/sponsor/forum_prune_body.tpl
## templates/SubSilver/sponsor/forum_prune_result_body.tpl
## templates/SubSilver/sponsor/forum_prune_select_body.tpl
## templates/SubSilver/sponsor/index_body.tpl
## templates/SubSilver/sponsor/index_frameset.tpl
## templates/SubSilver/sponsor/index_navigate.tpl
## templates/SubSilver/sponsor/page_footer.tpl
## templates/SubSilver/sponsor/page_header.tpl
## templates/SubSilver/sponsor/user_avatar_gallery.tpl
## templates/SubSilver/sponsor/user_edit_body.tpl
## templates/SubSilver/sponsor/user_email_body.tpl
## templates/SubSilver/sponsor/user_select_body.tpl
## templates/SubSilver/sponsor/words_edit_body.tpl
## templates/SubSilver/sponsor/words_list_body.tpl
## templates/SubSilver/sponsor/index.htm (blank security)
## sponsor/admin_disallow.php
## sponsor/admin_forum_prune.php
## sponsor/admin_forums.php
## sponsor/admin_mass_email.php
## sponsor/admin_users.php
## sponsor/admin_words.php
## sponsor/index.php
## sponsor/page_footer_admin.php
## sponsor/page_header_admin.php
## sponsor/pagestart.php
## templates/SubSilver/vip/category_edit_body.tpl
## templates/SubSilver/vip/disallow_body.tpl
## templates/SubSilver/vip/forum_admin_body.tpl
## templates/SubSilver/vip/forum_delete_body.tpl
## templates/SubSilver/vip/forum_edit_body.tpl
## templates/SubSilver/vip/forum_prune_body.tpl
## templates/SubSilver/vip/forum_prune_result_body.tpl
## templates/SubSilver/vip/forum_prune_select_body.tpl
## templates/SubSilver/vip/index_body.tpl
## templates/SubSilver/vip/index_frameset.tpl
## templates/SubSilver/vip/index_navigate.tpl
## templates/SubSilver/vip/page_footer.tpl
## templates/SubSilver/vip/page_header.tpl
## templates/SubSilver/vip/user_avatar_gallery.tpl
## templates/SubSilver/vip/user_edit_body.tpl
## templates/SubSilver/vip/user_email_body.tpl
## templates/SubSilver/vip/user_select_body.tpl
## templates/SubSilver/vip/words_edit_body.tpl
## templates/SubSilver/vip/words_list_body.tpl
## templates/SubSilver/vip/index.htm (blank security)
## vip/admin_disallow.php
## vip/admin_forum_prune.php
## vip/admin_forums.php
## vip/admin_mass_email.php
## vip/admin_users.php
## vip/admin_words.php
## vip/index.php
## vip/page_footer_admin.php
## vip/page_header_admin.php
## vip/pagestart.php
##
################################################## ############
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
################################################## ############
## 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:
## Upload the files provided using the directory structure (phpBB2 is the default installation directory, replace this with your own)
## Make sure you upload the templates into all template directories used by your forum
## This is NOT a Junior Admin mod and as such you need to grant the permissions for you 'Super Moderator' like you would a normal moderator.
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############
## MOD History
## 2003-08-23 - Version : 1.0.0
## - Initial Release

##
## 2003-08-25 - Version : 1.0.1
## - changed creditline
##
## 2003-08-25 - Version : 1.0.2 added premodded files
## - added premodded files
##
## 2003-08-26 - Version : 1.0.3
## - quick fix in admin_ug_auth.php and worked the premodded files also new
## thnx danb00 for mentioning it
##
## 2003-08-26 - Version : 1.0.4
## - added the lines which you need to change for the profilecp mod
##
## 2003-08-26 - Version : 1.0.5
## - removed a typo and set the permissions names through the lang_admin.php file
##
## 2003-09-04 - Version : 1.0.6
## - removed a typo that makes all extra levels an admin off the highest category
## thx for telling id_roman
##
################################################## ############
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_themes ADD fontcolor4 VARCHAR (6) ;
ALTER TABLE phpbb_themes_name ADD fontcolor4_name CHAR (50) ;
ALTER TABLE phpbb_themes ADD fontcolor5 VARCHAR (6) ;
ALTER TABLE phpbb_themes_name ADD fontcolor5_name CHAR (50) ;
ALTER TABLE phpbb_themes ADD fontcolor6 VARCHAR (6) ;
ALTER TABLE phpbb_themes_name ADD fontcolor6_name CHAR (50) ;
ALTER TABLE phpbb_themes ADD fontcolor7 VARCHAR (6) ;
ALTER TABLE phpbb_themes_name ADD fontcolor7_name CHAR (50) ;
ALTER TABLE phpbb_themes ADD fontcolor8 VARCHAR (6) ;
ALTER TABLE phpbb_themes_name ADD fontcolor8_name CHAR (50) ;
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('USER', 0);
define('ADMIN', 1);
define('MOD', 2);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('LESS_ADMIN', 3);
define('JUNIOR_ADMIN', 4);
define('SUPER_MOD', 5);
define('SPONSOR', 6);
define('VIP', 7);
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Admin_panel'] = 'Go to Administration Panel';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['Admin_panel'] = "Go to Super Administration Panel";
$lang['Admin_paneel'] = "Go to Administration Panel";//note this isnt an typo
$lang['Junior_panel'] = "Go to Junior Administration Panel";
$lang['Super_Mod_panel'] = "Go to Super Moderator Panel";
$lang['Mod_panel'] = "Go to Moderator Panel";
$lang['Sponsor_panel'] = "Go to Sponsor Panel";
$lang['Vip_panel'] = "Go to VIP Panel";
#
#-----[ FIND ]------------------------------------------
#
$lang['Admin_online_color'] = '%sAdministrator%s';
$lang['Mod_online_color'] = '%sModerator%s';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['Admin_online_color'] = '%sSuper Administrator%s';
$lang['Mod_online_color'] = '%sModerator%s';
$lang['Gebruiker_online_color'] = "%sUsers%s";
$lang['Sponsor_online_color'] = "%sSponsor%s";
$lang['Super_Mod_online_color'] = "%sSuper Moderator%s";
$lang['Junior_Admin_online_color'] = "%sJunior Administrator%s";
$lang['Administrator_online_color'] = "%sAdministrator%s";
$lang['VIP_online_color'] = "%sVIP%s";
$lang['User_online_color'] = "%sUser%s";
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]------------------------------------------
#
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $userdata['user_level'] == ADMIN )
{
$admin_link = '
<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />
<a href="' . append_sid("adm/index.$phpEx") . '">' . $lang['Admin_paneel'] . '</a><br /><br />
<a href="' . append_sid("junior/index.$phpEx") . '">' . $lang['Junior_panel'] . '</a><br /><br />
<a href="' . append_sid("super/index.$phpEx") . '">' . $lang['Super_Mod_panel'] . '</a><br /><br />
<a href="' . append_sid("mod/index.$phpEx") . '">' . $lang['Mod_panel'] . '</a><br /><br />
<a href="' . append_sid("sponsor/index.$phpEx") . '">' . $lang['Sponsor_panel'] . '</a><br /><br />
<a href="' . append_sid("vip/index.$phpEx") . '">' . $lang['Vip_panel'] . '</a><br /><br />';
}
else if ( $userdata['user_level'] == LESS_ADMIN )
{
$admin_link = '<a href="' . append_sid("adm/index.$phpEx") . '">' . $lang['Admin_paneel'] . '</a>';
}
else if ( $userdata['user_level'] == JUNIOR_ADMIN )
{
$admin_link = '<a href="' . append_sid("junior/index.$phpEx") . '">' . $lang['Junior_panel'] . '</a>';
}
else if ( $userdata['user_level'] == SUPER_MOD )
{
$admin_link = '<a href="' . append_sid("super/index.$phpEx") . '">' . $lang['Super_Mod_panel'] . '</a>';
}
else if ( $userdata['user_level'] == MOD )
{
$admin_link = '<a href="' . append_sid("mod/index.$phpEx") . '">' . $lang['Mod_panel'] . '</a>';
}
else if ( $userdata['user_level'] == SPONSOR )
{
$admin_link = '<a href="' . append_sid("sponsor/index.$phpEx") . '">' . $lang['Sponsor_panel'] . '</a>';
}
else if ( $userdata['user_level'] == VIP )
{
$admin_link = '<a href="' . append_sid("vip/index.$phpEx") . '">' . $lang['Vip_panel'] . '</a>';
}
/////////////////////////////////////////////////////////////
//
// NOTE
//
// To give some users no permissions to theyr own admin fields just leave the dir in your forum dir away and the // code snippet in the pagetail away
//
// example, if you dont want that an VIP has an own admin panel just leave
//
// else if ( $userdata['user_level'] == VIP )
// {
// $admin_link = '<a href="' . append_sid("vip/index.$phpEx") . '">' . $lang['Vip_panel'] . '</a>';
// }
// out of the pagetail code, you can also leave the lang line out in the lang_main.php
//
/////////////////////////////////////////////////////////////
#
#-----[ OPEN ]------------------------------------------
#
viewonline.php
#
#-----[ FIND ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR NORMAL INSTALLATION
//
// IF YOU HAVE PROFILECP INSTALLED SKIP THIS
//
/////////////////////////////////////////////////////////////
if ( $row['user_level'] == ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR NORMAL INSTALLATION
//
// IF YOU HAVE PROFILECP INSTALLED SKIP THIS
//
/////////////////////////////////////////////////////////////
else if ( $row['user_level'] == LESS_ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor4'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == JUNIOR_ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor5'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == SUPER_MOD )
{
$username = '<b style="color:#' . $theme['fontcolor6'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == SPONSOR )
{
$username = '<b style="color:#' . $theme['fontcolor7'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == VIP )
{
$username = '<b style="color:#' . $theme['fontcolor8'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == USER )
{
$username = '<b style="color:#' . $theme['body_link'] . '">' . $username . '</b>';
}
#
#-----[ FIND ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR PROFILECP INSTALLATION
//
// IF YOU HAVE A NORMAL INSTALLION SKIP THIS
//
/////////////////////////////////////////////////////////////
//
// Output page header and load viewonline template
//
$page_title = $lang['Who_is_Online'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'viewonline_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
'L_WHOSONLINE' => $lang['Who_is_online'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
'L_USERNAME' => $lang['Username'],
'L_FORUM_LOCATION' => $lang['Forum_Location'],
'L_LAST_UPDATE' => $lang['Last_updated'])
);
//
// Forum info
//
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if ( $result = $db->sql_query($sql) )
{
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[$row['forum_id']] = $row['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql);
}
//
// Get auth data
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
//
// Get user list
//
//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// $sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_ip
// FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
// WHERE u.user_id = s.session_user_id
// AND s.session_time >= ".( time() - 300 ) . "
// ORDER BY u.username ASC, s.session_ip ASC";
// if ( !($result = $db->sql_query($sql)) )
// {
// message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
// }
//-- fin mod : profile cp --------------------------------------------------------------------------
$guest_users = 0;
$registered_users = 0;
$hidden_users = 0;
$reg_counter = 0;
$guest_counter = 0;
$prev_user = 0;
$prev_ip = '';
//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// while ( $row = $db->sql_fetchrow($result) )
// {
//-- add
for ($i=0; $i < count($connected); $i++)
{
$row = $connected[$i];
//-- fin mod : profile cp --------------------------------------------------------------------------
$view_online = false;
if ( $row['session_logged_in'] )
{
//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// $user_id = $row['user_id'];
//
// if ( $user_id != $prev_user )
// {
// $username = $row['username'];
//
// $style_color = '';
// if ( $row['user_level'] == ADMIN )
// {
// $username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
// }
// else if ( $row['user_level'] == MOD )
// {
// $username = '<b style="color:#' . $theme['fontcolor2'] . '">' . $username . '</b>';
// }
//
// if ( !$row['user_allow_viewonline'] )
// {
// $view_online = ( $userdata['user_level'] == ADMIN ) ? true : false;
// $hidden_users++;
//
// $username = '<i>' . $username . '</i>';
// }
// else
// {
// $view_online = true;
// $registered_users++;
// }
//
// $which_counter = 'reg_counter';
// $which_row = 'reg_user_row';
// $prev_user = $user_id;
// }
//-- add
$username = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $connected[$i]['user_id'] ) . '"' . $connected[$i]['style'] . '>' . $connected[$i]['username'] . '</a>';
// set the status
switch ($row['status'])
{
case 'offline':
$hidden_users++;
$view_online = false;
break;
case 'online':
$registered_users++;
$view_online = true;
break;
case 'hidden':
$hidden_users++;
$view_online = true;
break;
default:
break;
}
$which_counter = 'reg_counter';
$which_row = 'reg_user_row';
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ REPLACE ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR PROFILECP INSTALLATION
//
// IF YOU HAVE A NORMAL INSTALLION SKIP THIS
//
/////////////////////////////////////////////////////////////
//
// Output page header and load viewonline template
//
$page_title = $lang['Who_is_Online'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'viewonline_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
'L_WHOSONLINE' => $lang['Who_is_online'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
'L_USERNAME' => $lang['Username'],
'L_FORUM_LOCATION' => $lang['Forum_Location'],
'L_LAST_UPDATE' => $lang['Last_updated'])
);
//
// Forum info
//
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if ( $result = $db->sql_query($sql) )
{
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[$row['forum_id']] = $row['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql);
}
//
// Get auth data
//
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
//
// Get user list
//
$sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 300 ) . "
ORDER BY u.username ASC, s.session_ip ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
}
$guest_users = 0;
$registered_users = 0;
$hidden_users = 0;
$reg_counter = 0;
$guest_counter = 0;
$prev_user = 0;
$prev_ip = '';
while ( $row = $db->sql_fetchrow($result) )
{
$view_online = false;
if ( $row['session_logged_in'] )
{
$user_id = $row['user_id'];
if ( $user_id != $prev_user )
{
$username = $row['username'];
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == LESS_ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor4'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == JUNIOR_ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor5'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == SUPER_MOD )
{
$username = '<b style="color:#' . $theme['fontcolor6'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == SPONSOR )
{
$username = '<b style="color:#' . $theme['fontcolor7'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == VIP )
{
$username = '<b style="color:#' . $theme['fontcolor8'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == MOD )
{
$username = '<b style="color:#' . $theme['fontcolor2'] . '">' . $username . '</b>';
}
if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == ADMIN ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
//ONLY IF YOU WANT SUPER MODERATORS TO VIEW USERONLINE DATA WHEN USERS AREN'T ALLOWED!
else if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == LESS_ADMIN ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
else if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == JUNIOR_ADMIN ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
//END ONLY IF YOU WANT SUPER MODERATORS TO VIEW USERONLINE DATA WHEN USERS AREN'T ALLOWED!
else
{
$view_online = true;
$registered_users++;
}
$which_counter = 'reg_counter';
$which_row = 'reg_user_row';
$prev_user = $user_id;
}
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == ADMIN ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//ONLY IF YOU WANT SUPER MODERATORS AND ADMINISTRATORS TO VIEW USERONLINE DATA WHEN USERS AREN'T ALLOWED!
//IF YOU WANT OTHER TO VIEW THE STATUS JUST ADD THE LINE WITH THE VARIABLES INSIDE IT
//EXAMPLE
// else if ( !$row['user_allow_viewonline'] )
// {
// $view_online = ( $userdata['user_level'] == VIP ) ? true : false;
// $hidden_users++;
//
// $username = '<i>' . $username . '</i>';
// }
//THIS IS IF YOU WANT ALSO ALLOWANCE FOR TO LET SEE THE VIP WHOS ONLINE
else if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == LESS_ADMIN ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
else if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == JUNIOR_ADMIN ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
else if ( !$row['user_allow_viewonline'] )
{
$view_online = ( $userdata['user_level'] == SUPER_MOD ) ? true : false;
$hidden_users++;
$username = '<i>' . $username . '</i>';
}
//END ONLY IF YOU WANT SUPER MODERATORS AND ADMINISTRATORS TO VIEW USERONLINE DATA WHEN USERS AREN'T ALLOWED!
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR NORMAL INSTALLATION
//
// IF YOU HAVE PROFILECP INSTALLED SKIP THIS
//
/////////////////////////////////////////////////////////////
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR NORMAL INSTALLATION
//
// IF YOU HAVE PROFILECP INSTALLED SKIP THIS
//
/////////////////////////////////////////////////////////////
else if ( $row['user_level'] == LESS_ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor4'] . '"';
}
else if ( $row['user_level'] == JUNIOR_ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor5'] . '"';
}
else if ( $row['user_level'] == SUPER_MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor6'] . '"';
}
else if ( $row['user_level'] == SPONSOR )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor7'] . '"';
}
else if ( $row['user_level'] == VIP )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor8'] . '"';
}
else if ( $row['user_level'] == USER )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['body_link'] . '"';
}
#
#-----[ FIND ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR PROFILECP INSTALLATION
//
// IF YOU HAVE A NORMAL INSTALLION SKIP THIS
//
/////////////////////////////////////////////////////////////
$connected = array();
$user_ids = array();
while ($row = $db->sql_fetchrow($result) )
{
// User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
{
if ( !in_array($row['user_id'], $user_ids) )
{
$row['style'] = ' class="' . get_user_level_class($row['user_level'], 'gen', $row) . '"';
$connected[] = $row;
$user_ids[] = $row['user_id'];
}
}
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$row['style'] = '';
$connected[] = $row;
}
}
$prev_session_ip = $row['session_ip'];
}
#
#-----[ REPLACE ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR PROFILECP INSTALLATION
//
// IF YOU HAVE A NORMAL INSTALLION SKIP THIS
//
/////////////////////////////////////////////////////////////
$connected = array();
$user_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
//User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == LESS_ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor4'] . '"';
}
else if ( $row['user_level'] == JUNIOR_ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor5'] . '"';
}
else if ( $row['user_level'] == SUPER_MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor6'] . '"';
}
else if ( $row['user_level'] == SPONSOR )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor7'] . '"';
}
else if ( $row['user_level'] == VIP )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor8'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&am p;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&am p;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link;
}
}
$prev_user_id = $row['user_id'];
}
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
}
}
$prev_session_ip = $row['session_ip'];
}
#
#-----[ FIND ]------------------------------------------
#
//THIS IS FOR WHO VISITED BOARD TODAY MOD.. MAY BE ON YOUR INDEX.PHP FILE
if( $todayrow['user_level'] == ADMIN )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//THIS IS FOR WHO VISITED BOARD TODAY MOD.. MAY BE ON YOUR INDEX.PHP FILE
else if( $todayrow['user_level'] == LESS_ADMIN )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor4'] . '"';
}
else if( $todayrow['user_level'] == JUNIOR_ADMIN )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor5'] . '"';
}
else if( $todayrow['user_level'] == SUPER_MOD )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor6'] . '"';
}
else if( $todayrow['user_level'] == SPONSOR )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor7'] . '"';
}
else if( $todayrow['user_level'] == VIP )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor8'] . '"';
}
#
#-----[ FIND ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR NORMAL INSTALLATION
//
// IF YOU HAVE PROFILECP INSTALLED SKIP THIS
//
/////////////////////////////////////////////////////////////
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'),
#
#-----[ AFTER, ADD ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR NORMAL INSTALLATION
//
// IF YOU HAVE PROFILECP INSTALLED SKIP THIS
//
/////////////////////////////////////////////////////////////
'L_WHOSONLINE_LESS_ADMIN' => sprintf($lang['Administrator_online_color'], '<span style="color:#' . $theme['fontcolor4'] . '">', '</span>'),
'L_WHOSONLINE_JUNIOR_ADMIN' => sprintf($lang['Junior_Admin_online_color'], '<span style="color:#' . $theme['fontcolor5'] . '">', '</span>'),
'L_WHOSONLINE_SUPER_MOD' => sprintf($lang['Super_Mod_online_color'], '<span style="color:#' . $theme['fontcolor6'] . '">', '</span>'),
'L_WHOSONLINE_SPONSOR' => sprintf($lang['Sponsor_online_color'], '<span style="color:#' . $theme['fontcolor7'] . '">', '</span>'),
'L_WHOSONLINE_VIP' => sprintf($lang['VIP_online_color'], '<span style="color:#' . $theme['fontcolor8'] . '">', '</span>'),
'L_WHOSONLINE_USER' => sprintf($lang['User_online_color'], '<span style="color:#' . $theme['body_link'] . '">', '</span>'),
#
#-----[ FIND ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR PROFILECP INSTALLATION
//
// IF YOU HAVE A NORMAL INSTALLION SKIP THIS
//
/////////////////////////////////////////////////////////////
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span class="' . get_user_level_class(ADMIN) . '">', '</span>'),
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span class="' . get_user_level_class(MOD) . '">', '</span>'),
#
#-----[ AFTER, ADD ]------------------------------------------
#
/////////////////////////////////////////////////////////////
//
// NOTE
//
// FOR PROFILECP INSTALLATION
//
// IF YOU HAVE A NORMAL INSTALLION SKIP THIS
//
/////////////////////////////////////////////////////////////
'L_WHOSONLINE_LESS_ADMIN' => sprintf($lang['Administrator_online_color'], '<span style="color:#' . $theme['fontcolor4'] . '">', '</span>'),
'L_WHOSONLINE_JUNIOR_ADMIN' => sprintf($lang['Junior_Admin_online_color'], '<span style="color:#' . $theme['fontcolor5'] . '">', '</span>'),
'L_WHOSONLINE_SUPER_MOD' => sprintf($lang['Super_Mod_online_color'], '<span style="color:#' . $theme['fontcolor6'] . '">', '</span>'),
'L_WHOSONLINE_SPONSOR' => sprintf($lang['Sponsor_online_color'], '<span style="color:#' . $theme['fontcolor7'] . '">', '</span>'),
'L_WHOSONLINE_VIP' => sprintf($lang['VIP_online_color'], '<span style="color:#' . $theme['fontcolor8'] . '">', '</span>'),
'L_WHOSONLINE_USER' => sprintf($lang['User_online_color'], '<span style="color:#' . $theme['body_link'] . '">', '</span>'),
#
#-----[ FIND ]------------------------------------------
#
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'T_FONTCOLOR4' => '#'.$theme['fontcolor4'],
'T_FONTCOLOR5' => '#'.$theme['fontcolor5'],
'T_FONTCOLOR6' => '#'.$theme['fontcolor6'],
'T_FONTCOLOR7' => '#'.$theme['fontcolor7'],
'T_FONTCOLOR8' => '#'.$theme['fontcolor8'],
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_styles.php
#
#-----[ FIND ]------------------------------------------
#
$updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3'];
$updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$updated['fontcolor4'] = $HTTP_POST_VARS['fontcolor4'];
$updated_name['fontcolor4_name'] = $HTTP_POST_VARS['fontcolor4_name'];
$updated['fontcolor5'] = $HTTP_POST_VARS['fontcolor5'];
$updated_name['fontcolor5_name'] = $HTTP_POST_VARS['fontcolor5_name'];
$updated['fontcolor6'] = $HTTP_POST_VARS['fontcolor6'];
$updated_name['fontcolor6_name'] = $HTTP_POST_VARS['fontcolor6_name'];
$updated['fontcolor7'] = $HTTP_POST_VARS['fontcolor7'];
$updated_name['fontcolor7_name'] = $HTTP_POST_VARS['fontcolor7_name'];
$updated['fontcolor8'] = $HTTP_POST_VARS['fontcolor8'];
$updated_name['fontcolor8_name'] = $HTTP_POST_VARS['fontcolor8_name'];
#
#-----[ FIND ]------------------------------------------
#
"L_FONTCOLOR_3" => $lang['fontcolor3'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_FONTCOLOR_4" => $lang['fontcolor4'],
"L_FONTCOLOR_5" => $lang['fontcolor5'],
"L_FONTCOLOR_6" => $lang['fontcolor6'],
"L_FONTCOLOR_7" => $lang['fontcolor7'],
"L_FONTCOLOR_8" => $lang['fontcolor8'],
#
#-----[ FIND ]------------------------------------------
#
"FONTCOLOR3" => $selected['fontcolor3'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"FONTCOLOR4" => $selected['fontcolor4'],
"FONTCOLOR5" => $selected['fontcolor5'],
"FONTCOLOR6" => $selected['fontcolor6'],
"FONTCOLOR7" => $selected['fontcolor7'],
"FONTCOLOR8" => $selected['fontcolor8'],
#
#-----[ FIND ]------------------------------------------
#
"FONTCOLOR3_NAME" => $selected['fontcolor3_name'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"FONTCOLOR4_NAME" => $selected['fontcolor4_name'],
"FONTCOLOR5_NAME" => $selected['fontcolor5_name'],
"FONTCOLOR6_NAME" => $selected['fontcolor6_name'],
"FONTCOLOR7_NAME" => $selected['fontcolor7_name'],
"FONTCOLOR8_NAME" => $selected['fontcolor8_name'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Link_color'] = 'Link Colour';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['Link_color'] = 'Link Colour And User';
#
#-----[ FIND ]------------------------------------------
#
$lang['Auth_Admin'] = 'Administrator';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['Auth_Admin'] = 'Super Administrator';
$lang['Auth_Admini'] = 'Administrator';
$lang['Auth_Junior'] = 'Junior Administrator';
$lang['Auth_Super'] = 'Super Moderator';
$lang['Auth_Mod'] = 'Moderator';
$lang['Auth_Sponsor'] = 'Sponsor';
$lang['Auth_Vip'] = 'VIP';
#
#-----[ FIND ]------------------------------------------
#
$lang['fontcolor2'] = 'Font Colour 2';
$lang['fontcolor3'] = 'Font Colour 3';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['fontcolor2'] = "Font Colour 2 Moderator";
$lang['fontcolor3'] = "Font Colour 3 Super Administrator";
$lang['fontcolor4'] = "Font Colour 4 Administrator";
$lang['fontcolor5'] = "Font Colour 5 Junior Administrator";
$lang['fontcolor6'] = "Font Colour 6 Super Moderator";
$lang['fontcolor7'] = "Font Colour 7 Sponsor";
$lang['fontcolor8'] = "Font Colour 8 VIP";
#
#-----[ OPEN ]------------------------------------------
#
{TEMPLATES DIR}/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
</tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS_ONLINE}<br /><br />
<center>&nbsp; [ <strong>{L_WHOSONLINE_ADMIN}</strong> ]
&nbsp; [ <strong>{L_WHOSONLINE_LESS_ADMIN}</strong> ]
&nbsp; [ <strong>{L_WHOSONLINE_JUNIOR_ADMIN}</strong> ]<br />
&nbsp; [ <strong>{L_WHOSONLINE_SUPER_MOD}</strong> ]
&nbsp; [ <strong>{L_WHOSONLINE_MOD}</strong> ]
&nbsp; [ <strong>{L_WHOSONLINE_SPONSOR}</strong> ]
&nbsp; [ <strong>{L_WHOSONLINE_VIP}</strong> ]
&nbsp; [ <strong>{L_WHOSONLINE_USER}</strong> ]<br /><br /></center>
{RECORD_USERS}<br />
{LOGGED_IN_USER_LIST}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
{TEMPLATES DIR}/admin/styles_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_FONTCOLOR_3}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor3" value="{FONTCOLOR3}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor3_name" value="{FONTCOLOR3_NAME}">
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_FONTCOLOR_4}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor4" value="{FONTCOLOR4}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor4_name" value="{FONTCOLOR4_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_5}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor5" value="{FONTCOLOR5}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor5_name" value="{FONTCOLOR5_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_6}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor6" value="{FONTCOLOR6}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor6_name" value="{FONTCOLOR6_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_7}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor7" value="{FONTCOLOR7}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor7_name" value="{FONTCOLOR7_NAME}">
</tr>
<tr>
<td class="row1">{L_FONTCOLOR_8}:</td>
<td class="row2"><input class="post" type="text" size="6" maxlength="6" name="fontcolor8" value="{FONTCOLOR8}"></td>
<td class="row2"><input class="post" type="text" size="25" maxlength="100" name="fontcolor8_name" value="{FONTCOLOR8_NAME}">
</tr>
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_ug_auth.php
#
#-----[ FIND ]------------------------------------------
#
else
{
if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'user' && $user_level == ADMIN )
{
#
#-----[ BEFORE, ADD ]------------------------------------------
#
else if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'admini' && $user_level != LESS_ADMIN )
{
//
// Make user an admin (if already user)
//
if ( $userdata['user_id'] != $user_id )
{
//
// Update users level, reset
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . LESS_ADMIN . "
WHERE user_id = $user_id";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't update user level", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = $group_id
AND auth_mod = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't delete auth access info", "", __LINE__, __FILE__, $sql);
}
//
// Delete any entries in auth_access, they are not required if user is becoming an
// admin
//
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET auth_view = 0, auth_read = 0, auth_post = 0, auth_reply = 0, auth_edit = 0, auth_delete = 0, auth_sticky = 0, auth_announce = 0
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update auth access", "", __LINE__, __FILE__, $sql);
}
}
$message = $lang['Auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_userauth'], '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else if ( $mode == 'user' && $HTTP_POST_VARS['userlevel'] == 'junior' && $user_level != JUNIOR_ADMIN )
{
//
// Make user an admin (if already user)
//