Global options can not be edited by non admin users anymore.

This commit is contained in:
Andre Lorbach 2008-07-22 16:57:36 +02:00
parent 662f7e3635
commit 4f339b3e0e
3 changed files with 19 additions and 13 deletions

View File

@ -55,15 +55,17 @@ InitFilterHelpers(); // Helpers for frontend filtering!
// Init admin langauge file now!
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' );
// --- Define Extra Stylesheet!
//$content['EXTRA_STYLESHEET'] = '<link rel="stylesheet" href="css/highlight.css" type="text/css">' . "\r\n";
//$content['EXTRA_STYLESHEET'] .= '<link rel="stylesheet" href="css/menu.css" type="text/css">';
// ---
// --- BEGIN Custom Code
// Check for changes first
if ( isset($_POST['op']) )
if ( isset($_SESSION['SESSION_ISADMIN']) && $_SESSION['SESSION_ISADMIN'] == 1 )
$content['EditAllowed'] = true;
else
$content['EditAllowed'] = false;
// Check for changes first | Abort if Edit is not allowed
if ( isset($_POST['op']) && $content['EditAllowed'] )
{
if ( $_POST['op'] == "edit" )
{
@ -135,8 +137,6 @@ if ($content['MiscShowDebugGridCounter'] == 1) { $content['MiscShowDebugGridCoun
if ($content['MiscShowPageRenderStats'] == 1) { $content['MiscShowPageRenderStats_checked'] = "checked"; } else { $content['MiscShowPageRenderStats_checked'] = ""; }
if ($content['MiscEnableGzipCompression'] == 1) { $content['MiscEnableGzipCompression_checked'] = "checked"; } else { $content['MiscEnableGzipCompression_checked'] = ""; }
if ($content['DebugUserLogin'] == 1) { $content['DebugUserLogin_checked'] = "checked"; } else { $content['DebugUserLogin_checked'] = ""; }
// ---
// --- BEGIN CREATE TITLE

View File

@ -51,13 +51,14 @@ $content['LN_GEN_GROUPONLYNAME'] = "Group '%1'";
// General Options
$content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options";
$content['LN_ADMIN_USERFRONTEND'] = "User specific frontend options";
$content['LN_ADMIN_MISC'] = "Miscellaneous Options";
$content['LN_GEN_SHOWDEBUGMSG'] = "Show Debug messages";
$content['LN_GEN_DEBUGGRIDCOUNTER'] = "Show Debug Gridcounter";
$content['LN_GEN_SHOWPAGERENDERSTATS'] = "Show Pagerenderstats";
$content['LN_GEN_ENABLEGZIP'] = "Enable GZIP Compressed Output";
$content['LN_GEN_DEBUGUSERLOGIN'] = "Debug Userlogin";
$content['LN_ADMIN_FRONTEND'] = "Frontend Options";
$content['LN_GEN_WEBSTYLE'] = "Default selected style";
$content['LN_GEN_SELLANGUAGE'] = "Default selected language";
$content['LN_GEN_PREPENDTITLE'] = "Prepend this string in title";
@ -73,7 +74,7 @@ $content['LN_GEN_SUCCESSFULLYSAVED'] = "The configuration Values have been succe
$content['LN_GEN_INTERNAL'] = "Internal";
$content['LN_GEN_DISABLED'] = "Function disabled";
$content['LN_GEN_CONFIGFILE'] = "Configuration File";
$content['LN_GEN_'] = "";
$content['LN_GEN_ACCESSDENIED'] = "Access denied to this function";
// User Center
$content['LN_USER_CENTER'] = "User Options";

View File

@ -12,7 +12,7 @@
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="600" align="center">
<tr>
<td colspan="2" align="center" valign="top" class="title">
<strong>{LN_ADMIN_FRONTEND}</strong></td>
<strong>{LN_ADMIN_GLOBFRONTEND}</strong></td>
</tr>
<tr>
<td align="left" class="cellmenu1" width="250" nowrap><b>{LN_GEN_WEBSTYLE}</b></td>
@ -95,11 +95,16 @@
<td align="left" class="cellmenu1" nowrap><b>{LN_GEN_DEBUGUSERLOGIN}</b></td>
<td align="right" class="line1" ><input type="checkbox" name="DebugUserLogin" value="yes" {DebugUserLogin_checked}></td>
</tr>
<tr>
<td align="center" colspan="2">
<!-- IF EditAllowed="true" -->
<input type="submit" value="{LN_ADMIN_SEND}">
<input type="hidden" name="op" value="edit">
<!-- ENDIF EditAllowed="true" -->
<!-- IF EditAllowed!="true" -->
<input type="submit" value="{LN_GEN_ACCESSDENIED}" disabled>
<!-- ENDIF EditAllowed!="true" -->
</td>
</tr>
</table>