$info['author'] = '{L_UNKNOWN}'; } if (!isset($info['preview'])) { $preview = false; $info['preview'] = './styles/.acp/media/images/style_preview.png'; } if ($style == $cfg['etc']['core']['site_style']) { TPL::add('MODULE_CONFIG:SITE_STYLE_NAME', strlen($info['name']) > 24 ? mb_substr($info['name'], 0, 24, 'UTF-8') . '...' : $info['name']); } $f_styles[] = array('STYLE_CODENAME' => $style, 'STYLE_NAME' => $info['name'], 'STYLE_AUTHOR' => $info['author'], 'STYLE_AUTHOR_LINK' => $info['author_link'], 'STYLE_PREVIEW' => $info['preview'], 'conds' => array('STYLE_ACTIVE' => $style == $cfg['etc']['core']['site_style'] ? true : false, 'STYLE_AUTHOR_LINK' => isset($info['author_link']) ? true : false, 'STYLE_PREVIEW' => $preview)); } TPL::assignAsLoop('MODULE_CONFIG:SITE_STYLE', $f_styles); } } Modules::$modules->{$GLOBALS['MODULE_NAME']} = new module_core(); Langs::load('core'); if (defined('IN_SYS') && IN_SYS || defined('IN_ACP') && IN_ACP) { TPL::addTpl('header'); if (!isset($_GET['c'])) { TPL::addTpl('homepage'); } TPL::modify('self::addTpl(\'footer\');self::$output .= self::$loadedTpls[\'footer\'];'); } if (defined('IN_ACP') && IN_ACP) { Modules::$modules->menu->menu->acp->main->addItem('./acp.php', '{L_ACP_HOME}', array('ACTIVE' => !isset($_GET['c']))); Modules::$modules->menu->menu->acp->main->addItem('./', '{L_INDEX}', array('ACTIVE' => false)); if (permission('core', 'modules', 'show')) { Modules::$modules->menu->menu->acp->main->addItem('./acp.php?c=modules', '{L_MODULES}', array('ACTIVE' => isset($_GET['c']) && $_GET['c'] == 'modules')); } if (permission('core', 'config', 'edit')) { Modules::$modules->menu->menu->acp->main->addItem('./acp.php?c=config&module=core', '{L_SITE_CONFIG}', array('ACTIVE' => isset($_GET['c'], $_GET['module']) && $_GET['c'] == 'config' && $_GET['module'] == 'core'));
} core::s('tpl')->assignLoop('GROUP_PERMISSIONS-' . $perm->module_codename . '-' . $perm->codename, $f_values); } core::s('tpl')->assignLoop('GROUP_PERMISSIONS', $f_permissions_modules); foreach ($f_permissions as $module_codename => $loop) { core::s('tpl')->assignLoop('GROUP_PERMISSIONS-' . $module_codename, $loop); } } } } Modules::$modules->auth = new module_auth(); TPL::modify(' if(/*!$_SESSION[\'logged\'] && */strpos(self::$output,\'{AUTH_CHALLENGE}\')) Modules::$modules->auth->getChallenge();'); if (!defined('IN_SYS') || !IN_SYS) { Langs::load('auth'); } if (defined('IN_AUTHBOX') && IN_AUTHBOX) { TPL::addTpl('authbox'); TPL::add('AUTHBOX_ACTION', './auth.php'); } /*$sql = new SQLObject(); $sql->exec(" INSERT INTO " . $sql->table('auth_users') . " (user_username,user_password_hash,user_email,AUTHKEY) VALUES ('Look Smog','" . hash('sha256','91a0a61d') . "','*****@*****.**','')"); $sql->last_insert_rowid();*/ if (defined('IN_AUTH') && IN_AUTH) { if (isset($_GET['logout'])) { Modules::$modules->auth->logout();