case "login": if ($method === "GET") { general::displayLoginForm(); } elseif ($method === "POST") { general::handleLogin(); } break; case "register": if ($method === "GET") { general::displayRegisterForm(); } elseif ($method === "POST") { general::handleRegister(); } break; case "registerOK": general::displayRegisterOKPage(); break; case "logout": general::logout(); break; } class general { public static function displayLoginForm($vars = array()) { global $smarty; $vars = self::ext($vars, array("error" => "false", "formAction" => "/general.php?action=login")); $smarty->assign($vars); $smarty->display("login.tpl.html"); } public static function handleLogin()