<?php include_once './modele/ressource.php'; include_once './modele/Unite.php'; include_once './modele/authentification.php'; if (estAuthentifier()) { global $currentJoueur; $titre = "Mes Unités"; $uni = Unite::Unites(); } else { retourEnTerresConnues(); } include_once './vue/Unite.php';
public function genUniteLink() { global $bdd; foreach (Unite::Unites() as $row) { $req = "INSERT INTO POSSEDE_UNITE(idJoueur, idUnite, quantite) VALUES ('" . $this->idJoueur . "', '" . $row['idUnite'] . "', 0)"; $req = $bdd->exec($req); } }