Пример #1
0
     header("Location: /galary/{$visitor}/");
     //$userName = $visitor;
     break;
 case 1:
     $temp = $galOne->showGalariesList($user, $visitor, $listNum);
     $output = makeGalaryList($temp, $link, $urlArr, $user, $visitor);
     break;
 case 2:
     switch ($altname) {
         case "add":
             // quki.ru/galary/13/add
             if ($visitor == $user) {
                 if (count($_POST) != 0) {
                     $newGalaryName = $_POST["galary_name"];
                     $comment = $_POST["galary_comment"];
                     $id = $galOne->addNewGalary($user, $newGalaryName, $comment);
                     if ($id != 0) {
                         header("Location: /galary/{$user}/{$id}/edit/2/");
                     }
                 }
                 /*
                 		        			if (count($_FILES)!=0)   
                 		        			{
                 		        				$altname = $_POST["id"];
                 		        				$fss = new FS();
                 		        				$userID = $user;
                 		        				$uploadDir = "/photos/$userID/galary";
                 		        				$filePropArr = $_FILES;
                 		        				$uFile = $fss->upload2($uploadDir, $filePropArr);
                 		        				$galOne->addPhoto($userID, $altname, $uploadDir."/".$uFile["lastName"]);
                 		        			} */