2009-08-25 12:16:42 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
****************************************************************************************************
|
|
|
|
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. |
|
|
|
|
| @ Author : ArslanHassan |
|
|
|
|
| @ Software : ClipBucket , © PHPBucket.com |
|
|
|
|
****************************************************************************************************
|
|
|
|
*/
|
|
|
|
require 'includes/config.inc.php';
|
|
|
|
|
|
|
|
if($userquery->login_check('',true)){
|
|
|
|
redirect_to(BASEURL);
|
|
|
|
}
|
|
|
|
|
|
|
|
//Checking If Registertatiosn Are Allowed or Not
|
|
|
|
|
|
|
|
if(!$signup->Registration()){
|
|
|
|
$msg = $LANG['usr_reg_err'];
|
|
|
|
}else{
|
|
|
|
if(isset($_POST['signup'])){
|
2009-08-27 15:01:32 +00:00
|
|
|
$signup->signup_user($_POST);
|
2009-08-25 12:16:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
subtitle('signup');
|
|
|
|
|
|
|
|
//Login User
|
|
|
|
|
|
|
|
if(isset($_POST['login'])){
|
|
|
|
$username = $_POST['username'];
|
|
|
|
$username = mysql_clean(clean($username));
|
|
|
|
$password = mysql_clean(clean($_POST['password']));
|
|
|
|
/*if($userquery->userlogin($username,$password)=='loggedin'){
|
|
|
|
redirect_to(BASEURL.login_success);
|
|
|
|
}else{
|
|
|
|
$error = $userquery->userlogin($username,$password);
|
|
|
|
if($error == 'banned'){
|
|
|
|
$msg = $LANG['usr_ban_err'];
|
|
|
|
}else{
|
|
|
|
$msg= $LANG['usr_login_err'];
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
if($userquery->login_user($username,$password))
|
|
|
|
redirect_to(BASEURL.login_success);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//Checking Ban Error
|
|
|
|
if(!isset($_POST['login']) && !isset($_POST['signup'])){
|
|
|
|
if(@$_GET['ban'] == true){
|
|
|
|
$msg = $LANG['usr_ban_err'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Assign('msg',$msg);
|
|
|
|
Template('header.html');
|
|
|
|
Template('message.html');
|
|
|
|
if($signup->Registration())
|
|
|
|
Template('signup.html');
|
|
|
|
Template('footer.html');
|
|
|
|
?>
|