if ($_POST['tourID']) { $_SESSION['tourID'] = $_POST['tourID']; } $_reg_tourID = $_SESSION['tourID']; $tour = new Tours($_reg_tourID); $tour->loadLinkedFromDB(); $smarty->assign('Tour', $tour->getValues()); $smarty->assign("addvaluesArray", $tour->getAddValuesArray()); $applyType = ''; if ($tour->_allowPreApply()) { $applyType = 'WL'; } if ($tour->_allowWaitinglist()) { $applyType = 'WL'; } if ($tour->_allowApply()) { $applyType = 'apply'; } $_POST['applyType'] = $applyType; $smarty->assign('type', $applyType); $smarty->assign($_POST); include "auth.php"; include "restricted.php"; $smarty->assign('d_userSex', getUserSex()); $smarty->assign('d_userHowFound', getUserHowFound()); $user->loadLinkedFromDB(); if (isset($_POST['applyFriend'])) { $v = $user->getValues(); $smarty->assign('Tours', $v['Tours']); $smarty->assign('userID', $v['userID']); } else {