public function Render() { $data = new stdClass(); $data->title = Strings::Get(Strings::SECTION_LOGIN, Strings::TITLE); $data->legend = Strings::Get(Strings::SECTION_LOGIN, Strings::LEGEND); $data->username = Strings::Get(Strings::SECTION_LOGIN, Strings::USERNAME); $data->password = Strings::Get(Strings::SECTION_LOGIN, Strings::PASSWORD); $data->button = Strings::Get(Strings::SECTION_LOGIN, Strings::SUBMIT); $data->message = $this->message; $elements = $this->elements; include "layout.php"; }
public function DoStuff() { if (isset($_GET["lang"])) { $lang = $_GET["lang"]; } else { $lang = "en"; } if (file_exists("{$lang}.ini")) { Strings::LoadLanguageFile("{$lang}.ini"); } else { Strings::LoadLanguageFile("en.ini"); } $view = new View(); $model = new Model(); if ($view->IsLoginHappening()) { $messageid = $model->TryLogin($view->GetUserData()); $message = Strings::Get(Strings::SECTION_LOGIN, $messageid); $view->SetMessage($message); } $view->Render(); }