SHARE
TWEET

Untitled

a guest Jan 28th, 2016 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. #models
  3. require_once("models/User.php");
  4. require_once("models/Spot.php");
  5.  
  6. $json = json_decode(file_get_contents("php://input"));
  7.  
  8. $function = $json->function;
  9.  
  10. switch($function){
  11.     case "login":
  12.         $username = $json->username;
  13.         $password = $json->password;
  14.         $login = User::login_js($username,$password);
  15.         if($login == true) {
  16.             $arr = array('succes'=>'true','function' => $function);
  17.         } else {
  18.             $arr = array('succes'=>'false');
  19.         }
  20.         break;
  21.        
  22.     case "getSpots":
  23.         break;
  24.        
  25. }
  26.  
  27. $response = json_encode($arr);
  28. echo $response;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top