update install and email activation + add friends inviting system

This commit is contained in:
unknown
2012-05-22 20:52:56 +03:00
parent 7d43ffbaa3
commit 2d87749f95
34 changed files with 765 additions and 488 deletions
+19 -3
View File
@@ -168,6 +168,7 @@ class Automation {
$this->sendSettlersComplete();
}
$this->updateGeneralAttack();
$this->checkInvitedPlayes();
$this->updateStore();
}
@@ -1912,8 +1913,8 @@ if($data['t11'] > 0){
$walllevel =0;
$rplevel =0;
}
$palaceimg = "<img src=\"gpack/travian_default/img/g/g26.gif\" height=\"30\" width=\"24\" alt=\"Palace\" title=\"Palace\" />";
$crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" width=\"24\" alt=\"Cranny\" title=\"Cranny\" />";
$palaceimg = "<img src=\"<?php echo GP_LOCATE; ?>img/g/g26.gif\" height=\"30\" width=\"24\" alt=\"Palace\" title=\"Palace\" />";
$crannyimg = "<img src=\"<?php echo GP_LOCATE; ?>img/g/g23.gif\" height=\"30\" width=\"24\" alt=\"Cranny\" title=\"Cranny\" />";
$info_spy = "".$spy_pic.",".$palaceimg." Residance/Palace Level : ".$rplevel."
<br>".$crannyimg." Cranny level: ".$crannylevel."<br><br>Wall Level : ".$walllevel."";
@@ -2731,7 +2732,7 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
}
}
private function demolitionComplete() {
private function demolitionComplete() {
global $building,$database;
$ourFileHandle = @fopen("GameEngine/Prevention/demolition.txt", 'w');
@fclose($ourFileHandle);
@@ -2858,6 +2859,21 @@ private function demolitionComplete() {
}
}
private function checkInvitedPlayes() {
global $database;
$q = "SELECT * FROM ".TB_PREFIX."users WHERE invited != 0";
$array = $database->query_return($q);
foreach($array as $user) {
$varray = count($database->getProfileVillages($user['id']));
if($varray > 1){
$usergold = $database->getUserField($user['invited'],"gold",0);
$gold = $usergold+50;
$database->updateUserField($user['invited'],"gold",$gold,1);
$database->updateUserField($user['id'],"invited",0,1);
}
}
}
private function updateGeneralAttack() {
global $database;
$time = time();