mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-23 20:58:46 -05:00
Fix to hide subscriber menu when not configured
This commit is contained in:
parent
55f92ead6d
commit
0b3e617d96
30
template.php
30
template.php
@ -27,21 +27,23 @@ class Template{
|
||||
if ( 'admin' == $str_url ) {
|
||||
$strSubsMenu = '';
|
||||
} else {
|
||||
// Subscriber menu is to be shown...
|
||||
$strSubsMenu = '<ul class="nav navbar-nav mr-auto">';
|
||||
// If subscriber is not logged on, display subscriber menus
|
||||
if ( (!isset($_SESSION['subscriber_valid'])) || false == $_SESSION['subscriber_valid'] ) {
|
||||
$strSubsMenu .= '<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"><span class="glyphicon glyphicon-th"></span> '. _('Subscribe').'</a>
|
||||
<ul class="dropdown-menu ">';
|
||||
if (SUBSCRIBE_EMAIL || SUBSCRIBE_TELEGRAM ) {
|
||||
// Subscriber menu is to be shown...
|
||||
$strSubsMenu = '<ul class="nav navbar-nav mr-auto">';
|
||||
// If subscriber is not logged on, display subscriber menus
|
||||
if ( (!isset($_SESSION['subscriber_valid'])) || false == $_SESSION['subscriber_valid'] ) {
|
||||
$strSubsMenu .= '<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"><span class="glyphicon glyphicon-th"></span> '. _('Subscribe').'</a>
|
||||
<ul class="dropdown-menu ">';
|
||||
|
||||
if ( SUBSCRIBE_EMAIL ) {
|
||||
$strSubsMenu .= '<li><a href="?do=email_subscription&new=1"><span class="glyphicon glyphicon-envelope"></span> '._('Subscribe via email').'</a></li>';
|
||||
}
|
||||
if ( SUBSCRIBE_TELEGRAM ) {
|
||||
$strSubsMenu .= '<li><a href="#"><script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="'.TG_BOT_USERNAME.'" data-size="small" data-userpic="false" data-auth-url="'.WEB_URL.'/telegram_check.php" data-request-access="write"></script></a></li>';
|
||||
}
|
||||
$strSubsMenu .= '</ul>';
|
||||
if ( SUBSCRIBE_EMAIL ) {
|
||||
$strSubsMenu .= '<li><a href="?do=email_subscription&new=1"><span class="glyphicon glyphicon-envelope"></span> '._('Subscribe via email').'</a></li>';
|
||||
}
|
||||
if ( SUBSCRIBE_TELEGRAM ) {
|
||||
$strSubsMenu .= '<li><a href="#"><script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="'.TG_BOT_USERNAME.'" data-size="small" data-userpic="false" data-auth-url="'.WEB_URL.'/telegram_check.php" data-request-access="write"></script></a></li>';
|
||||
}
|
||||
$strSubsMenu .= '</ul>';
|
||||
}
|
||||
}
|
||||
// If subscriber is logged on, display unsub and logoff menu points
|
||||
if ( (isset($_SESSION['subscriber_valid'])) && $_SESSION['subscriber_valid'] ) {
|
||||
|
Loading…
Reference in New Issue
Block a user