diff --git a/Admin/Templates/404.tpl b/Admin/Templates/404.tpl index af7953cb..b039f094 100644 --- a/Admin/Templates/404.tpl +++ b/Admin/Templates/404.tpl @@ -12,7 +12,7 @@

404 - File not found

- Not Found
+ Not Found

We looked 404 times already but can't find anything, Not even an X marking the spot.

This system is not complete yet. So the page probably does not exist.


diff --git a/Admin/Templates/Newmessage.tpl b/Admin/Templates/Newmessage.tpl index 5001d0fd..1fb62740 100644 --- a/Admin/Templates/Newmessage.tpl +++ b/Admin/Templates/Newmessage.tpl @@ -19,7 +19,7 @@ if(isset($id)) $varray = $database->getProfileVillages($id); $varmedal = $database->getProfileMedal($id); ?> - + - + diff --git a/Admin/Templates/msg.tpl b/Admin/Templates/msg.tpl index a861be06..7a6495dd 100644 --- a/Admin/Templates/msg.tpl +++ b/Admin/Templates/msg.tpl @@ -12,10 +12,10 @@ $msg = $database->getMessage($_GET['nid'],3);; if($msg) { ?> - - - - + + + +
diff --git a/Admin/Templates/playeradditionalinfo.tpl b/Admin/Templates/playeradditionalinfo.tpl index b5ed042d..165a1c09 100644 --- a/Admin/Templates/playeradditionalinfo.tpl +++ b/Admin/Templates/playeradditionalinfo.tpl @@ -50,7 +50,7 @@ getTimeFormat($tsdiffact); - echo ''; + echo ''; echo " $timetoecho"; } } @@ -172,7 +172,7 @@ diff --git a/Admin/Templates/playermedals.tpl b/Admin/Templates/playermedals.tpl index e61730ee..66f5a405 100644 --- a/Admin/Templates/playermedals.tpl +++ b/Admin/Templates/playermedals.tpl @@ -53,9 +53,9 @@ - + "; } @@ -84,7 +84,7 @@ diff --git a/Admin/Templates/playerplusbonus.tpl b/Admin/Templates/playerplusbonus.tpl index 7974001f..f7fe34bc 100644 --- a/Admin/Templates/playerplusbonus.tpl +++ b/Admin/Templates/playerplusbonus.tpl @@ -19,7 +19,7 @@ { $tsdiffact = $datetime - $now; $timetoecho = $timeformat->getTimeFormat($tsdiffact); - echo ''; + echo ''; echo " $timetoecho"; } } @@ -56,7 +56,7 @@ { $tsdiffact = $datetime - $now; $timetoecho = $timeformat->getTimeFormat($tsdiffact); - echo ''; + echo ''; echo " $timetoecho"; } } @@ -93,7 +93,7 @@ { $tsdiffact = $datetime - $now; $timetoecho = $timeformat->getTimeFormat($tsdiffact); - echo ''; + echo ''; echo " $timetoecho"; } } @@ -131,7 +131,7 @@ { $tsdiffact = $datetime - $now; $timetoecho = $timeformat->getTimeFormat($tsdiffact); - echo ''; + echo ''; echo " $timetoecho"; } } @@ -169,7 +169,7 @@ { $tsdiffact = $datetime - $now; $timetoecho = $timeformat->getTimeFormat($tsdiffact); - echo ''; + echo ''; echo " $timetoecho"; } } diff --git a/Admin/Templates/results_villages.tpl b/Admin/Templates/results_villages.tpl index 7939ebe8..7e5b5ee3 100644 --- a/Admin/Templates/results_villages.tpl +++ b/Admin/Templates/results_villages.tpl @@ -63,7 +63,7 @@ $result = $admin->search_village($_POST['s']); - - - + @@ -115,7 +115,7 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users" '; + echo ''; } echo ''; for($i=1; $i<11; $i++) @@ -128,7 +128,7 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users" echo ""; for($i=11; $i<21; $i++) { - echo ''; + echo ''; } echo ''; for($i=11; $i<21; $i++) @@ -141,7 +141,7 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users" echo ""; for($i=21; $i<31; $i++) { - echo ''; + echo ''; } echo ''; for($i=21; $i<31; $i++) @@ -154,7 +154,7 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users" echo ""; for($i=31; $i<41; $i++) { - echo ''; + echo ''; } echo ''; for($i=31; $i<41; $i++) @@ -167,7 +167,7 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users" echo ""; for($i=41; $i<51; $i++) { - echo ''; + echo ''; } echo ''; for($i=41; $i<51; $i++) diff --git a/Admin/Templates/troops.tpl b/Admin/Templates/troops.tpl index c2d08a8a..10d95e7f 100644 --- a/Admin/Templates/troops.tpl +++ b/Admin/Templates/troops.tpl @@ -207,16 +207,16 @@ echo ' - - - - - - - - - - + + + + + + + + + + @@ -237,16 +237,16 @@ echo ' - - - - - - - - - - + + + + + + + + + + diff --git a/Admin/Templates/village.tpl b/Admin/Templates/village.tpl index 446bdf98..73edf650 100644 --- a/Admin/Templates/village.tpl +++ b/Admin/Templates/village.tpl @@ -62,7 +62,7 @@ if(isset($id)) - +
Give how much Gold? - +
Add how many CP? - +
$rank $week $pointsimg/t/".$medal['img'].".jpg\"> - + img/a/del.gif'); height: 12px; width: 12px;\" src=\"../img/a/x.gif\">
- +
+
'.count($result).' Villages Found "'.$_POST['s'].'"
@@ -79,7 +79,7 @@ $result = $admin->search_village($_POST['s']);
+
No Villages Called '.$_POST['s'].'
diff --git a/Admin/Templates/server_info.tpl b/Admin/Templates/server_info.tpl index 28e9f3e8..51f831a5 100644 --- a/Admin/Templates/server_info.tpl +++ b/Admin/Templates/server_info.tpl @@ -100,7 +100,7 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
Gold GoldGold Gold
'.$u31.'
diff --git a/GameEngine/Account.php b/GameEngine/Account.php index 12649f16..bcca54a7 100644 --- a/GameEngine/Account.php +++ b/GameEngine/Account.php @@ -1,226 +1,235 @@ -Signup(); - break; - case "a2": - $this->Activate(); - break; - case "a3": - $this->Unreg(); - break; - case "a4": - $this->Login(); - break; - } - } if(isset($_GET['code'])) { - $_POST['id'] = $_GET['code']; $this->Activate(); - } - else { - if($session->logged_in && in_array("logout.php",explode("/",$_SERVER['PHP_SELF']))) { - $this->Logout(); - } - } - } - - private function Signup() { - global $database,$form,$mailer,$generator,$session; - if(!isset($_POST['name']) || $_POST['name'] == "") { - $form->addError("name",USRNM_EMPTY); - } - else { - if(strlen($_POST['name']) < USRNM_MIN_LENGTH) { - $form->addError("name",USRNM_SHORT); - } - else if(!USRNM_SPECIAL && preg_match('/[^0-9A-Za-z]/',$_POST['name'])) { - $form->addError("name",USRNM_CHAR); - } - else if($database->checkExist($_POST['name'],0)) { - $form->addError("name",USRNM_TAKEN); - } - else if($database->checkExist_activate($_POST['name'],0)) { - $form->addError("name",USRNM_TAKEN); - } - - } - if(!isset($_POST['pw']) || $_POST['pw'] == "") { - $form->addError("pw",PW_EMPTY); - } - else { - if(strlen($_POST['pw']) < PW_MIN_LENGTH) { - $form->addError("pw",PW_SHORT); - } - else if($_POST['pw'] == $_POST['name']) { - $form->addError("pw",PW_INSECURE); - } - } - if(!isset($_POST['email'])) { - $form->addError("email",EMAIL_EMPTY); - } - else { - if(!$this->validEmail($_POST['email'])) { - $form->addError("email",EMAIL_INVALID); - } - else if($database->checkExist($_POST['email'],1)) { - $form->addError("email",EMAIL_TAKEN); - } - else if($database->checkExist_activate($_POST['email'],1)) { - $form->addError("email",EMAIL_TAKEN); - } - } - if(!isset($_POST['vid'])) { - $form->addError("tribe",TRIBE_EMPTY); - } - if(!isset($_POST['agb'])) { - $form->addError("agree",AGREE_ERROR); - } - if($form->returnErrors() > 0) { - $_SESSION['errorarray'] = $form->getErrors(); - $_SESSION['valuearray'] = $_POST; - - header("Location: anmelden.php"); - } - else { - if(AUTH_EMAIL){ - $act = $generator->generateRandStr(10); - $act2 = $generator->generateRandStr(5); - $uid = $database->activate($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act,$act2); - if($uid) { - - $mailer->sendActivate($_POST['email'],$_POST['name'],$_POST['pw'],$act); - header("Location: activate.php?id=$uid&q=$act2"); - } - } - else { - $uid = $database->register($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act); - if($uid) { - setcookie("COOKUSR",$_POST['name'],time()+COOKIE_EXPIRE,COOKIE_PATH); - setcookie("COOKEMAIL",$_POST['email'],time()+COOKIE_EXPIRE,COOKIE_PATH); - - $database->updateUserField($uid,"act","",1); - $this->generateBase($_POST['kid'],$uid,$_POST['name']); - header("Location: login.php"); - } - } - } - } - - private function Activate() { - global $database; - $q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'"; - $result = mysql_query($q, $database->connection); - $dbarray = mysql_fetch_array($result); - if($dbarray['act'] == $_POST['id']) { - $uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],$dbarray['location'],""); - if($uid) { - $database->unreg($dbarray['username']); - $this->generateBase($dbarray['kid'],$uid,$dbarray['username']); - header("Location: activate.php?e=2"); - } - } - else { - header("Location: activate.php?e=3"); - } - } - - private function Unreg() { - global $database; - $q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'"; - $result = mysql_query($q, $database->connection); - $dbarray = mysql_fetch_array($result); - if(md5($_POST['pw']) == $dbarray['password']) { - $database->unreg($dbarray['username']); - header("Location: anmelden.php"); - } - else { - header("Location: activate.php?e=3"); - } - } - - private function Login() { - global $database,$session,$form; - if(!isset($_POST['user']) || $_POST['user'] == "") { - $form->addError("user",LOGIN_USR_EMPTY); - } - else if(!$database->checkExist($_POST['user'],0)) { - $form->addError("user",USR_NT_FOUND); - } - if(!isset($_POST['pw']) || $_POST['pw'] == "") { - $form->addError("pw",LOGIN_PASS_EMPTY); - } - else if(!$database->login($_POST['user'],$_POST['pw']) && !$database->sitterLogin($_POST['user'],$_POST['pw'])) { - $form->addError("pw",LOGIN_PW_ERROR); - } - if($database->getUserField($_POST['user'],"act",1) != "") { - $form->addError("activate",$_POST['user']); - } - if($form->returnErrors() > 0) { - $_SESSION['errorarray'] = $form->getErrors(); - $_SESSION['valuearray'] = $_POST; - - header("Location: login.php"); - } - else { - setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH); - $database->UpdateOnline("login" ,$_POST['user'],time()); - $session->login($_POST['user']); - } - } - - private function Logout() { - global $session,$database; - unset($_SESSION['wid']); - $database->activeModify($session->username,1); - $database->UpdateOnline("logout") or die(mysql_error()); - $session->Logout(); - } - - private function validEmail($email) { - $regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i"; - if ( !preg_match($regexp, $email) ) { - return false; - } - return true; - } - - function generateBase($kid,$uid,$username) { - global $database,$message; - $database->updateUserField($uid,"location","",1); - if($kid == 0) { - $kid = rand(1,4); - } - else{ - $kid = $_POST['kid']; - } - - $wid = $database->generateBase($kid); - $database->setFieldTaken($wid); - $database->addVillage($wid,$uid,$username,1); - $database->addResourceFields($wid,$database->getVillageType($wid)); - $database->addUnits($wid); - $database->addTech($wid); - $database->addABTech($wid); - $database->updateUserField($uid,"access",USER,1); - $message->sendWelcome($uid,$username); - } - -}; -$account = new Account; +class Account { + + function Account() { + global $session; + if(isset($_POST['ft'])) { + switch($_POST['ft']) { + case "a1": + $this->Signup(); + break; + case "a2": + $this->Activate(); + break; + case "a3": + $this->Unreg(); + break; + case "a4": + $this->Login(); + break; + } + } if(isset($_GET['code'])) { + $_POST['id'] = $_GET['code']; $this->Activate(); + } + else { + if($session->logged_in && in_array("logout.php",explode("/",$_SERVER['PHP_SELF']))) { + $this->Logout(); + } + } + } + + private function Signup() { + global $database,$form,$mailer,$generator,$session; + if(!isset($_POST['name']) || $_POST['name'] == "") { + $form->addError("name",USRNM_EMPTY); + } + else { + if(strlen($_POST['name']) < USRNM_MIN_LENGTH) { + $form->addError("name",USRNM_SHORT); + } + else if(!USRNM_SPECIAL && preg_match('/[^0-9A-Za-z]/',$_POST['name'])) { + $form->addError("name",USRNM_CHAR); + } + else if($database->checkExist($_POST['name'],0)) { + $form->addError("name",USRNM_TAKEN); + } + else if($database->checkExist_activate($_POST['name'],0)) { + $form->addError("name",USRNM_TAKEN); + } + + } + if(!isset($_POST['pw']) || $_POST['pw'] == "") { + $form->addError("pw",PW_EMPTY); + } + else { + if(strlen($_POST['pw']) < PW_MIN_LENGTH) { + $form->addError("pw",PW_SHORT); + } + else if($_POST['pw'] == $_POST['name']) { + $form->addError("pw",PW_INSECURE); + } + } + if(!isset($_POST['email'])) { + $form->addError("email",EMAIL_EMPTY); + } + else { + if(!$this->validEmail($_POST['email'])) { + $form->addError("email",EMAIL_INVALID); + } + else if($database->checkExist($_POST['email'],1)) { + $form->addError("email",EMAIL_TAKEN); + } + else if($database->checkExist_activate($_POST['email'],1)) { + $form->addError("email",EMAIL_TAKEN); + } + } + if(!isset($_POST['vid'])) { + $form->addError("tribe",TRIBE_EMPTY); + } + if(!isset($_POST['agb'])) { + $form->addError("agree",AGREE_ERROR); + } + if($form->returnErrors() > 0) { + $_SESSION['errorarray'] = $form->getErrors(); + $_SESSION['valuearray'] = $_POST; + + header("Location: anmelden.php"); + } + else { + if(AUTH_EMAIL){ + $act = $generator->generateRandStr(10); + $act2 = $generator->generateRandStr(5); + $uid = $database->activate($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act,$act2); + if($uid) { + + $mailer->sendActivate($_POST['email'],$_POST['name'],$_POST['pw'],$act); + header("Location: activate.php?id=$uid&q=$act2"); + } + } + else { + $uid = $database->register($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act); + if($uid) { + setcookie("COOKUSR",$_POST['name'],time()+COOKIE_EXPIRE,COOKIE_PATH); + setcookie("COOKEMAIL",$_POST['email'],time()+COOKIE_EXPIRE,COOKIE_PATH); + + $database->updateUserField($uid,"act","",1); + $database->updateUserField($uid,"invited",$_POST['invited'],1); + $this->generateBase($_POST['kid'],$uid,$_POST['name']); + header("Location: login.php"); + } + } + } + } + + private function Activate() { + if(START_DATE < date('m/d/Y') or START_DATE == date('m/d/Y') && START_TIME <= date('H:i')) + { + global $database; + $q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'"; + $result = mysql_query($q, $database->connection); + $dbarray = mysql_fetch_array($result); + if($dbarray['act'] == $_POST['id']) { + $uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],$dbarray['location'],""); + if($uid) { + $database->unreg($dbarray['username']); + $this->generateBase($dbarray['kid'],$uid,$dbarray['username']); + header("Location: activate.php?e=2"); + } + } + else + { + header("Location: activate.php?e=3"); + } + } + else + { + header("Location: activate.php"); + } + + } + + private function Unreg() { + global $database; + $q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'"; + $result = mysql_query($q, $database->connection); + $dbarray = mysql_fetch_array($result); + if(md5($_POST['pw']) == $dbarray['password']) { + $database->unreg($dbarray['username']); + header("Location: anmelden.php"); + } + else { + header("Location: activate.php?e=3"); + } + } + + private function Login() { + global $database,$session,$form; + if(!isset($_POST['user']) || $_POST['user'] == "") { + $form->addError("user",LOGIN_USR_EMPTY); + } + else if(!$database->checkExist($_POST['user'],0)) { + $form->addError("user",USR_NT_FOUND); + } + if(!isset($_POST['pw']) || $_POST['pw'] == "") { + $form->addError("pw",LOGIN_PASS_EMPTY); + } + else if(!$database->login($_POST['user'],$_POST['pw']) && !$database->sitterLogin($_POST['user'],$_POST['pw'])) { + $form->addError("pw",LOGIN_PW_ERROR); + } + if($database->getUserField($_POST['user'],"act",1) != "") { + $form->addError("activate",$_POST['user']); + } + if($form->returnErrors() > 0) { + $_SESSION['errorarray'] = $form->getErrors(); + $_SESSION['valuearray'] = $_POST; + + header("Location: login.php"); + } + else { + setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH); + $database->UpdateOnline("login" ,$_POST['user'],time()); + $session->login($_POST['user']); + } + } + + private function Logout() { + global $session,$database; + unset($_SESSION['wid']); + $database->activeModify($session->username,1); + $database->UpdateOnline("logout") or die(mysql_error()); + $session->Logout(); + } + + private function validEmail($email) { + $regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i"; + if ( !preg_match($regexp, $email) ) { + return false; + } + return true; + } + + function generateBase($kid,$uid,$username) { + global $database,$message; + if($kid == 0) { + $kid = rand(1,4); + } + else{ + $kid = $_POST['kid']; + } + + $wid = $database->generateBase($kid); + $database->setFieldTaken($wid); + $database->addVillage($wid,$uid,$username,1); + $database->addResourceFields($wid,$database->getVillageType($wid)); + $database->addUnits($wid); + $database->addTech($wid); + $database->addABTech($wid); + $database->updateUserField($uid,"access",USER,1); + $message->sendWelcome($uid,$username); + } + +}; +$account = new Account; ?> \ No newline at end of file diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 9b6ae10f..5b632149 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -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 = "\"Palace\""; -$crannyimg = "\"Cranny\""; +$palaceimg = "img/g/g26.gif\" height=\"30\" width=\"24\" alt=\"Palace\" title=\"Palace\" />"; +$crannyimg = "img/g/g23.gif\" height=\"30\" width=\"24\" alt=\"Cranny\" title=\"Cranny\" />"; $info_spy = "".$spy_pic.",".$palaceimg." Residance/Palace Level : ".$rplevel."
".$crannyimg." Cranny level: ".$crannylevel."

Wall Level : ".$walllevel.""; @@ -2731,7 +2732,7 @@ $crannyimg = "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(); diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php index bedfccb4..05a3f0f3 100644 --- a/GameEngine/Database/db_MYSQL.php +++ b/GameEngine/Database/db_MYSQL.php @@ -138,6 +138,12 @@ $dbarray = mysql_fetch_array($result); return $dbarray[$field]; } + + function getInvitedUser($uid) { + $q = "SELECT * FROM " . TB_PREFIX . "users where invited = $uid order by regtime desc"; + $result = mysql_query($q, $this->connection); + return $this->mysql_fetch_all($result); + } function getVrefField($ref, $field){ $q = "SELECT $field FROM " . TB_PREFIX . "vdata where wref = '$ref'"; diff --git a/GameEngine/Mailer.php b/GameEngine/Mailer.php index 0959e420..41ed4f98 100644 --- a/GameEngine/Mailer.php +++ b/GameEngine/Mailer.php @@ -33,8 +33,28 @@ Greetings, TravianX"; $headers = "From: Mailer@".SERVER_NAME."\n"; - //$headers .= 'MIME-Version: 1.0' . "\r\n"; - //$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; + + mail($email, $subject, $message, $headers); + } + + function sendInvite($email,$uid,$text) { + + $subject = "".SERVER_NAME." registeration"; + + $message = "Hello ".$username." + +Try the new ".SERVER_NAME."! + + +Link: ".SERVER."anmelden.php?id=".$uid." + +".$text." + + +Greetings, +TravianX"; + + $headers = "From: Mailer@".SERVER_NAME."\n"; mail($email, $subject, $message, $headers); } diff --git a/Templates/Plus/5.tpl b/Templates/Plus/5.tpl index cbd50bc1..38f13d7e 100644 --- a/Templates/Plus/5.tpl +++ b/Templates/Plus/5.tpl @@ -14,16 +14,17 @@ include("Templates/Plus/pmenu.tpl");

1) Invite your friends via Email

access != BANNED){ ?>

» Invite by e-mail

+

» Invite by e-mail

2) Copy your personal REF-Link and share it!

Your personal REF Link:
- ?id=ref_uid; ?> + anmelden?id=ref_uid; ?>

Progress of your invited friends

-

As soon as a player you invited has found his 2. village, you will be credited with 50 gold.

+

As soon as a player you invited has found his 2 village, you will be credited with 50 gold.

@@ -32,10 +33,6 @@ include("Templates/Plus/pmenu.tpl"); - - - - @@ -45,9 +42,33 @@ include("Templates/Plus/pmenu.tpl"); + + getInvitedUser($session->uid); + if(count($invite) > 0){ + foreach($invite as $invited) { + $varray = $database->getProfileVillages($invited['id']); + $totalpop = 0; + foreach($varray as $vil) { + $totalpop += $vil['pop']; + } + ?> + + + + + + + + + + +
WorldUID Member sinceVillages
You have not brought in any new players yet.
diff --git a/Templates/Plus/invite.tpl b/Templates/Plus/invite.tpl new file mode 100644 index 00000000..e353dd78 --- /dev/null +++ b/Templates/Plus/invite.tpl @@ -0,0 +1,80 @@ + + +

Invite friends and receive free Gold

+ +

If you get new players to open an account and settle a second village with Travian you will receive gold. You can use this gold to purchase a plus account or plus advantages. +
+
+ To bring in new players, you can invite them by e-mail or have them click on your REF link.

+ +

How is it done?

+ +

1) Invite your friends via Email

+access != BANNED){ ?> +
+

+

Own text:

+

+
+ +

» Invite by e-mail

+ +

2) Copy your personal REF-Link and share it!

Your personal REF Link: +
+ anmelden?id=ref_uid; ?> + +

Progress of your invited friends

+ +

As soon as a player you invited has found his 2. village, you will be credited with 50 gold.

+ + + + + + + + + + + + + + + + + + + + + + + getInvitedUser($session->uid); + if(count($invite) > 0){ + foreach($invite as $invited) { + $varray = $database->getProfileVillages($invited['id']); + $totalpop = 0; + foreach($varray as $vil) { + $totalpop += $vil['pop']; + } + ?> + + + + + + + + + + + + + + +
Players brought in
WorldUIDMember sinceInhabitantsVillages
You have not brought in any new players yet.
+ diff --git a/Templates/activate/activate.tpl b/Templates/activate/activate.tpl index 857e9fa2..308c0d30 100644 --- a/Templates/activate/activate.tpl +++ b/Templates/activate/activate.tpl @@ -1,67 +1,208 @@ -
+
-getActivateField($_GET['id'],"act2",0); - if($act2==$_GET['q']){ - $show='1'; - $naam=$database->getActivateField($_GET['id'],"username",0); - $email=$database->getActivateField($_GET['id'],"email",0); +getActivateField($_GET['id'],"act2",0); + if($act2==$_GET['q']){ + $show='1'; + $naam=$database->getActivateField($_GET['id'],"username",0); + $email=$database->getActivateField($_GET['id'],"email",0); - } + } +} + +if(isset($show)){ +?> +

register for the game

+
registration
+

+ Hello , +
+
+ The registration was successful. In the next few minutes you will receive an email with the access information. +

+The email will be sent to following address: +

+

In order to activate your account enter the code or click on the link in your email.

+
+
+

+ Activation code: +

+ +

+ + +

+
+
+
+

+ No email received? +

+

+ Sometimes the email is moved to the spam folder. For further help click here +

+
+
+ date('m/d/Y') or START_DATE == date('m/d/Y') && START_TIME <= date('H:i')){ ?> +
Activation Availble in:
+ + +

+ date('m/d/Y') or START_DATE == date('m/d/Y') && START_TIME <= date('H:i')){ + ?> +

Activation Availble in:
+ + +
+
+

+ Activation code: +

+ +

+ + +

+ +
+
+
+ + \ No newline at end of file diff --git a/activate.php b/activate.php index 926cfd72..33e2c884 100644 --- a/activate.php +++ b/activate.php @@ -1,108 +1,82 @@ - - - - - <?php echo SERVER_NAME; ?> - - - - - - - - - - - - - - +include('GameEngine/Account.php'); +?> + + + + <?php echo SERVER_NAME; ?> + + + + + + + + + + + + + + - + -
-
-
- -
- -
-getActivateField($_GET['id'],"email",0); - if($_GET['c'] == $generator->encodeStr($c,5)){ - include("Templates/activate/delete.tpl"); - } else { include("Templates/activate/activate.tpl"); } -} else { -include("Templates/activate/activate.tpl"); -} +
+
+
+ +
+ +
+encodeStr($_COOKIE['COOKEMAIL'],5)) { - include("Templates/activate/delete.tpl"); -} else -if(isset($_GET['id']) && !isset($_GET['c']) && !isset($_GET['e'])) { - include("Templates/activate/activate.tpl"); -} -else if(isset($_GET['usr']) && !isset($_GET['c']) && !isset($_GET['e'])) { - $_COOKIE['COOKUSR'] = $_GET['usr']; - $_COOKIE['COOKEMAIL'] = $database->getUserField($_GET['usr'],"email",1); - include("Templates/activate/activate.tpl"); -} else -if(isset($_GET['npw'])) { -} else { + if(isset($_GET['e']) && (START_DATE < date('m/d/Y') or START_DATE == date('m/d/Y') && START_TIME <= date('H:i'))) + { + switch($_GET['e']) + { + case 1: + include("Templates/activate/delete.tpl"); + break; + case 2: + include("Templates/activate/activated.tpl"); + break; + case 3: + include("Templates/activate/cantfind.tpl"); + break; + } + } else if(isset($_GET['id']) && isset($_GET['c'])) { + $c=$database->getActivateField($_GET['id'],"email",0); + if($_GET['c'] == $generator->encodeStr($c,5)){ + include("Templates/activate/delete.tpl"); + } else { include("Templates/activate/activate.tpl"); } + } else { + include("Templates/activate/activate.tpl"); + } -}*/ +?> +
+
+
-?> -
-
-
+
+
-
-
- - -
- - -
- + +
+ + +
+ \ No newline at end of file diff --git a/anmelden.php b/anmelden.php index a6536589..e4497314 100644 --- a/anmelden.php +++ b/anmelden.php @@ -48,6 +48,7 @@ if(REG_OPEN == true){ ?>

+ diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl index 3ccfddff..e995b62b 100644 --- a/install/data/constant_format.tpl +++ b/install/data/constant_format.tpl @@ -243,7 +243,7 @@ define("COOKIE_PATH", "/"); //////////////////////////////////////////// define("DOMAIN", "%DOMAIN%"); define("HOMEPAGE", "%HOMEPAGE%"); -define("SERVER", "%DOMAIN%"); +define("SERVER", "%SERVER%"); $requse = 0; diff --git a/install/data/sql.sql b/install/data/sql.sql index f85b2ea5..cd4aa5f9 100644 --- a/install/data/sql.sql +++ b/install/data/sql.sql @@ -1318,6 +1318,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` ( `clp` bigint(255) NOT NULL DEFAULT '0', `oldrank` bigint(255) unsigned NOT NULL DEFAULT '0', `regtime` int(10) unsigned NOT NULL DEFAULT '0', + `invited` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; diff --git a/install/process.php b/install/process.php index 9b99aa83..3bd191d7 100644 --- a/install/process.php +++ b/install/process.php @@ -76,6 +76,7 @@ $text = preg_replace("'%STARTTIME%'", time(), $text); $text = preg_replace("'%DOMAIN%'", $_POST['domain'], $text); $text = preg_replace("'%HOMEPAGE%'", $_POST['homepage'], $text); + $text = preg_replace("'%SERVER%'", $_POST['server'], $text); $text = preg_replace("'%LIMIT_MAILBOX%'", $_POST['limit_mailbox'], $text); $text = preg_replace("'%MAX_MAILS%'", $_POST['max_mails'], $text); $text = preg_replace("'%DEMOLISH%'", $_POST['demolish'], $text); diff --git a/install/templates/config.tpl b/install/templates/config.tpl index 38414de8..4be7fc39 100644 --- a/install/templates/config.tpl +++ b/install/templates/config.tpl @@ -33,6 +33,8 @@ echo "
Error creating constant.php
+ +
Server:
Domain:
Homepage:
Language: