function saveProfile($verify) { $sim = new simulator(); $handle = fopen("php://stdin", "r"); $pic = new photo(); $clr = new color(); echo "Enter Header Picture"; $this->temp = $pic->returnPhoto($verify); $size = count($this->temp); for ($x = 0; $x <= $size - 1; $x++) { echo $x . " " . $this->temp[$x] . "\n"; } echo "Press Number to add photo"; $pho = fgets($handle); $photo = "Header Picture: " . $this->temp[1]; echo "Enter Profile Picture"; for ($x = 0; $x <= $size - 1; $x++) { echo $x . " " . $this->temp[$x] . "\n"; } $ppho = fgets($handle); $pPhoto = "Profile Picture:" . $this->temp[1]; echo "Enter Full Name"; $full_name = fgets($handle); echo "Enter Bio"; $bio = fgets($handle); echo "Enter Location"; $location = fgets($handle); echo "Enter Website"; $website = fgets($handle); echo "Enter DOB "; $dob = fgets($handle); echo "Enter Theme Color"; $clrs = $clr->returnColors(); for ($x = 0; $x <= $size - 1; $x++) { echo $x . " " . $clrs[$x] . "\n"; } $t = fgets($handle); $theme_color = $clrs[1]; $myfile = fopen("{$verify}" . "profile", "w") or die("Unable to open file!"); fwrite($myfile, $photo . "\n" . $pPhoto . "\n" . $full_name . $bio . $location . $website . $dob . $theme_color); echo "Profile Made"; $sim->followUp($verify); }
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); $text = " Tweet: " . $tweet; echo "Write Location"; $loc = fgets($handle); $location = "Location: " . $loc; echo "Enter Photo\n"; $this->pic_array = $pic->returnPhoto($verify); $size = count($this->pic_array); for ($x = 0; $x <= $size - 1; $x++) { echo $x . " " . $this->pic_array[$x] . "\n"; } $pho = fgets($handle); $photo = "Picture: " . $this->pic_array[1]; $twt->post_tweet($verify, $text, $location, $photo); }