<?php require_once "../../config/init.php"; require_once "auth.php"; $smarty->assign('d_tripdifficulty', getTripDifficulty()); $smarty->assign('d_tripcomfort', getTripComfort()); $trip = new Trips((int) $_POST['_id']); $smarty->assign($trip->getValues()); $smarty->assign($_POST); $output = $smarty->fetch("trip_edit.html"); if (!empty($_POST) && !empty($_POST[formSubmit]) && ($smarty->_validate_processed == 1 && $smarty->_validate_error != 1)) { include "_default.action.php"; exit; } $smarty->display("trip_edit.html");
<?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;
<?php require_once "../../config/init.php"; require_once "auth.php"; $trip = new Trips(); $options = array(array('field' => 'tripTitle', 'eq' => 'ORDERBY', 'value' => 'tripTitle')); $smarty->assign('Trips', $trip->searchFromDB($options)); $smarty->display("trip.html");
<?php require_once "../../config/init.php"; require_once "auth.php"; $trip = new Trips(); $smarty->assign('Trips', $trip->searchFromDB()); $t = new Tours(); $options = array(); $options[] = array('field' => 'tourStartDate', 'eq' => 'ORDERBY', 'value' => 'tourTitle, tourStartDate desc'); $tours = $t->searchFromDB($options); $smarty->assign('Tours', $tours); if (!empty($_POST['mailFormSubmit'])) { global $DBCLASS; $users = $DBCLASS->mailUsers($_POST); $gmail = $guide->guideEmail1; $mailText = $_POST['mailText']; $mailSubject = $_POST['mailSubject']; if (isset($_FILES['mailFile']) && $_FILES['mailFile']['error'] == 0) { include 'Mail/mime.php'; $message = new Mail_mime(); $fname = "/tmp/" . $_FILES['mailFile']['name']; move_uploaded_file($_FILES['mailFile']['tmp_name'], $fname); $message->addAttachment($fname); $message->setTXTBody($mailText); $mailText = $message->get(array('text_charset' => 'utf-8')); $headers = $message->headers($headers); } $message = ''; $sent = array(); if (!$_POST['mailTestMode'] && is_array($users)) { foreach ($users as $u) {