This commit is contained in:
yi12345
2013-07-01 03:15:51 +03:00
parent 8470e618a3
commit 4a7210b1c0
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -21,8 +21,9 @@ class MYSQL_DB {
function register($username, $password, $email, $tribe, $act) {
$time = time();
$timep = time() + PROTECTION;
if(strtotime(START_TIME) > time()){
$timep = (strtotime(START_TIME) + PROTECTION);
$stime = strtotime(START_DATE)+strtotime(START_TIME)-time();
if($stime > time()){
$time = $stime;
}
$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)) {
+3 -2
View File
@@ -24,8 +24,9 @@ class MYSQLi_DB {
function register($username, $password, $email, $tribe, $act) {
$time = time();
$timep = time() + PROTECTION;
if(strtotime(START_TIME) > time()){
$timep = (strtotime(START_TIME) + PROTECTION);
$stime = strtotime(START_DATE)+strtotime(START_TIME)-time();
if($stime > time()){
$time = $stime;
}
$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)) {