diff --git a/admin/activeplanet.php b/admin/activeplanet.php
index ec28086..9cd3871 100644
--- a/admin/activeplanet.php
+++ b/admin/activeplanet.php
@@ -44,7 +44,7 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
$AllActivPlanet = doquery("SELECT * FROM {{table}} WHERE `last_update` >= '". (time()-15 * 60) ."' ORDER BY `id` ASC", 'planets');
$Count = 0;
- while ($ActivPlanet = mysql_fetch_array($AllActivPlanet)) {
+ while ($ActivPlanet = $AllActivPlanet->fetch(PDO::FETCH_BOTH)) {
$parse['online_list'] .= "
";
$parse['online_list'] .= "| ". $ActivPlanet['name'] ." | ";
$parse['online_list'] .= "[". $ActivPlanet['galaxy'] .":". $ActivPlanet['system'] .":". $ActivPlanet['planet'] ."] | ";
diff --git a/admin/chat.php b/admin/chat.php
index fd85732..860ae00 100644
--- a/admin/chat.php
+++ b/admin/chat.php
@@ -48,7 +48,7 @@ $parse = $lang;
// Affichage des messages
$query = doquery("SELECT * FROM {{table}} ORDER BY messageid DESC LIMIT 25", 'chat');
$i = 0;
- while ($e = mysql_fetch_array($query)) {
+ while ($e = $query->fetch(PDO::FETCH_BOTH)) {
$i++;
$parse['msg_list'] .= stripslashes("
| " . date('h:i:s', $e['timestamp']) . " | ".
"". $e['user'] . " | ".
diff --git a/admin/errors.php b/admin/errors.php
index 6309e5b..a99f1e0 100644
--- a/admin/errors.php
+++ b/admin/errors.php
@@ -49,7 +49,7 @@ $parse = $lang;
// Afficher les erreurs
$query = doquery("SELECT * FROM {{table}}", 'errors');
$i = 0;
- while ($u = mysql_fetch_array($query)) {
+ while ($u = $query->fetch(PDO::FETCH_BOTH)) {
$i++;
$parse['errors_list'] .= "
|---|
| ". $u['error_id'] ." |
diff --git a/admin/messagelist.php b/admin/messagelist.php
index 56dfd6a..c6d31d0 100644
--- a/admin/messagelist.php
+++ b/admin/messagelist.php
@@ -123,7 +123,7 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
$StartRec = 1 + (($ViewPage - 1) * 25);
$Messages = doquery("SELECT * FROM {{table}} WHERE `message_type` = '". $Selected ."' ORDER BY `message_time` DESC LIMIT ". $StartRec .",25;", 'messages');
- while ($row = mysql_fetch_assoc($Messages)) {
+ while ($row = $Messages->fetch(PDO::FETCH_ASSOC)) {
$OwnerData = doquery ("SELECT `username` FROM {{table}} WHERE `id` = '". $row['message_owner'] ."';", 'users',true);
$bloc['mlst_id'] = $row['message_id'];
$bloc['mlst_from'] = $row['message_from'];
diff --git a/admin/messall.php b/admin/messall.php
index 3522792..a05bb0d 100644
--- a/admin/messall.php
+++ b/admin/messall.php
@@ -57,7 +57,7 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
$From = "". $ranga ." ".$user['username']."";
$Subject = "". $gameConfig['temat'] ."";
$Message = "". $gameConfig['tresc'] ."";
- while ($u = mysql_fetch_array($sq)) {
+ while ($u = $sq->fetch(PDO::FETCH_BOTH)) {
SendSimpleMessage ( $u['id'], $user['id'], $Time, 97, $From, $Subject, $Message);
}
message("Wys�a�e� wiadomo�� do wszystkich graczy", "Complete", "../overview." . PHPEXT, 3);
diff --git a/admin/moonlist.php b/admin/moonlist.php
index 510af57..02b64b6 100644
--- a/admin/moonlist.php
+++ b/admin/moonlist.php
@@ -38,7 +38,7 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
$parse = $lang;
$query = doquery("SELECT * FROM {{table}} WHERE planet_type='3'", "planets");
$i = 0;
- while ($u = mysql_fetch_array($query)) {
+ while ($u = $query->fetch(PDO::FETCH_BOTH)) {
$parse['moon'] .= "
"
. "| " . $u[0] . " | "
. "" . $u[1] . " | "
diff --git a/admin/multi.php b/admin/multi.php
index b7d01e1..46af676 100644
--- a/admin/multi.php
+++ b/admin/multi.php
@@ -45,7 +45,7 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
$RowsTPL = gettemplate('admin/multi_rows');
$PageTPL = gettemplate('admin/multi_body');
- while ($infos = mysql_fetch_assoc($query)) {
+ while ($infos = $query->fetch(PDO::FETCH_ASSOC)) {
$Bloc['player'] = $infos['player'];
$Bloc['text'] = $infos['text'];
diff --git a/admin/planetlist.php b/admin/planetlist.php
index 99e9d49..954600c 100644
--- a/admin/planetlist.php
+++ b/admin/planetlist.php
@@ -38,7 +38,7 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
$parse = $lang;
$query = doquery("SELECT * FROM {{table}} WHERE planet_type='1'", "planets");
$i = 0;
- while ($u = mysql_fetch_array($query)) {
+ while ($u = $query->fetch(PDO::FETCH_BOTH)) {
$parse['planetes'] .= "
"
. "| " . $u[0] . " | "
. "" . $u[1] . " | "
diff --git a/admin/statbuilder.php b/admin/statbuilder.php
index 6c3a0ca..4784fee 100644
--- a/admin/statbuilder.php
+++ b/admin/statbuilder.php
@@ -47,7 +47,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
$GameUsers = doquery("SELECT * FROM {{table}} WHERE authlevel<3", 'users');
- while ($CurUser = mysql_fetch_assoc($GameUsers)) {
+ while ($CurUser = $GameUsers->fetch(PDO::FETCH_ASSOC)) {
// Recuperation des anciennes statistiques
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';",'statpoints');
if ($OldStatRecord) {
@@ -190,7 +190,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
// Statistiques des alliances ...
$GameAllys = doquery("SELECT * FROM {{table}}", 'alliance');
- while ($CurAlly = mysql_fetch_assoc($GameAllys)) {
+ while ($CurAlly = $GameAllys->fetch(PDO::FETCH_ASSOC)) {
// Recuperation des anciennes statistiques
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints');
if ($OldStatRecord) {
diff --git a/alliance.php b/alliance.php
index 861d312..688b354 100644
--- a/alliance.php
+++ b/alliance.php
@@ -222,7 +222,7 @@ if ($user['ally_id'] == 0) { // Sin alianza
if (mysql_num_rows($search) != 0) {
$template = gettemplate('alliance_searchresult_row');
- while ($s = mysql_fetch_array($search)) {
+ while ($s = $search->fetch(PDO::FETCH_BOTH)) {
$entry = array();
$entry['ally_tag'] = "[{$s['ally_tag']}]";
$entry['ally_name'] = $s['ally_name'];
@@ -428,7 +428,7 @@ elseif ($user['ally_id'] != 0 && $user['ally_request'] == 0) { // Con alianza
// Como es costumbre. un row template
$template = gettemplate('alliance_memberslist_row');
$page_list = '';
- while ($u = mysql_fetch_array($listuser)) {
+ while ($u = $listuser->fetch(PDO::FETCH_BOTH)) {
$UserPoints = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $u['id'] . "';", 'statpoints', true);
$i++;
@@ -506,7 +506,7 @@ elseif ($user['ally_id'] != 0 && $user['ally_request'] == 0) { // Con alianza
}
// looooooop
$list = '';
- while ($u = mysql_fetch_array($sq)) {
+ while ($u = $sq->fetch(PDO::FETCH_BOTH)) {
doquery("INSERT INTO {{table}} SET
`message_owner`='{$u['id']}',
`message_sender`='{$user['id']}' ,
@@ -802,7 +802,7 @@ elseif ($user['ally_id'] != 0 && $user['ally_request'] == 0) { // Con alianza
} else {
$selection=doquery("SELECT * FROM {{table}} where ally_id='".$user['ally_id']."'",'users');
$select='';
-while($data=mysql_fetch_array($selection)){
+while ($data = $selection->fetch(PDO::FETCH_BOTH)){
$select.='