diff --git a/e107_admin/ad_links.php b/e107_admin/ad_links.php index c88d7d9c9..ba92785fb 100644 --- a/e107_admin/ad_links.php +++ b/e107_admin/ad_links.php @@ -9,8 +9,8 @@ * Admin Navigation * * $Source: /cvs_backup/e107_0.8/e107_admin/ad_links.php,v $ - * $Revision: 1.12 $ - * $Date: 2009-07-15 09:50:05 $ + * $Revision: 1.13 $ + * $Date: 2009-08-05 14:22:15 $ * $Author: e107coders $ */ @@ -551,7 +551,7 @@ $array_functions = array( 2 => array(e_ADMIN.'banlist.php', ADLAN_34, ADLAN_35, '4', 2, E_16_BANLIST, E_32_BANLIST), 3 => array(e_ADMIN.'banner.php', ADLAN_54, ADLAN_55, 'D', 3, E_16_BANNER, E_32_BANNER), 4 => array(e_ADMIN.'cache.php', ADLAN_74, ADLAN_75, 'C', 1, E_16_CACHE, E_32_CACHE), - 5 => array(e_ADMIN.'cpage.php', ADLAN_42, ADLAN_43, '5', 3, E_16_CUST, E_32_CUST), + 5 => array(e_ADMIN.'cpage.php', ADLAN_42, ADLAN_43, '5|J', 3, E_16_CUST, E_32_CUST), 6 => array(e_ADMIN.'db.php', ADLAN_44, ADLAN_45, '0', 4, E_16_DATAB, E_32_DATAB), 7 => array(e_ADMIN.'download.php', ADLAN_24, ADLAN_25, 'R', 3, E_16_DOWNL, E_32_DOWNL), 8 => array(e_ADMIN.'emoticon.php', ADLAN_58, ADLAN_59, 'F', 1, E_16_EMOTE, E_32_EMOTE), diff --git a/e107_admin/administrator.php b/e107_admin/administrator.php index 4077313cb..5d7a2b584 100644 --- a/e107_admin/administrator.php +++ b/e107_admin/administrator.php @@ -9,8 +9,8 @@ * Administrators Management * * $Source: /cvs_backup/e107_0.8/e107_admin/administrator.php,v $ - * $Revision: 1.12 $ - * $Date: 2009-07-23 15:21:41 $ + * $Revision: 1.13 $ + * $Date: 2009-08-05 14:22:15 $ * $Author: e107coders $ * */ @@ -239,7 +239,8 @@ function edit_administrator($row) $text .= checkb("2", $a_perms, ADMSLAN_20); // Alter Menus $text .= checkb("3", $a_perms, ADMSLAN_21); // Modify administrator permissions $text .= checkb("4", $a_perms, ADMSLAN_22); // Moderate users/bans etc - $text .= checkb("5", $a_perms, ADMSLAN_23); // create/edit custom pages/menus + $text .= checkb("5", $a_perms, ADMSLAN_23); // create/edit custom pages + $text .= checkb("J", $a_perms, ADMSLAN_41); // create/edit custom menus $text .= checkb("Q", $a_perms, ADMSLAN_24); // Manage download categories $text .= checkb("6", $a_perms, ADMSLAN_25); // Upload /manage files $text .= checkb("Y", $a_perms, ADMSLAN_67); // file inspector @@ -262,7 +263,7 @@ function edit_administrator($row) $text .= checkb("B", $a_perms, ADMSLAN_37); // Moderate comments $text .= checkb("H", $a_perms, ADMSLAN_39); // Post news $text .= checkb("I", $a_perms, ADMSLAN_40); // Post links -// $text .= checkb("J", $a_perms, ADMSLAN_41); // Post articles - NOW PLUGIN + // $text .= checkb("K", $a_perms, ADMSLAN_42); // Post reviews - NOW PLUGIN $text .= checkb("L", $a_perms, ADMSLAN_43); // Configure URLs $text .= checkb("R", $a_perms, ADMSLAN_44); // Post downloads @@ -376,7 +377,9 @@ function renderperms($perm, $id) $pt["2"] = ADMSLAN_20; $pt["3"] = ADMSLAN_21; $pt["4"] = ADMSLAN_22; // Moderate users/bans etc - $pt["5"] = ADMSLAN_23; // create/edit custom pages/menus + $pt["5"] = ADMSLAN_23; // create/edit custom pages + $pt["J"] = ADMSLAN_41; // create/edit custom menus + $pt["Q"] = ADMSLAN_24; // Manage download categories $pt["6"] = ADMSLAN_25; // Upload /manage files $pt["Y"] = ADMSLAN_67; // file inspector diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index c5512cf52..c14ba5410 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -9,15 +9,15 @@ * Custom Menus/Pages Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $ - * $Revision: 1.19 $ - * $Date: 2009-08-03 18:36:24 $ - * $Author: marj_nl_fr $ + * $Revision: 1.20 $ + * $Date: 2009-08-05 14:22:15 $ + * $Author: e107coders $ * */ require_once("../class2.php"); -if (!getperms("5")) { header("location:".e_BASE."index.php"); exit; } +if (!getperms("5|J")) { header("location:".e_BASE."index.php"); exit; } $e_sub_cat = 'custom'; @@ -82,7 +82,15 @@ if (isset($_POST['saveOptions'])) if(!e_QUERY) { - $page->showExistingPages(); + if(getperms("5")) + { + $page->showExistingPages(); + } + else + { + $page->showExistingPages('menus'); + } + } else { @@ -130,33 +138,19 @@ class page // -------------------------------------------------------------------------- - function showExistingPages() + function menusPage() + { + if(!getperms("J")){ return; } + return $this->showExistingPages('menus'); + } + +// -------------------------------------------------------------------------- + + function showExistingPages($mode=FALSE) { global $sql, $e107, $emessage, $frm, $pref; -/* $text = " -
-
- ".CUSLAN_5." - - - - - - - - - - - - - - - - - ";*/ - - $text .= " + $text = "
".CUSLAN_5."
".ID."".CUSLAN_1."".CUSLAN_2."".CUSLAN_3."
". @@ -165,7 +159,19 @@ class page ""; - if(!$sql->db_Select("page", "*", "ORDER BY page_datestamp DESC", "nowhere")) + if($mode=='menus') + { + $qry = "page_theme !='' "; + $caption = CUSLAN_50; + } + else + { + if(!getperms("5")){ return; } + $qry = "page_theme ='' "; + $caption = CUSLAN_5; + } + + if(!$sql->db_Select("page", "*", $qry." ORDER BY page_datestamp DESC")) { $text .= " @@ -214,7 +220,7 @@ class page "; - $e107->ns->tablerender(CUSLAN_5, $emessage->render().$text); + $e107->ns->tablerender($caption, $emessage->render().$text); } @@ -591,19 +597,27 @@ class page { if ($action == "") { - $action = "main"; + $action = (getperms('5')) ? "pages" : "menus"; } - $var['main']['text'] = CUSLAN_11; - $var['main']['link'] = e_SELF; + $var['pages']['text'] = CUSLAN_48; + $var['pages']['link'] = e_SELF; + $var['pages']['perm'] = 5; + + $var['menus']['text'] = CUSLAN_49; + $var['menus']['link'] = e_SELF."?menus"; + $var['menus']['perm'] = "J"; $var['create']['text'] = CUSLAN_12; $var['create']['link'] = e_SELF."?create"; + $var['create']['perm'] = 5; $var['createm']['text'] = CUSLAN_31; $var['createm']['link'] = e_SELF."?createm"; + $var['createm']['perm'] = "J"; $var['options']['text'] = LAN_OPTIONS; $var['options']['link'] = e_SELF."?options"; + $var['options']['perm'] = "0"; e_admin_menu(CUSLAN_33, $action, $var); } diff --git a/e107_languages/English/admin/lan_administrator.php b/e107_languages/English/admin/lan_administrator.php index 2e9df28da..6e9ed2533 100644 --- a/e107_languages/English/admin/lan_administrator.php +++ b/e107_languages/English/admin/lan_administrator.php @@ -9,8 +9,8 @@ * Admin Language File * * $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_administrator.php,v $ - * $Revision: 1.7 $ - * $Date: 2009-07-07 22:55:13 $ + * $Revision: 1.8 $ + * $Date: 2009-08-05 14:22:15 $ * $Author: e107coders $ */ //define("ADMSLAN_0", "New user/admin entry created for"); - no references found @@ -31,7 +31,7 @@ define("ADMSLAN_19", "Alter site preferences"); define("ADMSLAN_20", "Alter Menus"); define("ADMSLAN_21", "Modify administrator permissions"); define("ADMSLAN_22", "Moderate users/bans etc"); -define("ADMSLAN_23", "Create/edit custom pages/menus"); +define("ADMSLAN_23", "Create/edit custom pages"); define("ADMSLAN_24", "Manage download categories"); define("ADMSLAN_25", "Upload /manage files"); define("ADMSLAN_26", "Oversee news categories"); @@ -49,7 +49,7 @@ define("ADMSLAN_37", "Moderate comments"); // define("ADMSLAN_38", "Moderate/configure chatbox"); define("ADMSLAN_39", "Post news"); define("ADMSLAN_40", "Post links"); -//define("ADMSLAN_41", "Post articles"); - NOW PLUGIN +define("ADMSLAN_41", "Create/edit custom menus"); //define("ADMSLAN_42", "Post reviews"); - NOW PLUGIN define("ADMSLAN_43", "Configure URLs"); define("ADMSLAN_44", "Post downloads"); diff --git a/e107_languages/English/admin/lan_cpage.php b/e107_languages/English/admin/lan_cpage.php index c3273d366..239b7d346 100644 --- a/e107_languages/English/admin/lan_cpage.php +++ b/e107_languages/English/admin/lan_cpage.php @@ -1,7 +1,7 @@ \ No newline at end of file