diff --git a/core/SDL/class.account.php b/core/SDL/class.account.php
index 7c37f76..8b45fe0 100644
--- a/core/SDL/class.account.php
+++ b/core/SDL/class.account.php
@@ -670,10 +670,14 @@ function delete_key($key)
// POST account id, reason, and banned by.
// @$banip: 1 = yes, ban the IP as well, 0 = Dont ban IP
- function banAccount($bannid, $banreason, $bannedby, $banip = 0)
+ function banAccount($bannid, $banreason, $banduration, $bannedby, $banip = 0)
{
- $timez = time();
- $unban = $timez - 10;
+ $starttime = time();
+ if($banduration > 0)
+ $endtime = $starttime + $banduration;
+ else
+ $endtime = 0;
+
$this->DB->query("INSERT INTO `account_banned`(
`id`,
`bandate`,
@@ -683,8 +687,8 @@ function banAccount($bannid, $banreason, $bannedby, $banip = 0)
`active`)
VALUES(
'".$bannid."',
- '".$timez."',
- '". $unban ."',
+ '".$starttime."',
+ '".$endtime."',
'".$bannedby."',
'".$banreason."',
'1')
@@ -702,14 +706,14 @@ function banAccount($bannid, $banreason, $bannedby, $banip = 0)
`banreason`)
VALUES(
'". $getip ."',
- '". $timez ."',
- '". $unban ."',
+ '". $starttime ."',
+ '". $endtime ."',
'". $bannedby ."',
'". $banreason. "')
");
}
- $this->DB->query("UPDATE `mw_account_extend` SET `account_level`=5 WHERE account_id='".$bannid."'");
+ //$this->DB->query("UPDATE `mw_account_extend` SET `account_level`=5 WHERE account_id='".$bannid."'");
return TRUE;
}
diff --git a/core/core.php b/core/core.php
index 538bf5a..478b316 100644
--- a/core/core.php
+++ b/core/core.php
@@ -10,8 +10,8 @@
class Core
{
- var $version = '4.0.0';
- var $version_date = '2017-01-20, 22:50';
+ var $version = '4.0.3';
+ var $version_date = '2017-01-28, 00:15';
var $exp_dbversion = '1.0a';
function __construct()
diff --git a/inc/account/account.manage.php b/inc/account/account.manage.php
index 92ec5b9..7c418ac 100644
--- a/inc/account/account.manage.php
+++ b/inc/account/account.manage.php
@@ -42,7 +42,11 @@
function changeEmail()
{
- global $lang, $user, $Account, $DB;
+ global $lang, $user, $Account, $DB, $Config;
+
+ if(!$Config->get('allow_user_emailchange'))
+ return TRUE;
+
$newemail = trim($_POST['email']);
// First we check if the email is valid
@@ -86,7 +90,7 @@ function changePass()
{
if($Account->setPassword($user['id'], $newpass) == TRUE)
{
- output_message('success', $lang['change_pass_success']);
+ output_message('success', $lang['change_pass_success'].'');
}
else
{
diff --git a/inc/admin/body_header.php b/inc/admin/body_header.php
index 4ab6a47..787f0f2 100644
--- a/inc/admin/body_header.php
+++ b/inc/admin/body_header.php
@@ -9,11 +9,6 @@
/****************************************************************************/
// Block out all users who arent admins
-if($user['account_level'] == 5)
-{
- echo "You Are Banned";
- die();
-}
if($user['account_level'] <= 2)
{
redirect('index.php',1);
diff --git a/inc/admin/script_files/admin.users.php b/inc/admin/script_files/admin.users.php
index 78d26a6..2c49642 100644
--- a/inc/admin/script_files/admin.users.php
+++ b/inc/admin/script_files/admin.users.php
@@ -65,7 +65,7 @@ function changePass()
{
if($Account->setPassword($_GET['id'], $newpass) == TRUE)
{
- output_message('success','Password set successfully! Please wait while your redirected...
+ output_message('success','Password set successfully! Please wait while you are redirected...
');
}
else
@@ -136,7 +136,7 @@ function editUser()
`total_donations`='".$_POST['total_donations']."'
WHERE `account_id`='".$_GET['id']."'
");
- output_message('success','User Updated Successfully! Please wait while your redirected...
+ output_message('success','User Updated Successfully! Please wait while you are redirected...
');
}
}
@@ -148,7 +148,7 @@ function unBan($unbanid)
if($Account->unbanAccount($unbanid) == TRUE)
{
output_message('success','Success. Account #'.$unbanid.' Successfully Un-Banned!
- Please wait while your redirected... banAccount($bannid, $banreason, $user['username']) == TRUE)
+ if($Account->banAccount($bannid, $banreason, $banduration, $user['username'], $banip) == TRUE)
{
output_message('success','Success. Account #'.$bannid.' Successfully banned. Reason: '.$banreason.'');
}
@@ -182,37 +182,53 @@ function showBanForm($banid)
{
global $DB;
$unme = $DB->selectCell("SELECT username FROM account WHERE id='".$banid."'");
- echo "
-
-