mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-27 21:57:16 +00:00
Small changes
This commit is contained in:
@@ -30,7 +30,7 @@ class Automation {
|
|||||||
private $bountyOproduction = array();
|
private $bountyOproduction = array();
|
||||||
private $bountyOpop = 1;
|
private $bountyOpop = 1;
|
||||||
|
|
||||||
public function isWinner() {
|
public function isWinner() {
|
||||||
$q = mysqli_query($GLOBALS['link'],"SELECT vref FROM ".TB_PREFIX."fdata WHERE f99 = '100' and f99t = '40'");
|
$q = mysqli_query($GLOBALS['link'],"SELECT vref FROM ".TB_PREFIX."fdata WHERE f99 = '100' and f99t = '40'");
|
||||||
$isThere = mysqli_num_rows($q);
|
$isThere = mysqli_num_rows($q);
|
||||||
if($isThere > 0)
|
if($isThere > 0)
|
||||||
|
|||||||
@@ -3541,7 +3541,7 @@ class MYSQLi_DB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//end general statistics
|
//end general statistics
|
||||||
|
|
||||||
function addFriend($uid, $column, $friend) {
|
function addFriend($uid, $column, $friend) {
|
||||||
$q = "UPDATE " . TB_PREFIX . "users SET $column = $friend WHERE id = $uid";
|
$q = "UPDATE " . TB_PREFIX . "users SET $column = $friend WHERE id = $uid";
|
||||||
return mysqli_query($this->dblink,$q);
|
return mysqli_query($this->dblink,$q);
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ class Village {
|
|||||||
function Village() {
|
function Village() {
|
||||||
global $session, $database;
|
global $session, $database;
|
||||||
if(isset($_SESSION['wid'])) {
|
if(isset($_SESSION['wid'])) {
|
||||||
$this->wid = $_SESSION['wid'];
|
$this->wid = $_SESSION['wid'];
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->wid = $session->villages[0];
|
$this->wid = $session->villages[0];
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
include("GameEngine/Village.php");
|
include("GameEngine/Village.php");
|
||||||
$start = $generator->pageLoadTimeStart();
|
$start = $generator->pageLoadTimeStart();
|
||||||
if(isset($_GET['ok'])){
|
if(isset($_GET['ok'])){
|
||||||
$database->updateUserField($session->uid,'ok','0','1'); $_SESSION['ok'] = '0';
|
$database->updateUserField($session->uid,'ok','0','1'); $_SESSION['ok'] = '0';
|
||||||
}
|
}
|
||||||
if(isset($_GET['newdid'])) {
|
if(isset($_GET['newdid'])) {
|
||||||
$_SESSION['wid'] = $_GET['newdid'];
|
$_SESSION['wid'] = $_GET['newdid'];
|
||||||
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$_GET['newdid']." WHERE id=".$session->uid);
|
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$_GET['newdid']." WHERE id=".$session->uid);
|
||||||
header("Location: ".$_SERVER['PHP_SELF']);
|
header("Location: ".$_SERVER['PHP_SELF']);
|
||||||
}else{
|
} else {
|
||||||
$building->procBuild($_GET);
|
$building->procBuild($_GET);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ include("GameEngine/Village.php");
|
|||||||
$start = $generator->pageLoadTimeStart();
|
$start = $generator->pageLoadTimeStart();
|
||||||
$message->procMessage($_POST);
|
$message->procMessage($_POST);
|
||||||
if($_GET['t'] == 1){
|
if($_GET['t'] == 1){
|
||||||
$automation->isWinner();
|
$automation->isWinner();
|
||||||
}
|
}
|
||||||
if(isset($_GET['newdid'])) {
|
if(isset($_GET['newdid'])) {
|
||||||
$_SESSION['wid'] = $_GET['newdid'];
|
$_SESSION['wid'] = $_GET['newdid'];
|
||||||
|
|||||||
Reference in New Issue
Block a user