Fix linting
This commit is contained in:
parent
5b17a7dbd7
commit
1614145b18
262 changed files with 45324 additions and 42695 deletions
|
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
|
||||
$pagea = 'accueil';
|
||||
$titre = 'Accueil administration';
|
||||
|
|
@ -13,4 +16,3 @@ $bdd->deconnexion();
|
|||
$template->assign('nbMail', $mail['nombre']);
|
||||
$template->assign('nbPilori', $pilori['nombre']);
|
||||
$template->assign('news', $news);
|
||||
?>
|
||||
|
|
@ -1,52 +1,51 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'print';
|
||||
$titre = 'Vérification alliance';
|
||||
|
||||
$template->assign('linkpage', 'valliances');
|
||||
$template->assign('linkpage', 'valliances');
|
||||
|
||||
if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
$pagea = 'print_key';
|
||||
$id_plan = $_GET['id'];
|
||||
$key = $_GET['key'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->escape($key);
|
||||
$reqA = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$req = $chapeau->unique_query("DESCRIBE $table_alliances $key;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $reqA);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $_GET['key']);
|
||||
$pagea = 'print_key';
|
||||
$id_plan = $_GET['id'];
|
||||
$key = $_GET['key'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->escape($key);
|
||||
$reqA = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$req = $chapeau->unique_query("DESCRIBE $table_alliances $key;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $reqA);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $_GET['key']);
|
||||
} elseif (!empty($_GET['id'])) {
|
||||
$id_plan = $_GET['id'];
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
$key = $_POST['key'];
|
||||
$mod = $_POST['mod'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($mod);
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->query("UPDATE $table_alliances SET $key = '$mod' WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
}
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = $_GET['name'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($name);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE nom = '$name';");
|
||||
$chapeau->deconnexion();
|
||||
header('Location: admin.php?p=valliances&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
elseif (!empty($_GET['id'])) {
|
||||
$id_plan = $_GET['id'];
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
$key = $_POST['key'];
|
||||
$mod = $_POST['mod'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($mod);
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->query("UPDATE $table_alliances SET $key = '$mod' WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
}
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
}
|
||||
elseif (!empty($_GET['name'])) {
|
||||
$name = $_GET['name'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($name);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE nom = '$name';");
|
||||
$chapeau->deconnexion();
|
||||
header('Location: admin.php?p=valliances&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,74 +1,69 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'bandeau';
|
||||
$titre = 'Bandeau d\'information';
|
||||
|
||||
//Ajout d'une information
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add' && !empty($_POST['texte']) && isset($_POST['color']))
|
||||
{
|
||||
$texte = gpc('texte', 'post');
|
||||
$color = gpc('color', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($texte);
|
||||
$bdd->escape($color);
|
||||
$bdd->query("INSERT INTO $table_infoshead (texte, color) VALUES ('$texte', '$color');");
|
||||
$bdd->deconnexion();
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add' && !empty($_POST['texte']) && isset($_POST['color'])) {
|
||||
$texte = gpc('texte', 'post');
|
||||
$color = gpc('color', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($texte);
|
||||
$bdd->escape($color);
|
||||
$bdd->query("INSERT INTO $table_infoshead (texte, color) VALUES ('$texte', '$color');");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
//Modification
|
||||
elseif (!empty($_GET['i']))
|
||||
{
|
||||
$id = intval(gpc('i'));
|
||||
if (!empty($_POST['texte']) && isset($_POST['color']))
|
||||
{
|
||||
$texte = gpc('texte', 'post');
|
||||
$color = gpc('color', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($texte);
|
||||
$bdd->escape($color);
|
||||
$bdd->query("UPDATE $table_infoshead SET texte = '$texte', color = '$color' WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_infoshead WHERE id = '$id';");
|
||||
$reqTT = $bdd->query("SELECT * FROM $table_infoshead ORDER BY id ASC;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('mod', $req);
|
||||
$template->assign('tableau', $reqTT);
|
||||
$template->assign('id', $id);
|
||||
}
|
||||
elseif (!empty($_GET['i'])) {
|
||||
$id = intval(gpc('i'));
|
||||
if (!empty($_POST['texte']) && isset($_POST['color'])) {
|
||||
$texte = gpc('texte', 'post');
|
||||
$color = gpc('color', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($texte);
|
||||
$bdd->escape($color);
|
||||
$bdd->query("UPDATE $table_infoshead SET texte = '$texte', color = '$color' WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_infoshead WHERE id = '$id';");
|
||||
$reqTT = $bdd->query("SELECT * FROM $table_infoshead ORDER BY id ASC;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('mod', $req);
|
||||
$template->assign('tableau', $reqTT);
|
||||
$template->assign('id', $id);
|
||||
}
|
||||
//Demande de suppression
|
||||
elseif (!empty($_GET['d']))
|
||||
{
|
||||
$id = intval(gpc('d'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("DELETE FROM $table_infoshead WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
elseif (!empty($_GET['d'])) {
|
||||
$id = intval(gpc('d'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("DELETE FROM $table_infoshead WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
//Demande de mise à jour du cache
|
||||
elseif (isset($_GET['actuCache']))
|
||||
{
|
||||
Cache::del('headerNB');
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Récupération des lignes du bandeau
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->query("SELECT * FROM $table_infoshead ORDER BY id ASC;");
|
||||
$bdd->deconnexion();
|
||||
elseif (isset($_GET['actuCache'])) {
|
||||
Cache::del('headerNB');
|
||||
|
||||
header('Location: admin.php?p=bandeau');
|
||||
exit;
|
||||
} else {
|
||||
//Récupération des lignes du bandeau
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->query("SELECT * FROM $table_infoshead ORDER BY id ASC;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('id', "add");
|
||||
}
|
||||
?>
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('id', "add");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,26 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!empty($_POST["req"]))
|
||||
$req = stripslashes(gpc("req", "post"));
|
||||
elseif (!empty($_GET["req"]))
|
||||
$req = gpc("req");
|
||||
else
|
||||
$req = "SHOW TABLES;";
|
||||
if (!empty($_POST["req"])) {
|
||||
$req = stripslashes(gpc("req", "post"));
|
||||
} elseif (!empty($_GET["req"])) {
|
||||
$req = gpc("req");
|
||||
} else {
|
||||
$req = "SHOW TABLES;";
|
||||
}
|
||||
|
||||
$bdd = new BDD();
|
||||
$template->assign("reponses", $bdd->query($req));
|
||||
$template->assign("erreur", $bdd->erreur());
|
||||
$template->assign("affected", $bdd->affected());
|
||||
$bdd->deconnexion();
|
||||
$bdd = new BDD();
|
||||
$template->assign("reponses", $bdd->query($req));
|
||||
$template->assign("erreur", $bdd->erreur());
|
||||
$template->assign("affected", $bdd->affected());
|
||||
$bdd->deconnexion();
|
||||
|
||||
if (preg_match("#show tables#i", $req))
|
||||
$template->assign("lien", "SELECT * FROM ");
|
||||
if (preg_match("#show tables#i", $req)) {
|
||||
$template->assign("lien", "SELECT * FROM ");
|
||||
}
|
||||
|
||||
$pagea = 'bdd';
|
||||
$titre = 'Administration de la base de données';
|
||||
?>
|
||||
|
|
@ -1,73 +1,68 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'demarrage';
|
||||
$titre = 'Page de démarrage';
|
||||
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add' && !empty($_POST['contenu']) && isset($_POST['titre']))
|
||||
{
|
||||
$titre = gpc('titre', 'post');
|
||||
$contenu = gpc('contenu', 'post');
|
||||
$time = time();
|
||||
$bdd = new BDD();
|
||||
$bdd ->escape($titre);
|
||||
$bdd ->escape($contenu);
|
||||
$bdd ->query("INSERT INTO $table_messages_demarrage (titre, contenu, time) VALUES ('$titre', '$contenu', $time);");
|
||||
$bdd ->deconnexion();
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add' && !empty($_POST['contenu']) && isset($_POST['titre'])) {
|
||||
$titre = gpc('titre', 'post');
|
||||
$contenu = gpc('contenu', 'post');
|
||||
$time = time();
|
||||
$bdd = new BDD();
|
||||
$bdd ->escape($titre);
|
||||
$bdd ->escape($contenu);
|
||||
$bdd ->query("INSERT INTO $table_messages_demarrage (titre, contenu, time) VALUES ('$titre', '$contenu', $time);");
|
||||
$bdd ->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
}
|
||||
elseif (!empty($_GET['i']))
|
||||
{
|
||||
$id = intval(gpc('i'));
|
||||
if (!empty($_POST['contenu']) && isset($_POST['titre']))
|
||||
{
|
||||
$titre = gpc('titre', 'post');
|
||||
$texte = gpc('contenu', 'post');
|
||||
$time = time();
|
||||
$reset = gpc('reset', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($titre);
|
||||
$bdd->escape($texte);
|
||||
if (!empty($reset))
|
||||
$bdd->query("UPDATE $table_messages_demarrage SET contenu = '$texte', titre = '$titre', time = $time WHERE id = $id;");
|
||||
else
|
||||
$bdd->query("UPDATE $table_messages_demarrage SET contenu = '$texte', titre = '$titre' WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
} elseif (!empty($_GET['i'])) {
|
||||
$id = intval(gpc('i'));
|
||||
if (!empty($_POST['contenu']) && isset($_POST['titre'])) {
|
||||
$titre = gpc('titre', 'post');
|
||||
$texte = gpc('contenu', 'post');
|
||||
$time = time();
|
||||
$reset = gpc('reset', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($titre);
|
||||
$bdd->escape($texte);
|
||||
if (!empty($reset)) {
|
||||
$bdd->query("UPDATE $table_messages_demarrage SET contenu = '$texte', titre = '$titre', time = $time WHERE id = $id;");
|
||||
} else {
|
||||
$bdd->query("UPDATE $table_messages_demarrage SET contenu = '$texte', titre = '$titre' WHERE id = $id;");
|
||||
}
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$template->assign('mod', $bdd->unique_query("SELECT * FROM $table_messages_demarrage WHERE id = '$id';"));
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_messages_demarrage;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', $id);
|
||||
}
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$template->assign('mod', $bdd->unique_query("SELECT * FROM $table_messages_demarrage WHERE id = '$id';"));
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_messages_demarrage;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', $id);
|
||||
}
|
||||
//Suppression d'un message
|
||||
elseif (!empty($_GET['d']))
|
||||
{
|
||||
$id = intval(gpc('d'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("DELETE FROM $table_messages_demarrage WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
}
|
||||
elseif (!empty($_GET['d'])) {
|
||||
$id = intval(gpc('d'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("DELETE FROM $table_messages_demarrage WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
}
|
||||
//Demande de mise à jour du cache
|
||||
elseif (isset($_GET['actuCache']))
|
||||
{
|
||||
Cache::del('headerNB');
|
||||
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$bdd = new BDD();
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_messages_demarrage;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', 'add');
|
||||
}
|
||||
?>
|
||||
elseif (isset($_GET['actuCache'])) {
|
||||
Cache::del('headerNB');
|
||||
|
||||
header('Location: admin.php?p=demarrage');
|
||||
exit;
|
||||
} else {
|
||||
$bdd = new BDD();
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_messages_demarrage;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', 'add');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,32 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'vflotte';
|
||||
$titre = 'Vérification flottes';
|
||||
|
||||
//Vérification des flottes
|
||||
if (!isset($_GET['ceil'])) $_GET['ceil'] = 5000;
|
||||
if (!isset($_GET['ceil'])) {
|
||||
$_GET['ceil'] = 5000;
|
||||
}
|
||||
|
||||
$bdd = new BDD();
|
||||
$res = $bdd->query("SELECT * FROM `$table_flottes` ORDER BY `start_time` DESC");
|
||||
$bdd->deconnexion();
|
||||
$tableau = array();
|
||||
if (isset($resultat))
|
||||
foreach($resultat as $res) {
|
||||
$user_source = infoPlan($resultat['end_galaxie'], $resultat['end_ss'], $resultat['end_position'], 'id_user');
|
||||
if ($resultat['contenu_metal'] + $resultat['contenu_cristal'] + $resultat['contenu_hydrogene'] >= $_GET['ceil']) $color = 'FF0000';
|
||||
elseif ($user_source != $resultat['id_user']) $color = 'DFBF00';
|
||||
else $color = false;
|
||||
$tableau[] = array(trouvNom($user_source), trouvNom($resultat['id_user']), infoPlan($resultat['start_galaxie'], $resultat['start_ss'], $resultat['start_position'], 'nom_planete'), '['.$resultat['start_galaxie'].':'.$resultat['start_ss'].':'.$resultat['start_position'].']', infoPlan($resultat['end_galaxie'], $resultat['end_ss'], $resultat['end_position'], 'nom_planete'), '['.$resultat['end_galaxie'].':'.$resultat['end_ss'].':'.$resultat['end_position'].']', $resultat['start_time'], '<acronym title="!!!Détail vaisseaux">'.$resultat['nb_vais'].'</acronym>', $resultat['vitesse'], $resultat['contenu_metal'], $resultat['contenu_cristal'], $resultat['contenu_hydrogene'], $color);
|
||||
if (isset($resultat)) {
|
||||
foreach ($resultat as $res) {
|
||||
$user_source = infoPlan($resultat['end_galaxie'], $resultat['end_ss'], $resultat['end_position'], 'id_user');
|
||||
if ($resultat['contenu_metal'] + $resultat['contenu_cristal'] + $resultat['contenu_hydrogene'] >= $_GET['ceil']) {
|
||||
$color = 'FF0000';
|
||||
} elseif ($user_source != $resultat['id_user']) {
|
||||
$color = 'DFBF00';
|
||||
} else {
|
||||
$color = false;
|
||||
}
|
||||
$tableau[] = array(trouvNom($user_source), trouvNom($resultat['id_user']), infoPlan($resultat['start_galaxie'], $resultat['start_ss'], $resultat['start_position'], 'nom_planete'), '['.$resultat['start_galaxie'].':'.$resultat['start_ss'].':'.$resultat['start_position'].']', infoPlan($resultat['end_galaxie'], $resultat['end_ss'], $resultat['end_position'], 'nom_planete'), '['.$resultat['end_galaxie'].':'.$resultat['end_ss'].':'.$resultat['end_position'].']', $resultat['start_time'], '<acronym title="!!!Détail vaisseaux">'.$resultat['nb_vais'].'</acronym>', $resultat['vitesse'], $resultat['contenu_metal'], $resultat['contenu_cristal'], $resultat['contenu_hydrogene'], $color);
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign('flottes', $tableau);
|
||||
?>
|
||||
|
|
@ -1,30 +1,27 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$titre = "Création d'inscription";
|
||||
$pagea = "inscription";
|
||||
|
||||
if (!empty($_POST["HB_pseudo"]) && !empty($_POST["race"]))
|
||||
{
|
||||
if (empty($_POST["HB_conf"]) && empty($_POST["HB_mdp"]))
|
||||
$_POST["HB_mdp"] = $_POST["HB_conf"] = gen_mdp(9);
|
||||
if (!empty($_POST["HB_pseudo"]) && !empty($_POST["race"])) {
|
||||
if (empty($_POST["HB_conf"]) && empty($_POST["HB_mdp"])) {
|
||||
$_POST["HB_mdp"] = $_POST["HB_conf"] = gen_mdp(9);
|
||||
}
|
||||
|
||||
if ($_POST['HB_conf'] == $_POST['HB_mdp'] && !empty($_POST['HB_mdp']))
|
||||
{
|
||||
$_POST['HB_mdp'] = cxor(gpc("HB_mdp", "post"), sha1(gpc("HB_pseudo", "post").'£'.gpc("race", "post")));
|
||||
$cds = sha1(gpc("HB_pseudo", "post").'$'.gpc("race", "post").'£'.gpc("HB_mdp", "post").'#'.gpc("HB_mail", "post").'ß'.time().'Ó'.$_SERVER['HTTP_USER_AGENT'].'♀☻'.$_SERVER['REMOTE_ADDR'].gpc("HB_placement", "post"));
|
||||
if (empty($_POST['mailler']))
|
||||
erreur('MDP: <em>'.gpc("HB_conf", "post").'</em><br />URL : <a href="?p=njoueur&nom='.gpc("HB_pseudo", "post").'&race='.gpc("race", "post").'&mdp='.strhex(gpc("HB_mdp", "post")).'&mail='.gpc("HB_mail", "post").'&ti='.time().'&placement='.gpc("HB_placement", "post").'&cds='.$cds.'">Lien</a><br /><br />L\'inscription doit avoir lieu par vous même en raison des procédures de sécurités !', "white");
|
||||
else
|
||||
{
|
||||
if (send_mail(gpc("HB_mail", "post"), "Halo-Battle :: Inscription sur le serveur ".$VAR['serveur_name'], "Bonjour ".gpc("HB_pseudo", "post")." et bienvenue dans l'univers d'Halo-Battle !\n\nNous sommes ravi de vous annoncer qu'un opérateur vient de vous créer un compte sur le serveur ".$VAR['serveur_name'].".\n\nVoici le mot de passe qui vous servira à vous connecter à ce serveur : ".gpc("HB_conf", "post")."\n\nA bientôt,\nLe staff de Halo-Battle"))
|
||||
{
|
||||
|
||||
}
|
||||
header('Location: admin.php?p=njoueur&nom='.gpc("HB_pseudo", "post").'&race='.gpc("race", "post").'&mdp='.strhex(gpc("HB_mdp", "post")).'&mail='.gpc("HB_mail", "post").'&ti='.time().'&placement='.gpc("HB_placement", "post").'&cds='.$cds);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
erreur('Mot de passe incorrect !');
|
||||
if ($_POST['HB_conf'] == $_POST['HB_mdp'] && !empty($_POST['HB_mdp'])) {
|
||||
$_POST['HB_mdp'] = cxor(gpc("HB_mdp", "post"), sha1(gpc("HB_pseudo", "post").'£'.gpc("race", "post")));
|
||||
$cds = sha1(gpc("HB_pseudo", "post").'$'.gpc("race", "post").'£'.gpc("HB_mdp", "post").'#'.gpc("HB_mail", "post").'ß'.time().'Ó'.$_SERVER['HTTP_USER_AGENT'].'♀☻'.$_SERVER['REMOTE_ADDR'].gpc("HB_placement", "post"));
|
||||
if (empty($_POST['mailler'])) {
|
||||
erreur('MDP: <em>'.gpc("HB_conf", "post").'</em><br />URL : <a href="?p=njoueur&nom='.gpc("HB_pseudo", "post").'&race='.gpc("race", "post").'&mdp='.strhex(gpc("HB_mdp", "post")).'&mail='.gpc("HB_mail", "post").'&ti='.time().'&placement='.gpc("HB_placement", "post").'&cds='.$cds.'">Lien</a><br /><br />L\'inscription doit avoir lieu par vous même en raison des procédures de sécurités !', "white");
|
||||
} else {
|
||||
if (send_mail(gpc("HB_mail", "post"), "Halo-Battle :: Inscription sur le serveur ".$VAR['serveur_name'], "Bonjour ".gpc("HB_pseudo", "post")." et bienvenue dans l'univers d'Halo-Battle !\n\nNous sommes ravi de vous annoncer qu'un opérateur vient de vous créer un compte sur le serveur ".$VAR['serveur_name'].".\n\nVoici le mot de passe qui vous servira à vous connecter à ce serveur : ".gpc("HB_conf", "post")."\n\nA bientôt,\nLe staff de Halo-Battle")) {
|
||||
}
|
||||
header('Location: admin.php?p=njoueur&nom='.gpc("HB_pseudo", "post").'&race='.gpc("race", "post").'&mdp='.strhex(gpc("HB_mdp", "post")).'&mail='.gpc("HB_mail", "post").'&ti='.time().'&placement='.gpc("HB_placement", "post").'&cds='.$cds);
|
||||
}
|
||||
} else {
|
||||
erreur('Mot de passe incorrect !');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,61 +1,63 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
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
|
||||
$page = gpc('v');
|
||||
if (empty($page) || !is_numeric($page))
|
||||
$page = 0;
|
||||
if (empty($page) || !is_numeric($page)) {
|
||||
$page = 0;
|
||||
}
|
||||
|
||||
$act = gpc('act');
|
||||
if ($act == 'multiok')
|
||||
{
|
||||
$bdd = new BDD();
|
||||
$user = intval(gpc('util'));
|
||||
$bdd->query("UPDATE $table_user SET multi = '1' WHERE id = ".$user.";");
|
||||
$bdd->deconnexion();
|
||||
unset($user);
|
||||
if ($act == 'multiok') {
|
||||
$bdd = new BDD();
|
||||
$user = intval(gpc('util'));
|
||||
$bdd->query("UPDATE $table_user SET multi = '1' WHERE id = ".$user.";");
|
||||
$bdd->deconnexion();
|
||||
unset($user);
|
||||
}
|
||||
|
||||
$trace = 'absent pour plus de rapidité';
|
||||
|
||||
$bdd = new BDD();
|
||||
if (isset($_GET['ip']))
|
||||
{
|
||||
$req = $bdd->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 = '".gpc('ip')."' ORDER BY ip ASC;");
|
||||
$trace = gethostbyaddr($req[0]['ip']);
|
||||
if (isset($_GET['ip'])) {
|
||||
$req = $bdd->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 = '".gpc('ip')."' ORDER BY ip ASC;");
|
||||
$trace = gethostbyaddr($req[0]['ip']);
|
||||
} elseif (isset($_GET['util']) && isset($_GET['comp'])) {
|
||||
$req = $bdd->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 = ".intval(gpc('util'))." OR id_util = ".intval(gpc('comp'))." ORDER BY ip ASC;");
|
||||
} elseif (isset($_GET['util'])) {
|
||||
$req = $bdd->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 = '".intval(gpc('util'))."' ORDER BY ip ASC;");
|
||||
} elseif (isset($_GET['tri'])) {
|
||||
$req = $bdd->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 ".gpc('tri')." ASC;");
|
||||
} else {
|
||||
$req = $bdd->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;");
|
||||
}
|
||||
elseif (isset($_GET['util']) && isset($_GET['comp']))
|
||||
$req = $bdd->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 = ".intval(gpc('util'))." OR id_util = ".intval(gpc('comp'))." ORDER BY ip ASC;");
|
||||
elseif (isset($_GET['util']))
|
||||
$req = $bdd->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 = '".intval(gpc('util'))."' ORDER BY ip ASC;");
|
||||
elseif (isset($_GET['tri']))
|
||||
$req = $bdd->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 ".gpc('tri')." ASC;");
|
||||
else
|
||||
$req = $bdd->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 = $bdd->unique_query("SELECT COUNT(id) AS nb FROM $table_registre_identification WHERE time > '$timelimit 00:00:00';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$anc = array('ip' => 0, 'id_util' => 0);
|
||||
$tableau = array();
|
||||
if (isset($resultat))
|
||||
foreach($req as $resultat)
|
||||
{
|
||||
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;
|
||||
if (isset($resultat)) {
|
||||
foreach ($req as $resultat) {
|
||||
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'], $trace, $resultat['id_util'], $resultat['pseudo'], $resultat['time'], $resultat['mv'], $color);
|
||||
$anc = $resultat;
|
||||
$tableau[] = array($resultat['ip'], $trace, $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));
|
||||
?>
|
||||
|
|
@ -1,98 +1,94 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'print';
|
||||
$titre = 'Vérification joueur';
|
||||
|
||||
$template->assign('linkpage', 'vjoueurs');
|
||||
$template->assign('linkpage', 'vjoueurs');
|
||||
|
||||
//Changement du nom d'utilisateur
|
||||
if (!empty($_GET['id']) && !empty($_POST['key']) && !empty($_POST['mod']) && $_POST['key'] == 'pseudo')
|
||||
{
|
||||
$id_plan = intval(gpc('id'));
|
||||
$mod = gpc('mod', 'post');
|
||||
if (!empty($_GET['id']) && !empty($_POST['key']) && !empty($_POST['mod']) && $_POST['key'] == 'pseudo') {
|
||||
$id_plan = intval(gpc('id'));
|
||||
$mod = gpc('mod', 'post');
|
||||
|
||||
$liste = "abcdefghijklmnopqrstuvwxyz./!*123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
$code = '';
|
||||
while(strlen($code) <= 8)
|
||||
$code .= $liste[rand(0,64)];
|
||||
$liste = "abcdefghijklmnopqrstuvwxyz./!*123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
$code = '';
|
||||
while (strlen($code) <= 8) {
|
||||
$code .= $liste[rand(0, 64)];
|
||||
}
|
||||
|
||||
$mdp = mdp($mod, $code);
|
||||
$mdp = mdp($mod, $code);
|
||||
|
||||
$bdd = new BDD();
|
||||
$reqMail = $bdd->unique_query("SELECT mail FROM $table_user WHERE id = $id_plan;");
|
||||
$bdd->escape($mod);
|
||||
$reqPseudo = $bdd->query("SELECT mail FROM $table_user WHERE pseudo = '$mod';");
|
||||
if ($reqPseudo !== NULL)
|
||||
erreur('Nom d\'utilisateur déjà utilisé. Impossible de faire le changement !');
|
||||
$bdd->query("UPDATE $table_user SET pseudo = '$mod', mdp = '".$mdp[0]."', mdp_var = '".$mdp[1]."' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$bdd = new BDD();
|
||||
$reqMail = $bdd->unique_query("SELECT mail FROM $table_user WHERE id = $id_plan;");
|
||||
$bdd->escape($mod);
|
||||
$reqPseudo = $bdd->query("SELECT mail FROM $table_user WHERE pseudo = '$mod';");
|
||||
if ($reqPseudo !== null) {
|
||||
erreur('Nom d\'utilisateur déjà utilisé. Impossible de faire le changement !');
|
||||
}
|
||||
$bdd->query("UPDATE $table_user SET pseudo = '$mod', mdp = '".$mdp[0]."', mdp_var = '".$mdp[1]."' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
if(send_mail($reqMail['mail'], "Nouveau nom d'utilisateur", "Bonjour ".$mod.",\n\nVous recevez ce mail suite au changement de votre nom d'utilisateur sur le serveur ".$VAR["serveur_name"].".\nCe changement a été effectué par un opérateur de la galaxie, sur votre demande ou dans le cadre des règles du jeu.\nDe plus, pour votre sécurité, un nouveau mot de passe vous a été automatiquement attribué.\n\nVos nouvelles informations personnelles sont les suivantes :\n\tNom d'utilisateur : ".$mod."\n\tMot de passe : '.$code.'\n\nVotre ancien nom d'utilisateur et mot de passe ne sont plus valide à partir de maintenant et vous devez utiliser les données ci-dessus pour vous connecter.\n\nSi vous rencontrez des problèmes suites à ce changement, n'hésitez pas à contacter l'opérateur qui suivit votre demande.\n\nPour votre sécurité, nous vous rappelons qu'il est dangeureux de conserver un mail contenant des données personnelles. Pensez donc à supprimer ce mail une fois que vous vous serez connecté au jeu.\n\nL'équipe d'Halo-Battle"))
|
||||
erreur("Nom d'utilisateur mis à jour avec succès. Un mail a été envoyé à l'utilisateur contenant un nouveau mot de passe.", "green");
|
||||
else
|
||||
erreur("Une erreur est survenue lors de l'envoie du mail.");
|
||||
}
|
||||
if (send_mail($reqMail['mail'], "Nouveau nom d'utilisateur", "Bonjour ".$mod.",\n\nVous recevez ce mail suite au changement de votre nom d'utilisateur sur le serveur ".$VAR["serveur_name"].".\nCe changement a été effectué par un opérateur de la galaxie, sur votre demande ou dans le cadre des règles du jeu.\nDe plus, pour votre sécurité, un nouveau mot de passe vous a été automatiquement attribué.\n\nVos nouvelles informations personnelles sont les suivantes :\n\tNom d'utilisateur : ".$mod."\n\tMot de passe : '.$code.'\n\nVotre ancien nom d'utilisateur et mot de passe ne sont plus valide à partir de maintenant et vous devez utiliser les données ci-dessus pour vous connecter.\n\nSi vous rencontrez des problèmes suites à ce changement, n'hésitez pas à contacter l'opérateur qui suivit votre demande.\n\nPour votre sécurité, nous vous rappelons qu'il est dangeureux de conserver un mail contenant des données personnelles. Pensez donc à supprimer ce mail une fois que vous vous serez connecté au jeu.\n\nL'équipe d'Halo-Battle")) {
|
||||
erreur("Nom d'utilisateur mis à jour avec succès. Un mail a été envoyé à l'utilisateur contenant un nouveau mot de passe.", "green");
|
||||
} else {
|
||||
erreur("Une erreur est survenue lors de l'envoie du mail.");
|
||||
}
|
||||
}
|
||||
//Changement du mot de passe
|
||||
elseif (!empty($_GET['id']) && !empty($_POST['key']) && !empty($_POST['mod']) && $_POST['key'] == 'mdp')
|
||||
{
|
||||
$id_plan = intval(gpc('id'));
|
||||
$mod = gpc('mod', 'post');
|
||||
elseif (!empty($_GET['id']) && !empty($_POST['key']) && !empty($_POST['mod']) && $_POST['key'] == 'mdp') {
|
||||
$id_plan = intval(gpc('id'));
|
||||
$mod = gpc('mod', 'post');
|
||||
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT pseudo, mdp_var FROM $table_user WHERE id = $id_plan;");
|
||||
$mdp = mdp($req["pseudo"], $mod, $req["mdp_var"]);
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT pseudo, mdp_var FROM $table_user WHERE id = $id_plan;");
|
||||
$mdp = mdp($req["pseudo"], $mod, $req["mdp_var"]);
|
||||
|
||||
$bdd->query("UPDATE $table_user SET mdp = '$mdp' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$bdd->query("UPDATE $table_user SET mdp = '$mdp' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
erreur("Mot de passe changé avec succès.<br />Pensez à avertir l'utilisateur de ce changement !", "green");
|
||||
}
|
||||
elseif (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id' && $_GET['key'] != 'mdpNOUV' && $_GET['key'] != 'auth_level' && $_GET['key'] != 'mdp_var')
|
||||
{
|
||||
$pagea = 'print_key';
|
||||
$id_plan = intval(gpc('id'));
|
||||
$key = gpc('key');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($key);
|
||||
$reqJ = $bdd->unique_query("SELECT * FROM $table_user WHERE id = $id_plan;");
|
||||
$req = $bdd->unique_query("DESCRIBE $table_user $key;");
|
||||
$bdd->deconnexion();
|
||||
erreur("Mot de passe changé avec succès.<br />Pensez à avertir l'utilisateur de ce changement !", "green");
|
||||
} elseif (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id' && $_GET['key'] != 'mdpNOUV' && $_GET['key'] != 'auth_level' && $_GET['key'] != 'mdp_var') {
|
||||
$pagea = 'print_key';
|
||||
$id_plan = intval(gpc('id'));
|
||||
$key = gpc('key');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($key);
|
||||
$reqJ = $bdd->unique_query("SELECT * FROM $table_user WHERE id = $id_plan;");
|
||||
$req = $bdd->unique_query("DESCRIBE $table_user $key;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('tableau', $reqJ);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $key);
|
||||
}
|
||||
elseif (!empty($_GET['id']))
|
||||
{
|
||||
$id_plan = intval(gpc('id'));
|
||||
if (isset($_POST['key']) && isset($_POST['mod']))
|
||||
{
|
||||
$key = gpc('key', 'post');
|
||||
$mod = gpc('mod', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($mod);
|
||||
$bdd->escape($key);
|
||||
$bdd->query("UPDATE $table_user SET $key = '$mod' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('tableau', $reqJ);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $key);
|
||||
} elseif (!empty($_GET['id'])) {
|
||||
$id_plan = intval(gpc('id'));
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
$key = gpc('key', 'post');
|
||||
$mod = gpc('mod', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($mod);
|
||||
$bdd->escape($key);
|
||||
$bdd->query("UPDATE $table_user SET $key = '$mod' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
}
|
||||
elseif (!empty($_GET['name']))
|
||||
{
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
header('Location: admin.php?p=vjoueurs&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
$pagea = 'print_choixU';
|
||||
?>
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
header('Location: admin.php?p=vjoueurs&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,57 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'mail_liste';
|
||||
$titre = 'Demandes et problèmes de la galaxie';
|
||||
|
||||
$template->assign('linkpage', 'courrier');
|
||||
$template->assign('linkpage', 'courrier');
|
||||
|
||||
if (!empty($_GET['w']) || !empty($_GET['x'])) {
|
||||
if (!empty($_GET['w'])) $id = $_GET['w'];
|
||||
else $id = $_GET['x'];
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($id);
|
||||
$req = $bdd->unique_query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user WHERE $table_ope_mail.id = '$id';");
|
||||
if ($req['statut'] >= 6) $bdd->query("UPDATE $table_ope_mail SET statut = '0' WHERE id = '$id';");
|
||||
else $bdd->query("UPDATE $table_ope_mail SET statut = statut + 1 WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
if (!empty($_GET['w'])) {
|
||||
$id = $_GET['w'];
|
||||
} else {
|
||||
$id = $_GET['x'];
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($id);
|
||||
$req = $bdd->unique_query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user WHERE $table_ope_mail.id = '$id';");
|
||||
if ($req['statut'] >= 6) {
|
||||
$bdd->query("UPDATE $table_ope_mail SET statut = '0' WHERE id = '$id';");
|
||||
} else {
|
||||
$bdd->query("UPDATE $table_ope_mail SET statut = statut + 1 WHERE id = '$id';");
|
||||
}
|
||||
$bdd->deconnexion();
|
||||
|
||||
if (isset($_GET['x'])) header('Location: admin.php?p=courrier&v='.$id);
|
||||
else header('Location: admin.php?p=courrier');
|
||||
exit;
|
||||
}
|
||||
elseif (!empty($_GET['v'])) {
|
||||
$id = $_GET['v'];
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($id);
|
||||
$req = $bdd->unique_query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user WHERE $table_ope_mail.id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
if (isset($_GET['x'])) {
|
||||
header('Location: admin.php?p=courrier&v='.$id);
|
||||
} else {
|
||||
header('Location: admin.php?p=courrier');
|
||||
}
|
||||
exit;
|
||||
} elseif (!empty($_GET['v'])) {
|
||||
$id = $_GET['v'];
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($id);
|
||||
$req = $bdd->unique_query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user WHERE $table_ope_mail.id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('req', $req);
|
||||
$template->assign('id', $id);
|
||||
$pagea = 'mail_view';
|
||||
}
|
||||
elseif (!empty($_GET['d']) && $sess->level >= 5) {
|
||||
$id = $_GET['d'];
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($id);
|
||||
$bdd->query("DELETE FROM $table_ope_mail WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('req', $req);
|
||||
$template->assign('id', $id);
|
||||
$pagea = 'mail_view';
|
||||
} elseif (!empty($_GET['d']) && $sess->level >= 5) {
|
||||
$id = $_GET['d'];
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($id);
|
||||
$bdd->query("DELETE FROM $table_ope_mail WHERE id = '$id';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=courrier');
|
||||
exit;
|
||||
header('Location: admin.php?p=courrier');
|
||||
exit;
|
||||
} else {
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user ORDER BY $table_ope_mail.time DESC;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('mails', $req);
|
||||
}
|
||||
else {
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user ORDER BY $table_ope_mail.time DESC;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('mails', $req);
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,24 +1,25 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'mail_mass';
|
||||
$titre = 'Envoie de mail en masse aux joueurs de la galaxie';
|
||||
|
||||
$template->assign('linkpage', 'mail_mass');
|
||||
$template->assign('linkpage', 'mail_mass');
|
||||
|
||||
if (!empty($_POST['sujet']) || !empty($_POST['message'])) {
|
||||
$sujet = "Halo-Battle :: ".gpc('sujet', 'post');
|
||||
$message = gpc('message', 'post');
|
||||
$bdd = new BDD();
|
||||
$users = $bdd->query("SELECT pseudo, mail FROM $table_user;");
|
||||
$bdd->deconnexion();
|
||||
$sujet = "Halo-Battle :: ".gpc('sujet', 'post');
|
||||
$message = gpc('message', 'post');
|
||||
$bdd = new BDD();
|
||||
$users = $bdd->query("SELECT pseudo, mail FROM $table_user;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
foreach($users as $user)
|
||||
{
|
||||
$messageJ = str_replace('$pseudo', $user["pseudo"], $message);
|
||||
send_mail($user["mail"], $sujet, $messageJ);
|
||||
//print 'Mail : '.$user["mail"].' ; sujet : '.$sujet.' ; message : '.$messageJ.'<br />';
|
||||
}
|
||||
foreach ($users as $user) {
|
||||
$messageJ = str_replace('$pseudo', $user["pseudo"], $message);
|
||||
send_mail($user["mail"], $sujet, $messageJ);
|
||||
//print 'Mail : '.$user["mail"].' ; sujet : '.$sujet.' ; message : '.$messageJ.'<br />';
|
||||
}
|
||||
|
||||
erreur("Tous les mails ont été envoyés avec succès.", "green");
|
||||
erreur("Tous les mails ont été envoyés avec succès.", "green");
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,77 +1,69 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'print';
|
||||
$titre = 'Vérification planète';
|
||||
|
||||
$template->assign('linkpage', 'vplanetes');
|
||||
$template->assign('linkpage', 'vplanetes');
|
||||
|
||||
if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] == 'hash_planete')
|
||||
{
|
||||
$id_plan = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("UPDATE $table_planete SET hash_planete = SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)) WHERE id = $id_plan;");
|
||||
if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] == 'hash_planete') {
|
||||
$id_plan = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("UPDATE $table_planete SET hash_planete = SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)) WHERE id = $id_plan;");
|
||||
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
}
|
||||
elseif (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id')
|
||||
{
|
||||
$pagea = 'print_key';
|
||||
$id_plan = intval(gpc('id'));
|
||||
$key = intval(gpc('key'));
|
||||
$bdd = new BDD();
|
||||
$reqp = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$req = $bdd->unique_query("DESCRIBE $table_planete $key;");
|
||||
$bdd->deconnexion();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
} elseif (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
$pagea = 'print_key';
|
||||
$id_plan = intval(gpc('id'));
|
||||
$key = intval(gpc('key'));
|
||||
$bdd = new BDD();
|
||||
$reqp = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$req = $bdd->unique_query("DESCRIBE $table_planete $key;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('tableau', $reqp);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $_GET['key']);
|
||||
}
|
||||
elseif (!empty($_GET['id']))
|
||||
{
|
||||
$id_plan = intval(gpc('id'));
|
||||
if (isset($_POST['key']) && isset($_POST['mod']) && $_POST['key'] != 'id')
|
||||
{
|
||||
$key = gpc('key', 'post');
|
||||
$mod = gpc('mod', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($key);
|
||||
$bdd->escape($mod);
|
||||
$bdd->query("UPDATE $table_planete SET $key = '$mod' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
}
|
||||
elseif (isset($_GET['amas']) && isset($_GET['ss']) && !empty($_GET['pos']))
|
||||
{
|
||||
$amas = intval(gpc('amas'));
|
||||
$ss = intval(gpc('ss'));
|
||||
$pos = intval(gpc('pos'));
|
||||
$template->assign('tableau', $reqp);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $_GET['key']);
|
||||
} elseif (!empty($_GET['id'])) {
|
||||
$id_plan = intval(gpc('id'));
|
||||
if (isset($_POST['key']) && isset($_POST['mod']) && $_POST['key'] != 'id') {
|
||||
$key = gpc('key', 'post');
|
||||
$mod = gpc('mod', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($key);
|
||||
$bdd->escape($mod);
|
||||
$bdd->query("UPDATE $table_planete SET $key = '$mod' WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
} elseif (isset($_GET['amas']) && isset($_GET['ss']) && !empty($_GET['pos'])) {
|
||||
$amas = intval(gpc('amas'));
|
||||
$ss = intval(gpc('ss'));
|
||||
$pos = intval(gpc('pos'));
|
||||
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_planete WHERE galaxie = $amas AND ss = $ss AND position = $pos;");
|
||||
$bdd->deconnexion();
|
||||
header('Location: '.$VAR["menu"]["vplanetes"].'&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
elseif (isset($_GET['format']))
|
||||
{
|
||||
preg_match('#^\[?([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})\]?$#', gpc('format'), $position);
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_planete WHERE galaxie = $amas AND ss = $ss AND position = $pos;");
|
||||
$bdd->deconnexion();
|
||||
header('Location: '.$VAR["menu"]["vplanetes"].'&id='.$req['id']);
|
||||
exit;
|
||||
} elseif (isset($_GET['format'])) {
|
||||
preg_match('#^\[?([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})\]?$#', gpc('format'), $position);
|
||||
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_planete WHERE galaxie = ".$position[1]." AND ss = ".$position[2]." AND position = ".$position[3].";");
|
||||
$bdd->deconnexion();
|
||||
header('Location: '.$VAR["menu"]["vplanetes"].'&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
$pagea = 'print_choixP';
|
||||
?>
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_planete WHERE galaxie = ".$position[1]." AND ss = ".$position[2]." AND position = ".$position[3].";");
|
||||
$bdd->deconnexion();
|
||||
header('Location: '.$VAR["menu"]["vplanetes"].'&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixP';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$titre = 'Prise de contrôle d\'un joueur';
|
||||
$pagea = 'erreur';
|
||||
|
||||
$template->assign('linkpage', 'cjoueurs');
|
||||
$template->assign('linkpage', 'cjoueurs');
|
||||
|
||||
if ($SESS->level >= 5 && !empty($_GET['id']))
|
||||
{
|
||||
$name = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT id, pseudo, auth_level FROM $table_user WHERE id = $name;");
|
||||
$bdd->deconnexion();
|
||||
if ($req['auth_level'] >= $SESS->level)
|
||||
$template->assign('message', 'Vous ne pouvez pas prendre le contrôle de cet utilisateur !');
|
||||
else
|
||||
{
|
||||
$bdd->reconnexion();
|
||||
$reqPl = $bdd->unique_query("SELECT id, nom_planete FROM $table_planete WHERE id_user = '".$req['id']."' LIMIT 1;");
|
||||
$bdd->deconnexion();
|
||||
if ($SESS->level >= 5 && !empty($_GET['id'])) {
|
||||
$name = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT id, pseudo, auth_level FROM $table_user WHERE id = $name;");
|
||||
$bdd->deconnexion();
|
||||
if ($req['auth_level'] >= $SESS->level) {
|
||||
$template->assign('message', 'Vous ne pouvez pas prendre le contrôle de cet utilisateur !');
|
||||
} else {
|
||||
$bdd->reconnexion();
|
||||
$reqPl = $bdd->unique_query("SELECT id, nom_planete FROM $table_planete WHERE id_user = '".$req['id']."' LIMIT 1;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
if (empty($SESS->values['souscontrole'])) $SESS->values['souscontrole'] = array($SESS->values['id'], $SESS->values['idPlan']);
|
||||
$SESS->values['id'] = $req['id'];
|
||||
$SESS->values['idPlan'] = $reqPl['id'];
|
||||
$SESS->put();
|
||||
if (empty($SESS->values['souscontrole'])) {
|
||||
$SESS->values['souscontrole'] = array($SESS->values['id'], $SESS->values['idPlan']);
|
||||
}
|
||||
$SESS->values['id'] = $req['id'];
|
||||
$SESS->values['idPlan'] = $reqPl['id'];
|
||||
$SESS->put();
|
||||
|
||||
$template->assign('message', 'Vous contrôlez maintenant le joueur '.$req['pseudo'].'.<br />Planète '.$reqPl['nom_planete'].' sélectionnée !');
|
||||
}
|
||||
}
|
||||
elseif (!empty($_GET['name']))
|
||||
{
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
header('Location: admin.php?p=cjoueurs&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
$pagea = 'print_choixU';
|
||||
?>
|
||||
$template->assign('message', 'Vous contrôlez maintenant le joueur '.$req['pseudo'].'.<br />Planète '.$reqPl['nom_planete'].' sélectionnée !');
|
||||
}
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
header('Location: admin.php?p=cjoueurs&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,22 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'vide';
|
||||
$titre = 'Mise à jour de la liste des proxys';
|
||||
|
||||
function traiterfichier($uri, &$list)
|
||||
{
|
||||
$fp = fopen($uri, "r");
|
||||
while (!feof($fp))
|
||||
{
|
||||
$buffer = fgets($fp);
|
||||
if (preg_match("#^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}#", $buffer, $match))
|
||||
$list[] = $match[0];
|
||||
//$list[] = substr($buffer, 0, strpos($buffer, ":"));
|
||||
}
|
||||
fclose($fp);
|
||||
$fp = fopen($uri, "r");
|
||||
while (!feof($fp)) {
|
||||
$buffer = fgets($fp);
|
||||
if (preg_match("#^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}#", $buffer, $match)) {
|
||||
$list[] = $match[0];
|
||||
}
|
||||
//$list[] = substr($buffer, 0, strpos($buffer, ":"));
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$list = array();
|
||||
|
|
@ -39,4 +42,3 @@ $bdd->query("INSERT INTO proxy_list VALUES ('".implode("'),('", $list)."');");
|
|||
$bdd->deconnexion();
|
||||
|
||||
erreur("Procédure terminée, ".count($list)." proxys listés.", "green");
|
||||
?>
|
||||
|
|
@ -1,31 +1,31 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'rapports';
|
||||
$titre = 'Afficher les rapports d\'un joueur';
|
||||
|
||||
$template->assign('linkpage', 'vrapports');
|
||||
$template->assign('linkpage', 'vrapports');
|
||||
|
||||
if (!empty($_GET['id']))
|
||||
{
|
||||
$id_user = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->query("SELECT * FROM $table_mail WHERE destinataire = $id_user AND expediteur = '' ORDER BY temps DESC;");
|
||||
$bdd->deconnexion();
|
||||
if (!empty($_GET['id'])) {
|
||||
$id_user = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->query("SELECT * FROM $table_mail WHERE destinataire = $id_user AND expediteur = '' ORDER BY temps DESC;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_user);
|
||||
$template->assign('script', '<script>for (j=0; document.getElementsByName(j)[0]; j++) hide(document.getElementsByName(j)[0]);</script>');
|
||||
}
|
||||
elseif (!empty($_GET['name'])) {
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_user WHERE pseudo = '".$name."';");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_user);
|
||||
$template->assign('script', '<script>for (j=0; document.getElementsByName(j)[0]; j++) hide(document.getElementsByName(j)[0]);</script>');
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_user WHERE pseudo = '".$name."';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=vrapports&id='.$req['id']);
|
||||
exit;
|
||||
header('Location: admin.php?p=vrapports&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
else
|
||||
$pagea = 'print_choixU';
|
||||
?>
|
||||
|
|
@ -1,45 +1,41 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$titre = 'Sanction joueur';
|
||||
$pagea = 'erreur';
|
||||
|
||||
$template->assign('linkpage', 'sjoueurs');
|
||||
$template->assign('linkpage', 'sjoueurs');
|
||||
|
||||
if (!empty($_GET['id']) && !empty($_GET['sanc']) && (!empty($_GET['raisonmv']) || $_GET['sanc'] < 0))
|
||||
{
|
||||
$raisonmv = gpc('raisonmv');
|
||||
$id_plan = intval(gpc('id'));
|
||||
$sanc = gpc('sanc');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($raisonmv);
|
||||
|
||||
if ($sanc == 'definitif' || $sanc== 'définitif' || $sanc == 'd')
|
||||
{
|
||||
$bdd->query("UPDATE $table_user SET mv = '3', raisonmv = '$raisonmv', operateurmv = $id_user WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
if (!empty($_GET['id']) && !empty($_GET['sanc']) && (!empty($_GET['raisonmv']) || $_GET['sanc'] < 0)) {
|
||||
$raisonmv = gpc('raisonmv');
|
||||
$id_plan = intval(gpc('id'));
|
||||
$sanc = gpc('sanc');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($raisonmv);
|
||||
|
||||
if ($sanc == 'definitif' || $sanc== 'définitif' || $sanc == 'd') {
|
||||
$bdd->query("UPDATE $table_user SET mv = '3', raisonmv = '$raisonmv', operateurmv = $id_user WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('message', 'Le joueur a été banni définitivement !');
|
||||
}
|
||||
else
|
||||
{
|
||||
$time = time() + $sanc * 86400 - 259200;
|
||||
$bdd->query("UPDATE $table_user SET mv = '2', last_visite = $time, raisonmv = '$raisonmv', operateurmv = $id_user WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message', 'Le joueur a été banni définitivement !');
|
||||
} else {
|
||||
$time = time() + $sanc * 86400 - 259200;
|
||||
$bdd->query("UPDATE $table_user SET mv = '2', last_visite = $time, raisonmv = '$raisonmv', operateurmv = $id_user WHERE id = $id_plan;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
$template->assign('message', 'Le joueur a été placé en mode vacances !');
|
||||
}
|
||||
}
|
||||
elseif (!empty($_GET['name']) && !empty($_GET['sanc']) && isset($_GET['raisonmv']))
|
||||
{
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message', 'Le joueur a été placé en mode vacances !');
|
||||
}
|
||||
} elseif (!empty($_GET['name']) && !empty($_GET['sanc']) && isset($_GET['raisonmv'])) {
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT id FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: '.$VAR["menu"]["sjoueur"].'&sanc='.gpc('sanc').'&raisonmv='.gpc('raisonmv').'&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
$pagea = 'sanctionU_choix';
|
||||
?>
|
||||
header('Location: '.$VAR["menu"]["sjoueur"].'&sanc='.gpc('sanc').'&raisonmv='.gpc('raisonmv').'&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'sanctionU_choix';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +1,53 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'print';
|
||||
$titre = 'Vue des futurs alliances';
|
||||
|
||||
$template->assign('linkpage', 'snalliances');
|
||||
$template->assign('linkpage', 'snalliances');
|
||||
|
||||
//TODO tout est à faire
|
||||
|
||||
if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] != 'id') {
|
||||
$pagea = 'print_key';
|
||||
$id_plan = $_GET['id'];
|
||||
$key = $_GET['key'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->escape($key);
|
||||
$reqA = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$req = $chapeau->unique_query("DESCRIBE $table_alliances $key;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $reqA);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $_GET['key']);
|
||||
$pagea = 'print_key';
|
||||
$id_plan = $_GET['id'];
|
||||
$key = $_GET['key'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->escape($key);
|
||||
$reqA = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$req = $chapeau->unique_query("DESCRIBE $table_alliances $key;");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $reqA);
|
||||
$template->assign('type', explode('(', $req['Type']));
|
||||
$template->assign('idPlan', $id_plan);
|
||||
$template->assign('key', $_GET['key']);
|
||||
} elseif (!empty($_GET['id'])) {
|
||||
$id_plan = $_GET['id'];
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
$key = $_POST['key'];
|
||||
$mod = $_POST['mod'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($mod);
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->query("UPDATE $table_alliances SET $key = '$mod' WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
}
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = $_GET['name'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($name);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE nom = '$name';");
|
||||
$chapeau->deconnexion();
|
||||
header('Location: admin.php?p=valliances&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
elseif (!empty($_GET['id'])) {
|
||||
$id_plan = $_GET['id'];
|
||||
if (isset($_POST['key']) && isset($_POST['mod'])) {
|
||||
$key = $_POST['key'];
|
||||
$mod = $_POST['mod'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($mod);
|
||||
$chapeau->escape($id_plan);
|
||||
$chapeau->query("UPDATE $table_alliances SET $key = '$mod' WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
}
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE id = '$id_plan';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('tableau', $req);
|
||||
$template->assign('idPlan', $id_plan);
|
||||
}
|
||||
elseif (!empty($_GET['name'])) {
|
||||
$name = $_GET['name'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($name);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_alliances WHERE nom = '$name';");
|
||||
$chapeau->deconnexion();
|
||||
header('Location: admin.php?p=valliances&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,41 +1,37 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$titre = '!!! Supprimer joueur !!!';
|
||||
$pagea = 'erreur';
|
||||
|
||||
$template->assign('linkpage', 'djoueurs');
|
||||
$template->assign('linkpage', 'djoueurs');
|
||||
|
||||
if ($SESS->level >= 5 && !empty($_GET['id']))
|
||||
{
|
||||
$id = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE id = $id;");
|
||||
if ($req && $req["auth_level"] < 4)
|
||||
{
|
||||
$bdd->query("DELETE FROM $table_mail WHERE destinataire = $id;");
|
||||
$bdd->query("DELETE FROM $table_user WHERE id = $id;");
|
||||
$bdd->query("DELETE FROM $table_flottes WHERE id_user = $id;");
|
||||
$bdd->query("DELETE FROM $table_planete WHERE id_user = $id;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message', 'Le joueur '.$id.' ('.$req['pseudo'].') a été supprimé du jeu ainsi que toutes les données le concernant !<br />Vérifiez qu\'il ne soit pas fondateur d\'une alliance ou d\'une mission groupée.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message', 'Le joueur n\'a pas été trouvé ou vous n\'avez pas les permissions de le supprimer !');
|
||||
}
|
||||
}
|
||||
elseif (!empty($_GET['name']))
|
||||
{
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
if ($SESS->level >= 5 && !empty($_GET['id'])) {
|
||||
$id = intval(gpc('id'));
|
||||
$bdd = new BDD();
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE id = $id;");
|
||||
if ($req && $req["auth_level"] < 4) {
|
||||
$bdd->query("DELETE FROM $table_mail WHERE destinataire = $id;");
|
||||
$bdd->query("DELETE FROM $table_user WHERE id = $id;");
|
||||
$bdd->query("DELETE FROM $table_flottes WHERE id_user = $id;");
|
||||
$bdd->query("DELETE FROM $table_planete WHERE id_user = $id;");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message', 'Le joueur '.$id.' ('.$req['pseudo'].') a été supprimé du jeu ainsi que toutes les données le concernant !<br />Vérifiez qu\'il ne soit pas fondateur d\'une alliance ou d\'une mission groupée.');
|
||||
} else {
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message', 'Le joueur n\'a pas été trouvé ou vous n\'avez pas les permissions de le supprimer !');
|
||||
}
|
||||
} elseif (!empty($_GET['name'])) {
|
||||
$name = gpc('name');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($name);
|
||||
$req = $bdd->unique_query("SELECT * FROM $table_user WHERE pseudo = '$name';");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: '.$VAR["menu"]["djoueurs"].'&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
$pagea = 'print_choixU';
|
||||
?>
|
||||
header('Location: '.$VAR["menu"]["djoueurs"].'&id='.$req['id']);
|
||||
exit;
|
||||
} else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,71 +1,67 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ../');
|
||||
exit;
|
||||
}
|
||||
$pagea = 'version';
|
||||
$titre = 'Versions';
|
||||
|
||||
//Ajout d'une version
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add' && $SESS->level >= 7 && !empty($_POST['version']) && !empty($_POST['contenu']))
|
||||
{
|
||||
$version = gpc('version', 'post');
|
||||
$contenu = gpc('contenu', 'post');
|
||||
$temps = time();
|
||||
$nom_user = trouvNom($SESS->values['id']);
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($version);
|
||||
$bdd->escape($contenu);
|
||||
$bdd->escape($nom_user);
|
||||
$bdd->query("INSERT INTO $table_version (version, contenu, temps, pseudo) VALUES ('$version', '$contenu', $temps, '$nom_user');");
|
||||
$bdd->deconnexion();
|
||||
if (!empty($_GET['i']) && $_GET['i'] == 'add' && $SESS->level >= 7 && !empty($_POST['version']) && !empty($_POST['contenu'])) {
|
||||
$version = gpc('version', 'post');
|
||||
$contenu = gpc('contenu', 'post');
|
||||
$temps = time();
|
||||
$nom_user = trouvNom($SESS->values['id']);
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($version);
|
||||
$bdd->escape($contenu);
|
||||
$bdd->escape($nom_user);
|
||||
$bdd->query("INSERT INTO $table_version (version, contenu, temps, pseudo) VALUES ('$version', '$contenu', $temps, '$nom_user');");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
//Modification d'une version
|
||||
elseif (!empty($_GET['i']))
|
||||
{
|
||||
$id = intval(gpc('i'));
|
||||
if (!empty($_POST['version']) && !empty($_POST['contenu'])) {
|
||||
$version = gpc('version', 'post');
|
||||
$contenu = gpc('contenu', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($version);
|
||||
$bdd->escape($contenu);
|
||||
$bdd->query("UPDATE $table_version SET version = '$version', contenu = '$contenu' WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
elseif (!empty($_GET['i'])) {
|
||||
$id = intval(gpc('i'));
|
||||
if (!empty($_POST['version']) && !empty($_POST['contenu'])) {
|
||||
$version = gpc('version', 'post');
|
||||
$contenu = gpc('contenu', 'post');
|
||||
$bdd = new BDD();
|
||||
$bdd->escape($version);
|
||||
$bdd->escape($contenu);
|
||||
$bdd->query("UPDATE $table_version SET version = '$version', contenu = '$contenu' WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$template->assign('mod', $bdd->unique_query("SELECT * FROM $table_version WHERE id = '$id';"));
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_version ORDER BY temps DESC;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', $id);
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
$bdd = new BDD();
|
||||
$template->assign('mod', $bdd->unique_query("SELECT * FROM $table_version WHERE id = '$id';"));
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_version ORDER BY temps DESC;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', $id);
|
||||
}
|
||||
//Suppression d'une version
|
||||
elseif (!empty($_GET['d']) && $SESS->level >= 7)
|
||||
{
|
||||
$id = intval(gpc('d'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("DELETE FROM $table_version WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
elseif (!empty($_GET['d']) && $SESS->level >= 7) {
|
||||
$id = intval(gpc('d'));
|
||||
$bdd = new BDD();
|
||||
$bdd->query("DELETE FROM $table_version WHERE id = $id;");
|
||||
$bdd->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
//Demande de mise à jour du cache
|
||||
elseif (isset($_GET['actuCache']))
|
||||
{
|
||||
Cache::del('versionsDATA');
|
||||
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$bdd = new BDD();
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_version ORDER BY temps DESC;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', 'add');
|
||||
}
|
||||
?>
|
||||
elseif (isset($_GET['actuCache'])) {
|
||||
Cache::del('versionsDATA');
|
||||
|
||||
header('Location: admin.php?p=version');
|
||||
exit;
|
||||
} else {
|
||||
$bdd = new BDD();
|
||||
$template->assign('tableau', $bdd->query("SELECT * FROM $table_version ORDER BY temps DESC;"));
|
||||
$bdd->deconnexion();
|
||||
$template->assign('id', 'add');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue