Esempio n. 1
0
         $dob = null;
         //$email = null;
         if (isset($_REQUEST[P_DOB])) {
             $test_date = $_REQUEST[P_DOB];
             $test_arr = explode('/', $test_date);
             if (count($test_arr) == 3) {
                 if (checkdate($test_arr[0], $test_arr[1], $test_arr[2])) {
                     $dob = $_REQUEST[P_DOB];
                 } else {
                     // problem with dates ...
                 }
             } else {
                 // problem with input ...
             }
         }
         $response = $modes->register($email, $password, $dob);
     } else {
         $response[KEY_STATUS] = R_STATUS_FAILED;
         if (SETTING_ERROR) {
             $response[KEY_ERROR_CODE] = E_INSUFFICIENT_PARAMS;
             $response[KEY_ERROR_MESSAGE] = EM_INSUFFICIENT_PARAMS;
         }
     }
     break;
 case M_UPDATE_FACEBOOK_DETAILS:
     require './php/session_test.php';
     if (isset($_REQUEST[P_EMAIL]) && isset($_REQUEST[P_FB_EMAIL]) && isset($_REQUEST[P_DOB]) && isset($_REQUEST[P_FB_ID])) {
         //&& isset($_REQUEST[P_FULL_NAME])){
         $email = strtolower($_REQUEST[P_EMAIL]);
         $fb_email = strtolower($_REQUEST[P_FB_EMAIL]);
         $facebook_id = $_REQUEST[P_FB_ID];