Пример #1
0
if (!is_object($guide) || !$guide->exists()) {
    if (!empty($_POST['formLoginSubmit'])) {
        $smarty->assign($_POST);
        $out = $smarty->fetch('login.html');
        if (!empty($_POST) && !empty($_POST[formLoginSubmit]) && ($smarty->_validate_processed == 1 && $smarty->_validate_error != 1)) {
            $guide = new Guides();
            if ($guide->auth($_POST['guideLogin'], $_POST['guidePassword'])) {
                $message = '_guideAuthOK';
                $_SESSION['guide'] = $guide;
                gs_session::save($guide->getValues(), 'login_gs_admin');
                if ($guide->guideType == 'admin') {
                    header('Location: stats.php');
                    die;
                }
            } else {
                $smarty->assign('AUTH_INCORRECT_LOGIN', 'AUTH_INCORRECT_LOGIN');
                $message = '_errorLogPass';
            }
        }
    }
}
if ($guide && $guide->exists()) {
    $guide = new Guides($guide->getID());
    $guide->loadLinkedFromDB();
    $smarty->assign('Guide', $guide->getValues());
} else {
    $smarty->display('login.html');
    exit;
}
$years = $DBCLASS->queryResult('select distinct date_format(tourStartDate,"%Y") as year from Tour where tourStartDate>"2000-01-01"', 1);
$smarty->assign('alltouryears', $years);
Пример #2
0
<?php

require_once "../../config/init.php";
require_once "auth.php";
$smarty->assign('d_userSex', getUserSex());
$guideo = new Guides((int) $_POST['_id']);
$smarty->assign($guideo->getValues());
$smarty->assign($_POST);
$output = $smarty->fetch("guide_edit.html");
if (!empty($_POST) && !empty($_POST[formSubmit]) && ($smarty->_validate_processed == 1 && $smarty->_validate_error != 1)) {
    include "_default.action.php";
    exit;
}
$smarty->display("guide_edit.html");
Пример #3
0
<?php

require_once "../../config/init.php";
require_once "ajax.php";
$guide = new Guides();
$smarty->assign('Guides', $guide->searchFromDB());
$smarty->display("guide.html");
Пример #4
0
<?php

require_once "../../config/init.php";
require_once "auth.php";
$smarty->assign('d_tourdifficulty', getTripDifficulty());
$smarty->assign('d_tourcomfort', getTripComfort());
$smarty->assign('d_tourstatus', getTourStatus());
$smarty->assign('d_tourPlacesGender', getPlacesGender());
$g = new Guides();
$smarty->assign('Guides', $g->getHTMLSelect('guideName'));
loadclass('RentabikeSet');
$rbs = new RentabikeSet();
$smarty->assign('rentabikeSet', $rbs->getHTMLSelect('name'));
$tour = new Tours((int) $_POST['_id']);
if (is_numeric($_POST['tripID'])) {
    $trip = new Trips((int) $_POST['tripID']);
    $v = $trip->getValues();
    $tv = $tour->getValues();
    foreach ($v as $k => $r) {
        $tk = str_replace('trip', 'tour', $k);
        if ($tk != 'tourID' && array_key_exists($tk, $tour->_EQUALS)) {
            $tour->{$tk} = $r;
        }
    }
}
$smarty->assign($tour->getValues());
$smarty->assign($_POST);
$output = $smarty->fetch("tour_edit.html");
if (!empty($_POST) && !empty($_POST[formSubmit]) && ($smarty->_validate_processed == 1 && $smarty->_validate_error != 1)) {
    include "_default.action.php";
    exit;