blog && $core->auth->check($permissions,$core->blog->id))
{
return;
}
if (session_id()) {
$core->session->destroy();
}
http::redirect(DC_AUTH_PAGE);
}
# Check super admin
public static function checkSuper()
{
global $core;
if (!$core->auth->isSuperAdmin())
{
if (session_id()) {
$core->session->destroy();
}
http::redirect(DC_AUTH_PAGE);
}
}
# Top of admin page
public static function open($title='',$head='',$popup=false)
{
global $core, $_ctx;
$_ctx->popup = (boolean) $popup;
$_ctx->page_header = $head;
$_ctx->fillPageTitle($title);
ob_start();
}
public static function close()
{
$res = ob_get_contents();
ob_end_clean();
global $core, $_ctx;
if ($core->error->flag()) {
foreach($core->error->getErrors() as $e) {
$_ctx->addError($e);
}
}
$_ctx->page_content = $res;
$core->tpl->display('page_layout.html.twig');
}
public static function openPopup($title='',$head='')
{
self::open($title,$head,true);
}
public static function closePopup()
{
self::close();
}
public static function message($msg,$timestamp=true,$div=false,$echo=true)
{
global $core;
$res = '';
if ($msg != '') {
$res = ($div ? '