diff --git a/Templates/Profile/preference.tpl b/Templates/Profile/preference.tpl index 77922600..61edeb4b 100644 --- a/Templates/Profile/preference.tpl +++ b/Templates/Profile/preference.tpl @@ -13,13 +13,17 @@ if(isset($_GET['del']) && is_numeric($_GET['del'])){ ## Developed by: Dzoki ## ## Fixed by: Shadow / Skype : cata7007 ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2013. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## URLs: http://travian.shadowss.ro ## ## Source code: http://github.com/Shadowss/TravianZ/ ## ## ## ################################################################################# // Save new link or just edit a link -if($_POST) { +if(isset($_POST['ft']) && $_POST['ft'] == 'p3'){ + return; +} + +if(isset($_POST['nr0']) || isset($_POST['id0']) || isset($_POST['linkname0']) || isset($_POST['linkziel0'])) { $links = []; // let's do some complicated code x'D @@ -82,13 +86,46 @@ if($_POST) { $query = mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'links` WHERE `userid` = ' . (int) $session->uid . ' ORDER BY `pos` ASC') or die(mysqli_error($database->dblink)); $links = []; while($data = mysqli_fetch_assoc($query)) $links[] = $data; + +//Code for preference (map,timezone,timeformat,etc.) + +if(isset($_POST['v1']) || isset($_POST['v2']) || isset($_POST['timezone'])) { + + $v1 = isset($_POST['v1']) ? 1 : 0; + $v2 = isset($_POST['v2']) ? 1 : 0; + $v3 = isset($_POST['v3']) ? 1 : 0; + $map = isset($_POST['map']) ? 1 : 0; + $v4 = isset($_POST['v4']) ? 1 : 0; + $v5 = isset($_POST['v5']) ? 1 : 0; + $v6 = isset($_POST['v6']) ? 1 : 0; + + $timezone = isset($_POST['timezone']) ? intval($_POST['timezone']) : 1; + $tformat = isset($_POST['tformat']) ? intval($_POST['tformat']) : 0; + + $database->query(" + UPDATE ".TB_PREFIX."users SET + v1 = $v1, + v2 = $v2, + v3 = $v3, + map = $map, + v4 = $v4, + v5 = $v5, + v6 = $v6, + timezone = $timezone, + tformat = $tformat + WHERE id = ".$session->uid." + "); + + header("Location: spieler.php?s=2"); + exit; +} ?>
| Auto completion | -|
|---|---|
| Used for rally point and marketplace: | - -|
| - | own villages | -
| - - | villages of the surroundings | -
| - | villages from players of the alliance | -
| Large map | -|
|---|---|
| - | Show the large map in an extra window. | -
| Report filter | -|
|---|---|
| - | No reports for transfers to own villages. | - -
| - | No reports for transfers to foreign villages. | -
| - | No reports for transfers from foreign villages. | - -
| Auto completion | |||
|---|---|---|---|
| Used for rally point and marketplace: | |||
| Time preferences | ++userinfo['v1']) echo 'checked'; ?>> + | +own villages | |
| Here you can change Travian's displayed time to fit your time zone. | ++userinfo['v2']) echo 'checked'; ?>> + | +villages of the surroundings | |
| Time zones | -- - | -||
| Date | -
- - - - - - |
++userinfo['v3']) echo 'checked'; ?>> + | +villages from players of the alliance |
| Large map | |
|---|---|
| +userinfo['map']) echo 'checked'; ?>> + | +Show the large map in an extra window. | +
| Report filter | |
|---|---|
| +userinfo['v4']) echo 'checked'; ?>> + | +No reports for transfers to own villages. | +
| +userinfo['v5']) echo 'checked'; ?>> + | +No reports for transfers to foreign villages. | +
| +userinfo['v6']) echo 'checked'; ?>> + | +No reports for transfers from foreign villages. | +
| Time preferences | |
|---|---|
| Here you can change Travian's displayed time to fit your time zone. | |
| Time zones | ++ + | +
| Date | +
+
+ + + + + + + + + |
+
+