[UPDATE] hide/show qrcode page

This commit is contained in:
iAmShorty 2014-04-03 16:25:31 +02:00
parent 700c9f646b
commit 8b6f291384
5 changed files with 20 additions and 2 deletions

View File

@ -279,6 +279,13 @@ $aSettings['acl'][] = array(
'name' => 'acl_moot_forum', 'value' => $setting->getValue('acl_moot_forum'),
'tooltip' => 'Make the forum page private (users only) or public.'
);
$aSettings['acl'][] = array(
'display' => 'QRCode', 'type' => 'select',
'options' => array( 0 => 'Enabled', 1 => 'Disabled' ),
'default' => 0,
'name' => 'acl_qrcode', 'value' => $setting->getValue('acl_qrcode'),
'tooltip' => 'Hide or Show the QRCode Page.'
);
$aSettings['system'][] = array(
'display' => 'E-mail address for system error notifications', 'type' => 'text',
'size' => 25,

View File

@ -1,5 +1,15 @@
<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
if ($user->isAuthenticated()) $smarty->assign("CONTENT", "default.tpl");
switch($setting->getValue('acl_qrcode')) {
case '0':
if ($user->isAuthenticated()) {
$smarty->assign("CONTENT", "default.tpl");
}
break;
case '1':
$_SESSION['POPUP'][] = array('CONTENT' => 'Page currently disabled. Please try again later.', 'TYPE' => 'alert alert-danger');
$smarty->assign("CONTENT", "");
break;
}
?>

View File

@ -134,6 +134,7 @@ $aGlobal['acl']['about']['page'] = $setting->getValue('acl_about_page');
$aGlobal['acl']['contactform'] = $setting->getValue('acl_contactform');
$aGlobal['acl']['chat']['page'] = $setting->getValue('acl_chat_page', 2);
$aGlobal['acl']['moot']['forum'] = $setting->getValue('acl_moot_forum', 2);
$aGlobal['acl']['qrcode'] = $setting->getValue('acl_qrcode');
// We don't want these session infos cached
if (@$_SESSION['USERDATA']['id']) {

View File

@ -18,7 +18,7 @@
<li><a href="{$smarty.server.SCRIPT_NAME}?page=account&action=earnings"><i class="fa fa-money fa-fw"></i> Earnings</a></li>
{if !$GLOBAL.config.disable_notifications}<li><a href="{$smarty.server.SCRIPT_NAME}?page=account&action=notifications"><i class="fa fa-bullhorn fa-fw"></i> Notifications</a></li>{/if}
{if !$GLOBAL.config.disable_invitations}<li><a href="{$smarty.server.SCRIPT_NAME}?page=account&action=invitations"><i class="fa fa-users fa-fw"></i> Invitations</a></li>{/if}
<li><a href="{$smarty.server.SCRIPT_NAME}?page=account&action=qrcode"><i class="fa fa-qrcode fa-fw"></i> QR Codes</a></li>
{if !$GLOBAL.acl.qrcode}<li><a href="{$smarty.server.SCRIPT_NAME}?page=account&action=qrcode"><i class="fa fa-qrcode fa-fw"></i> QR Codes</a></li>{/if}
</ul>
<!-- /.nav-second-level -->
</li>