Anonymous 3D Imageboard http://cyberia.digital/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.6KB

  1. <?
  2. class Post {
  3. /*
  4. 'id' => 'integer',
  5. 'key' => 'string',
  6. 'scale' => 'integer',
  7. 'date' => 'integer',
  8. 'player_ip' => 'string',
  9. 'player_id' => 'integer',
  10. 'is_canon' => 'boolean',
  11. 'nsfw' => 'boolean',
  12. 'player_name' => 'string',
  13. 'thread_key' => 'string',
  14. 'canvas_key' => 'string',
  15. 'message' => 'string',
  16. 'url' => 'string',
  17. 'magnet' => 'string',
  18. 'torrent' => 'string',
  19. 'hash' => 'string'
  20. */
  21. public $id;
  22. public $key;
  23. public $scale;
  24. public $date;
  25. public $reply;
  26. public $player_ip;
  27. public $player_id;
  28. public $is_canon;
  29. public $nsfw;
  30. public $player_name;
  31. public $map_key;
  32. public $canvas_key;
  33. public $message;
  34. public $url;
  35. public $magnet;
  36. public $hash;
  37. public $graffiti;
  38. function __construct( ) {
  39. $this ->url = "";
  40. $this ->map_key = "";
  41. $this ->message = "";
  42. $this ->magnet = "";
  43. $this ->hash = "";
  44. $this ->player_name = "anonymous";
  45. $this ->graffiti = 'false';
  46. $this ->reply = "";
  47. }
  48. function fillWithPostData(){
  49. if( isset($_POST['tmap_key']) ) $this -> map_key = $_POST['map_key'];
  50. if( isset($_POST['canvas_key']) ) $this -> canvas_key = $_POST['canvas_key'];
  51. if( isset($_POST['message']) ) $this -> message = $_POST['message'];
  52. if( isset($_POST['magnet']) ) $this -> magnet = $_POST['magnet'];
  53. if( isset($_POST['url']) ) $this -> url = $_POST['url'];
  54. if( isset($_POST['hash']) ) $this -> hash = $_POST['hash'];
  55. if( isset($_POST['graffiti']) ) $this -> graffiti = $_POST['graffiti'];
  56. if( isset($_POST['reply']) ) $this -> reply = $_POST['reply'];
  57. }
  58. }