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);
<?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");