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 |
|
|
|
|
****************************************************************************************************
|
|
|
|
*/
|
2009-11-30 19:46:45 +00:00
|
|
|
|
|
|
|
define("THIS_PAGE","signup");
|
|
|
|
define("PARENT_PAGE","signup");
|
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
require 'includes/config.inc.php';
|
2009-12-09 13:43:19 +00:00
|
|
|
|
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
if($userquery->login_check('',true)){
|
|
|
|
redirect_to(BASEURL);
|
|
|
|
}
|
|
|
|
|
2009-12-09 13:43:19 +00:00
|
|
|
/**
|
|
|
|
* Signing up new user
|
|
|
|
*/
|
2009-08-25 12:16:42 +00:00
|
|
|
if(isset($_POST['signup'])){
|
2009-12-09 13:43:19 +00:00
|
|
|
if(!$userquery->is_registeration_allowed())
|
|
|
|
e(lang('usr_reg_err'));
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$signup = $userquery->signup_user($_POST);
|
|
|
|
if($signup)
|
|
|
|
{
|
|
|
|
$udetails = $userquery->get_user_details($signup);
|
|
|
|
$eh->flush();
|
|
|
|
assign('udetails',$udetails);
|
|
|
|
assign('mode','signup_success');
|
|
|
|
}
|
|
|
|
}
|
2009-08-25 12:16:42 +00:00
|
|
|
}
|
2009-12-09 13:43:19 +00:00
|
|
|
|
2009-08-25 12:16:42 +00:00
|
|
|
|
|
|
|
//Login User
|
|
|
|
|
|
|
|
if(isset($_POST['login'])){
|
|
|
|
$username = $_POST['username'];
|
|
|
|
$username = mysql_clean(clean($username));
|
|
|
|
$password = mysql_clean(clean($_POST['password']));
|
|
|
|
if($userquery->login_user($username,$password))
|
2009-12-29 11:28:48 +00:00
|
|
|
redirect_to(cblink(array('name'=>'login_success')));
|
2009-08-25 12:16:42 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//Checking Ban Error
|
|
|
|
if(!isset($_POST['login']) && !isset($_POST['signup'])){
|
|
|
|
if(@$_GET['ban'] == true){
|
|
|
|
$msg = $LANG['usr_ban_err'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-31 08:59:12 +00:00
|
|
|
subtitle(lang("signup"));
|
2009-10-14 21:09:54 +00:00
|
|
|
//Displaying The Template
|
|
|
|
template_files('signup.html');
|
|
|
|
display_it()
|
2009-08-25 12:16:42 +00:00
|
|
|
?>
|