예제 #1
0
 public function saveTrip($itineraryKey, $pitstops)
 {
     if (isset($_POST['itineraryKey']) && isset($_POST['pitstops'])) {
         $itineraryKey = $_POST['itineraryKey'];
         $pitstops = json_encode($_POST['pitstops']);
     }
     $itineraryKey = Hash::make($itineraryKey);
     $checkItineraryKey = Trip::checkKey($itineraryKey);
     if ($checkItineraryKey) {
         return 0;
     }
     return Trip::saveTrip($itineraryKey, $pitstops);
 }
예제 #2
0
 public function checkKey($itineraryKey)
 {
     if (isset($_GET['itineraryKey'])) {
         $itineraryKey = $_GET['itineraryKey'];
     }
     $itineraryKey = Hash::make($itineraryKey);
     $checkItineraryKey = Trip::checkKey($itineraryKey);
     if ($checkItineraryKey) {
         return 0;
     }
     return "Valid Key";
 }