Remove CantTouchThis
This commit is contained in:
parent
ed98c2c3c2
commit
e3023f8b39
|
@ -1,22 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
class Article {
|
class Article {
|
||||||
|
|
||||||
private $ID;
|
private $ID;
|
||||||
private $Title;
|
private $Title;
|
||||||
private $Cover;
|
private $Cover;
|
||||||
|
@ -25,30 +10,30 @@ CANTTOUCH;
|
||||||
private $PostDate;
|
private $PostDate;
|
||||||
private $Comments;
|
private $Comments;
|
||||||
private $Description;
|
private $Description;
|
||||||
|
|
||||||
|
|
||||||
public function __construct($id) {
|
public function __construct($id) {
|
||||||
|
|
||||||
$this->ID = $id;
|
$this->ID = $id;
|
||||||
|
|
||||||
$this->getArticle($id);
|
$this->getArticle($id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getArticle($id) {
|
private function getArticle($id) {
|
||||||
|
|
||||||
$db = new DatabaseModule();
|
$db = new DatabaseModule();
|
||||||
|
|
||||||
$getArticle = $db->Handle->prepare('SELECT * FROM ms_articles WHERE id = :id');
|
$getArticle = $db->Handle->prepare('SELECT * FROM ms_articles WHERE id = :id');
|
||||||
$getArticle->bindValue(':id', $id, PDO::PARAM_INT);
|
$getArticle->bindValue(':id', $id, PDO::PARAM_INT);
|
||||||
$getArticle->execute();
|
$getArticle->execute();
|
||||||
|
|
||||||
$ArticleInfo = $getArticle->fetch();
|
$ArticleInfo = $getArticle->fetch();
|
||||||
|
|
||||||
$getArticle->closeCursor();
|
$getArticle->closeCursor();
|
||||||
|
|
||||||
|
|
||||||
$this->Title = $ArticleInfo['articleName'];
|
$this->Title = $ArticleInfo['articleName'];
|
||||||
$this->Cover = $ArticleInfo['articleCover'];
|
$this->Cover = $ArticleInfo['articleCover'];
|
||||||
$this->Author = $ArticleInfo['articleAuthor'];
|
$this->Author = $ArticleInfo['articleAuthor'];
|
||||||
|
@ -56,27 +41,27 @@ CANTTOUCH;
|
||||||
$this->PostDate = betterDate($ArticleInfo['articleDate']);
|
$this->PostDate = betterDate($ArticleInfo['articleDate']);
|
||||||
$this->Comments = $ArticleInfo['articleComments'];
|
$this->Comments = $ArticleInfo['articleComments'];
|
||||||
$this->Description = $ArticleInfo['articleDescription'];
|
$this->Description = $ArticleInfo['articleDescription'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __get($what) {
|
public function __get($what) {
|
||||||
|
|
||||||
if(property_exists($this, $what)) {
|
if(property_exists($this, $what)) {
|
||||||
|
|
||||||
return $this->{$what};
|
return $this->{$what};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update($what) {
|
public function update($what) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,74 +1,59 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
class ArticleComment {
|
class ArticleComment {
|
||||||
|
|
||||||
private $ID;
|
private $ID;
|
||||||
private $Author;
|
private $Author;
|
||||||
private $Content;
|
private $Content;
|
||||||
private $PostDate;
|
private $PostDate;
|
||||||
private $ArticleID;
|
private $ArticleID;
|
||||||
|
|
||||||
|
|
||||||
public function __construct($id) {
|
public function __construct($id) {
|
||||||
$this->ID = $id;
|
$this->ID = $id;
|
||||||
|
|
||||||
$this->getArticleComment($id);
|
$this->getArticleComment($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getArticleComment($id) {
|
private function getArticleComment($id) {
|
||||||
|
|
||||||
$db = new DatabaseModule();
|
$db = new DatabaseModule();
|
||||||
|
|
||||||
$getArticle = $db->Handle->prepare('SELECT * FROM ms_articlecomments WHERE id = :id');
|
$getArticle = $db->Handle->prepare('SELECT * FROM ms_articlecomments WHERE id = :id');
|
||||||
$getArticle->bindValue(':id', $id, PDO::PARAM_INT);
|
$getArticle->bindValue(':id', $id, PDO::PARAM_INT);
|
||||||
$getArticle->execute();
|
$getArticle->execute();
|
||||||
|
|
||||||
$ArticleInfo = $getArticle->fetch();
|
$ArticleInfo = $getArticle->fetch();
|
||||||
|
|
||||||
$getArticle->closeCursor();
|
$getArticle->closeCursor();
|
||||||
|
|
||||||
$this->Author = $ArticleInfo['commentAuthor'];
|
$this->Author = $ArticleInfo['commentAuthor'];
|
||||||
$this->Content = $ArticleInfo['commentContent'];
|
$this->Content = $ArticleInfo['commentContent'];
|
||||||
$this->PostDate = betterDate($ArticleInfo['commentDate']);
|
$this->PostDate = betterDate($ArticleInfo['commentDate']);
|
||||||
$this->ArticleID = $ArticleInfo['articleID'];
|
$this->ArticleID = $ArticleInfo['articleID'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __get($what) {
|
public function __get($what) {
|
||||||
|
|
||||||
if(property_exists($this, $what)) {
|
if(property_exists($this, $what)) {
|
||||||
|
|
||||||
return $this->{$what};
|
return $this->{$what};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update($what) {
|
public function update($what) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,75 +1,60 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
class EpisodeComment {
|
class EpisodeComment {
|
||||||
|
|
||||||
private $ID;
|
private $ID;
|
||||||
private $Author;
|
private $Author;
|
||||||
private $Content;
|
private $Content;
|
||||||
private $PostDate;
|
private $PostDate;
|
||||||
private $ShowID;
|
private $ShowID;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct($id) {
|
public function __construct($id) {
|
||||||
$this->ID = $id;
|
$this->ID = $id;
|
||||||
|
|
||||||
$this->getComment($id);
|
$this->getComment($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getComment($id) {
|
private function getComment($id) {
|
||||||
|
|
||||||
$db = new DatabaseModule();
|
$db = new DatabaseModule();
|
||||||
|
|
||||||
$get = $db->Handle->prepare('SELECT * FROM episodecomments WHERE id = :id');
|
$get = $db->Handle->prepare('SELECT * FROM episodecomments WHERE id = :id');
|
||||||
$get->bindValue(':id', $id, PDO::PARAM_INT);
|
$get->bindValue(':id', $id, PDO::PARAM_INT);
|
||||||
$get->execute();
|
$get->execute();
|
||||||
|
|
||||||
$data = $get->fetch();
|
$data = $get->fetch();
|
||||||
|
|
||||||
$get->closeCursor();
|
$get->closeCursor();
|
||||||
|
|
||||||
$this->Author = $data['commentAuthor'];
|
$this->Author = $data['commentAuthor'];
|
||||||
$this->Content = $data['commentContent'];
|
$this->Content = $data['commentContent'];
|
||||||
$this->PostDate = betterDate($data['commentDate']);
|
$this->PostDate = betterDate($data['commentDate']);
|
||||||
$this->ArticleID = $data['showID'];
|
$this->ArticleID = $data['showID'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __get($what) {
|
public function __get($what) {
|
||||||
|
|
||||||
if(property_exists($this, $what)) {
|
if(property_exists($this, $what)) {
|
||||||
|
|
||||||
return $this->{$what};
|
return $this->{$what};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update($what) {
|
public function update($what) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,19 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
class Project {
|
class Project {
|
||||||
/* -- User info variables; used for the functions here -- */
|
/* -- User info variables; used for the functions here -- */
|
||||||
|
@ -23,28 +8,28 @@ CANTTOUCH;
|
||||||
private $Title;
|
private $Title;
|
||||||
private $Cover;
|
private $Cover;
|
||||||
private $LastUpdate;
|
private $LastUpdate;
|
||||||
|
|
||||||
/* -- User class constructor -- */
|
/* -- User class constructor -- */
|
||||||
public function __construct($id) {
|
public function __construct($id) {
|
||||||
$this->ID = $id;
|
$this->ID = $id;
|
||||||
|
|
||||||
$this->getProject($id);
|
$this->getProject($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- Used in the constructor to access the DB and get all the user's info and populate the variables -- */
|
/* -- Used in the constructor to access the DB and get all the user's info and populate the variables -- */
|
||||||
private function getProject($id) {
|
private function getProject($id) {
|
||||||
// Open database connection
|
// Open database connection
|
||||||
$db = new DatabaseModule();
|
$db = new DatabaseModule();
|
||||||
|
|
||||||
// Get user information from the DB
|
// Get user information from the DB
|
||||||
$getProject = $db->Handle->prepare('SELECT * FROM ms_projects WHERE id = :id');
|
$getProject = $db->Handle->prepare('SELECT * FROM ms_projects WHERE id = :id');
|
||||||
$getProject->bindValue(':id', $id, PDO::PARAM_INT); // bind $id to the placeholder
|
$getProject->bindValue(':id', $id, PDO::PARAM_INT); // bind $id to the placeholder
|
||||||
$getProject->execute();
|
$getProject->execute();
|
||||||
|
|
||||||
$ProjectInfo = $getProject->fetch(); // get the results from the query
|
$ProjectInfo = $getProject->fetch(); // get the results from the query
|
||||||
|
|
||||||
$getProject->closeCursor(); // close the SELECT query from continuing its search
|
$getProject->closeCursor(); // close the SELECT query from continuing its search
|
||||||
|
|
||||||
// Populate the variables
|
// Populate the variables
|
||||||
$this->ID = $ProjectInfo["id"];
|
$this->ID = $ProjectInfo["id"];
|
||||||
$this->Type = $ProjectInfo["type"];
|
$this->Type = $ProjectInfo["type"];
|
||||||
|
@ -53,7 +38,7 @@ CANTTOUCH;
|
||||||
$this->Cover = $ProjectInfo["cover"];
|
$this->Cover = $ProjectInfo["cover"];
|
||||||
$this->lastUpdate = betterDate($ProjectInfo["lastUpdate"]);
|
$this->lastUpdate = betterDate($ProjectInfo["lastUpdate"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- Returns whatever info needed at the moment -- */
|
/* -- Returns whatever info needed at the moment -- */
|
||||||
public function __get($what) {
|
public function __get($what) {
|
||||||
if(property_exists($this, $what)) {
|
if(property_exists($this, $what)) {
|
||||||
|
@ -62,10 +47,10 @@ CANTTOUCH;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- Updates a value in the DB belonging to the user -- */
|
/* -- Updates a value in the DB belonging to the user -- */
|
||||||
public function update($what) {
|
public function update($what) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,123 +1,108 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
class Show {
|
class Show {
|
||||||
|
|
||||||
private $ID;
|
private $ID;
|
||||||
private $Title;
|
private $Title;
|
||||||
private $ShowID;
|
private $ShowID;
|
||||||
private $Thumbnail;
|
private $Thumbnail;
|
||||||
private $Description;
|
private $Description;
|
||||||
private $EpisodeArray;
|
private $EpisodeArray;
|
||||||
|
|
||||||
private $EpisodeComments;
|
private $EpisodeComments;
|
||||||
|
|
||||||
private $db;
|
private $db;
|
||||||
|
|
||||||
private $ThumbPath = "http://localhost:8888/Resources/Images/Thumbs/Show/";
|
private $ThumbPath = "http://localhost:8888/Resources/Images/Thumbs/Show/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct($id) {
|
public function __construct($id) {
|
||||||
|
|
||||||
$DBM = new DatabaseModule();
|
$DBM = new DatabaseModule();
|
||||||
$this->db = $DBM->Handle;
|
$this->db = $DBM->Handle;
|
||||||
|
|
||||||
$this->ShowID = $id;
|
$this->ShowID = $id;
|
||||||
|
|
||||||
$this->CommentBox = GetTemplate('comments/commentbox');
|
$this->CommentBox = GetTemplate('comments/commentbox');
|
||||||
$this->CommentForm = GetTemplate('comments/commentform');
|
$this->CommentForm = GetTemplate('comments/commentform');
|
||||||
|
|
||||||
$this->getData();
|
$this->getData();
|
||||||
$this->GetEpisodeList();
|
$this->GetEpisodeList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getData() {
|
private function getData() {
|
||||||
|
|
||||||
$get = $this->db->prepare('SELECT * FROM ms_projects WHERE showid = :id');
|
$get = $this->db->prepare('SELECT * FROM ms_projects WHERE showid = :id');
|
||||||
$get->bindValue(':id', $this->ShowID, PDO::PARAM_INT); // bind $id to the placeholder
|
$get->bindValue(':id', $this->ShowID, PDO::PARAM_INT); // bind $id to the placeholder
|
||||||
$get->execute();
|
$get->execute();
|
||||||
|
|
||||||
$data = $get->fetch();
|
$data = $get->fetch();
|
||||||
|
|
||||||
$get->closeCursor();
|
$get->closeCursor();
|
||||||
|
|
||||||
$this->ID = $data["id"];
|
$this->ID = $data["id"];
|
||||||
$this->Title = $data["title"];
|
$this->Title = $data["title"];
|
||||||
$this->Thumbnail = $this->ThumbPath . $data["thumbnail"];
|
$this->Thumbnail = $this->ThumbPath . $data["thumbnail"];
|
||||||
$this->Description = $data["desc"];
|
$this->Description = $data["desc"];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __get($what) {
|
public function __get($what) {
|
||||||
|
|
||||||
if(property_exists($this, $what)) {
|
if(property_exists($this, $what)) {
|
||||||
|
|
||||||
return $this->{$what};
|
return $this->{$what};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function GetEpisodeList() {
|
public function GetEpisodeList() {
|
||||||
|
|
||||||
$get = $this->db->prepare("SELECT * FROM episodes WHERE `show` = :s ORDER BY id DESC");
|
$get = $this->db->prepare("SELECT * FROM episodes WHERE `show` = :s ORDER BY id DESC");
|
||||||
$get->bindValue(':s', $this->ShowID, PDO::PARAM_INT);
|
$get->bindValue(':s', $this->ShowID, PDO::PARAM_INT);
|
||||||
$get->execute();
|
$get->execute();
|
||||||
|
|
||||||
$episodes = $get->fetchAll();
|
$episodes = $get->fetchAll();
|
||||||
|
|
||||||
$get->closeCursor();
|
$get->closeCursor();
|
||||||
|
|
||||||
$this->EpisodeArray = $episodes;
|
$this->EpisodeArray = $episodes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function GetEpisodeComments($id) {
|
public function GetEpisodeComments($id) {
|
||||||
|
|
||||||
$get = $this->db->prepare('SELECT * FROM episodecomments WHERE showID = :id');
|
$get = $this->db->prepare('SELECT * FROM episodecomments WHERE showID = :id');
|
||||||
$get->bindValue(':id', $id, PDO::PARAM_INT);
|
$get->bindValue(':id', $id, PDO::PARAM_INT);
|
||||||
$get->execute();
|
$get->execute();
|
||||||
|
|
||||||
$data = $get->fetchAll();
|
$data = $get->fetchAll();
|
||||||
|
|
||||||
$list = array();
|
$list = array();
|
||||||
|
|
||||||
foreach($data as $ID) {
|
foreach($data as $ID) {
|
||||||
|
|
||||||
$comment = new EpisodeComment($ID['id']);
|
$comment = new EpisodeComment($ID['id']);
|
||||||
$poster = new User($comment->Author);
|
$poster = new User($comment->Author);
|
||||||
|
|
||||||
$list[] = ParseTemplate($this->CommentBox, array('a' => $poster->Avatar, 'u' => $poster->Username, 'c' => BBCode(magicClean($comment->Content)), 'd' => $comment->PostDate));
|
$list[] = ParseTemplate($this->CommentBox, array('a' => $poster->Avatar, 'u' => $poster->Username, 'c' => BBCode(magicClean($comment->Content)), 'd' => $comment->PostDate));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,19 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
class User {
|
class User {
|
||||||
/* -- User info variables; used for the functions here -- */
|
/* -- User info variables; used for the functions here -- */
|
||||||
|
@ -33,10 +18,10 @@ CANTTOUCH;
|
||||||
private $Reputation;
|
private $Reputation;
|
||||||
private $isVerified;
|
private $isVerified;
|
||||||
private $MemberLevel;
|
private $MemberLevel;
|
||||||
|
|
||||||
/* User Database Handle */
|
/* User Database Handle */
|
||||||
private $DB = null;
|
private $DB = null;
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------------------------------------- */
|
||||||
/* ------------------------------------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -45,10 +30,10 @@ CANTTOUCH;
|
||||||
$DM = new DatabaseModule();
|
$DM = new DatabaseModule();
|
||||||
$DM->createUserHandle();
|
$DM->createUserHandle();
|
||||||
$this->DB = $DM->userHandle;
|
$this->DB = $DM->userHandle;
|
||||||
|
|
||||||
|
|
||||||
$this->UserID = $id;
|
$this->UserID = $id;
|
||||||
|
|
||||||
$this->getUser($id);
|
$this->getUser($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,19 +42,19 @@ CANTTOUCH;
|
||||||
|
|
||||||
private function getUser($id) {
|
private function getUser($id) {
|
||||||
$db = $this->DB;
|
$db = $this->DB;
|
||||||
|
|
||||||
// Get username and ID from the database
|
// Get username and ID from the database
|
||||||
$getUser = $db->prepare('SELECT * FROM ms_users WHERE id = :id');
|
$getUser = $db->prepare('SELECT * FROM ms_users WHERE id = :id');
|
||||||
$getUser->bindValue(':id', $id, PDO::PARAM_INT); // bind $id to the placeholder
|
$getUser->bindValue(':id', $id, PDO::PARAM_INT); // bind $id to the placeholder
|
||||||
$getUser->execute();
|
$getUser->execute();
|
||||||
|
|
||||||
$User = $getUser->fetch(); // get the results from the query
|
$User = $getUser->fetch(); // get the results from the query
|
||||||
|
|
||||||
$getUser->closeCursor(); // close the SELECT query from continuing its search
|
$getUser->closeCursor(); // close the SELECT query from continuing its search
|
||||||
|
|
||||||
// Populate the variable(s)
|
// Populate the variable(s)
|
||||||
$this->Username = $User['username'];
|
$this->Username = $User['username'];
|
||||||
|
|
||||||
$this->Title = $User['title'];
|
$this->Title = $User['title'];
|
||||||
$this->Email = $User['email'];
|
$this->Email = $User['email'];
|
||||||
$this->Gender = $User['gender'];
|
$this->Gender = $User['gender'];
|
||||||
|
@ -83,28 +68,28 @@ CANTTOUCH;
|
||||||
$this->Reputation = $User['reputation'];
|
$this->Reputation = $User['reputation'];
|
||||||
$this->MemberLevel = $User['mlevel'];
|
$this->MemberLevel = $User['mlevel'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------------------------------------- */
|
||||||
/* ------------------------------------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
public function __get($what) {
|
public function __get($what) {
|
||||||
|
|
||||||
if(property_exists($this, $what)) {
|
if(property_exists($this, $what)) {
|
||||||
|
|
||||||
return $this->{$what};
|
return $this->{$what};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update($what) {
|
public function update($what) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,19 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
--- The Community Module
|
--- The Community Module
|
||||||
|
|
|
@ -1,19 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
--- The Database Module
|
--- The Database Module
|
||||||
|
|
|
@ -1,55 +1,39 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #425b5c;">
|
|
||||||
<center><img src="../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_COOKIE['MadSplashUser'])) {
|
if(!empty($_COOKIE['MadSplashUser'])) {
|
||||||
$user = explode(" ", $_COOKIE['MadSplashUser']);
|
$user = explode(" ", $_COOKIE['MadSplashUser']);
|
||||||
|
|
||||||
echo <<<SUPERNAV
|
echo <<<SUPERNAV
|
||||||
<section id="SuperNav">
|
<section id="SuperNav">
|
||||||
<div class="left" style="padding-left: 12px;">
|
<div class="left" style="padding-left: 12px;">
|
||||||
Heyas, <a href="#">{$user[1]}</a>! You can go to your <a href="#">User CP</a> or <a href="http://localhost:8888/Resources/Scripts/PHP/Hubs/CommunityHub.php?user={$user[0]}&action=logout">logout</a>.
|
Heyas, <a href="#">{$user[1]}</a>! You can go to your <a href="#">User CP</a> or <a href="http://localhost:8888/Resources/Scripts/PHP/Hubs/CommunityHub.php?user={$user[0]}&action=logout">logout</a>.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
||||||
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
||||||
|
|
||||||
<div class="CrossNav">
|
<div class="CrossNav">
|
||||||
<img src="../Resources/Images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
|
<img src="../Resources/Images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<a href="http://therpg.madsplash.net/" target="_blank">
|
<a href="http://therpg.madsplash.net/" target="_blank">
|
||||||
<li class="RPG">
|
<li class="RPG">
|
||||||
<img src="../Resources/Images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
|
<img src="../Resources/Images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
|
||||||
|
|
||||||
<a class="RPGLink">The RPG</a> <br />
|
<a class="RPGLink">The RPG</a> <br />
|
||||||
Our up-and-coming web-and-text-based RPG. Play!
|
Our up-and-coming web-and-text-based RPG. Play!
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<li class="footer">
|
<li class="footer">
|
||||||
<div style="padding: 4px 8px;">
|
<div style="padding: 4px 8px;">
|
||||||
Follow us here, too: <br />
|
Follow us here, too: <br />
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
||||||
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -62,36 +46,36 @@ SUPERNAV;
|
||||||
echo <<<SUPERNAV
|
echo <<<SUPERNAV
|
||||||
<section id="SuperNav">
|
<section id="SuperNav">
|
||||||
<div class="left" style="padding-left: 12px;">
|
<div class="left" style="padding-left: 12px;">
|
||||||
Hey there, Guest. You can <a href="http://localhost:8888/community/index.php?page=login">login</a>
|
Hey there, Guest. You can <a href="http://localhost:8888/community/index.php?page=login">login</a>
|
||||||
or <a href="http://localhost:8888/community/index.php?page=register">register</a> here.
|
or <a href="http://localhost:8888/community/index.php?page=register">register</a> here.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
||||||
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
||||||
|
|
||||||
<div class="CrossNav">
|
<div class="CrossNav">
|
||||||
<img src="../Resources/Images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
|
<img src="../Resources/Images/Icons/General/CrossNavDark.png" style="width: 28px; height: 28px;" />
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<a href="http://therpg.madsplash.net/" target="_blank">
|
<a href="http://therpg.madsplash.net/" target="_blank">
|
||||||
<li class="RPG">
|
<li class="RPG">
|
||||||
<img src="../Resources/Images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
|
<img src="../Resources/Images/Logos/TheRPG.png" style="width: 38px; float: left; margin-right: 4px; margin-top: 4px;" />
|
||||||
|
|
||||||
<a class="RPGLink">The RPG</a> <br />
|
<a class="RPGLink">The RPG</a> <br />
|
||||||
Our up-and-coming web-and-text-based RPG. Play!
|
Our up-and-coming web-and-text-based RPG. Play!
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<li class="footer">
|
<li class="footer">
|
||||||
<div style="padding: 4px 8px;">
|
<div style="padding: 4px 8px;">
|
||||||
Follow us here, too: <br />
|
Follow us here, too: <br />
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
<a class="YouTube" href="http://youtube.com/User/MadSplashTV" target="_blank"> </a>
|
||||||
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
<a class="Twitter" href="http://twitter.com/MadSplashStudio" target="_blank"> </a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -101,4 +85,4 @@ SUPERNAV;
|
||||||
</section>
|
</section>
|
||||||
SUPERNAV;
|
SUPERNAV;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user