Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fde7653cf | ||
|
|
7dcc790e65 | ||
|
|
5797328adc | ||
|
|
6f1e5e4467 | ||
|
|
8ebc4cd91f | ||
|
|
4b92511bae | ||
|
|
74c4f31f7f |
9 changed files with 54 additions and 51 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ config.php
|
|||
.idea/
|
||||
coverage/
|
||||
src/application/cache/*
|
||||
src/application/configs/local.php
|
||||
|
|
|
|||
|
|
@ -351,8 +351,8 @@ CREATE TABLE IF NOT EXISTS {$this->getTableName('planets')} (
|
|||
`gauss_canyon` DECIMAL(65,0) NOT NULL DEFAULT 0,
|
||||
`ionic_canyon` DECIMAL(65,0) NOT NULL DEFAULT 0,
|
||||
`buster_canyon` DECIMAL(65,0) NOT NULL DEFAULT 0,
|
||||
`small_protection_shield` ENUM('0','1') NOT NULL DEFAULT 0,
|
||||
`big_protection_shield` ENUM('0','1') NOT NULL DEFAULT 0,
|
||||
`small_protection_shield` ENUM('0','1') NOT NULL DEFAULT '0',
|
||||
`big_protection_shield` ENUM('0','1') NOT NULL DEFAULT '0',
|
||||
`interceptor_misil` SMALLINT NOT NULL DEFAULT 0,
|
||||
`interplanetary_misil` SMALLINT NOT NULL DEFAULT 0,
|
||||
`metal_mine_porcent` TINYINT NOT NULL DEFAULT 10,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ function SendSimpleMessage ( $Owner, $Sender, $Time, $Type, $From, $Subject, $Me
|
|||
$QryInsertMessage = "INSERT INTO {{table}} SET ";
|
||||
$QryInsertMessage .= "`message_owner` = '". $Owner ."', ";
|
||||
$QryInsertMessage .= "`message_sender` = '". $Sender ."', ";
|
||||
$QryInsertMessage .= "`message_time` = '" . $Time . "', ";
|
||||
// $QryInsertMessage .= "`message_time` = '" . $Time . "', ";
|
||||
$QryInsertMessage .= "`message_type` = '". $Type ."', ";
|
||||
$QryInsertMessage .= "`message_from` = '". addslashes( $From ) ."', ";
|
||||
$QryInsertMessage .= "`message_subject` = '". addslashes( $Subject ) ."', ";
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@ function ModuleMarchand ( $CurrentUser, &$CurrentPlanet ) {
|
|||
|
||||
$parse = $lang;
|
||||
|
||||
if ($_POST['ress'] != '') {
|
||||
if (isset($_POST['ress']) && $_POST['ress'] != '') {
|
||||
$PageTPL = gettemplate('message_body');
|
||||
$Error = false;
|
||||
$CheatTry = false;
|
||||
$Metal = $_POST['metal'];
|
||||
$Crystal = $_POST['cristal'];
|
||||
$Deuterium = $_POST['deut'];
|
||||
$Metal = isset($_POST['metal']) ? $_POST['metal'] : 0;
|
||||
$Crystal = isset($_POST['cristal']) ? $_POST['cristal'] : 0;
|
||||
$Deuterium = isset($_POST['deut']) ? $_POST['deut'] : 0;
|
||||
if ($Metal < 0) {
|
||||
$Metal *= -1;
|
||||
$CheatTry = true;
|
||||
|
|
@ -72,8 +72,8 @@ function ModuleMarchand ( $CurrentUser, &$CurrentPlanet ) {
|
|||
|
||||
case 'cristal':
|
||||
$Necessaire = (( $Metal * 0.5) + ( $Deuterium * 2));
|
||||
if ($CurrentPlanet['crystal'] > $Necessaire) {
|
||||
$CurrentPlanet['crystal'] -= $Necessaire;
|
||||
if ($CurrentPlanet['cristal'] > $Necessaire) {
|
||||
$CurrentPlanet['cristal'] -= $Necessaire;
|
||||
} else {
|
||||
$Message = $lang['mod_ma_noten'] ." ". $lang['Crystal'] ."! ";
|
||||
$Error = true;
|
||||
|
|
@ -94,17 +94,17 @@ function ModuleMarchand ( $CurrentUser, &$CurrentPlanet ) {
|
|||
if ($Error == false) {
|
||||
if ($CheatTry == true) {
|
||||
$CurrentPlanet['metal'] = 0;
|
||||
$CurrentPlanet['crystal'] = 0;
|
||||
$CurrentPlanet['cristal'] = 0;
|
||||
$CurrentPlanet['deuterium'] = 0;
|
||||
} else {
|
||||
$CurrentPlanet['metal'] += $Metal;
|
||||
$CurrentPlanet['crystal'] += $Crystal;
|
||||
$CurrentPlanet['cristal'] += $Crystal;
|
||||
$CurrentPlanet['deuterium'] += $Deuterium;
|
||||
}
|
||||
|
||||
$QryUpdatePlanet = "UPDATE {{table}} SET ";
|
||||
$QryUpdatePlanet .= "`metal` = '". $CurrentPlanet['metal'] ."', ";
|
||||
$QryUpdatePlanet .= "`crystal` = '". $CurrentPlanet['crystal'] ."', ";
|
||||
$QryUpdatePlanet .= "`cristal` = '". $CurrentPlanet['cristal'] ."', ";
|
||||
$QryUpdatePlanet .= "`deuterium` = '". $CurrentPlanet['deuterium'] ."' ";
|
||||
$QryUpdatePlanet .= "WHERE ";
|
||||
$QryUpdatePlanet .= "`id` = '". $CurrentPlanet['id'] ."';";
|
||||
|
|
@ -118,7 +118,7 @@ function ModuleMarchand ( $CurrentUser, &$CurrentPlanet ) {
|
|||
}
|
||||
$parse['mes'] = $Message;
|
||||
} else {
|
||||
if ($_POST['action'] != 2) {
|
||||
if (!isset($_POST['action']) || $_POST['action'] != 2) {
|
||||
$PageTPL = gettemplate('marchand_main');
|
||||
} else {
|
||||
$parse['mod_ma_res'] = "1";
|
||||
|
|
@ -145,8 +145,7 @@ function ModuleMarchand ( $CurrentUser, &$CurrentPlanet ) {
|
|||
$Page = parsetemplate ( $PageTPL, $parse );
|
||||
return $Page;
|
||||
}
|
||||
|
||||
$Page = ModuleMarchand ( $user, $planetrow );
|
||||
$Page = ModuleMarchand ( $user, $planet );
|
||||
display ( $Page, $lang['mod_marchand'], true, '', false );
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ if(!isset($user['authlevel'])) {
|
|||
includeLang('messages');
|
||||
|
||||
|
||||
$OwnerID = $_GET['id'];
|
||||
$MessCategory = $_GET['messcat'];
|
||||
$MessPageMode = (string) $_GET['mode'];
|
||||
$DeleteWhat = $_POST['deletemessages'];
|
||||
if (isset ($DeleteWhat)) {
|
||||
$OwnerID = isset($_GET['id']) ? $_GET['id'] : null;
|
||||
$MessCategory = isset($_GET['messcat']) ? $_GET['messcat'] : null;
|
||||
$MessPageMode = isset($_GET['mode']) ? (string) $_GET['mode'] : null;
|
||||
$DeleteWhat = isset($_POST['deletemessages']) ? $_POST['deletemessages'] : null;
|
||||
if (!empty($DeleteWhat)) {
|
||||
$MessPageMode = "delete";
|
||||
}
|
||||
|
||||
|
|
@ -55,6 +55,9 @@ $MessageType = array (0, 1, 2, 3, 4, 5, 15, 99, 100 );
|
|||
$TitleColor = array (0 => '#FFFF00', 1 => '#FF6699', 2 => '#FF3300', 3 => '#FF9900', 4 => '#773399', 5 => '#009933', 15 => '#030070', 99 => '#007070', 100 => '#ABABAB');
|
||||
$BackGndColor = array (0 => '#663366', 1 => '#336666', 2 => '#000099', 3 => '#666666', 4 => '#999999', 5 => '#999999', 15 => '#999999', 99 => '#999999', 100 => '#999999');
|
||||
|
||||
$page = null;
|
||||
$text = null;
|
||||
|
||||
for ($MessType = 0; $MessType < 101; $MessType++) {
|
||||
if (in_array($MessType, $MessageType) ) {
|
||||
$WaitingMess[$MessType] = $UnRead[$messfields[$MessType]];
|
||||
|
|
@ -230,7 +233,7 @@ $Message = trim ( nl2br ( strip_tags ( $_POST['text'], '<br>' ) ) ); }
|
|||
$page .= "<th>". stripslashes( $CurMess['message_subject'] ) ." ";
|
||||
if ($CurMess['message_type'] == 1) {
|
||||
$page .= "<a href=\"messages.php?mode=write&id=". $CurMess['message_sender'] ."&subject=".$lang['mess_answer_prefix'] . htmlspecialchars( $CurMess['message_subject']) ."\">";
|
||||
$page .= "<img src=\"". $dpath ."img/m.gif\" alt=\"".$lang['mess_answer']."\" border=\"0\"></a></th>";
|
||||
$page .= "<img src=\"". $user['dpath'] ."img/m.gif\" alt=\"".$lang['mess_answer']."\" border=\"0\"></a></th>";
|
||||
} else {
|
||||
$page .= "</th>";
|
||||
}
|
||||
|
|
@ -254,12 +257,12 @@ $Message = trim ( nl2br ( strip_tags ( $_POST['text'], '<br>' ) ) ); }
|
|||
$page .= "\n<tr>";
|
||||
$page .= "<input name=\"showmes". $CurMess['message_id'] . "\" type=\"hidden\" value=\"1\">";
|
||||
$page .= "<th><input name=\"delmes". $CurMess['message_id'] ."\" type=\"checkbox\"></th>";
|
||||
$page .= "<th>". date("m-d H:i:s O", $CurMess['message_time']) ."</th>";
|
||||
$page .= "<th>". date("d-m-Y H:i:s", strtotime($CurMess['message_time'])) ."</th>";
|
||||
$page .= "<th>". stripslashes( $CurMess['message_from'] ) ."</th>";
|
||||
$page .= "<th>". stripslashes( $CurMess['message_subject'] ) ." ";
|
||||
if ($CurMess['message_type'] == 1) {
|
||||
$page .= "<a href=\"messages.php?mode=write&id=". $CurMess['message_sender'] ."&subject=".$lang['mess_answer_prefix'] . htmlspecialchars( $CurMess['message_subject']) ."\">";
|
||||
$page .= "<img src=\"". $dpath ."img/m.gif\" alt=\"".$lang['mess_answer']."\" border=\"0\"></a></th>";
|
||||
$page .= "<img src=\"". $user['dpath'] ."img/m.gif\" alt=\"".$lang['mess_answer']."\" border=\"0\"></a></th>";
|
||||
} else {
|
||||
$page .= "</th>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,18 +50,18 @@ $mode = isset($_GET['mode']) ? $_GET['mode'] : null;
|
|||
}
|
||||
}
|
||||
|
||||
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
|
||||
|
||||
if ($_POST && $mode == "change") { // Array ( [db_character]
|
||||
$iduser = $user["id"];
|
||||
$avatar = $_POST["avatar"];
|
||||
|
||||
if ($_POST["dpath"] != "")
|
||||
$dpath = $_POST["dpath"];
|
||||
else
|
||||
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
|
||||
|
||||
// Gestion des options speciales pour les admins
|
||||
if ($user['authlevel'] != LEVEL_PLAYER) {
|
||||
if ($_POST['adm_pl_prot'] == 'on') {
|
||||
if (isset($_POST['adm_pl_prot']) && $_POST['adm_pl_prot'] == 'on') {
|
||||
doquery ("UPDATE {{table}} SET `id_level` = '".$user['authlevel']."' WHERE `id_owner` = '".$user['id']."';", 'planets');
|
||||
} else {
|
||||
doquery ("UPDATE {{table}} SET `id_level` = '0' WHERE `id_owner` = '".$user['id']."';", 'planets');
|
||||
|
|
@ -191,10 +191,7 @@ $mode = isset($_GET['mode']) ? $_GET['mode'] : null;
|
|||
`settings_bud` = '$settings_bud',
|
||||
`settings_mis` = '$settings_mis',
|
||||
`settings_rep` = '$settings_rep',
|
||||
`db_deaktjava` = '$db_deaktjava',
|
||||
`kolorminus` = '$kolorminus',
|
||||
`kolorplus` = '$kolorplus',
|
||||
`kolorpoziom` = '$kolorpoziom'
|
||||
`db_deaktjava` = '$db_deaktjava'
|
||||
WHERE `id` = '$iduser' LIMIT 1", "users");
|
||||
|
||||
if (isset($_POST["db_password"]) && md5($_POST["db_password"]) == $user["password"]) {
|
||||
|
|
@ -250,7 +247,7 @@ $mode = isset($_GET['mode']) ? $_GET['mode'] : null;
|
|||
$parse['opt_modev_data'] = ($user['urlaubs_modus'] == 1)?" checked='checked'/":'';
|
||||
$parse['opt_modev_exit'] = ($user['urlaubs_modus'] == 0)?" checked='1'/":'';
|
||||
$parse['Vaccation_mode'] = $lang['Vaccation_mode'];
|
||||
$parse['vacation_until'] = date("d.m.Y G:i:s",$user['urlaubs_until']);
|
||||
$parse['vacation_until'] = date("d.m.Y G:i:s",$user['urlaubs_until']->getTimestamp());
|
||||
$parse['user_settings_rep'] = ($user['settings_rep'] == 1) ? " checked='checked'/":'';
|
||||
$parse['user_settings_esp'] = ($user['settings_esp'] == 1) ? " checked='checked'/":'';
|
||||
$parse['user_settings_wri'] = ($user['settings_wri'] == 1) ? " checked='checked'/":'';
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ $user = Wootook_Player_Model_Session::getSingleton()->getPlayer();
|
|||
$planet = $user->getCurrentPlanet();
|
||||
|
||||
$Page = BuildRessourcePage($user, $planet);
|
||||
display($Page, $lang['Resources']);
|
||||
display($Page, 'Resources', false);
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
// History version
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ define('INSIDE' , true);
|
|||
define('INSTALL' , false);
|
||||
require_once dirname(__FILE__) .'/application/bootstrap.php';
|
||||
|
||||
$searchtext = mysql_escape_string($_POST['searchtext']);
|
||||
$type = $_POST['type'];
|
||||
$searchtext = isset($_POST['searchtext']) ? mysql_escape_string($_POST['searchtext']) : null;
|
||||
$type = isset($_POST['type']) ? $_POST['type'] : null;
|
||||
|
||||
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
|
||||
$dpath = (empty($user["dpath"])) ? DEFAULT_SKINPATH : $user["dpath"];
|
||||
|
||||
includeLang('search');
|
||||
$search_results = null;
|
||||
$result_list = null;
|
||||
$i = 0;
|
||||
//creamos la query
|
||||
$searchtext = mysql_escape_string($_POST["searchtext"]);
|
||||
switch($type){
|
||||
case "playername":
|
||||
$table = gettemplate('search_user_table');
|
||||
|
|
@ -89,7 +89,7 @@ if(isset($searchtext) && isset($type)){
|
|||
}else{
|
||||
$pquery = doquery("SELECT name FROM {{table}} WHERE id = {$s['id_planet']}","planets",true);
|
||||
$s['planet_name'] = $pquery['name'];
|
||||
$s['ally_name'] = ($aquery['ally_name']!='')?"<a href=\"alliance.php?mode=ainfo&tag={$aquery['ally_name']}\">{$aquery['ally_name']}</a>":'';
|
||||
$s['ally_name'] = (!empty($aquery['ally_name']))?"<a href=\"alliance.php?mode=ainfo&tag={$aquery['ally_name']}\">{$aquery['ally_name']}</a>":'';
|
||||
}
|
||||
//ahora la alianza
|
||||
if($s['ally_id']!=0&&$s['ally_request']==0){
|
||||
|
|
@ -99,8 +99,9 @@ if(isset($searchtext) && isset($type)){
|
|||
}
|
||||
|
||||
|
||||
|
||||
if (!empty($s['rank'])) {
|
||||
$s['position'] = "<a href=\"stat.php?start=".$s['rank']."\">".$s['rank']."</a>";
|
||||
}
|
||||
$s['dpath'] = $dpath;
|
||||
$s['coordinated'] = "{$s['galaxy']}:{$s['system']}:{$s['planet']}";
|
||||
$s['buddy_request'] = $lang['buddy_request'];
|
||||
|
|
@ -122,10 +123,10 @@ if(isset($searchtext) && isset($type)){
|
|||
}
|
||||
|
||||
//el resto...
|
||||
$lang['type_playername'] = ($_POST["type"] == "playername") ? " SELECTED" : "";
|
||||
$lang['type_planetname'] = ($_POST["type"] == "planetname") ? " SELECTED" : "";
|
||||
$lang['type_allytag'] = ($_POST["type"] == "allytag") ? " SELECTED" : "";
|
||||
$lang['type_allyname'] = ($_POST["type"] == "allyname") ? " SELECTED" : "";
|
||||
$lang['type_playername'] = (isset($_POST["type"]) && $_POST["type"] == "playername") ? " SELECTED" : "";
|
||||
$lang['type_planetname'] = (isset($_POST["type"]) && $_POST["type"] == "planetname") ? " SELECTED" : "";
|
||||
$lang['type_allytag'] = (isset($_POST["type"]) && $_POST["type"] == "allytag") ? " SELECTED" : "";
|
||||
$lang['type_allyname'] = (isset($_POST["type"]) && $_POST["type"] == "allyname") ? " SELECTED" : "";
|
||||
$lang['searchtext'] = $searchtext;
|
||||
$lang['search_results'] = $search_results;
|
||||
//esto es algo repetitivo ... w
|
||||
|
|
|
|||
|
|
@ -35,19 +35,20 @@ require_once dirname(__FILE__) .'/application/bootstrap.php';
|
|||
includeLang('stat');
|
||||
|
||||
$parse = $lang;
|
||||
$who = (isset($_POST['who'])) ? $_POST['who'] : $_GET['who'];
|
||||
$who = (isset($_POST['who'])) ? $_POST['who'] : isset($_GET['who']) ? $_GET['who'] : null;
|
||||
if (!isset($who)) {
|
||||
$who = 1;
|
||||
}
|
||||
$type = (isset($_POST['type'])) ? $_POST['type'] : $_GET['type'];
|
||||
$type = (isset($_POST['type'])) ? $_POST['type'] : isset($_GET['type']) ? $_GET['type'] : null;
|
||||
if (!isset($type)) {
|
||||
$type = 1;
|
||||
}
|
||||
$range = (isset($_POST['range'])) ? $_POST['range'] : $_GET['range'];
|
||||
$range = (isset($_POST['range'])) ? $_POST['range'] : isset($_GET['range']) ? $_GET['range'] : null;
|
||||
if (!isset($range)) {
|
||||
$range = 1;
|
||||
}
|
||||
|
||||
$start = 0;
|
||||
$parse['who'] = "<option value=\"1\"". (($who == "1") ? " SELECTED" : "") .">". $lang['stat_player'] ."</option>";
|
||||
$parse['who'] .= "<option value=\"2\"". (($who == "2") ? " SELECTED" : "") .">". $lang['stat_allys'] ."</option>";
|
||||
|
||||
|
|
@ -144,6 +145,7 @@ if ($who == 2) {
|
|||
}
|
||||
} else {
|
||||
$MaxUsers = doquery ("SELECT COUNT(*) AS `count` FROM {{table}} WHERE `db_deaktjava` = '0';", 'users', true);
|
||||
$LastPage = 0;
|
||||
if ($MaxUsers['count'] > 100) {
|
||||
$LastPage = floor($MaxUsers['count'] / 100);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue