Esempio n. 1
0
 public function post_tweet($verify, $text, $location, $photo)
 {
     $sim = new simulator();
     $dbh = new dbHandler();
     $dbh->sendTweets($verify, $text, $location, $photo);
     $sim->followUp($verify);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 function myLogin($a, $b)
 {
     $obj = new simulator();
     $ojb = new dbHandler();
     $verify = $ojb->checkUser($a, $b);
     if ($verify) {
         $obj->followUp($verify);
     } else {
         $obj->wrongLogin();
     }
 }
Esempio n. 5
0
 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);
 }