k
This commit is contained in:
13
dev_mvc/controller/ActionHandler.php
Normal file
13
dev_mvc/controller/ActionHandler.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
class ActionHandler
|
||||
{
|
||||
static function doAction(){
|
||||
$action = '';
|
||||
if(isset($_GET['action'])){
|
||||
if(!$action == ''){
|
||||
include_once("./model/actions/model_".$action."php");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
Class HUtils{
|
||||
const FETCHGET = 0;
|
||||
const FETCHPOST = 1;
|
||||
static function issetPost($arr_postvars){
|
||||
for ($i=0; $i <sizeof($arr_postvars) ; $i++)
|
||||
{
|
||||
@@ -22,10 +24,18 @@ Class HUtils{
|
||||
|
||||
return new DateTime($date);
|
||||
}
|
||||
static function getPage(){
|
||||
static function getPage($fetchmethod){
|
||||
$p = "";
|
||||
if(isset($_GET['p'])){
|
||||
$p = $_GET['p'];
|
||||
if($fetchmethod == HUtils::FETCHGET){
|
||||
if(isset($_GET['p'])){
|
||||
$p = $_GET['p'];
|
||||
}
|
||||
}
|
||||
else if($fetchmethod == HUtils::FETCHPOST){
|
||||
if(isset($_POST['p']))
|
||||
{
|
||||
$p = $_POST['p'];
|
||||
}
|
||||
}
|
||||
return $p;
|
||||
}
|
||||
|
||||
38
dev_mvc/controller/data/Reply.php
Normal file
38
dev_mvc/controller/data/Reply.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
class Reply{
|
||||
public $id;
|
||||
public $user;
|
||||
public $thread;
|
||||
public $text;
|
||||
function Reply($id, $user, $thread, $text){
|
||||
$this->id = $id;
|
||||
$this->user = $user;
|
||||
$this->thread = $thread;
|
||||
$this->text = $text;
|
||||
}
|
||||
public function getId(){
|
||||
return $this->id;
|
||||
}
|
||||
public function setId($id){
|
||||
$this->id = $id;
|
||||
}
|
||||
public function getUser(){
|
||||
return $this->user;
|
||||
}
|
||||
public function setUser($user){
|
||||
$this->user = $user;
|
||||
}
|
||||
public function getThread(){
|
||||
return $this->thread;
|
||||
}
|
||||
public function setThread($thread){
|
||||
$this->thread = $thread;
|
||||
}
|
||||
public function getText(){
|
||||
return $this->text;
|
||||
}
|
||||
public function setText($text){
|
||||
$this->text = $text;
|
||||
}
|
||||
}
|
||||
?>
|
||||
18
dev_mvc/controller/data/Thread.php
Normal file
18
dev_mvc/controller/data/Thread.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
class Thread{
|
||||
static $threadArray = [];
|
||||
public $id;
|
||||
public $titel;
|
||||
public $text;
|
||||
public $user;
|
||||
public $board;
|
||||
public function Thread($id, $titel, $text, $user){
|
||||
$this->id = $id;
|
||||
$this->titel = $titel;
|
||||
$this->text = $text;
|
||||
$this->user = $user;
|
||||
array_push(Thread::$threadArray, $this);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
33
dev_mvc/controller/data/User.php
Normal file
33
dev_mvc/controller/data/User.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
class User{
|
||||
static $userArray = [];
|
||||
public $id;
|
||||
public $username;
|
||||
public $email;
|
||||
public function User($id, $username, $email, $password){
|
||||
$this->id = $id;
|
||||
$this->username = $username;
|
||||
$this->email = $email;
|
||||
$this->password = $password;
|
||||
array_push(User::$userArray, $this);
|
||||
}
|
||||
public function getId(){
|
||||
return $this->id;
|
||||
}
|
||||
public function setId($id){
|
||||
$this->id = $id;
|
||||
}
|
||||
public function getUsername(){
|
||||
return $this->username;
|
||||
}
|
||||
public function setUsername($username){
|
||||
$this->username = $username;
|
||||
}
|
||||
public function getEmail(){
|
||||
return $this->email;
|
||||
}
|
||||
public function setEmail($email){
|
||||
$this->email = $email;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user