Ejemplo n.º 1
0
 */
if (!defined('sugarEntry') || !sugarEntry) {
    die('Not A Valid Entry Point');
}
global $db, $app_list_strings;
$response = "";
$action = "";
if (isset($_POST['action'])) {
    $action = $_POST['action'];
}
if (isset($_POST['department']) && isset($_POST['frame_type'])) {
    $department = $_POST['department'];
    $frame_type = $_POST['frame_type'];
    $sql = "SELECT * FROM tours WHERE deparment = '{$department}' AND frame_type = '{$frame_type}' AND is_template = 1 AND deleted = 0";
    $result = $db->query($sql);
    Tour::destinationToList();
    $tours = array();
    while ($row = $db->fetchByAssoc($result)) {
        $transport = explode('^,^', $row['transport']);
        $transport_dom = get_select_options($app_list_strings['transport_dom'], $transport);
        $destination = explode('^,^', $row['noiden']);
        $allCountries = Country::get_list_countries($row['deparment']);
        $destiantion_dom = get_select_options_with_id($allCountries, $row['deparment']);
        $currency = get_select_options($app_list_strings['currency_dom'], $row['currency']);
        $status = get_select_options_with_id($app_list_strings['tour_status_dom'], $row['status']);
        /*$tour = array(
          "id" => $row['id'],
          "name" => $row['name'],
          "description" => $row['description'],
          "from_place" => $row['from_place'],
          "to_place" => $row['to_place'],