"picture" => $row['picture'] ); $programs[$row['id']]=$program; }*/ $response = json_encode($lines); } else { if ($action == "sync") { if (isset($_POST['tour_id_sync'])) { $synced = array(); $id = $_POST['tour_id_sync']; if (!empty($id)) { $ids = explode("|", $id); foreach ($ids as $i) { $tour = new Tour(); $tour->retrieve($i); if ($synced[$i] = $tour->sync()) { $tour->synced = true; $tour->save(); } } $response = json_encode($synced); } else { return false; } } } else { if ($action == "get_tour_num") { $response = Tour::get_tour_num(); } else { if ($action == "get_destination_by_area") { if (isset($_POST['area'])) {