示例#1
0
 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);
 }