Version 1.7l

This commit is contained in:
nemunaire 2008-11-19 12:00:00 +01:00
commit aea537909a
42 changed files with 718 additions and 131 deletions

View file

@ -6,6 +6,7 @@ $titre = 'Vérification flottes';
//Vérification des flottes
if (!isset($_GET['ceil'])) $_GET['ceil'] = 5000;
$chapeau->connexion();
$req = mysql_query("SELECT * FROM `$table_flottes` ORDER BY `start_time` DESC");
$tableau = array();
while($resultat = mysql_fetch_array($req)) {

View file

@ -3,21 +3,34 @@ if(!defined('INDEX')) { header('Location: ../'); exit; }
$pagea = 'vip';
$titre = 'Vérification IP';
$timelimit = date('Y-m-d', mktime(0, 0, 0, date("m"), date("d"), date("Y"))); //2008-06-17 18:15:00
$chapeau->connexion();
if (isset($_GET['ip'])) $req = mysql_query("SELECT * FROM $table_registre_identification WHERE ip = '".$_GET['ip']."' ORDER BY ip ASC;");
elseif (isset($_GET['util'])) $req = mysql_query("SELECT * FROM $table_registre_identification WHERE id_util = '".$_GET['util']."' ORDER BY ip ASC;");
elseif (isset($_GET['tri'])) $req = mysql_query("SELECT * FROM $table_registre_identification ORDER BY ".$_GET['tri']." ASC;");
else $req = mysql_query("SELECT * FROM $table_registre_identification ORDER BY ip ASC;");
$page = gpc('v');
if (empty($page) || !is_numeric($page)) $page = 0;
$act = gpc('act');
if ($act == 'multiok') $chapeau->query("UPDATE $table_user SET multi = '1' WHERE id = ".$_GET['util'].";");
if (isset($_GET['ip'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE ip = '".$_GET['ip']."' ORDER BY ip ASC;");
elseif (isset($_GET['util']) && isset($_GET['comp'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE id_util = ".$_GET['util']." OR id_util = ".$_GET['comp']." ORDER BY ip ASC;");
elseif (isset($_GET['util'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE id_util = '".$_GET['util']."' ORDER BY ip ASC;");
elseif (isset($_GET['tri'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id ORDER BY ".$_GET['tri']." ASC;");
else $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE R.time > '$timelimit 00:00:00' ORDER BY R.ip ASC LIMIT ".($page*75).",75;");
//SELECT last_ip,COUNT(*) FROM user GROUP BY last_ip HAVING COUNT(*)>1
$nbpage = $chapeau->unique_query("SELECT COUNT(id) AS nb FROM $table_registre_identification WHERE time > '$timelimit 00:00:00';");
$chapeau->deconnexion();
$anc = array('ip' => 0, 'id_util' => 0);
$tableau = array();
while($resultat = mysql_fetch_array($req)) {
if ($anc['ip'] == $resultat['ip'] && $anc['id_util'] != $resultat['id_util']) $color = 'FF0000';
elseif ($anc['ip'] == $resultat['ip']) $color = 'DFBF00';
if ($resultat['mv'] == 3) $color = 'DFBF00';
elseif ($resultat['multi'] == 1 && $anc['ip'] == $resultat['ip'] && $anc['id_util'] != $resultat['id_util']) $color = 'EE66EE';
elseif ($anc['ip'] == $resultat['ip'] && $anc['id_util'] != $resultat['id_util']) $color = 'FF0000';
else $color = false;
$tableau[] = array($resultat['ip'], gethostbyaddr($resultat['ip']), $resultat['id_util'], trouvNom($resultat['id_util']), $resultat['time'], $resultat['commodo'], $color);
$tableau[] = array($resultat['ip'], gethostbyaddr($resultat['ip']), $resultat['id_util'], $resultat['pseudo'], $resultat['time'], $resultat['mv'], $color);
$anc = $resultat;
}
$template->assign('ips', $tableau);
$template->assign('numpage', $page);
$template->assign('nbpage', floor($nbpage['nb']/75));
?>

View file

@ -1,7 +1,7 @@
<?php
if(!defined('INDEX')) { header('Location: ../'); exit; }
$pagea = 'print';
$titre = 'Vérification planète';
$titre = 'Vérification joueur';
$template->assign('linkpage', 'vjoueurs');

View file

@ -1,6 +1,6 @@
<?php
if(!defined('INDEX')) { header('Location: ../'); exit; }
$titre = 'Sanction joueur';
$titre = 'Prise de contrôle d\'un joueur';
$pagea = 'erreur';
$template->assign('linkpage', 'cjoueurs');

View file

@ -5,21 +5,23 @@ $pagea = 'erreur';
$template->assign('linkpage', 'sjoueurs');
if (!empty($_GET['id']) && !empty($_GET['sanc']) && !empty($_GET['raisonmv'])) {
if (!empty($_GET['id']) && !empty($_GET['sanc']) && (!empty($_GET['raisonmv']) || $_GET['sanc'] < 0)) {
$raisonmv = $_GET['raisonmv'];
$id_plan = $_GET['id'];
$chapeau->connexion();
$chapeau->escape($raisonmv);
$chapeau->escape($id_plan);
if ($_GET['sanc'] == 'definitif' || $_GET['sanc'] == 'définitif') {
$chapeau->query("UPDATE $table_user SET mv = '3', raisonmv = '$raisonmv' WHERE id = '$id_plan';");
if ($_GET['sanc'] == 'definitif' || $_GET['sanc'] == 'définitif' || $_GET['sanc'] == 'd') {
$chapeau->query("UPDATE $table_user SET mv = '3', raisonmv = '$raisonmv', operateurmv = '$id_user' WHERE id = '$id_plan';");
$chapeau->deconnexion();
$template->assign('message', 'Le joueur a été banni définitivement !');
}
else {
$sanc = $_GET['sanc'];
$time = time() + $_GET['sanc'] * 86400 - 259200;
$chapeau->query("UPDATE $table_user SET mv = '2', last_visite = '$time', raisonmv = '$raisonmv' WHERE id = '$id_plan';");
$chapeau->query("UPDATE $table_user SET mv = '2', last_visite = '$time', raisonmv = '$raisonmv', operateurmv = '$id_user' WHERE id = '$id_plan';");
$chapeau->deconnexion();
$template->assign('message', 'Le joueur a été placé en mode vacances !');

View file

@ -10,11 +10,15 @@ if ($sess->values['auth_level'] >= 5 && !empty($_GET['id'])) {
$chapeau->connexion();
$chapeau->escape($id);
$req = $chapeau->unique_query("SELECT * FROM $table_user WHERE id = '$id';");
$chapeau->deconnexion();
if ($req) {
$chapeau->query("DELETE FROM $table_mail WHERE destinataire = '".trouvNom($id)."';");
$nom = trouvNom($id);
$chapeau->connexion();
$chapeau->escape($nom);
$chapeau->query("DELETE FROM $table_mail WHERE destinataire = '$nom';");
$chapeau->query("DELETE FROM $table_user WHERE id = '$id';");
$chapeau->query("DELETE FROM $table_flottes WHERE id_user = '$id';");
$chapeau->query("DELETE FROM $table_planete WHERE id_user = '$id';");
$chapeau->query("DELETE FROM $table_user WHERE id = '$id';");
$chapeau->deconnexion();
$template->assign('message', 'Le joueur a été supprimé du jeu ainsi que toutes les données le concernant !');
}

View file

@ -37,7 +37,9 @@ elseif (!empty($_GET['i'])) {
header('Location: admin.php?p=version');
exit;
}
$chapeau->connexion();
$req = $chapeau->unique_query("SELECT * FROM $table_version WHERE id = '$id';");
$chapeau->deconnexion();
$template->assign('mod', $req);
$template->assign('id', $id);
$pagea = 'version_add';