示例#1
0
         break;
     case "select":
         $result = $users->select();
         break;
         // list with order, index, count and where
     // list with order, index, count and where
     case "enumerate":
         $result = $users->enumerate();
         break;
         // list with where
     // list with where
     case "login":
         $result = $am->login($user, $pass, $sid);
         break;
     case "pwcheck":
         $result = $am->checkPassword($user, $pass);
         break;
         // just check pass, dont create session
     // just check pass, dont create session
     case "logout":
         $result = $am->logout();
         break;
     default:
         throw new Exception("userFunctions:: invalid operation: '{$operation}' provided");
 }
 if ($result === null) {
     throw new Exception($users->errormsg);
 }
 if ($result === "") {
     $response = array('success' => true, 'insert_id' => $users->conn->insert_id, 'affected_rows' => $users->conn->affected_rows);
 } else {