1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +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), 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), 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), 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), 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), 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), 27 => array(e_ADMIN.'mailout.php', ADLAN_136, ADLAN_137, 'W', 2, E_16_MAIL, E_32_MAIL),

View File

@@ -14,7 +14,8 @@
* *
*/ */
require_once ('../class2.php'); require_once ('../class2.php');
if (!getperms('4'))
if (!getperms('4|U1|U2|U3') )
{ {
header('location:'.$e107->url->getUrl('core:core','main','action=index')); header('location:'.$e107->url->getUrl('core:core','main','action=index'));
exit; exit;
@@ -104,10 +105,7 @@ if (e_QUERY)
} }
$from = varset($from,0); $from = varset($from,0);
$amount = 30; $amount = 30;
if ($action == 'ranks')
{
showRanks();
}
// ------- Check for Bounces -------------- // ------- Check for Bounces --------------
$bounce_act = ''; $bounce_act = '';
if (isset ($_POST['check_bounces'])) if (isset ($_POST['check_bounces']))
@@ -568,28 +566,62 @@ echo "id= ".$id."<br />";
echo "from= ".$from."<br />"; echo "from= ".$from."<br />";
echo "amount= ".$amount."<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) 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) switch ($action)
{ {
case "unverified" : case "unverified" :
$user->show_existing_users($action,$sub_action,$id,$from,$amount); $user->show_existing_users($action,$sub_action,$id,$from,$amount);
break; break;
case "options" : case "options" :
if(getperms('4|U2'))
{
$user->show_prefs(); $user->show_prefs();
}
break; break;
case "prune" : case "prune" :
$user->show_prune(); $user->show_prune();
break; break;
case "create" : case "create" :
$userMethods->deleteExpired(); if(getperms(('4|U1')))
// Remove time-expired users {
$userMethods->deleteExpired(); // Remove time-expired users
$user->user_add($user_data); $user->user_add($user_data);
}
break; break;
case "ranks" :
if(getperms(('4|U3')))
{
showRanks();
}
break;
default : default :
if(getperms('4|U1'))
{
$user->show_existing_users($action,$sub_action,$id,$from,$amount); $user->show_existing_users($action,$sub_action,$id,$from,$amount);
} }
}
require_once ("footer.php"); require_once ("footer.php");
@@ -601,10 +633,38 @@ class users
var $sortorderrev = "desc"; var $sortorderrev = "desc";
var $sortfield = "user_id"; var $sortfield = "user_id";
var $from = 0; var $from = 0;
var $menuOptions = array();
function users() 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; global $pref,$user_pref,$sql,$tp;
if (isset ($pref['admin_user_disp'])) 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); $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) function showUserOptions($row)
{ {
if(!getperms('4'))
{
// return;
}
extract($row); extract($row);
$text .= "<div> $text .= "<div>
@@ -1162,10 +1235,11 @@ class users
while ($row = $sql->db_Fetch()) while ($row = $sql->db_Fetch())
{ {
$text .= " $text .= "<tr>";
<tr>
<td class='center' >".$frm->checkbox('user_selected[]',$row['user_id'])."</td> $text .= (isset($this->fields['checkboxes'])) ? "<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 .= "<td class='center' style='width:5%; text-align:center' >{$row['user_id']}</td>";
foreach ($this->fieldpref as $disp) 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 ".$class." style='white-space:nowrap'>".$this->renderValue($disp,$row)."</td>\n";
} }
$text .= " $text .= (isset($this->fields['checkboxes'])) ? "<td style='width:30%' class='center'>".$this->showUserOptions($row)."</td>" : "";
<td style='width:30%' class='center'>".$this->showUserOptions($row)."</td></tr>\n"; $text .= "</tr>\n";
} }
$text .= "</tbody> $text .= "</tbody>
@@ -1210,7 +1284,7 @@ class users
$emessage = eMessage :: getInstance(); $emessage = eMessage :: getInstance();
$total_cap = (isset ($_GET['srch'])) ? $user_total : $users; $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); $ns->tablerender($caption,$emessage->render().$text);
} }
@@ -1290,6 +1364,11 @@ class users
function show_batch_options() function show_batch_options()
{ {
if(!getperms('4'))
{
return;
}
$e107 = e107::getInstance(); $e107 = e107::getInstance();
$classObj = $e107->getUserClass(); $classObj = $e107->getUserClass();
$frm = new e_form(); $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) // Please duplicate any changes to this function also in /usersettings.php. (at the end of the script)
global $unverified;
// ##### Display options // ##### Display options
if ($action == '') if ($action == '')
{ {
$action = 'main'; $action = 'main';
} }
// ##### Display options
$var ['main']['text'] = USRLAN_71; show_admin_menu(LAN_USER_OPTIONS,$action,$this->menuOptions);
$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);
} }
@@ -1603,17 +1664,7 @@ class users
<a href='#set_perms' class='e-expandit'>Set Permissions</a> <a href='#set_perms' class='e-expandit'>Set Permissions</a>
<div class='e-hideme' id='set_perms' >\n"; <div class='e-hideme' id='set_perms' >\n";
$groupedList = $prm->getPermList('grouped'); $text .= $prm->renderPermTable('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 .= "</div></td> $text .= "</div></td>
</tr>\n"; </tr>\n";
@@ -2204,10 +2255,12 @@ function updateRanks()
function showRanks() function showRanks()
{ {
global $pref,$emessage; global $pref,$emessage;
$frm = new e_form;
$frm = e107::getForm();
$ns = e107::getRender();
$e107 = e107::getInstance(); $e107 = e107::getInstance();
include_once (e_HANDLER.'file_class.php');
require_once (e_HANDLER.'message_handler.php'); require_once (e_HANDLER.'message_handler.php');
/* /*
@@ -2316,7 +2369,7 @@ function showRanks()
} }
$text .= '</table>'; $text .= '</table>';
*/ */
$e107->ns->tablerender('',$emessage->render());
// $e107->ns->tablerender('Rank Calculation fields',$text); // $e107->ns->tablerender('Rank Calculation fields',$text);
$fields = array( $fields = array(
@@ -2376,7 +2429,8 @@ function showRanks()
</td> </td>
<td class='control'><input class='tbox' type='text' size='5' name='calc_lower[$k]' value='{$r['thresh']}' /></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'><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> </td>
</tr> </tr>
"; ";
@@ -2401,7 +2455,9 @@ function showRanks()
</tr> </tr>
"; ";
$text .= '</table></form>'; $text .= '</table></form>';
$e107->ns->tablerender('Ranks',$text);
$ns->tablerender(LAN_USER_RANKS,$emessage->render().$text);
include (e_ADMIN.'footer.php'); include (e_ADMIN.'footer.php');
exit; exit;
} }

View File

@@ -452,6 +452,14 @@ class e_form
return $ret; return $ret;
} }
/**
* checkbox
* parm $name
* parm $value
* parm $checked
* @return void
* @author
*/
function checkbox($name, $value, $checked = false, $options = array()) function checkbox($name, $value, $checked = false, $options = array())
{ {
$options = $this->format_options('checkbox', $name, $options); $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 class e_userperms
{ {
protected $core_perms = array( protected $core_perms = array(
"1"=> ADMSLAN_19, // In the same order as admin navigation!
"2"=> ADMSLAN_20,
"3"=> ADMSLAN_21, // Settings
"4"=> ADMSLAN_22, // Moderate users/bans etc "C" => array(ADMSLAN_64,E_16_CACHE, E_32_CACHE), // Clear the system cache
"5"=> ADMSLAN_23, // create/edit custom pages "F" => array(ADMSLAN_31,E_16_EMOTE, E_32_EMOTE), // Emoticons
"J"=> ADMSLAN_41, // create/edit custom menus "G" => array(ADMSLAN_32,E_16_FRONT, E_32_FRONT), // Front-Page Configuration
"Q"=> ADMSLAN_24, // Manage download categories "T" => array(ADMSLAN_34,E_16_META, E_32_META), // Meta tags
"6"=> ADMSLAN_25, // Upload /manage files
"Y"=> ADMSLAN_67, // file inspector "1" => array(ADMSLAN_19,E_16_PREFS, E_32_PREFS), // Alter Site Preferences
"O"=> ADMSLAN_68, // notify "X" => array(ADMSLAN_66,E_16_SEARCH, E_32_SEARCH), // Search
"7"=> ADMSLAN_26, "I" => array(ADMSLAN_40,E_16_LINKS, E_32_LINKS), // Post SiteLinks
"8"=> ADMSLAN_27, "8" => array(ADMSLAN_27,E_16_LINKS, E_32_LINKS), // Oversee SiteLink Categories
"C"=> ADMSLAN_64, "L" => array(ADMSLAN_43,E_16_EURL, E_32_EURL), // Configure URLs
"9"=> ADMSLAN_28,
"W"=> ADMSLAN_65, // Users
"D"=> ADMSLAN_29, "3" => array(ADMSLAN_21,E_16_ADMIN, E_32_ADMIN), // Modify Admin perms
"E"=> ADMSLAN_30, "4" => array(ADMSLAN_22,E_16_USER, E_32_USER), // Moderate users/bans etc
"F"=> ADMSLAN_31, "U1" => array(LAN_USER_QUICKADD,E_16_USER, E_32_USER), // USRLAN_72, // "User: Quick Add User",
"G"=> ADMSLAN_32, "U2" => array(LAN_USER_OPTIONS,E_16_USER, E_32_USER),
"S"=> ADMSLAN_33, "U3" => array(LAN_USER_RANKS,E_16_USER, E_32_USER),
"T"=> ADMSLAN_34, "W" => array(ADMSLAN_65,E_16_MAIL, E_32_MAIL), // Configure mail settings and mailout
"V"=> ADMSLAN_35,
"X"=> ADMSLAN_66, // Content
"A"=> ADMSLAN_36, // Configure Image Settings
"B"=> ADMSLAN_37, "5" => array(ADMSLAN_23,E_16_CUST, E_32_CUST), // create/edit custom PAGES
"H"=> ADMSLAN_39, "J" => array(ADMSLAN_41,E_16_CUST, E_32_CUST), // create/edit custom MENUS
"I"=> ADMSLAN_40, "H" => array(ADMSLAN_39,E_16_NEWS, E_32_NEWS), // Post News
"L"=> ADMSLAN_43, "N" => array(ADMSLAN_47,E_16_NEWS, E_32_NEWS), // Moderate submitted news
"R"=> ADMSLAN_44, "V" => array(ADMSLAN_35,E_16_UPLOADS, E_32_UPLOADS), // Configure public file uploads
"U"=> ADMSLAN_45, "M" => array(ADMSLAN_46,E_16_WELCOME, E_32_WELCOME), // Welcome Messages
"M"=> ADMSLAN_46,
"N"=> ADMSLAN_47, // Tools
// "Z"=> ADMSLAN_62, "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(); protected $plugin_perms = array();
@@ -894,7 +920,7 @@ class e_userperms
$sql->db_Select("plugin", "*", "plugin_installflag='1'"); $sql->db_Select("plugin", "*", "plugin_installflag='1'");
while ($row2 = $sql->db_Fetch()) 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); 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); 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(); $frm = e107::getForm();
$par = "<div class='field-spacer'>"; if(is_array($info))
$par .= $frm->checkbox('perms[]', $arg, getperms($arg, $perms));
if ($label)
{ {
$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; return $par;
} }
@@ -989,7 +1026,7 @@ class e_userperms
foreach($tmp as $p) foreach($tmp as $p)
{ {
$ptext[] = $permdiz[$p]; $ptext[] = is_array($permdiz[$p]) ? $permdiz[$p][0] : $permdiz[$p];
} }
$id = "id_".$uniqueID; $id = "id_".$uniqueID;
@@ -1055,24 +1092,18 @@ class e_userperms
<td class='label'>".ADMSLAN_18."</td> <td class='label'>".ADMSLAN_18."</td>
<td class='control'> <td class='control'>
"; ";
$groupedList = $prm->getPermList('grouped'); $text .= $this->renderPermTable('grouped',$a_perms);
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 .= "<div class='field-section'> $text .= "<div class='field-section'>
".$frm->admin_button('check_all', 'jstarget:perms', 'action', LAN_CHECKALL)." ".$frm->admin_button('check_all', 'jstarget:perms', 'action', LAN_CHECKALL)."
".$frm->admin_button('uncheck_all', 'jstarget:perms', 'action', LAN_UNCHECKALL)." ".$frm->admin_button('uncheck_all', 'jstarget:perms', 'action', LAN_UNCHECKALL)."
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -1089,6 +1120,33 @@ class e_userperms
$ns->tablerender(ADMSLAN_52, $text); $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. * Update user (admin) permissions.
* NOTE: exit if $uid is not an integer or is 0. * 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_LABEL', 'Confirm Delete');
define('LAN_UI_DELETE_WARNING', 'You are about to delete <strong>%1$d</strong> records. Please confirm to continue.'); 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) // 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_33", "Configure system logging");
define("ADMSLAN_34", "Configure meta tags"); define("ADMSLAN_34", "Configure meta tags");
define("ADMSLAN_35", "Configure public file uploads"); 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_37", "Moderate comments");
// define("ADMSLAN_38", "Moderate/configure chatbox"); // define("ADMSLAN_38", "Moderate/configure chatbox");
define("ADMSLAN_39", "Post news"); define("ADMSLAN_39", "Post news");
define("ADMSLAN_40", "Post links"); define("ADMSLAN_40", "Manage Sitelinks");
define("ADMSLAN_41", "Create/edit custom menus"); define("ADMSLAN_41", "Create/edit custom menus");
define("ADMSLAN_42", "Post reviews"); // - NOW PLUGIN define("ADMSLAN_42", "Post reviews"); // - NOW PLUGIN
define("ADMSLAN_43", "Configure URLs"); define("ADMSLAN_43", "Configure URLs");

View File

@@ -69,7 +69,7 @@ define("USRLAN_55", "Prune");
define("USRLAN_56", "Deleted"); define("USRLAN_56", "Deleted");
define("USRLAN_57", "Deleting un-activated members ..."); define("USRLAN_57", "Deleting un-activated members ...");
define("USRLAN_58", "file uploads are disabled in php.ini"); 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_60", "Add user");
define("USRLAN_61", "Display name"); define("USRLAN_61", "Display name");
define("USRLAN_62", "Password"); define("USRLAN_62", "Password");
@@ -81,12 +81,12 @@ define("USRLAN_67", "The two passwords do not match");
define("USRLAN_68", "You left required field(s) blank"); define("USRLAN_68", "You left required field(s) blank");
define("USRLAN_69", "That doesn't appear to be a valid email address"); define("USRLAN_69", "That doesn't appear to be a valid email address");
// define("USRLAN_70", "User created"); // define("USRLAN_70", "User created");
define("USRLAN_71", "Users Front Page"); // define("USRLAN_71", "Users Front Page"); // Moved to lan_admin.php and renamed 'User List'
define("USRLAN_72", "Quick Add User"); // define("USRLAN_72", "Quick Add User"); // Use: LAN_USER_QUICKADD
define("USRLAN_73", "Prune Users"); // define("USRLAN_73", "Prune Users"); // Use: LAN_USER_PRUNE
// define("USRLAN_75", "Options"); // define("USRLAN_75", "Options"); // Use: LAN_OPTIONS
define("USRLAN_76", "User Options"); // define("USRLAN_76", "User Options"); // Use: LAN_USER_OPTIONS
define("USRLAN_77", "Existing Users"); // define("USRLAN_77", "Existing Users"); // Use: LAN_USER_LIST;
define("USRLAN_78", "User Name"); define("USRLAN_78", "User Name");
define("USRLAN_79", "Status"); define("USRLAN_79", "Status");
define("USRLAN_80", "Info"); 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_164', 'User ID --UID-- name --NAME-- made admin');
define('USRLAN_165', 'User ID --UID-- name --NAME-- admin status revoked'); define('USRLAN_165', 'User ID --UID-- name --NAME-- admin status revoked');
define('USRLAN_166', 'User ID --UID-- name --NAME-- approved'); 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_167', 'Validation email ID --ID-- resent to --NAME-- at --EMAIL--');
define('USRLAN_168', 'Re-send --COUNT-- validation emails'); define('USRLAN_168', 'Re-send --COUNT-- validation emails');
define('USRLAN_169', 'Total --COUNT-- bounced emails deleted'); define('USRLAN_169', 'Total --COUNT-- bounced emails deleted');
@@ -200,7 +202,7 @@ define('USRLAN_194', '');
define('USRLAN_195', ''); define('USRLAN_195', '');
//User Ranks phrases //User Ranks phrases
define('USRLAN_196', 'User ranks'); // define('USRLAN_196', 'User ranks'); // use LAN_USER_RANKS
define('USRLAN_197', 'Source'); define('USRLAN_197', 'Source');
define('USRLAN_198', 'Field Name'); define('USRLAN_198', 'Field Name');
define('USRLAN_199', 'Operation'); define('USRLAN_199', 'Operation');
@@ -209,7 +211,7 @@ define('USRLAN_201', 'Number of comments');
define('USRLAN_202', 'Number of site visits'); define('USRLAN_202', 'Number of site visits');
define('USRLAN_203', 'Number of days member'); define('USRLAN_203', 'Number of days member');
define('USRLAN_204', 'Core'); define('USRLAN_204', 'Core');
define('USRLAN_205', 'Plugin'); // define('USRLAN_205', 'Plugin'); // Use LAN_PLUGIN
define('USRLAN_206', 'Current Calculation'); define('USRLAN_206', 'Current Calculation');
define('USRLAN_207', 'Type'); define('USRLAN_207', 'Type');
define('USRLAN_208', 'Rank Name'); define('USRLAN_208', 'Rank Name');
@@ -217,7 +219,7 @@ define('USRLAN_209', 'Lower Threshold');
define('USRLAN_210', 'Lang Prefix'); define('USRLAN_210', 'Lang Prefix');
define('USRLAN_211', 'Rank Image'); define('USRLAN_211', 'Rank Image');
define('USRLAN_212', 'User Rank'); define('USRLAN_212', 'User Rank');
define('USRLAN_213', 'Are you sure you want to delete this rank'); // define('USRLAN_213', 'Are you sure you want to delete this rank'); // use LAN_CONFIRMDEL
define('USRLAN_214', 'Add New Rank'); define('USRLAN_214', 'Add New Rank');
define('USRLAN_215', 'Update Ranks'); define('USRLAN_215', 'Update Ranks');
define('USRLAN_216', '--select image--'); 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_2', 'Logout from %s account');
define('USRLAN_AS_3', 'You are already logged in as another user account. Please logout first.'); 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() 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 == '') if ($action == '')
{ {
$action = 'main'; $action = 'main';
} }
// ##### Display options // ##### Display options
$var ['main']['text'] = USRLAN_71; $var = array();
$var ['main']['text'] = LAN_USER_LIST;
$var ['main']['link'] = e_ADMIN.'users.php'; $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 ['create']['link'] = e_ADMIN.'users.php?create';
$var ['prune']['text'] = USRLAN_73; $var ['create']['perm'] = '4|U1';
$var ['prune']['link'] = e_ADMIN.'users.php?prune'; $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']['text'] = LAN_OPTIONS;
$var ['options']['link'] = e_ADMIN.'users.php?options'; $var ['options']['link'] = e_ADMIN.'users.php?options';
if ($unverified) $var ['options']['perm'] = '4|U2';
{ $var ['ranks']['text'] = LAN_USER_RANKS;
$var ['unveri']['text'] = USRLAN_138." ($unverified)"; $var ['ranks']['link'] = e_ADMIN.'users.php?ranks';
$var ['unveri']['link'] = e_ADMIN.'users.php?unverified'; $var ['ranks']['perm'] = '4|U3';
}
$var ['rank']['text'] = USRLAN_196;
$var ['rank']['link'] = e_ADMIN.'users.php?ranks';
// $var['mailing']['text']= USRLAN_121; // $var['mailing']['text']= USRLAN_121;
// $var['mailing']['link']="mailout.php"; // $var['mailing']['link']="mailout.php";
show_admin_menu(USRLAN_76,$action,$var); show_admin_menu(USRLAN_76,$action,$var);