Example #1
0
    $tt->insertSlot("MAKE_VALUE", $make);
    $tt->insertSlot("REG_LABEL", FormFieldTexts::REG);
    $tt->insertSlot("REG_VALUE", $reg);
    $tt->insertSlot("COLOUR_LABEL", FormFieldTexts::COLOUR);
    $tt->insertSlot("COLOUR_VALUE", $colour);
    $tt->insertSlot("FLIGHT_LABEL", FormFieldTexts::FLIGHT);
    $tt->insertSlot("FLIGHT_VALUE", $flight);
    $tt->insertSlot("DEPART_LABEL", FormFieldTexts::DEPART);
    $tt->insertSlot("DEPART_VALUE", $depart);
    $tt->insertSlot("ARRIVE_LABEL", FormFieldTexts::ARRIVE);
    $tt->insertSlot("ARRIVE_VALUE", $arrive);
    $tt->insertSlot("MEET_LABEL", FormFieldTexts::SUGGESTED_MEETING_TIME);
    $tt->insertSlot("MEET_SELECTED_60", $suggested_time == 60 ? " selected" : "");
    $tt->insertSlot("MEET_SELECTED_75", $suggested_time == 75 ? " selected" : "");
    $tt->insertSlot("MEET_SELECTED_90", $suggested_time == 90 ? " selected" : "");
    $tt->insertSlot("MEET_SELECTED_105", $suggested_time == 105 ? " selected" : "");
    $tt->insertSlot("MEET_SELECTED_120", $suggested_time == 120 ? " selected" : "");
    $tt->insertSlot("MEET_SELECTED_180", $suggested_time == 180 ? " selected" : "");
    $tt->insertSlot("MEET_SELECTED_240", $suggested_time == 240 ? " selected" : "");
    $tt->insertSlot("PAY_LABEL", FormFieldTexts::PAY);
    $tt->insertSlot("PAY_SELECTED_0", $payment_methods_id == 0 ? " selected" : "");
    $tt->insertSlot("PAY_SELECTED_1", $payment_methods_id == 1 ? " selected" : "");
    $tt->insertSlot("PAY_SELECTED_2", $payment_methods_id == 2 ? " selected" : "");
    $tt->insertSlot("PAY_SELECTED_3", $payment_methods_id == 3 ? " selected" : "");
    $tt->insertSlot("ACCEPTED_TERMS_CHECKED", $accepted_terms ? " checked=\"checked\"" : "");
    $tt->insertSlot("FOCUS_ID", $focusId);
    $tt->insertSlot("SHOW_FORM_PAGE", $showFormPage);
    $tt->insertSlot("SHOW_PAYMENT_NOTE", (int) $payment_methods_id);
}
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Bookings", $tt->output(), $jsExtra);
echo $t->output();
Example #2
0
<?php

include "includes/startloggedinadmin.inc.php";
require_once "classes/sessionhelper.class.php";
require_once "classes/template.class.php";
require_once "classes/templatehelper.class.php";
require_once "classes/constants.class.php";
require_once "classes/db.class.php";
$t = new Template("templates/admin_page.tpl.html");
if (SessionHelper::isMaster()) {
    $tt = new Template("templates/master.tpl.html");
} else {
    $tt = new Template("templates/admin.tpl.html");
}
$db = new Db();
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Admin", $tt->output());
echo $t->output();
Example #3
0
                $printRow .= "<a href=\"edit_booking.php?id={$bid}\">edit</a><br />";
            }
            $printRow .= "<a href=\"edit_booking.php?id={$bid}&clone=1\">clone</a>";
            $results .= sprintf($rowTemplate, $n % 2 == 0 ? "even" : "odd", $n, $bid, $row["surname"] . ", " . $row["name"], $emailImg . $email . "<br />" . $phoneImg . $row["phone"], $row["vehicle"] . " \"" . $row["reg"] . "\"", $row["flight"], "", $depart, "", $meet, "", $arrive, $row["payment"], $combo, $cdate, $printRow);
        }
        $results .= "</table>\n";
    }
    $message = "";
}
$tt->insertSlot("RESULTS", $results);
$tt->insertSlot("SEARCH_TEXT", $search_text);
$tt->insertSlot("NAME_STATUS", $name_status);
$tt->insertSlot("EMAIL_STATUS", $email_status);
$tt->insertSlot("PHONE_STATUS", $phone_status);
$tt->insertSlot("AMOUNT_STATUS", $amount_status);
$tt->insertSlot("COMMENT_STATUS", $comment_status);
$tt->insertSlot("MAKE_STATUS", $make_status);
$tt->insertSlot("PARKING_POINTS_STATUS", $parking_points_status);
$tt->insertSlot("REG_STATUS", $reg_status);
$tt->insertSlot("COLOUR_STATUS", $colour_status);
$tt->insertSlot("FLIGHT_STATUS", $flight_status);
$tt->insertSlot("DROPOFF_STATUS", $dropoff_status);
$tt->insertSlot("PICKUP_STATUS", $pickup_status);
$tt->insertSlot("RANGE_START_VALUE", $_POST ? $range_start : "");
$tt->insertSlot("RANGE_END_VALUE", $_POST ? $range_end : "");
$tt->insertSlot("MESSAGE", $error ? "<span class=\"feedback_negative\">{$error}</span>" : "<span class=\"feedback_positive\">{$message}</span>");
$tt->insertSlot("FOCUS_ID", $focusId);
// output
$jsExtra = JsWriter::scriptLink("js/jquery-1.4.2.min.js") . "\n" . JsWriter::scriptLink("js/report_search.js") . "\n" . JsWriter::scriptLink("js/datetimepicker_css.js");
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Report - search", $tt->output(), $jsExtra);
echo $t->output();
Example #4
0
                                $error = "Could not update your details";
                            } else {
                                SessionHelper::updateName($values[0], $values[1]);
                            }
                            $message = "Your details have been updated";
                        }
                    }
                }
            }
        }
    }
}
// common
$firstnameValue = $submitted && $submitSuccess ? $_POST["firstname"] : $userData["first_name"];
$lastnameValue = $submitted && $submitSuccess ? $_POST["lastname"] : $userData["last_name"];
$message = $error ? "<span class=\"feedback_negative\">{$error}</span>" : "<span class=\"feedback_positive\">{$message}</span>";
$jsExtra = "<script src='js/settings.js' type='text/javascript'></script>";
$t = new Template("templates/admin_page.tpl.html");
$tSettings = new Template("templates/settings.tpl.html");
$tSettings->insertSlot("MESSAGE", $message);
$tSettings->insertSlot("FIRSTNAME_LABEL", FormFieldTexts::FIRST_NAME);
$tSettings->insertSlot("FIRSTNAME_VALUE", $firstnameValue);
$tSettings->insertSlot("LASTNAME_LABEL", FormFieldTexts::LAST_NAME);
$tSettings->insertSlot("LASTNAME_VALUE", $lastnameValue);
$tSettings->insertSlot("OLDPASS1_LABEL", FormFieldTexts::EXISTING_PASSWORD);
$tSettings->insertSlot("OLDPASS2_LABEL", FormFieldTexts::CONFIRM_EXISTING_PASSWORD);
$tSettings->insertSlot("NEWPASS1_LABEL", FormFieldTexts::NEW_PASSWORD);
$tSettings->insertSlot("NEWPASS2_LABEL", FormFieldTexts::CONFIRM_NEW_PASSWORD);
$tSettings->insertSlot("FOCUS_ID", $focusId);
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Edit Profile", $tSettings->output(), $jsExtra);
echo $t->output();
Example #5
0
            $focusId = "email";
        } else {
            if (!UserHelper::emailExists($db, $emailFilteredValue)) {
                $error = "The email address you entered has not been registered: {$emailFilteredValue}";
                $focusId = "email";
            } else {
                // all good
                $showForm = false;
                $emailResult = UserHelper::forgotPassword($db, $emailFilteredValue);
                if (!$emailResult) {
                    $error = "Could not send password reset email";
                } else {
                    $message = "Your password has been reset and emailed to you";
                }
            }
        }
    }
} else {
    $emailFilteredValue = "email";
}
if (!$showForm) {
    $tInner->insertBlock("FORM_CONTENT", "");
    $tInner->insertBlock("INSTRUCTION_CONTENT", "");
} else {
    // showing form
    $tInner->insertSlot("FOCUS_ID", $focusId);
    $tInner->insertSlot("EMAIL_VALUE", $emailFilteredValue);
}
$tInner->insertSlot("FEEDBACK", $error ? "<span class='feedback_negative'>{$error}</span>" : ($message ? "<span class='feedback_positive'>{$message}</span>" : ""));
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Forgot Password", $tInner->output());
echo $t->output();
Example #6
0
        // they logged in using the form, send redirect headers
        //		echo "SUCCESS " . print_r($_POST); exit;
        if ($from) {
            header("Location: " . $from);
        } else {
            if (SessionHelper::isAdmin()) {
                header("Location: report_time.php");
            } else {
                header("Location: .");
            }
        }
        exit;
    }
}
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// Date in the past
require_once "classes/template.class.php";
require_once "classes/templatehelper.class.php";
require_once "classes/formwriter.class.php";
$t = new Template("templates/admin_page.tpl.html");
$t->insertBlock("LINKS", "");
$tLogin = new Template("templates/login.tpl.html");
$tLogin->insertSlot("MESSAGE", "<span class=\"" . (isset($success) ? $success ? "feedback_positive" : "feedback_negative" : "feedback_neutral") . "\">" . $message . "</span>");
$tLogin->insertSlot("FIELD_TEXT_EMAIL", FormFieldTexts::EMAIL);
$tLogin->insertSlot("PREFILL_EMAIL", $prefillEmail);
$tLogin->insertSlot("FROM", $from);
$tLogin->insertSlot("FOCUS_ID", $focusId);
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Login", $tLogin->output(), JSWriter::scriptLink("js/jquery-1.4.2.min.js"));
echo $t->output();
Example #7
0
        $select_status .= '<option value="2" selected>Confirmed</option>';
    } else {
        $select_status .= '<option value="2" >Confirmed</option>';
    }
    if ($_POST["payment"] == 3) {
        $select_status .= '<option value="3" selected>Paid</option>';
    } else {
        $select_status .= '<option value="3" >Paid</option>';
    }
    if ($_POST["payment"] == 4) {
        $select_status .= '<option value="4" selected>Client no-show</option>';
    } else {
        $select_status .= '<option value="4" >Client no-show</option>';
    }
    if ($_POST["payment"] == 5) {
        $select_status .= '<option value="5" selected>Completed</option>';
    } else {
        $select_status .= '<option value="5" >Completed</option>';
    }
    $select_status .= '</select>
						    </div>
						    <label>Status</label>
						  </div>';
}
$tt->insertSlot("SELECT_STATUS", $select_status);
$tt->insertSlot("FOCUS_ID", $focusId);
// output
$jsExtra = JsWriter::scriptLink("js/jquery-1.4.2.min.js") . "\n" . JsWriter::scriptLink("js/datetimepicker_css.js");
$pagename = $clone ? 'clone' : 'edit';
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - {$pagename} - booking", $tt->output(), $jsExtra);
echo $t->output();
Example #8
0
<?php

require_once "classes/template.class.php";
require_once "classes/templatehelper.class.php";
$jsExtra = "";
$t = new Template("templates/page.tpl.html");
$tt = new Template("templates/vehicle_storage.tpl.html");
TemplateHelper::configurePage($t, Constants::SITE_NAME . " - Vehicle storage", $tt->output(), $jsExtra);
echo $t->output();