} //$data=new UserDataChange(); //Registry::setKey("loc",$currentUser->location->getLocationId()); //$currentUser->location->changeLocation(array("countryId" => 3159, "regionId" =>54 , "cityId" => 5281)); $timeUTC = new UTCTime(true); $smarty->assign("lastUpdateTime", $timeUTC->getTime($currentUser->lastUpdate)); $smarty->assign("location", $currentUser->location->getLocation()); $smarty->assign("info", $currentUser->getInfo()); $smarty->assign("user", $currentUser); $smarty->assign("photo", $currentUser->getPhoto()); $output["title"] = $currentUser->name . " " . $currentUser->secondName; $output["text"] = $smarty->fetch("users.view.tpl"); break; case "logout": try { $usersSignInOut->signOut(); } catch (UserException $e) { } header("Location: {$links['enterForm']}"); break; case "register": $output["text"] = $smarty->fetch("users.register.tpl"); break; case "create": $registerUser = new UserRegister(); $registerUser->mailTemplate = "users.mail.tpl"; try { $registerUser->checkPassword($_POST["password1"], $_POST["password2"]); $id = $registerUser->register($_POST["mail"], $_POST["password1"], $_POST["name"], $_POST["surname"], $_POST["burthday"], $_POST["gender"], 0); } catch (UserException $usrException) { $_SESSION["error"] = $usrException->getMessage();