Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('IN_CMS') || die("Don't access this file directly.");
- $profileId = $main->clean($_GET['profileDest']);
- $newsId = $main->clean($_GET['newsDest']);
- $teamId = $main->clean($_GET['teamDest']);
- if ($_POST)
- {
- unset($me);
- $_SESSION['username'] = strtolower($_POST['username']);
- $_SESSION['password'] = $main->clean($_POST['password']);
- $user_info = array('username' => $_SESSION['username']);
- $me = new user($user_info, check_login);
- $me->info['username_clean'] = $_SESSION['username'];
- $tpl_vars['username'] = $main->clean($_SESSION['username']);
- if(is_numeric($profileId) && $me->check_login())
- {
- header("Location:?module=Community&file=Users&id=" . $profileId . "#add_comment");
- }
- if(is_numeric($newsId) && $me->check_login())
- {
- header("Location:?module=News&file=Article&id=" . $newsId ."#add_comment");
- }
- if(is_numeric($teamId) && $me->check_login())
- {
- header("Location:?module=Community&file=Teams&id=" . $teamId ."#add_comment");
- }
- if(empty($_POST['username']))
- {
- $messages[] = "Please enter a username.";
- }
- if(empty($_POST['password']))
- {
- $messages[] = "Please enter a password.";
- }
- if ($me->check_login())
- {
- $messages[] = "Successful Login.<br /><br />Continue to the <a href='?module=Your_Account'>User Cp</a>.";
- $tpl_vars['success'] = true;
- }
- else
- {
- if(!empty($_POST['username']) && !empty($_POST['password']))
- $messages[] = "Invalid login. Try again.";
- }
- $tpl_vars['messages'] = $messages;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement