Пример #1
0
         }
     }
     jecho($users);
     break;
     /**
      * Adding user to db
      */
 /**
  * Adding user to db
  */
 case "add-user":
     $success = true;
     if (isset($_REQUEST['name'])) {
         $name = mysql_escape_string($_REQUEST['name']);
         if ($checkDatabaseConnection) {
             $sql = $QUERIES->insertUser($name);
             $result = mysql_query($sql) or $success = false;
         } else {
             $success = false;
         }
     } else {
         $success = false;
     }
     $output = new stdClass();
     $output->success = $success;
     $output->id = mysql_insert_id();
     jecho($output);
     break;
     /**
      * Removing user from db
      */