From ee6f0bfb92aaf4fe2ab1278267899ff409d56a43 Mon Sep 17 00:00:00 2001 From: yi12345 Date: Mon, 1 Jul 2013 15:30:50 +0300 Subject: [PATCH] more updates --- GameEngine/Database/db_MYSQL.php | 4 +- GameEngine/Database/db_MYSQLi.php | 4 +- login.php | 130 +----------------------------- 3 files changed, 8 insertions(+), 130 deletions(-) diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php index 8ce744aa..9422aa57 100644 --- a/GameEngine/Database/db_MYSQL.php +++ b/GameEngine/Database/db_MYSQL.php @@ -20,11 +20,11 @@ class MYSQL_DB { function register($username, $password, $email, $tribe, $act) { $time = time(); - $timep = time() + PROTECTION; - $stime = strtotime(START_DATE)+strtotime(START_TIME)-time(); + $stime = strtotime(START_DATE)-strtotime(date('m/d/Y'))+strtotime(START_TIME); if($stime > time()){ $time = $stime; } + $timep = $time + PROTECTION; $q = "INSERT INTO " . TB_PREFIX . "users (username,password,access,email,timestamp,tribe,act,protect,lastupdate,regtime) VALUES ('$username', '$password', " . USER . ", '$email', $time, $tribe, '$act', $timep, $time, $time)"; if(mysql_query($q, $this->connection)) { return mysql_insert_id($this->connection); diff --git a/GameEngine/Database/db_MYSQLi.php b/GameEngine/Database/db_MYSQLi.php index 58a17934..cea3a429 100644 --- a/GameEngine/Database/db_MYSQLi.php +++ b/GameEngine/Database/db_MYSQLi.php @@ -23,11 +23,11 @@ class MYSQLi_DB { function register($username, $password, $email, $tribe, $act) { $time = time(); - $timep = time() + PROTECTION; - $stime = strtotime(START_DATE)+strtotime(START_TIME)-time(); + $stime = strtotime(START_DATE)-strtotime(date('m/d/Y'))+strtotime(START_TIME); if($stime > time()){ $time = $stime; } + $timep = $time + PROTECTION; $q = "INSERT INTO " . TB_PREFIX . "users (username,password,access,email,timestamp,tribe,act,protect,lastupdate,regtime) VALUES ('$username', '$password', " . USER . ", '$email', $time, $tribe, '$act', $timep, $time, $time)"; if(mysql_query($this->connection, $q)) { return mysql_insert_id($this->connection); diff --git a/login.php b/login.php index 25441662..9022ac39 100644 --- a/login.php +++ b/login.php @@ -73,7 +73,8 @@ else
login

date('m/d/Y')){ +$stime = strtotime(START_DATE)-strtotime(date('m/d/Y'))+strtotime(START_TIME); +if($stime > time()){ ?>
Server will start in:
date('H:i')){ -?> -
Server will start in:
- - -
- - - - - - - - - - - - - - -
" maxlength="30" autocomplete='off' /> getError("user"); ?>
" maxlength="30" autocomplete='off' /> getError("pw"); ?>
- -

- - -

- -
-
@@ -302,7 +180,7 @@ Element.implement({ - " maxlength="30" autocomplete='off' /> getError("pw"); ?> + " maxlength="100" autocomplete='off' /> getError("pw"); ?>