コード例 #1
0
function rechercherArrond()
{
    $oElus = new Elus();
    $aElus = $oElus->rechercheElusArrond($_POST['arrond']);
    $oVue = new Vue();
    $oVue->AfficheElus($aElus);
}
コード例 #2
0
 private function rechercheArrond()
 {
     $erreur = '';
     $aElus = array();
     $oMenu = new Menu();
     $aMenu = $oMenu->getMenu();
     $oVue = new Vue();
     $oVue->AfficheEntete("Maires", array("Elus", "Toto le magicien", "Tadam"));
     $oVue->AfficheMenu($aMenu);
     if ($_GET['action'] == 'rechercher') {
         $oElus = new Elus();
         try {
             $aElus = $oElus->rechercheElusArrond($_POST['arrond']);
         } catch (Exception $e) {
             $erreur = $e->getMessage();
         }
         $oVue->AfficheChampRechercheArrond($_POST['arrond'], $erreur);
         $oVue->AfficheElus($aElus);
     } else {
         $oVue->AfficheChampRechercheArrond($_POST['arrond'], $erreur);
     }
     $oVue->AffichePied();
 }
コード例 #3
0
		<link href="../css/global.css" rel="stylesheet" type="text/css" />
	</head>

	<body>
		<div id="header">
			<h1>Test - Menu</h1>
		</div>
		<div id="contenu">
			<?php 
include "../modeles/Menu.class.php";
include "../modeles/Elus.class.php";
include "../lib/monSQL.class.php";
$oMenu = new Menu();
echo "<h2>Menu::getMenu()</h2>";
var_dump($oMenu->getMenu());
$oElus = new Elus();
echo "<details>";
echo "<summary>Elus::getElus()</summary>";
var_dump($oElus->getElus());
echo "</details>";
echo "<details>";
$res = $oElus->rechercheElusArrond("Anjou");
echo '<summary>Elus::rechercheElusArrond($arrond = "Anjou") Attendu 5, résultat = ' . count($res) . '</summary>';
var_dump($res);
echo "</details>";
echo "<details>";
echo '<summary>Elus::rechercheElusArrond($arrond = "")</summary>';
var_dump($oElus->rechercheElusArrond(""));
echo "</details>";
echo "<details>";
echo '<summary>Elus::rechercheElusArrond($arrond = "Totolemagicien")</summary>';