first commit

This commit is contained in:
unknown
2012-03-29 13:00:34 +02:00
commit 6928cbcd1d
2446 changed files with 85772 additions and 0 deletions
+146
View File
@@ -0,0 +1,146 @@
<h1>Player profile</h1>
<?php include("menu.tpl"); ?>
<form action="spieler.php" method="POST">
<input type="hidden" name="ft" value="p3">
<input type="hidden" name="uid" value="<?php echo $session->uid; ?>" />
<table cellpadding="1" cellspacing="1" id="change_pass" class="account">
<thead><tr>
<th colspan="2">Change password</th>
</tr></thead><tbody>
<tr>
<th>Old password</th>
<td><input class="text" type="password" name="pw1" maxlength="20" /></td>
</tr>
<tr>
<th>New password</th>
<td><input class="text" type="password" name="pw2" maxlength="20" /></td>
</tr>
<tr>
<th>New password</th>
<td><input class="text" type="password" name="pw3" maxlength="20" /></td>
</tr></tbody></table>
<?php
if($form->getError("pw") != "") {
echo "<span class=\"error\">".$form->getError('pw')."</span>";
}
?>
<table cellpadding="1" cellspacing="1" id="change_mail" class="account"><thead><tr>
<th colspan="2">Change email</th>
</tr></thead>
<tbody><tr>
<td class="note" colspan="2">Please enter your old and your new e-mail addresses. You will then receive a code snippet at both e-mail addresses which you have to enter here.</td></tr>
<tr>
<th>Old email</th>
<td><input class="text" type="text" name="email_alt" maxlength="50" /></td>
</tr>
<tr>
<th>New email</th>
<td><input class="text" type="text" name="email_neu" maxlength="50" /></td>
</tr></tbody></table>
<?php
if($form->getError("email") != "") {
echo "<span class=\"error\">".$form->getError('email')."</span>";
}
?>
<table cellpadding="1" cellspacing="1" id="sitter" class="account"><thead>
<tr>
<th colspan="2">Account sitters</th>
</tr></thead>
<tbody><tr>
<td class="note" colspan="2">A sitter can log into your account by using your name and his/her password. You can have up to two sitters.</td>
</tr>
<?php
$count = 0;
if($session->userinfo['sit1'] != 0) $count +=1; if($session->userinfo['sit2'] !=0) $count += 1;
if($count < 2) {
?>
<tr>
<th>Name of the sitter</th>
<td><input class="text" type="text" name="v1" maxlength="15"><span class="count">(<?php echo $count; ?>/2)</span></td>
</tr>
<?php
}
?><tr><td colspan="2" class="sitter">
<?php if($count == 0) { echo "<span class=\"none\">You have no sitters.</span></td>"; }
if($session->userinfo['sit1'] != 0) {
echo "<div>";
echo "<a href=\"spieler.php?s=3&e=3&id=".$session->userinfo['sit1']."&a=".$session->checker."&type=1\"><img class=\"del\" src=\"img/x.gif\" title=\"Remove sitters\" alt=\"Remove sitters\" /></a>";
echo "<a href=\"spieler.php?uid=".$session->userinfo['sit1']."\">".$database->getUserField($session->userinfo['sit1'],"username",0)."</a>";
echo "</div>";
}
if($session->userinfo['sit2'] != 0) {
echo "<div>";
echo "<a href=\"spieler.php?s=3&e=3&id=".$session->userinfo['sit2']."&a=".$session->checker."&type=2\"><img class=\"del\" src=\"img/x.gif\" title=\"Remove sitters\" alt=\"Remove sitters\" /></a>";
echo "<a href=\"spieler.php?uid=".$session->userinfo['sit2']."\">".$database->getUserField($session->userinfo['sit2'],"username",0)."</a>";
echo "</div>";
}
?></tr>
<tr><td class="note" colspan="2">You have been entered as sitter on the following accounts. You can cancel this by clicking the red X.</td></tr><tr><td colspan="2" class="sitter">
<?php
$sitee = $database->getSitee($session->uid);
if(count($sitee) == 0) {
echo "<span class=\"none\">You have no sitters.</span>";
}
else {
foreach($sitee as $sit) {
echo "<div>";
echo "<a href=\"spieler.php?s=3&e=2&id=".$sit['id']."&a=".$session->checker."\"><img class=\"del\" src=\"img/x.gif\" title=\"Remove sitters\" alt=\"Remove sitters\" /></a>";
echo "<a href=\"spieler.php?uid=".$sit['id']."\">".$database->getUserField($sit['id'],"username",0)."</a>";
echo "</div>";
}
}
?>
</td></tr></table>
<?php
if($form->getError("email") != "") {
echo "<span class=\"error\">".$form->getError('email')."</span>";
}
?>
<table cellpadding="1" cellspacing="1" id="del_acc" class="account"><thead>
<tr>
<th colspan="2">Delete account</th>
</tr>
</thead><tbody>
<tr>
<td class="note" colspan="2">You can delete your account here. After starting the cancellation it will take three days to complete the cancellation of your account. You can cancel this process within the first 24 hours.</td>
</tr><tr>
<?php
$timestamp = $database->isDeleting($session->uid);
if($timestamp) {
echo "<td colspan=\"2\" class=\"count\">";
if($timestamp > time()+48*3600) {
echo "<a href=\"spieler.php?s=3&id=".$session->uid."&a=1&e=4\"><img
class=\"del\" src=\"img/x.gif\" alt=\"Cancel process\"
title=\"Cancel process\" /> </a>";
}
$time=$generator->getTimeFormat(($timestamp-time()));
echo "The account will be deleted in <span
id=\"timer1\">".$time."</span> .</td>";
}
else {
?>
<th>Delete account?</th>
<td class="del_selection">
<label><input class="radio" type="radio" name="del" value="1" /> Yes</label>
<label><input class="radio" type="radio" name="del" value="0" checked /> No</label>
</td>
</tr>
<tr>
<th>Confirm with password:</th>
<td><input class="text" type="password" name="del_pw" maxlength="20" /></td>
<?php
}
?>
</tr></tbody></table>
<?php
if($form->getError("del") != "") {
echo "<span class=\"error\">".$form->getError("del")."</span>";
}
?>
<p class="btn"><input type="image" value="" name="s1" id="btn_save" class="dynamic_img" src="img/x.gif" alt="save" /></p>
</form>
+104
View File
@@ -0,0 +1,104 @@
<?php if(GP_ENABLE) {
?>
<h1>Player profile</h1>
<?php include("menu.tpl"); ?>
<?php if(isset($_POST["custom_url"])) {
$database->updateUserField($session->uid,gpack,$_POST["custom_url"],1);
} ?>
<?php if(isset($_GET["custom_url"])) {
?>
<link href="<?php echo $_GET["custom_url"]; ?>lang/en/gp_check.css" rel="stylesheet" type="text/css">
<div id="gpack_popup">
<div id="gpack_error">
<img class="logo unknown" src="img/x.gif" alt="unknown" title="unknown"><span class="error">Graphic Pack could not be found. This could be due to the following reasons:</span><br>
<ul>
<li>The path must be set to the folder that contains the file '<b>travian.css</b>' and the folders '<b>img</b>', '<b>lang</b>' and '<b>modules</b>'.</li>
<li>Your browser does not support Graphic Packs hosted on your computer and needs them to be online, with a path starting with '<b>http://</b>'.</li>
</ul> <form action="spieler.php" method="post">
<input type="hidden" name="s" value="4">
<div class="btn"><input type="image" alt="OK" src="img/x.gif" value="ok" class="dynamic_img" id="btn_ok"></div>
</form>
</div>
<div id="gpack_activate">
<span class="info">Graphic Pack found.</span><br>
<img id="preview" src="img/x.gif"><br>
The path '<span class="path"><?php echo $_GET["custom_url"]; ?></span>' shows an allowed Graphic Pack. Save your choice to activate the Graphic Pack. You can change this setting at any time.
<form action="spieler.php" method="post">
<input type="hidden" name="s" value="4">
<input type="hidden" name="custom_url" value="<?php echo $_GET["custom_url"]; ?>">
<div class="btn"><input type="image" alt="save" src="img/x.gif" value="save" class="dynamic_img" id="btn_save" name="gp_activate_button"></div>
</form>
</div>
</div>
<?php } ?>
<form action="spieler.php" method="post" name="gp_selection">
<input type="hidden" name="s" value="4" />
<table cellpadding="1" cellspacing="1" id="gpack">
<thead>
<tr>
<th>Graphic pack settings</th>
</tr>
</thead>
<tbody>
<tr>
<td class="info">
With a graphic pack you can alter the appearance of Travian. You can choose one from the list or provide the path to a graphic pack on your computer. By using a local graphic pack you may reduce page loading time for every page request.<br />
<span class="alert">ATTENTION! Use only trustworthy graphic packs</span>
</td>
</tr>
<tr>
<th class="empty"></th>
</tr>
<tr>
<td>
<label>
<input type="radio" class="radio" name="gp_type" value="custom" checked="checked" />
User-defined graphic pack </label>
<input class="text" type="text" name="custom_url" value="<?php echo $session->gpack; ?>" onclick="document.gp_selection.gp_type[1].checked = true" /><br />
<div class="example">Example: <span class="path">file:///C:/Travian/gpack/</span> or <span class="path">http://www.travian.org/user/gpack/</span></div>
<center><div class="example">Default: <span class="path"><?php echo GP_LOCATE; ?></span></div></center>
</td>
</tr>
</tbody>
</table>
<p class="btn"><input type="image" alt="OK" src="img/x.gif" name="gp_selection_button" value="ok" class="dynamic_img" id="btn_ok" /></p>
</form>
<table cellpadding="1" cellspacing="1" id="download">
<thead>
<tr>
<th colspan="4">More graphic packs</th>
</tr>
<tr>
<td>Name</td>
<td>Size in MB</td>
<td>Activate</td>
<td>Download</td>
</tr>
</thead>
<tbody>
<tr>
<td class="nam">Travian Default</td>
<td class="size">4</td>
<td class="act"><a href="spieler.php?s=4&gp_type=custom&custom_url=gpack/travian_default/">Activate</a></td>
<td class="down"><a href="gpack/download/travian_default.zip" target="_blank">Download</a></td>
</tr>
</tbody>
</table>
<?php
}
?>
+121
View File
@@ -0,0 +1,121 @@
<?php
//gp link
if($session->gpack == null || GP_ENABLE == false) {
$gpack= GP_LOCATE;
} else {
$gpack= $session->gpack;
}
//de bird
if($displayarray['protect'] > time()){
$uurover=date('H:i:s', ($displayarray['protect']-time())-3600);
$profiel = preg_replace("/\[#0]/is",'<img src="'.$gpack.'img/t/tn.gif" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>This player has '.$uurover.' hours of beginners protection left.</td></tr></table>\')">', $profiel, 1);
} else {
$geregistreerd=date('d-m-Y', ($displayarray['timestamp']));
$profiel = preg_replace("/\[#0]/is",'<img src="'.$gpack.'img/t/tnd.gif" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>This player registered his account on '.$geregistreerd.'.</td></tr></table>\')">', $profiel, 1);
}
//natar image
if($displayarray['username'] == "Natars"){
$profiel = preg_replace("/\[#natars]/is",'<img src="'.$gpack.'img/t/t10_2.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official Natar account</td></tr></table>\')">', $profiel, 1);
$profiel = preg_replace("/\[#WW]/is",'<img src="'.$gpack.'img/t/g40_11-ltr.png" width="250" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official World Wonder Village</td></tr></table>\')">', $profiel, 1);
}
//de lintjes
/******************************
INDELING CATEGORIEEN:
===============================
== 1. Aanvallers top 10 ==
== 2. Defence top 10 ==
== 3. Klimmers top 10 ==
== 4. Overvallers top 10 ==
== 5. In att en def tegelijk ==
== 6. in top 3 - aanval ==
== 7. in top 3 - verdediging ==
== 8. in top 3 - klimmers ==
== 9. in top 3 - overval ==
******************************/
foreach($varmedal as $medal) {
switch ($medal['categorie']) {
case "1":
$titel="Attackers of the Week";
$woord="Points";
break;
case "2":
$titel="Defenders of the Week";
$woord="Points";
break;
case "3":
$titel="Pop Climbers of the week";
$woord="Pop";
break;
case "4":
$titel="Robbers of the week";
$woord="Resources";
break;
case "5":
$titel="Receiving this medal shows that you where in the top 10 of both attacckers and defenders of the week.";
$bonus[$medal['id']]=1;
break;
case "6":
$titel="Receiving this medal shows that you were in the top 3 Attackers of the week ".$medal['points']." in a row";
$bonus[$medal['id']]=1;
break;
case "7":
$titel="Receiving this medal shows that you were in the top 3 Defenders of the week ".$medal['points']." in a row";
$bonus[$medal['id']]=1;
break;
case "8":
$titel="Receiving this medal shows that you were in the top 3 Pop Climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "9":
$titel="Receiving this medal shows that you were in the top 3 Robbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "10":
$titel="Rank Climbers of the week.";
$woord="Ranks";
break;
case "11":
$titel="Receiving this medal shows that you were in the top 3 of the Rank Climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "12":
$titel="Receiving this medal shows that you were in the top 10 Attackers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "13":
$titel="Receiving this medal shows that you were in the top 10 Defenders of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "14":
$titel="Receiving this medal shows that you were in the top 10 Pop Climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "15":
$titel="Receiving this medal shows that you were in the top 10 Robbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "16":
$titel="Receiving this medal shows that you were in the top 10 Rank Climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
}
if(isset($bonus[$medal['id']])){
$profiel = preg_replace("/\[#".$medal['id']."]/is",'<img src="'.$gpack.'img/t/'.$medal['img'].'.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>'.$titel.'<br /><br />Received in week: '.$medal['week'].'</td></tr></table>\')">', $profiel, 1);
} else {
$profiel = preg_replace("/\[#".$medal['id']."]/is",'<img src="'.$gpack.'img/t/'.$medal['img'].'.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Category:</td><td>'.$titel.'</td></tr><tr><td>Week:</td><td>'.$medal['week'].'</td></tr><tr><td>Rank:</td><td>'.$medal['plaats'].'</td></tr><tr><td>'.$woord.':</td><td>'.$medal['points'].'</td></tr></table>\')">', $profiel, 1);
}
}
?>
+14
View File
@@ -0,0 +1,14 @@
<div id="textmenu">
<a href="spieler.php?uid=<?php if(isset($_GET['uid'])) { echo $_GET['uid']; } else { echo $session->uid; } ?>" <?php if(isset($_GET['uid'])) { echo "class=\"selected\""; } ?>>Overview</a>
| <a href="spieler.php?s=1" <?php if(isset($_GET['s']) && $_GET['s'] == 1) { echo "class=\"selected\""; } ?>>Profile</a>
| <a href="spieler.php?s=2" <?php if(isset($_GET['s']) && $_GET['s'] == 2) { echo "class=\"selected\""; } ?>>Preferences</a>
| <a href="spieler.php?s=3" <?php if(isset($_GET['s']) && $_GET['s'] == 3) { echo "class=\"selected\""; } ?>>Account</a>
<?php
if(GP_ENABLE) {
?>
| <a href="spieler.php?s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) { echo "class=\"selected\""; } ?>>Graphic pack</a>
<?php
}
?>
</div>
+2
View File
@@ -0,0 +1,2 @@
<h1>Player profile</h1>
<p>No player found</p>
+170
View File
@@ -0,0 +1,170 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename overview.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
$ranking->procRankReq($_GET);
$displayarray = $database->getUserArray($_GET['uid'],1);
$varmedal = $database->getProfileMedal($_GET['uid']);
$profiel="".$displayarray['desc1']."".md5(skJkev3)."".$displayarray['desc2']."";
require("medal.php");
$profiel=explode("".md5(skJkev3)."", $profiel);
$varray = $database->getProfileVillages($_GET['uid']);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
?>
<h1>Player profile</h1>
<?php
if($_GET['uid'] == $session->uid) { include("menu.tpl"); } ?>
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Player <?php echo $displayarray['username']; ?></th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<?php if($displayarray['access']==BANNED){ echo "<tr><td colspan='2'><center><b>Banned</b></center></td></tr>"; } ?>
<tr>
<th>Rank</th>
<td><?php echo $ranking->getUserRank($displayarray['username']); ?></td>
</tr>
<tr>
<th>Tribe</th>
<td><?php
if($displayarray['tribe'] == 1) {
echo "Roman";
}
else if($displayarray['tribe'] == 2) {
echo "Teutons";
}
else if($displayarray['tribe'] == 3) {
echo "Gauls";
}
else if($displayarray['tribe'] == 4) {
echo "Nature";
}else if($displayarray['tribe'] == 5) {
echo "Natars";
} ?></td>
</tr>
<tr>
<th>Alliance</th>
<td><?php if($displayarray['alliance'] == 0) {
echo "-";
}
else {
$displayalliance = $database->getAllianceName($displayarray['alliance']);
echo "<a href=\"allianz.php?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
} ?></td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $totalpop; ?></td>
</tr>
<?php
//Date of Birth
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
$age = date('Y') - substr($displayarray['birthday'],0,4);
if ((date('m') - substr($displayarray['birthday'],5,2)) < 0){$age --;}
elseif ((date('m') - substr($displayarray['birthday'],5,2)) == 0){
if(date('d') < substr($displayarray['birthday'],8,2)){$age --;}
}
echo "<tr><th>Age</th><td>$age</td></tr>";
}
//Gender
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
}
//Location
if($displayarray['location'] != "") {
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
}
?>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<?php if($_GET['uid'] == $session->uid) {
echo "<td colspan=\"2\"> <a href=\"spieler.php?s=1\">&raquo; Change profile</a></td>";
} else {
echo "<td colspan=\"2\"> <a href=\"nachrichten.php?t=1&amp;id=".$_GET['uid']."\">&raquo; Write message</a></td>";
}
?>
</tr>
<!--<tr><td colspan="2"><a href="nachrichten.php?t=1&id=0"><font color="Red">&raquo; Report Player</font></a></td></tr>-->
<tr>
<td colspan="2" class="desc2">
<div class="desc2div"><?php echo nl2br($profiel[0]); ?></div>
</td>
</tr>
</table>
</td>
<td class="desc1" >
<div><?php echo nl2br($profiel[1]); ?>
</div>
</div>
</td>
</tr>
</tbody>
</table><table cellpadding="1" cellspacing="1" id="villages">
<thead>
<tr>
<th colspan="3">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead><tbody>
<?php
foreach($varray as $vil) {
$coor = $database->getCoor($vil['wref']);
echo "<tr><td class=\"nam\"><a href=\"karte.php?d=".$vil['wref']."&amp;c=".$generator->getMapCheck($vil['wref'])."\">".$vil['name']."</a>";
if($vil['capital'] == 1) {
echo "<span class=\"none3\"> (capital)</span>";
}
echo "</td>";
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
}
?>
</tbody></table>
+238
View File
@@ -0,0 +1,238 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename links.tpl ##
## Developed by: Slim, Manuel Mannhardt < manuel_mannhardt@web.de > ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
// Save new link or just edit a link
if($_POST) {
$links = array();
// let's do some complicated code x'D
foreach($_POST as $key => $value) {
if(substr($key, 0, 2) == 'nr') {
$i = substr($key, 2);
$links[$i]['nr'] = mysql_escape_string($value);
}
if(substr($key, 0, 2) == 'id') {
$i = substr($key, 2);
$links[$i]['id'] = mysql_escape_string($value);
}
if(substr($key, 0, 8) == 'linkname') {
$i = substr($key, 8);
$links[$i]['linkname'] = mysql_escape_string($value);
}
if(substr($key, 0, 8) == 'linkziel') {
$i = substr($key, 8);
$links[$i]['linkziel'] = mysql_escape_string($value);
}
}
// Save
foreach($links as $link) {
settype($link['nr'], 'int');
if(trim($link['nr']) != '' AND trim($link['linkname']) != '' AND trim($link['linkziel']) != '' AND trim($link['id']) == '') {
// Add new link
$userid = $session->uid;
$query = mysql_query('INSERT INTO `' . TB_PREFIX . 'links` (`userid`, `name`, `url`, `pos`) VALUES (' . $userid . ', \'' . $link['linkname'] . '\', \'' . $link['linkziel'] . '\', ' . $link['nr'] . ')');
} elseif(trim($link['nr']) != '' AND trim($link['linkname']) != '' AND trim($link['linkziel']) != '' AND trim($link['id']) != '') {
// Update link
$query = mysql_query('SELECT * FROM `' . TB_PREFIX . 'links` WHERE `id` = ' . $link['id']);
$data = mysql_fetch_assoc($query);
// May the user update this entry?
if($data['userid'] == $session->uid) {
$query2 = mysql_query('UPDATE `' . TB_PREFIX . 'links` SET `name` = \'' . $link['linkname'] . '\', `url` = \'' . $link['linkziel'] . '\', `pos` = ' . $link['nr'] . ' WHERE `id` = ' . $link['id']);
}
} elseif(trim($link['nr']) == '' AND trim($link['linkname']) == '' AND trim($link['linkziel']) == '' AND trim($link['id']) != '') {
// Delete entry
$query = mysql_query('SELECT * FROM `' . TB_PREFIX . 'links` WHERE `id` = ' . $link['id']);
$data = mysql_fetch_assoc($query);
// May the user delete this entry?
if($data['userid'] == $session->uid) {
$query2 = mysql_query('DELETE FROM `' . TB_PREFIX . 'links` WHERE `id` = ' . $link['id']);
}
}
}
print '<meta http-equiv="refresh" content="0">';
}
// Fetch all links
$query = mysql_query('SELECT * FROM `' . TB_PREFIX . 'links` WHERE `userid` = ' . $session->uid . ' ORDER BY `pos` ASC') or die(mysql_error());
$links = array();
while($data = mysql_fetch_assoc($query)) {
$links[] = $data;
}
?>
<h1>Player profile</h1>
<?php include("menu.tpl"); ?>
<form action="spieler.php?s=2" method="POST">
<input type="hidden" name="ft" value="p2">
<input type="hidden" name="uid" value="<?php echo $session->uid; ?>" />
<table cellpadding="1" cellspacing="1" id="links">
<thead>
<tr>
<th><img class="help" src="img/x.gif" /></th>
<th colspan="2">Direct links</th>
</tr>
<tr>
<td>No.</td>
<td>Link name</td>
<td>Link target</td>
</tr>
</thead>
<tbody>
<?php $i = 0; foreach($links as $link): ?>
<tr>
<td class="nr"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="nr<?php print $i; ?>" value="<?php print $link['pos']; ?>" size="1" maxlength="3" /><input type="hidden" name="id<?php print $i; ?>" value="<?php print $link['id']; ?>" /></td>
<td class="nam"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkname<?php print $i; ?>" value="<?php print $link['name']; ?>" maxlength="30" /></td>
<td class="link"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkziel<?php print $i; ?>" value="<?php print $link['url']; ?>" maxlength="255" /></td>
</tr>
<?php ++$i; $last_pos = $link['pos']; endforeach; ?>
<tr>
<td class="nr"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="nr<?php print $i; ?>" value="<?php print ($last_pos + 1); ?>" size="1" maxlength="3"></td>
<td class="nam"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkname<?php print $i; ?>" value="" maxlength="30"></td>
<td class="link"><input <?php if(!$session->plus){echo"disabled";} ?> class="text" type="text" name="linkziel<?php print $i; ?>" value="" maxlength="255"></td>
</tr>
<tr>
<td colspan="3"><input type="image" value="" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></td>
</tr>
</tbody>
</table>
</form>
<!-- <table cellpadding="1" cellspacing="1" id="completion" class="set"><thead>
<tr>
<th colspan="2">Auto completion</th>
</tr>
<tr>
<td colspan="2">Used for rally point and marketplace:</td>
</tr>
</thead><tbody>
<tr>
<td class="sel"><input class="check" type="checkbox" name="v1" value="1" checked></td>
<td>own villages</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="v2" value="1" ></td>
<td>villages of the surroundings</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="v3" value="1" ></td>
<td>villages from players of the alliance</td>
</tr>
</tbody></table><table cellpadding="1" cellspacing="1" id="big_map" class="set"><thead>
<tr>
<th colspan="2">Large map</th>
</tr>
</thead><tbody>
<tr>
<td class="sel"><input class="check" type="checkbox" name="map" ></td>
<td>Show the large map in an extra window.</td>
</tr>
</tbody>
</table><table cellpadding="1" cellspacing="1" id="report_filter" class="set"><thead>
<tr>
<th colspan="2">Report filter</th>
</tr>
</thead><tbody>
<tr>
<td class="sel"><input class="check" type="checkbox" name="v4" value="1" ></td>
<td>No reports for transfers to own villages.</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="v5" value="1" ></td>
<td>No reports for transfers to foreign villages.</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="v6" value="1" ></td>
<td>No reports for transfers from foreign villages.</td>
</tr>
</tbody>
</table><table cellpadding="1" cellspacing="1" id="time" class="set"><thead>
<tr>
<th colspan="2">Time preferences</th>
</tr>
<tr>
<td colspan="2">Here you can change Travian's displayed time to fit your time zone.</td>
</tr>
</thead><tbody>
<tr>
<th>Time zones</th>
<td><select name="timezone" class="dropdown">
<optgroup label="local time zones"><option value="495">Europe</option>
<option value="99" selected="selected">UK</option>
<option value="492">Turkey</option>
<option value="328">Asia/Kolkata</option>
<option value="345">Asia/Bangkok</option>
<option value="257">USA/New York</option>
<option value="189">USA/Chicago</option>
<option value="474">New Zealand</option></optgroup><optgroup label="general time zones"><option value="12">UTC-11</option>
<option value="13">UTC-10</option>
<option value="14">UTC-9</option>
<option value="15">UTC-8</option>
<option value="16">UTC-7</option>
<option value="17">UTC-6</option>
<option value="18">UTC-5</option>
<option value="19">UTC-4</option>
<option value="20">UTC-3</option>
<option value="21">UTC-2</option>
<option value="22">UTC-1</option>
<option value="23">UTC</option>
<option value="0">UTC+1</option>
<option value="1">UTC+2</option>
<option value="2">UTC+3</option>
<option value="3">UTC+4</option>
<option value="4">UTC+5</option>
<option value="5">UTC+6</option>
<option value="6">UTC+7</option>
<option value="7">UTC+8</option>
<option value="8">UTC+9</option>
<option value="9">UTC+10</option>
<option value="10">UTC+11</option>
<option value="11">UTC+12</option>
</optgroup></select>
</td>
</tr><tr>
<th>Date</th>
<td>
<label><input class="radio" type="Radio" name="tformat" value="0" checked> EU (dd.mm.yy 24h)</label><br />
<label><input class="radio" type="Radio" name="tformat" value="1"> US (mm/dd/yy 12h)</label><br />
<label><input class="radio" type="Radio" name="tformat" value="2"> UK (dd/mm/yy 12h)</label><br />
<label><input class="radio" type="Radio" name="tformat" value="3"> ISO (yy/mm/dd 24h)</label>
</td>
</tr>
</tbody>
</table><p class="btn"><input type="image" value="" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p>
</form> //-->
+144
View File
@@ -0,0 +1,144 @@
<h1>Player profile</h1>
<?php
$varmedal = $database->getProfileMedal($session->uid);
include("menu.tpl"); ?>
<form action="spieler.php" method="POST">
<input type="hidden" name="ft" value="p1" />
<input type="hidden" name="uid" value="<?php echo $session->uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<table cellpadding="1" cellspacing="1" id="edit" ><thead>
<tr>
<th colspan="3">Player <?php echo $session->username; ?> </th>
</tr>
<tr>
<td colspan="2">Details</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2" class="empty"></td><td class="empty"></td></tr>
<tr>
<?php
if($session->userinfo['birthday'] != 0) {
$bday = explode("-",$session->userinfo['birthday']);
}
else {
$bday = array('','','');
}
?>
<th>Birthday</th><td class="birth"><input tabindex="1" class="text day" type="text" name="tag" value="<?php echo $bday[2]; ?>" maxlength="2" /> <select tabindex="2" name="monat" size="" class="dropdown">
<option value="0"></option><option value="1" <?php if($bday[1] == 1) { echo "selected"; } ?>>Jan</option><option value="2"<?php if($bday[1] == 2) { echo "selected"; } ?>>Feb</option><option value="3"<?php if($bday[1] == 3) { echo "selected"; } ?>>Mar</option><option value="4"<?php if($bday[1] == 4) { echo "selected"; } ?>>Apr</option><option value="5"<?php if($bday[1] == 5) { echo "selected"; } ?>>May</option><option value="6"<?php if($bday[1] == 6) { echo "selected"; } ?>>June</option><option value="7"<?php if($bday[1] == 7) { echo "selected"; } ?>>July</option><option value="8"<?php if($bday[1] == 8) { echo "selected"; } ?>>Aug</option><option value="9"<?php if($bday[1] == 9) { echo "selected"; } ?>>Sep</option><option value="10"<?php if($bday[1] == 10) { echo "selected"; } ?>>Oct</option><option value="11"<?php if($bday[1] == 11) { echo "selected"; } ?>>Nov</option><option value="12"<?php if($bday[1] == 12) { echo "selected"; } ?>>Dec</option></select> <input tabindex="3" type="text" name="jahr" value="<?php echo $bday[0]; ?>" maxlength="4" class="text year"></td>
<td rowspan="7" class="desc1"><textarea tabindex="7" name="be1"><?php echo $session->userinfo['desc2']; ?></textarea></td></tr>
<tr><th>Gender</th>
<td class="gend">
<label><input class="radio" type="radio" name="mw" value="0" <?php if($session->userinfo['gender'] == 0) { echo "checked"; } ?> tabindex="4">n/a</label>
<label><input class="radio" type="radio" name="mw" value="1" <?php if($session->userinfo['gender'] == 1) { echo "checked"; } ?> >m</label>
<label><input class="radio" type="radio" name="mw" value="2" <?php if($session->userinfo['gender'] == 2) { echo "checked"; } ?> >f</label>
</td></tr>
<tr><th>Location</th><td><input tabindex="5" type="text" name="ort" value="<?php echo $session->userinfo['location']; ?>" maxlength="30" class="text"></td></tr>
<tr><td colspan="2" class="empty"></td></tr>
<?php
$varray = $database->getProfileVillages($session->uid);
for($i=0;$i<=count($varray)-1;$i++) {
echo "<tr><th>Village name</th><td><input tabindex=\"6\" type=\"text\" name=\"dname$i\" value=\"".$varray[$i]['name']."\" maxlength=\"20\" class=\"text\"></td></tr>";
}
?>
<tr><td colspan="2" class="desc2"><textarea tabindex="8" name="be2"><?php echo $session->userinfo['desc1']; ?></textarea></td></tr>
</table>
<p>
<table cellspacing="1" cellpadding="2" class="tbg">
<tr><td class="rbg" colspan="4">Medals</td></tr>
<tr>
<td>Category</td>
<td>Rang</td>
<td>Week</td>
<td>BB-Code</td>
</tr>
<?php
/******************************
INDELING CATEGORIEEN:
===============================
== 1. Aanvallers top 10 ==
== 2. Defence top 10 ==
== 3. Klimmers top 10 ==
== 4. Overvallers top 10 ==
== 5. In att en def tegelijk ==
== 6. in top 3 - aanval ==
== 7. in top 3 - verdediging ==
== 8. in top 3 - klimmers ==
== 9. in top 3 - overval ==
******************************/
foreach($varmedal as $medal) {
$titel="Bonus";
switch ($medal['categorie']) {
case "1":
$titel="Attacker of the Week";
break;
case "2":
$titel="Defender of the Week";
break;
case "3":
$titel="Pop Climber of the week";
break;
case "4":
$titel="Robber of the week";
break;
case "5":
$titel="Top 10 of both attacckers and defenders";
break;
case "6":
$titel="Top 3 of Attackers of week ".$medal['points']." in a row";
break;
case "7":
$titel="Top 3 of Defenders of week ".$medal['points']." in a row";
break;
case "8":
$titel="Top 3 of Pop climbers of week ".$medal['points']." in a row";
break;
case "9":
$titel="Top 3 of Robbers of week ".$medal['points']." in a row";
break;
case "10":
$titel="Rank Climber of the week";
break;
case "11":
$titel="Top 3 of Rank climbers of week ".$medal['points']." in a row";
break;
case "12":
$titel="Top 10 of Rank Attackers of week ".$medal['points']." in a row";
break;
}
echo"<tr>
<td> ".$titel."</td>
<td>".$medal['plaats']."</td>
<td>".$medal['week']."</td>
<td>[#".$medal['id']."]</td>
</tr>";
} ?>
<tr>
<td>Beginners Protection</td>
<td></td>
<td></td>
<td>[#0]</td>
</tr>
</table></p>
<p class="btn"><input type="image" value="" tabindex="9" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p>
</form>
+1
View File
@@ -0,0 +1 @@
<?php