<?php

include "view/pubs.php";
$ordre = "NOM ASC";
if (isset($_GET["ordre"])) {
    $ordre = $_GET["ordre"];
}
$nom = "";
if (isset($_GET["nom"])) {
    $nom = $_GET["nom"];
}
$listeAventurier = Aventurier::ListerMesAventuriers($ordre, $nom);
include "view/gestionAventuriers.php";
Example #2
0
<?php

$ordre = "NOM ASC";
if (isset($_GET["ordre"])) {
    $ordre = $_GET["ordre"];
}
$nom = "";
if (isset($_GET["nom"])) {
    $nom = $_GET["nom"];
}
$listeAventurier = Aventurier::Lister($ordre, $nom);
include "view/pubs.php";
include "view/archiveAventurier.php";
Example #3
0
     }
 }
 if ($_GET["action"] == "action_suppression") {
     $aventurier = new Aventurier($_GET["id_aventurier"]);
     if ($aventurier->codeacces == $_GET["codeacces"]) {
         $aventurier->supprimer();
         $listeAventurier = Aventurier::Lister("NOM ASC", "");
         include "view/pubs.php";
         include "view/archiveAventurier.php";
     } else {
         $message = "vous n&apos;avez pas le bon code d&apos;accès.";
         include "view/message.php";
     }
 }
 if ($_GET["action"] == "action_modification") {
     $aventurier = new Aventurier($_GET["id_aventurier"]);
     if ($aventurier->codeacces == $_GET["codeacces"]) {
         $armes = Arme::ListerBase();
         $equipements = Equipement::ListerBase();
         $protections = Protection::ListerBase();
         $types_arme = Arme::ListerTypesArmeDeBase();
         $types_protection = Protection::ListerTypesProtectionDeBase();
         $types_equipement = Equipement::ListerTypesEquipementDeBase();
         $metiers = Metier::Lister();
         $origines = Origine::Lister();
         $competences = Competence::Lister();
         $aventurier->set_all_from_form($_POST);
         //remise à 0 des objets
         $aventurier->armes = array();
         $aventurier->equipements = array();
         $aventurier->protections = array();
 * On peut trier les résultats par nom, niveau, metier et origine. On peut aussi filtrer avec un nom spécifique. 
 * @author  Birdimol
 * @version 2.0 
 * @date 06 novembre 2015
 */
if (is_file(ROOT . "/view/archives/archives_aventuriers.php")) {
    //ordre d'affichage par défaut
    $ordre = "AVENTURIER_NOM ASC";
    //si un ordre est présent dans l'url, on l'utilise
    if (isset($_GET["sort"])) {
        $ordre = str_replace("-", " ", $_GET["sort"]);
    }
    //nom à rechercher par défaut : vide = tous
    $nom = "";
    //si un nom est présent dans l'url, on l'utilise
    if (isset($_GET["nom"])) {
        $nom = $_GET["nom"];
    }
    //index choisi par défaut : 1 = les 100 premiers résultats
    $index_choisi = 1;
    //si l'index est présent dans l'url, on l'utilise pour ne sortir que les résultat de (index-1)*100 à index*100
    if (isset($_GET["index"])) {
        $index_choisi = $_GET["index"];
    }
    //nombre total d'aventurier (pour info en haut de page)
    $compte = Aventurier::Compter($nom);
    $listeAventuriers = Aventurier::Lister($ordre, $nom, $index_choisi);
    include ROOT . "/view/archives/archives_aventuriers.php";
} else {
    include ROOT . "/view/vue_introuvable.php";
}
Example #5
0
     foreach ($_POST as $key => $value) {
         if (substr($key, 0, 3) == "mob") {
             for ($a = 0; $a < $value; $a++) {
                 $id = substr($key, 3);
                 $mob = new Mob($id);
                 $mob->getLoot();
                 $mobs[] = $mob;
             }
         }
     }
     $_SESSION["mobs"] = serialize($mobs);
     include "view/creation_fiche_mob.php";
 } else {
     if ($_GET["action"] == "simulation_combat") {
         $aventuriers = Aventurier::Lister();
         $mesAventuriers = Aventurier::ListerMesAventuriers("NOM", "");
         include "view/simulation_combat_aventuriers_selection.php";
     } else {
         if ($_GET["action"] == "simulation_combat_mobs_selection") {
             $ids = array();
             $aventuriers = array();
             for ($a = 1; $a <= $_POST["maxID"]; $a++) {
                 if (isset($_POST["aventurier" . $a])) {
                     $aventurier = new Aventurier($a);
                     $aventuriers[] = $aventurier;
                 }
             }
             $mobs = Mob::Lister();
             $_SESSION["sim_combat_aventuriers"] = serialize($aventuriers);
             include "view/simulation_combat_mobs_selection.php";
         } else {
<div class='principal_avec_pub'>    
    <?php 
$ids = array();
$listeAventuriers = array();
for ($a = 1; $a <= $_POST["maxID"]; $a++) {
    if (isset($_POST["aventurier" . $a])) {
        $aventurier = new Aventurier($a);
        $listeAventuriers[] = $aventurier;
        $ids[] = $a;
    }
}
$tds = array();
$tds[0] = array();
$tds[1] = array();
$tds[2] = array();
$tds[3] = array();
$indextd = 0;
foreach ($listeAventuriers as $aventurier) {
    $tds[$indextd][] = $aventurier;
    $indextd++;
    if ($indextd == 4) {
        $indextd = 0;
    }
}
?>
    <div style='text-align:center;'>
        <a target='blank_' href='view/fiche_MJ_aventuriers_imprimable.php?ids=<?php 
foreach ($ids as $id) {
    echo $id . "-";
}
?>
Example #7
0
session_start();
header("Content-type: image/png");
$image = imagecreatefromjpeg(__DIR__ . "/../image/perso.jpg");
include __DIR__ . "/../config/param.php";
include __DIR__ . "/../model/GeneralFunctions.php";
include __DIR__ . "/../model/autoloader.php";
$compte_arme = 0;
$aventurier;
if (isset($_GET["id"])) {
    $aventurier = new Aventurier($_GET["id"]);
} else {
    if (isset($_SESSION["birdibeuk_aventurier"])) {
        $aventurier = unserialize($_SESSION["birdibeuk_aventurier"]);
    } else {
        $aventurier = new Aventurier();
    }
}
$noir = imagecolorallocate($image, 0, 0, 0);
$vert = imagecolorallocate($image, 0, 144, 0);
$rouge = imagecolorallocate($image, 144, 0, 0);
$font = __DIR__ . "/../fonts/VINERITC.TTF";
$fontSize = 20;
$fontSizeEquipement = 16;
//imagestring($image, 6, 3$fontSize, 125, $aventurier->NOM , $noir);
imagettftext($image, $fontSize, 0, 310, 135, $noir, $font, $aventurier->NOM);
imagettftext($image, $fontSize, 0, 760, 135, $noir, $font, $aventurier->SEXE);
imagettftext($image, $fontSize, 0, 325, 188, $noir, $font, $aventurier->ORIGINE);
if ($aventurier->METIER->NOM == "Mage") {
    imagettftext($image, $fontSize, 0, 605, 188, $noir, $font, $aventurier->METIER . " (" . $aventurier->magie . ")");
} else {