public function cekEmail()
 {
     $email = addslashes($_POST['em']);
     $fb = new FBUser();
     $arr = $fb->getWhere("email = '{$email}'");
     $json['bool'] = 0;
     if (count($arr) > 0) {
         $json['bool'] = 1;
     }
     echo json_encode($json);
 }
예제 #2
0
 public static function login()
 {
     $emailadd = addslashes($_POST['emailadd']);
     $p1 = addslashes($_POST['p1']);
     $fbuser = new FBUser();
     $arr = $fbuser->getWhere("email = '{$emailadd}' AND data_pass = '******'");
     if (count($arr) > 0) {
         $user = $arr[0];
         $_SESSION['user'] = $user;
         $_SESSION["admin_session"] = 1;
     }
 }