1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-14 01:22:13 +02:00

Admin perms cleanup. Enhanced ui, multiple perms for sections of admin->users. Support for more perms.

This commit is contained in:
CaMer0n 2011-05-11 11:56:42 +00:00
parent 0ddd1310ab
commit 414acedafc
8 changed files with 278 additions and 143 deletions

View File

@ -574,7 +574,7 @@ $array_functions = array(
21 => array(e_ADMIN.'admin_log.php', ADLAN_155, ADLAN_156, 'S', 4, E_16_ADMINLOG, E_32_ADMINLOG),
22 => array(e_ADMIN.'theme.php', ADLAN_140, ADLAN_141, '1', 5, E_16_THEMEMANAGER, E_32_THEMEMANAGER),
23 => array(e_ADMIN.'upload.php', ADLAN_72, ADLAN_73, 'V', 3, E_16_UPLOADS, E_32_UPLOADS),
24 => array(e_ADMIN.'users.php', ADLAN_36, ADLAN_37, '4', 2, E_16_USER, E_32_USER),
24 => array(e_ADMIN.'users.php', ADLAN_36, ADLAN_37, '4|U1|U2|U3', 2, E_16_USER, E_32_USER),
25 => array(e_ADMIN.'userclass2.php', ADLAN_38, ADLAN_39, '4', 2, E_16_USERCLASS, E_32_USERCLASS),
26 => array(e_ADMIN.'language.php', ADLAN_132, ADLAN_133, '0', 1, E_16_LANGUAGE, E_32_LANGUAGE),
27 => array(e_ADMIN.'mailout.php', ADLAN_136, ADLAN_137, 'W', 2, E_16_MAIL, E_32_MAIL),

View File

@ -14,8 +14,9 @@
*
*/
require_once ('../class2.php');
if (!getperms('4'))
{
if (!getperms('4|U1|U2|U3') )
{
header('location:'.$e107->url->getUrl('core:core','main','action=index'));
exit;
}
@ -104,10 +105,7 @@ if (e_QUERY)
}
$from = varset($from,0);
$amount = 30;
if ($action == 'ranks')
{
showRanks();
}
// ------- Check for Bounces --------------
$bounce_act = '';
if (isset ($_POST['check_bounces']))
@ -568,27 +566,61 @@ echo "id= ".$id."<br />";
echo "from= ".$from."<br />";
echo "amount= ".$amount."<br />";
*/
$unverified = $sql->db_Count("user","(*)","WHERE user_ban = 2");
// $unverified = $sql->db_Count("user","(*)","WHERE user_ban = 2");
if (!e_QUERY)
$action = "main";
{
// Determine the default based on perms.
foreach($user->menuOptions as $act=>$arr)
{
if(getperms($arr['perm']))
{
$action = $act;
break;
}
}
}
switch ($action)
{
case "unverified" :
$user->show_existing_users($action,$sub_action,$id,$from,$amount);
break;
break;
case "options" :
$user->show_prefs();
break;
if(getperms('4|U2'))
{
$user->show_prefs();
}
break;
case "prune" :
$user->show_prune();
break;
break;
case "create" :
$userMethods->deleteExpired();
// Remove time-expired users
$user->user_add($user_data);
break;
if(getperms(('4|U1')))
{
$userMethods->deleteExpired(); // Remove time-expired users
$user->user_add($user_data);
}
break;
case "ranks" :
if(getperms(('4|U3')))
{
showRanks();
}
break;
default :
$user->show_existing_users($action,$sub_action,$id,$from,$amount);
if(getperms('4|U1'))
{
$user->show_existing_users($action,$sub_action,$id,$from,$amount);
}
}
require_once ("footer.php");
@ -601,10 +633,38 @@ class users
var $sortorderrev = "desc";
var $sortfield = "user_id";
var $from = 0;
var $menuOptions = array();
function users()
{
// Any changed need to be duplicated in /usersettings.php (end of the script)
$var = array();
$var ['main']['text'] = LAN_USER_LIST;
$var ['main']['link'] = e_ADMIN.'users.php';
$var ['main']['perm'] = '4|U1';
$var ['create']['text'] = LAN_USER_QUICKADD;
$var ['create']['link'] = e_ADMIN.'users.php?create';
$var ['create']['perm'] = '4|U1';
$var ['prune']['text'] = LAN_USER_PRUNE;
$var ['prune']['link'] = e_ADMIN.'users.php?prune';// Will be moved to "Schedule tasks"
$var ['prune']['perm'] = '4';
$var ['options']['text'] = LAN_OPTIONS;
$var ['options']['link'] = e_ADMIN.'users.php?options';
$var ['options']['perm'] = '4|U2';
$var ['ranks']['text'] = LAN_USER_RANKS;
$var ['ranks']['link'] = e_ADMIN.'users.php?ranks';
$var ['ranks']['perm'] = '4|U3';
// if ($unverified) // No longer needed - done with 'filter'.
// {
// $var ['unveri']['text'] = USRLAN_138." ($unverified)";
// $var ['unveri']['link'] = e_ADMIN.'users.php?unverified';
// }
$this->menuOptions = $var;
global $pref,$user_pref,$sql,$tp;
if (isset ($pref['admin_user_disp']))
{
@ -673,6 +733,13 @@ class users
}
}
$this->fields['options'] = array('title' => LAN_OPTIONS,'width' => '10%',"thclass" => "center last",'forced' => true);
if(!getperms('4'))
{
unset($this->fields['checkboxes']);
unset($this->fields['options']);
}
// print_a($this->fields);
}
@ -951,6 +1018,12 @@ class users
function showUserOptions($row)
{
if(!getperms('4'))
{
// return;
}
extract($row);
$text .= "<div>
@ -1142,7 +1215,7 @@ class users
$ns = e107::getRender();
$tp = e107::getParser();
$e107 = e107 :: getInstance();
$e107 = e107::getInstance();
$qry = $this->get_search_query();
$this->fieldpref = array_unique($this->fieldpref);
@ -1162,10 +1235,11 @@ class users
while ($row = $sql->db_Fetch())
{
$text .= "
<tr>
<td class='center' >".$frm->checkbox('user_selected[]',$row['user_id'])."</td>
<td class='center' style='width:5%; text-align:center' >{$row['user_id']}</td>";
$text .= "<tr>";
$text .= (isset($this->fields['checkboxes'])) ? "<td class='center' >".$frm->checkbox('user_selected[]',$row['user_id'])."</td>" : "";
$text .= "<td class='center' style='width:5%; text-align:center' >{$row['user_id']}</td>";
foreach ($this->fieldpref as $disp)
{
@ -1173,8 +1247,8 @@ class users
$text .= "<td ".$class." style='white-space:nowrap'>".$this->renderValue($disp,$row)."</td>\n";
}
$text .= "
<td style='width:30%' class='center'>".$this->showUserOptions($row)."</td></tr>\n";
$text .= (isset($this->fields['checkboxes'])) ? "<td style='width:30%' class='center'>".$this->showUserOptions($row)."</td>" : "";
$text .= "</tr>\n";
}
$text .= "</tbody>
@ -1210,7 +1284,7 @@ class users
$emessage = eMessage :: getInstance();
$total_cap = (isset ($_GET['srch'])) ? $user_total : $users;
$caption = USRLAN_77."&nbsp;&nbsp; (total: $total_cap)";
$caption = LAN_USER_LIST."&nbsp;&nbsp; (total: $total_cap)";
$ns->tablerender($caption,$emessage->render().$text);
}
@ -1290,6 +1364,11 @@ class users
function show_batch_options()
{
if(!getperms('4'))
{
return;
}
$e107 = e107::getInstance();
$classObj = $e107->getUserClass();
$frm = new e_form();
@ -1341,31 +1420,13 @@ class users
// Please duplicate any changes to this function also in /usersettings.php. (at the end of the script)
global $unverified;
// ##### Display options
if ($action == '')
{
$action = 'main';
}
// ##### Display options
$var ['main']['text'] = USRLAN_71;
$var ['main']['link'] = e_ADMIN.'users.php';
$var ['create']['text'] = USRLAN_72;
$var ['create']['link'] = e_ADMIN.'users.php?create';
$var ['prune']['text'] = USRLAN_73;
$var ['prune']['link'] = e_ADMIN.'users.php?prune';
$var ['options']['text'] = LAN_OPTIONS;
$var ['options']['link'] = e_ADMIN.'users.php?options';
if ($unverified)
{
$var ['unveri']['text'] = USRLAN_138." ($unverified)";
$var ['unveri']['link'] = e_ADMIN.'users.php?unverified';
}
$var ['ranks']['text'] = USRLAN_196;
$var ['ranks']['link'] = e_ADMIN.'users.php?ranks';
// $var['mailing']['text']= USRLAN_121;
// $var['mailing']['link']="mailout.php";
show_admin_menu(USRLAN_76,$action,$var);
show_admin_menu(LAN_USER_OPTIONS,$action,$this->menuOptions);
}
@ -1602,18 +1663,8 @@ class users
<td>
<a href='#set_perms' class='e-expandit'>Set Permissions</a>
<div class='e-hideme' id='set_perms' >\n";
$groupedList = $prm->getPermList('grouped');
foreach($groupedList as $section=>$list)
{
$text .= "\t\t<div class='field-section'><h4>".$prm->renderSectionDiz($section)."</h4>"; //XXX Lan - General
foreach($list as $key=>$diz)
{
$text .= $prm->checkb($key, '', $diz);
}
$text .= "</div>";
}
$text .= $prm->renderPermTable('grouped');
$text .= "</div></td>
</tr>\n";
@ -2204,10 +2255,12 @@ function updateRanks()
function showRanks()
{
global $pref,$emessage;
$frm = new e_form;
$frm = e107::getForm();
$ns = e107::getRender();
$e107 = e107::getInstance();
include_once (e_HANDLER.'file_class.php');
require_once (e_HANDLER.'message_handler.php');
/*
@ -2316,7 +2369,7 @@ function showRanks()
}
$text .= '</table>';
*/
$e107->ns->tablerender('',$emessage->render());
// $e107->ns->tablerender('Rank Calculation fields',$text);
$fields = array(
@ -2376,7 +2429,8 @@ function showRanks()
</td>
<td class='control'><input class='tbox' type='text' size='5' name='calc_lower[$k]' value='{$r['thresh']}' /></td>
<td class='control'><input type='checkbox' name='calc_pfx[$k]' value='1' {$pfx_checked} /></td>
<td class='control'>".RankImageDropdown($imageList,"calc_img[$k]",$r['image'])."&nbsp;".$frm->submit_image("delete_rank[{$r['id']}]",LAN_DELETE,'delete',USRLAN_213.": [{$r['name']}]?")."
<td class='control'>".RankImageDropdown($imageList,"calc_img[$k]",$r['image'])."&nbsp;".
$frm->submit_image("delete_rank[{$r['id']}]",LAN_DELETE,'delete',LAN_CONFIRMDEL.": [{$r['name']}]?")."
</td>
</tr>
";
@ -2401,7 +2455,9 @@ function showRanks()
</tr>
";
$text .= '</table></form>';
$e107->ns->tablerender('Ranks',$text);
$ns->tablerender(LAN_USER_RANKS,$emessage->render().$text);
include (e_ADMIN.'footer.php');
exit;
}

View File

@ -452,6 +452,14 @@ class e_form
return $ret;
}
/**
* checkbox
* parm $name
* parm $value
* parm $checked
* @return void
* @author
*/
function checkbox($name, $value, $checked = false, $options = array())
{
$options = $this->format_options('checkbox', $name, $options);

View File

@ -832,41 +832,67 @@ e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_administrator.php");
class e_userperms
{
protected $core_perms = array(
"1"=> ADMSLAN_19,
"2"=> ADMSLAN_20,
"3"=> ADMSLAN_21,
"4"=> ADMSLAN_22, // Moderate users/bans etc
"5"=> ADMSLAN_23, // create/edit custom pages
"J"=> ADMSLAN_41, // create/edit custom menus
"Q"=> ADMSLAN_24, // Manage download categories
"6"=> ADMSLAN_25, // Upload /manage files
"Y"=> ADMSLAN_67, // file inspector
"O"=> ADMSLAN_68, // notify
"7"=> ADMSLAN_26,
"8"=> ADMSLAN_27,
"C"=> ADMSLAN_64,
"9"=> ADMSLAN_28,
"W"=> ADMSLAN_65,
"D"=> ADMSLAN_29,
"E"=> ADMSLAN_30,
"F"=> ADMSLAN_31,
"G"=> ADMSLAN_32,
"S"=> ADMSLAN_33,
"T"=> ADMSLAN_34,
"V"=> ADMSLAN_35,
"X"=> ADMSLAN_66,
"A"=> ADMSLAN_36, // Configure Image Settings
"B"=> ADMSLAN_37,
"H"=> ADMSLAN_39,
"I"=> ADMSLAN_40,
"L"=> ADMSLAN_43,
"R"=> ADMSLAN_44,
"U"=> ADMSLAN_45,
"M"=> ADMSLAN_46,
"N"=> ADMSLAN_47,
// "Z"=> ADMSLAN_62,
// In the same order as admin navigation!
// Settings
"C" => array(ADMSLAN_64,E_16_CACHE, E_32_CACHE), // Clear the system cache
"F" => array(ADMSLAN_31,E_16_EMOTE, E_32_EMOTE), // Emoticons
"G" => array(ADMSLAN_32,E_16_FRONT, E_32_FRONT), // Front-Page Configuration
"T" => array(ADMSLAN_34,E_16_META, E_32_META), // Meta tags
"1" => array(ADMSLAN_19,E_16_PREFS, E_32_PREFS), // Alter Site Preferences
"X" => array(ADMSLAN_66,E_16_SEARCH, E_32_SEARCH), // Search
"I" => array(ADMSLAN_40,E_16_LINKS, E_32_LINKS), // Post SiteLinks
"8" => array(ADMSLAN_27,E_16_LINKS, E_32_LINKS), // Oversee SiteLink Categories
"L" => array(ADMSLAN_43,E_16_EURL, E_32_EURL), // Configure URLs
// Users
"3" => array(ADMSLAN_21,E_16_ADMIN, E_32_ADMIN), // Modify Admin perms
"4" => array(ADMSLAN_22,E_16_USER, E_32_USER), // Moderate users/bans etc
"U1" => array(LAN_USER_QUICKADD,E_16_USER, E_32_USER), // USRLAN_72, // "User: Quick Add User",
"U2" => array(LAN_USER_OPTIONS,E_16_USER, E_32_USER),
"U3" => array(LAN_USER_RANKS,E_16_USER, E_32_USER),
"W" => array(ADMSLAN_65,E_16_MAIL, E_32_MAIL), // Configure mail settings and mailout
// Content
"5" => array(ADMSLAN_23,E_16_CUST, E_32_CUST), // create/edit custom PAGES
"J" => array(ADMSLAN_41,E_16_CUST, E_32_CUST), // create/edit custom MENUS
"H" => array(ADMSLAN_39,E_16_NEWS, E_32_NEWS), // Post News
"N" => array(ADMSLAN_47,E_16_NEWS, E_32_NEWS), // Moderate submitted news
"V" => array(ADMSLAN_35,E_16_UPLOADS, E_32_UPLOADS), // Configure public file uploads
"M" => array(ADMSLAN_46,E_16_WELCOME, E_32_WELCOME), // Welcome Messages
// Tools
"Y" => array(ADMSLAN_67,E_16_INSPECT, E_32_INSPECT), // File inspector
"9" => array(ADMSLAN_28,E_16_MAINTAIN, E_32_MAINTAIN), // Take Down site for Maintenance
"O" => array(ADMSLAN_68,E_16_NOTIFY, E_32_NOTIFY), // Notify
"U" => array(ADMSLAN_45,E_16_CRON, E_32_CRON), // Schedule Tasks
"S" => array(ADMSLAN_33,E_16_ADMINLOG, E_32_ADMINLOG), // System Logging
// Manage
"B" => array(ADMSLAN_37,E_16_COMMENT, E_32_COMMENT), // Moderate Comments
"6" => array(ADMSLAN_25,E_16_FILE, E_32_FILE), // File-Manager - Upload /manage files -
"A" => array(ADMSLAN_36,E_16_IMAGES, E_32_IMAGES), // Media-Manager and Image Settings
"2" => array(ADMSLAN_20,E_16_MENUS, E_32_MENUS), // Alter Menus
// "D"=> ADMSLAN_29, // Manage Banners (deprecated - now a plugin)
// "E"=> ADMSLAN_30, // News feed headlines (deprecated - now a plugin)
// "K"=>
// "P" // Reserved for Plugins
// "Q"=> array(ADMSLAN_24), // Manage download categories (deprecated - now a plugin)
// "R"=> ADMSLAN_44, // Post Downloads (deprecated)
// "Z"=> ADMSLAN_62, // Plugin Manager.. included under Plugins category.
);
protected $plugin_perms = array();
@ -894,7 +920,7 @@ class e_userperms
$sql->db_Select("plugin", "*", "plugin_installflag='1'");
while ($row2 = $sql->db_Fetch())
{
$this->plugin_perms[("P".$row2['plugin_id'])] = LAN_PLUGIN." - ".$tp->toHTML($row2['plugin_name'], FALSE, 'RAWTEXT,defs');
$this->plugin_perms[("P".$row2['plugin_id'])] = $tp->toHTML($row2['plugin_name'], FALSE, 'RAWTEXT,defs');
}
asort($this->plugin_perms);
@ -966,17 +992,28 @@ class e_userperms
return array_merge($this->core_perms,$this->plugin_perms,$this->language_perms,$this->main_perms);
}
function checkb($arg, $perms, $label='')
function checkb($arg, $perms, $info='')
{
$frm = e107::getForm();
$par = "<div class='field-spacer'>";
$par .= $frm->checkbox('perms[]', $arg, getperms($arg, $perms));
if ($label)
if(is_array($info))
{
$par .= $frm->label($label,'perms[]', $arg);
$label = $info[0];
$icon_16 = $info[1];
$icon_32 = $info[2];
}
$par .= "</div>\n";
elseif($info)
{
$label = $info;
$icon_16 = "";
$icon_32 = "";
}
$par = "<tr>
<td style='text-align:center'>".$icon_16."</td>
<td style='text-align:center'>".$frm->checkbox('perms[]', $arg, getperms($arg, $perms))."</td>
<td>".$frm->label($label,'perms[]', $arg)."</td>
</tr>";
return $par;
}
@ -989,7 +1026,7 @@ class e_userperms
foreach($tmp as $p)
{
$ptext[] = $permdiz[$p];
$ptext[] = is_array($permdiz[$p]) ? $permdiz[$p][0] : $permdiz[$p];
}
$id = "id_".$uniqueID;
@ -1054,25 +1091,19 @@ class e_userperms
<tr>
<td class='label'>".ADMSLAN_18."</td>
<td class='control'>
";
$groupedList = $prm->getPermList('grouped');
foreach($groupedList as $section=>$list)
{
$text .= "\t\t<div class='field-section'><h4>".$prm->renderSectionDiz($section)."</h4>"; //XXX Lan - General
foreach($list as $key=>$diz)
{
$text .= $prm->checkb($key, $a_perms, $diz);
}
$text .= "</div>";
}
$text .= $this->renderPermTable('grouped',$a_perms);
$text .= "<div class='field-section'>
".$frm->admin_button('check_all', 'jstarget:perms', 'action', LAN_CHECKALL)."
".$frm->admin_button('uncheck_all', 'jstarget:perms', 'action', LAN_UNCHECKALL)."
</div>
</td>
</tr>
</tbody>
@ -1089,6 +1120,33 @@ class e_userperms
$ns->tablerender(ADMSLAN_52, $text);
}
function renderPermTable($type,$a_perms='')
{
$groupedList = $this->getPermList($type);
$text = "";
foreach($groupedList as $section=>$list)
{
$text .= "\t\t<table class='adminlist'>
<colgroup span='3'>
<col class='center' style='width:50px' />
<col style='width:50px' />
<col />
</colgroup>
<tbody><tr><td class='field-section' colspan='3'><h4>".$this->renderSectionDiz($section)."</h4></td></tr>"; //XXX Lan - General
// $text .= "\t\t<div class='field-section'><h4>".$prm->renderSectionDiz($section)."</h4>"; //XXX Lan - General
foreach($list as $key=>$diz)
{
$text .= $this->checkb($key, $a_perms, $diz);
}
$text .= "</tbody>
</table>";
}
return $text;
}
/**
* Update user (admin) permissions.
* NOTE: exit if $uid is not an integer or is 0.

View File

@ -352,4 +352,12 @@ define('LAN_UI_PREF_LABEL', 'Settings');
define('LAN_UI_DELETE_LABEL', 'Confirm Delete');
define('LAN_UI_DELETE_WARNING', 'You are about to delete <strong>%1$d</strong> records. Please confirm to continue.');
define("LAN_USER_LIST", "User List");
define("LAN_USER_QUICKADD","Quick Add User");
define("LAN_USER_PRUNE", "Prune Users");
define("LAN_USER_OPTIONS", "User Options");
define("LAN_USER_RANKS", "User Ranks");
// TODO - move e_form related LANS below, add new lan_form.php file (for both front/back-end)

View File

@ -44,11 +44,11 @@ define("ADMSLAN_32", "Configure front page content");
define("ADMSLAN_33", "Configure system logging");
define("ADMSLAN_34", "Configure meta tags");
define("ADMSLAN_35", "Configure public file uploads");
define("ADMSLAN_36", "Configure Image Settings");
define("ADMSLAN_36", "Media-Manager and image settings");
define("ADMSLAN_37", "Moderate comments");
// define("ADMSLAN_38", "Moderate/configure chatbox");
define("ADMSLAN_39", "Post news");
define("ADMSLAN_40", "Post links");
define("ADMSLAN_40", "Manage Sitelinks");
define("ADMSLAN_41", "Create/edit custom menus");
define("ADMSLAN_42", "Post reviews"); // - NOW PLUGIN
define("ADMSLAN_43", "Configure URLs");

View File

@ -69,7 +69,7 @@ define("USRLAN_55", "Prune");
define("USRLAN_56", "Deleted");
define("USRLAN_57", "Deleting un-activated members ...");
define("USRLAN_58", "file uploads are disabled in php.ini");
define("USRLAN_59", "Quick add user");
define("USRLAN_59", "Quick add user"); // FIXME duplicate?
define("USRLAN_60", "Add user");
define("USRLAN_61", "Display name");
define("USRLAN_62", "Password");
@ -80,13 +80,13 @@ define("USRLAN_66", "That display name already exists in the database, please ch
define("USRLAN_67", "The two passwords do not match");
define("USRLAN_68", "You left required field(s) blank");
define("USRLAN_69", "That doesn't appear to be a valid email address");
//define("USRLAN_70", "User created");
define("USRLAN_71", "Users Front Page");
define("USRLAN_72", "Quick Add User");
define("USRLAN_73", "Prune Users");
// define("USRLAN_75", "Options");
define("USRLAN_76", "User Options");
define("USRLAN_77", "Existing Users");
// define("USRLAN_70", "User created");
// define("USRLAN_71", "Users Front Page"); // Moved to lan_admin.php and renamed 'User List'
// define("USRLAN_72", "Quick Add User"); // Use: LAN_USER_QUICKADD
// define("USRLAN_73", "Prune Users"); // Use: LAN_USER_PRUNE
// define("USRLAN_75", "Options"); // Use: LAN_OPTIONS
// define("USRLAN_76", "User Options"); // Use: LAN_USER_OPTIONS
// define("USRLAN_77", "Existing Users"); // Use: LAN_USER_LIST;
define("USRLAN_78", "User Name");
define("USRLAN_79", "Status");
define("USRLAN_80", "Info");
@ -169,6 +169,8 @@ define('USRLAN_163', 'User ID --UID-- deleted');
define('USRLAN_164', 'User ID --UID-- name --NAME-- made admin');
define('USRLAN_165', 'User ID --UID-- name --NAME-- admin status revoked');
define('USRLAN_166', 'User ID --UID-- name --NAME-- approved');
//FIX ME USERLAN_160 - USERLAN_166 need to be reworked avoid duplication.
define('USRLAN_167', 'Validation email ID --ID-- resent to --NAME-- at --EMAIL--');
define('USRLAN_168', 'Re-send --COUNT-- validation emails');
define('USRLAN_169', 'Total --COUNT-- bounced emails deleted');
@ -200,7 +202,7 @@ define('USRLAN_194', '');
define('USRLAN_195', '');
//User Ranks phrases
define('USRLAN_196', 'User ranks');
// define('USRLAN_196', 'User ranks'); // use LAN_USER_RANKS
define('USRLAN_197', 'Source');
define('USRLAN_198', 'Field Name');
define('USRLAN_199', 'Operation');
@ -209,15 +211,15 @@ define('USRLAN_201', 'Number of comments');
define('USRLAN_202', 'Number of site visits');
define('USRLAN_203', 'Number of days member');
define('USRLAN_204', 'Core');
define('USRLAN_205', 'Plugin');
// define('USRLAN_205', 'Plugin'); // Use LAN_PLUGIN
define('USRLAN_206', 'Current Calculation');
define('USRLAN_207', 'Type');
define('USRLAN_208', 'Rank Name');
define('USRLAN_209', 'Lower Threshold');
define('USRLAN_210', 'Lang Prefix');
define('USRLAN_211', 'Rank Image');
define('USRLAN_212', 'User Rank');
define('USRLAN_213', 'Are you sure you want to delete this rank');
define('USRLAN_212', 'User Rank');
// define('USRLAN_213', 'Are you sure you want to delete this rank'); // use LAN_CONFIRMDEL
define('USRLAN_214', 'Add New Rank');
define('USRLAN_215', 'Update Ranks');
define('USRLAN_216', '--select image--');
@ -264,4 +266,5 @@ define('USRLAN_AS_1', 'Login as %s');
define('USRLAN_AS_2', 'Logout from %s account');
define('USRLAN_AS_3', 'You are already logged in as another user account. Please logout first.');
// Always search lan_admin.php before adding more.

View File

@ -745,27 +745,29 @@ function headerjs()
function usersettings_adminmenu()
{
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_users.php');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
if ($action == '')
{
$action = 'main';
}
// ##### Display options
$var ['main']['text'] = USRLAN_71;
$var = array();
$var ['main']['text'] = LAN_USER_LIST;
$var ['main']['link'] = e_ADMIN.'users.php';
$var ['create']['text'] = USRLAN_72;
$var ['main']['perm'] = '4';
$var ['create']['text'] = LAN_USER_QUICKADD;
$var ['create']['link'] = e_ADMIN.'users.php?create';
$var ['prune']['text'] = USRLAN_73;
$var ['prune']['link'] = e_ADMIN.'users.php?prune';
$var ['create']['perm'] = '4|U1';
$var ['prune']['text'] = LAN_USER_PRUNE;
$var ['prune']['link'] = e_ADMIN.'users.php?prune';// Will be moved to "Schedule tasks"
$var ['prune']['perm'] = '4';
$var ['options']['text'] = LAN_OPTIONS;
$var ['options']['link'] = e_ADMIN.'users.php?options';
if ($unverified)
{
$var ['unveri']['text'] = USRLAN_138." ($unverified)";
$var ['unveri']['link'] = e_ADMIN.'users.php?unverified';
}
$var ['rank']['text'] = USRLAN_196;
$var ['rank']['link'] = e_ADMIN.'users.php?ranks';
$var ['options']['perm'] = '4|U2';
$var ['ranks']['text'] = LAN_USER_RANKS;
$var ['ranks']['link'] = e_ADMIN.'users.php?ranks';
$var ['ranks']['perm'] = '4|U3';
// $var['mailing']['text']= USRLAN_121;
// $var['mailing']['link']="mailout.php";
show_admin_menu(USRLAN_76,$action,$var);