Example #1
0
* @version 05-15-06
* @package phpScheduleIt
*
* Copyright (C) 2003 - 2007 phpScheduleIt
* License: GPL, see LICENSE
*/
include_once 'lib/Template.class.php';
include_once 'lib/Reservation.class.php';
include_once 'lib/Resource.class.php';
$t = new Template(translate('Manage Invites'));
if (Auth::is_logged_in() && (isset($_POST['y']) || isset($_POST['n']))) {
    CmnFns::redirect('ctrlpnl.php', 1, false);
}
$t->printHTMLHeader();
if (Auth::is_logged_in()) {
    $t->printWelcome();
}
$t->startMain();
if (isset($_POST['y'])) {
    // Process the reservation
    if (isset($_GET['id']) && isset($_GET['memberid']) && isset($_GET['action'])) {
        global $conf;
        $memberid = $_GET['memberid'];
        $resid = $_GET['id'];
        $action = $_GET['action'];
        $accept_code = $_GET['accept_code'];
        // Get the user
        $user = new User($memberid);
        if ($user == null) {
            // User not found, look in the anon table
            $user = new AnonymousUser($memberid);
Example #2
0
/**
* Prints a page notifiying the admin that the requirest failed.
* It will also assign the data passed in to a session variable
*  so it can be reinserted into the form that it came from
* @param string or array $msg message(s) to print to user
* @param array $data array of data to post back into the form
*/
function print_fail($msg, $data = null)
{
    if (!is_array($msg)) {
        $msg = array($msg);
    }
    if (!empty($data)) {
        $_SESSION['post'] = $data;
    }
    $t = new Template(translate('Update failed!'));
    $t->printHTMLHeader();
    $t->printWelcome();
    $t->startMain();
    CmnFns::do_error_box(translate('There were problems processing your request.') . '<br /><br />' . '- ' . join('<br />- ', $msg) . '<br />' . '<br /><a href="' . $_SERVER['HTTP_REFERER'] . '">' . translate('Please go back and correct any errors.') . '</a>');
    $t->endMain();
    $t->printHTMLFooter();
    die;
}