mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-16 16:21:01 +00:00
more updates
This commit is contained in:
@@ -20,11 +20,11 @@ class MYSQL_DB {
|
|||||||
|
|
||||||
function register($username, $password, $email, $tribe, $act) {
|
function register($username, $password, $email, $tribe, $act) {
|
||||||
$time = time();
|
$time = time();
|
||||||
$timep = time() + PROTECTION;
|
$stime = strtotime(START_DATE)-strtotime(date('m/d/Y'))+strtotime(START_TIME);
|
||||||
$stime = strtotime(START_DATE)+strtotime(START_TIME)-time();
|
|
||||||
if($stime > time()){
|
if($stime > time()){
|
||||||
$time = $stime;
|
$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)";
|
$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)) {
|
if(mysql_query($q, $this->connection)) {
|
||||||
return mysql_insert_id($this->connection);
|
return mysql_insert_id($this->connection);
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ class MYSQLi_DB {
|
|||||||
|
|
||||||
function register($username, $password, $email, $tribe, $act) {
|
function register($username, $password, $email, $tribe, $act) {
|
||||||
$time = time();
|
$time = time();
|
||||||
$timep = time() + PROTECTION;
|
$stime = strtotime(START_DATE)-strtotime(date('m/d/Y'))+strtotime(START_TIME);
|
||||||
$stime = strtotime(START_DATE)+strtotime(START_TIME)-time();
|
|
||||||
if($stime > time()){
|
if($stime > time()){
|
||||||
$time = $stime;
|
$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)";
|
$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)) {
|
if(mysql_query($this->connection, $q)) {
|
||||||
return mysql_insert_id($this->connection);
|
return mysql_insert_id($this->connection);
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ else
|
|||||||
<h5><img class="img_u04" src="img/x.gif" alt="login" /></h5>
|
<h5><img class="img_u04" src="img/x.gif" alt="login" /></h5>
|
||||||
<p><?php echo COOKIES; ?></p>
|
<p><?php echo COOKIES; ?></p>
|
||||||
<?php
|
<?php
|
||||||
if(START_DATE > date('m/d/Y')){
|
$stime = strtotime(START_DATE)-strtotime(date('m/d/Y'))+strtotime(START_TIME);
|
||||||
|
if($stime > time()){
|
||||||
?>
|
?>
|
||||||
<br/><center><big>Server will start in: </big></center>
|
<br/><center><big>Server will start in: </big></center>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
@@ -97,7 +98,7 @@ function CountBack(secs) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
|
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
|
||||||
DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));
|
DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,100000));
|
||||||
DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
|
DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
|
||||||
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
|
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
|
||||||
|
|
||||||
@@ -144,129 +145,6 @@ CountBack(gsecs);
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}elseif(START_DATE == date('m/d/Y')){
|
|
||||||
|
|
||||||
if(START_TIME > date('H:i')){
|
|
||||||
?>
|
|
||||||
<br/><center><big>Server will start in: </big></center>
|
|
||||||
<script language="JavaScript">
|
|
||||||
TargetDate = "<?php echo START_DATE; ?> <?php echo START_TIME; ?>";
|
|
||||||
CountActive = true;
|
|
||||||
CountStepper = -1;
|
|
||||||
LeadingZero = true;
|
|
||||||
DisplayFormat = "%%H%%:%%M%%:%%S%%";
|
|
||||||
FinishMessage = "START NOW";
|
|
||||||
|
|
||||||
function calcage(secs, num1, num2) {
|
|
||||||
s = ((Math.floor(secs/num1))%num2).toString();
|
|
||||||
if (LeadingZero && s.length < 2)
|
|
||||||
s = "0" + s;
|
|
||||||
return "" + s + "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function CountBack(secs) {
|
|
||||||
if (secs < 0) {
|
|
||||||
document.getElementById("cntdwn").innerHTML = FinishMessage;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
|
|
||||||
DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));
|
|
||||||
DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
|
|
||||||
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
|
|
||||||
|
|
||||||
document.getElementById("cntdwn").innerHTML = DisplayStr;
|
|
||||||
if (CountActive)
|
|
||||||
setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
function putspan(backcolor, forecolor) {
|
|
||||||
document.write("<div class='activation_time' id='cntdwn'></div>");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof(BackColor)=="undefined")
|
|
||||||
BackColor = "white";
|
|
||||||
if (typeof(ForeColor)=="undefined")
|
|
||||||
ForeColor= "black";
|
|
||||||
if (typeof(TargetDate)=="undefined")
|
|
||||||
TargetDate = "12/31/2020 5:00 AM";
|
|
||||||
if (typeof(DisplayFormat)=="undefined")
|
|
||||||
DisplayFormat = "%%H%%:%%M%%:%%S%%";
|
|
||||||
if (typeof(CountActive)=="undefined")
|
|
||||||
CountActive = true;
|
|
||||||
if (typeof(FinishMessage)=="undefined")
|
|
||||||
FinishMessage = "";
|
|
||||||
if (typeof(CountStepper)!="number")
|
|
||||||
CountStepper = -1;
|
|
||||||
if (typeof(LeadingZero)=="undefined")
|
|
||||||
LeadingZero = true;
|
|
||||||
|
|
||||||
|
|
||||||
CountStepper = Math.ceil(CountStepper);
|
|
||||||
if (CountStepper == 0)
|
|
||||||
CountActive = false;
|
|
||||||
var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990;
|
|
||||||
putspan(BackColor, ForeColor);
|
|
||||||
var dthen = new Date(TargetDate);
|
|
||||||
var dnow = new Date();
|
|
||||||
if(CountStepper>0)
|
|
||||||
ddiff = new Date(dnow-dthen);
|
|
||||||
else
|
|
||||||
ddiff = new Date(dthen-dnow);
|
|
||||||
gsecs = Math.floor(ddiff.valueOf()/1000);
|
|
||||||
CountBack(gsecs);
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
}elseif(START_TIME <= date('H:i')) {
|
|
||||||
?>
|
|
||||||
<form method="post" name="snd" action="login.php">
|
|
||||||
<input type="hidden" name="ft" value="a4" />
|
|
||||||
<input type="hidden" name="csrf" value="<?php echo $key; ?>" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
Element.implement({
|
|
||||||
//imgid: falls zu dem link ein pfeil geh?rt kann dieser "auf/zugeklappt" werden
|
|
||||||
showOrHide: function(imgid) {
|
|
||||||
//einblenden
|
|
||||||
if (this.getStyle('display') == 'none')
|
|
||||||
{
|
|
||||||
if (imgid != '')
|
|
||||||
{
|
|
||||||
$(imgid).className = 'open';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//ausblenden
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (imgid != '')
|
|
||||||
{
|
|
||||||
$(imgid).className = 'close';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.toggleClass('hide');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<table cellpadding="1" cellspacing="1" id="login_form">
|
|
||||||
<tbody>
|
|
||||||
<tr class="top">
|
|
||||||
<th><?php echo NAME; ?></th>
|
|
||||||
<td><input class="text" type="text" name="user" value="<?php echo stripslashes(stripslashes(stripslashes($form->getDiff("user",$_COOKIE['COOKUSR'])))); ?>" maxlength="30" autocomplete='off' /> <span class="error"> <?php echo $form->getError("user"); ?></span></td>
|
|
||||||
</tr>
|
|
||||||
<tr class="btm">
|
|
||||||
<th><?php echo PASSWORD; ?></th>
|
|
||||||
<td><input class="text" type="password" name="pw" value="<?php echo $form->getValue("pw");?>" maxlength="30" autocomplete='off' /> <span class="error"><?php echo $form->getError("pw"); ?></span></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p class="btn">
|
|
||||||
<!--<input type="hidden" name="e1d9d0c" value="" />-->
|
|
||||||
<input type="image" value="login" name="s1" onclick="xy();" id="btn_login" class="dynamic_img" src="img/x.gif" alt="login button" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}else{ ?>
|
}else{ ?>
|
||||||
<form method="post" name="snd" action="login.php">
|
<form method="post" name="snd" action="login.php">
|
||||||
<input type="hidden" name="ft" value="a4" />
|
<input type="hidden" name="ft" value="a4" />
|
||||||
@@ -302,7 +180,7 @@ Element.implement({
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="btm">
|
<tr class="btm">
|
||||||
<th><?php echo PASSWORD; ?></th>
|
<th><?php echo PASSWORD; ?></th>
|
||||||
<td><input class="text" type="password" name="pw" value="<?php echo $form->getValue("pw");?>" maxlength="30" autocomplete='off' /> <span class="error"><?php echo $form->getError("pw"); ?></span></td>
|
<td><input class="text" type="password" name="pw" value="<?php echo $form->getValue("pw");?>" maxlength="100" autocomplete='off' /> <span class="error"><?php echo $form->getError("pw"); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user