// New registration $data['lang'] = determine_language(); $adminCreated = Auth::is_logged_in() && Auth::isAdmin(); $msg = $auth->do_register_user($data, $adminCreated); $show_form = false; } else { if (isset($_POST['update'])) { // Update registration $adminUpdate = $curUser->get_id() != $id && (Auth::isAdmin() || $curUser->is_group_admin(array($id))); $msg = $auth->do_edit_user($data, $adminUpdate); $show_form = false; } } // Print HTML headers $t->printHTMLHeader(); $t->set_title($edit ? translate('Modify My Profile') : translate('Register')); // Print the welcome banner if they are logged in if ($edit || !(bool) $conf['app']['allowSelfRegistration']) { $t->printWelcome(); } // Begin main table $t->startMain(); $t->startNavLinkTable(); $t->showNavLinksTable(Auth::isAdmin()); $t->endNavLinkTable(); $t->splitTable(); // Either this is a fresh view or there was an error, so show the form if ($show_form || $msg != '') { if (!isset($data['timezone'])) { $data['timezone'] = $conf['app']['default_timezone']; }
/** * Template class */ include_once 'lib/Template.class.php'; /** * Reservation class */ include_once 'lib/Blackout.class.php'; // Check that the admin is logged in if (!Auth::isAdmin()) { CmnFns::do_error_box('This section is only available to the administrator.<br />' . '<a href="ctrlpnl.php">Back to My Control Panel</a>'); } $t = new Template(); //AK HTTP_REFERER is blocked is cleared by gelman firewall will not run this check if (isset($_POST['submit'])) { $t->set_title('Processing Blackout'); $t->printHTMLHeader(); $t->startMain(); process_blackout($_POST['fn']); } else { $blackout_info = getBlackoutInfo(); $t->set_title($blackout_info['title']); $t->printHTMLHeader(); $t->startMain(); present_blackout($blackout_info['resid']); } // End main table $t->endMain(); // Print HTML footer $t->printHTMLFooter(); /**
$Class = 'Blackout'; $_POST['minres'] = $_POST['maxRes'] = null; } else { include_once 'lib/Reservation.class.php'; $Class = 'Reservation'; } if ((!isset($_GET['read_only']) || !$_GET['read_only']) && $conf['app']['readOnlyDetails']) { // Make sure user is logged in if (!Auth::is_logged_in()) { Auth::print_login_msg(); } } $t = new Template(); //AK HTTP_REFERER is striped by Gelman firewall if (isset($_POST['btnSubmit'])) { $t->set_title(translate("Processing {$Class}")); $t->printHTMLHeader(); $t->startMain(); process_reservation($_POST['fn']); } else { $res_info = getResInfo(); $t->set_title($res_info['title']); $t->printHTMLHeader(); $t->startMain(); present_reservation($res_info['resid']); } // End main table $t->endMain(); $timer->stop(); $timer->print_comment(); // Print HTML footer