more fixes

This commit is contained in:
yi12345
2013-05-13 13:10:06 +03:00
parent 5a94d1d297
commit 9dffb208e3
4 changed files with 21 additions and 15 deletions
+5 -2
View File
@@ -19,8 +19,11 @@ class MYSQL_DB {
}
function register($username, $password, $email, $tribe, $act) {
$time = time();
$timep = (strtotime(START_TIME) + PROTECTION);
$time = time();
if(strtotime(START_TIME) > time()){
$time = strtotime(START_TIME);
}
$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);