public function gettweetsAdmin($verify) { $dbh = new dbHandler(); $sim = new simulator(); $twts = $dbh->returnTweets($verify); $sim->showTweets($twts); }
public function showProfile($verify) { $sim = new simulator(); $this->prr = file_get_contents($verify . "profile", FILE_USE_INCLUDE_PATH); echo $this->prr; $handle = fopen("php://stdin", "r"); $extra = fgets($handle); $sim->followUp($verify); }
function addFollowers($verify) { $obj = new simulator(); $dbh1 = new dbHandler(); $obj->returnUsersF($verify); $follow = $obj->getFollowersInfo(); $following = array(); array_push($following, $follow); $obj->afterFollowing($following, $verify, $follow); }
function readMessage($verify) { $file = file_get_contents($verify . "message", FILE_USE_INCLUDE_PATH); if (trim($file) == false) { echo "NO MESSAGES"; } else { echo $file; } $sim = new simulator(); $sim->followUp($verify); }
public function AdminLogin($username, $password) { $ojb = new dbHandler(); $sim = new simulator(); $verify = $ojb->checkAdmin($username, $password); if ($verify) { $sim->afterAdminLogin($verify); } else { echo "Re-Enter Your Credentials Please"; $sim->adminLoginInfo(); } }
function addToList($list_name, $verify) { $db = new dbHandler(); $sim = new simulator(); $handle = fopen("php://stdin", "r"); echo "Press 1 to add people in {$list_name}"; $db->allUsersF($verify); echo "========Press the ID Number of the User to Add it to the list===========\n"; $b = fgets($handle); $member = $db->returnUser($b); array_push($list_name, $member); $sim->afterList($list_name, $verify); }
function addUser() { $sim = new simulator(); $handle = fopen("php://stdin", "r"); echo "Enter Email\n"; $email = fgets($handle); echo "Enter Username"; $username = fgets($handle); echo "Enter Password"; $password = fgets($handle); $id = sizeof($this->users) + 1; $newUser = array("id" => $id, "email" => $email, "username" => $username, "password" => $password); array_push($this->users, $newUser); $sim->followUp($username); }
<?php include_once "Api/user.php"; include_once "Api/tweet.php"; include_once "Api/dbhandle.php"; include_once "Api/profile.php"; include_once "Api/list.php"; include_once "Api/message.php"; include_once "Api/admin.php"; $obj = new simulator(); $obj->welcome(); class simulator { public function __construct() { // $this->setting(); $twt = new tweet(); } public function wrongLogin() { echo "Please Re-Enter Your Credentials\n"; $this->loginInfo(); } function tweetInput($verify) { $pic = new photo(); $twt = new tweet(); $dbh = new dbHandler(); $handle = fopen("php://stdin", "r"); echo "Write your Tweet\n "; $tweet = fgets($handle);