diff --git a/src/includes/functions/SendSimpleMessage.php b/src/includes/functions/SendSimpleMessage.php
index 3e19e1c..3d2b0ab 100644
--- a/src/includes/functions/SendSimpleMessage.php
+++ b/src/includes/functions/SendSimpleMessage.php
@@ -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 ) ."', ";
diff --git a/src/messages.php b/src/messages.php
index bb8bb1d..9d080e5 100644
--- a/src/messages.php
+++ b/src/messages.php
@@ -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'], '
' ) ) ); }
$page .= "
". stripslashes( $CurMess['message_subject'] ) ." ";
if ($CurMess['message_type'] == 1) {
$page .= "";
- $page .= "![\"".$lang['mess_answer']."\"](\"".) | ";
+ $page .= "
";
} else {
$page .= "";
}
@@ -254,12 +257,12 @@ $Message = trim ( nl2br ( strip_tags ( $_POST['text'], '
' ) ) ); }
$page .= "\n";
$page .= "";
$page .= " | ";
- $page .= "". date("m-d H:i:s O", $CurMess['message_time']) ." | ";
+ $page .= "". date("d-m-Y H:i:s", strtotime($CurMess['message_time'])) ." | ";
$page .= "". stripslashes( $CurMess['message_from'] ) ." | ";
$page .= "". stripslashes( $CurMess['message_subject'] ) ." ";
if ($CurMess['message_type'] == 1) {
$page .= "";
- $page .= "![\"".$lang['mess_answer']."\"](\"".) | ";
+ $page .= "
";
} else {
$page .= "";
}
diff --git a/src/resources.php b/src/resources.php
index 222c86d..0d0ff77 100644
--- a/src/resources.php
+++ b/src/resources.php
@@ -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
diff --git a/src/search.php b/src/search.php
index 7a90a53..5b469f5 100644
--- a/src/search.php
+++ b/src/search.php
@@ -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']!='')?"{$aquery['ally_name']}":'';
+ $s['ally_name'] = (!empty($aquery['ally_name']))?"{$aquery['ally_name']}":'';
}
//ahora la alianza
if($s['ally_id']!=0&&$s['ally_request']==0){
@@ -99,8 +99,9 @@ if(isset($searchtext) && isset($type)){
}
-
- $s['position'] = "".$s['rank']."";
+ if (!empty($s['rank'])) {
+ $s['position'] = "".$s['rank']."";
+ }
$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
diff --git a/src/stat.php b/src/stat.php
index c623527..e99027e 100644
--- a/src/stat.php
+++ b/src/stat.php
@@ -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'] = "";
$parse['who'] .= "";
@@ -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);
}