Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- // PATH DECLARATION
- $path = PATH;
- // CREATE TPL
- $tpl = new Template;
- // LOAD TPL
- $tpl->load(TPL."/login.html");
- //LOAD CLASS
- include_once("lib/User.class.php");
- include_once("lib/Message.class.php");
- // GETTING INFO
- if($_POST["submit"])
- {
- if(!empty($_POST["username"]) && !empty($_POST["password"]))
- {
- try
- {
- $user = new User();
- $user->Username = $_POST["username"];
- $user->Password = $_POST["password"];
- $user->Login();
- $feedback = "";
- }
- catch(Exception $e)
- {
- $error = $e->getMessage();
- }
- }
- else
- {
- $error = "Vul alle velden in.";
- }
- }
- if(isset($error)){$login_message = feedbackHandler($feedback,$error);}
- $message = new Message();
- $messages = $message->countRows("totalInbox");
- // REPLACE $VAR BY TPL #VAR#
- $tpl->replace("path",$path);
- $tpl->replace("messages",$messages);
- $tpl->replace("login_message",$login_message);
- $tpl->replace("username",$_SESSION["U"]);
- $tpl->replace("userID",$_SESSION["I"]);
- $tpl->publish(); // PUBLISH TEMPLATE
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement