if (get_config('installed')) { $sitedata = site_statistics(); } $smarty = smarty(); $smarty->assign('PAGEHEADING', get_string('administration', 'admin')); // normal admin page starts here $smarty->assign('upgrades', $upgrades); if (isset($sitedata)) { $smarty->assign('sitedata', $sitedata); } if (isset($register)) { $smarty->assign('register', $register); } $smarty->assign('closed', $closed); $smarty->assign('closeform', $closeform); $smarty->assign('warnings', site_warnings()); $smarty->display('admin/index.tpl'); function close_site_submit(Pieform $form, $values) { global $closed; if (!$closed && $values['close']) { set_config('siteclosedbyadmin', 1); require_once get_config('docroot') . 'auth/session.php'; remove_all_sessions(); } else { if ($closed && !$values['close']) { set_config('siteclosedbyadmin', 0); } } redirect(get_config('wwwroot') . 'admin/index.php'); }
/** * * @package mahara * @subpackage admin * @author Catalyst IT Ltd * @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later * @copyright For copyright information on Mahara, please see the README file distributed with this software. * */ define('INTERNAL', 1); define('ADMIN', 1); define('INSTALLER', 1); require dirname(dirname(__FILE__)) . '/init.php'; require get_config('libroot') . 'upgrade.php'; if (param_integer('finished', 0)) { foreach (site_warnings() as $w) { $SESSION->add_error_msg($w, FALSE); } if ($missing = check_installed_plugins()) { $message = get_string('installedpluginsmissing', 'admin') . ': '; $message .= join(', ', $missing) . '.'; $message .= ' ' . get_string('ensurepluginsexist', 'admin', get_config('docroot')); $SESSION->add_error_msg($message); } if (get_config('new_registration_policy') == 1) { redirect('/admin/registersite.php'); } redirect(); } $smarty = smarty(); $upgrades = check_upgrades();