echo "<option value='{$id}'>"; } echo "{$appellation}</option>"; } echo "</select>"; ?> </div> </div> <div class="form-group"> <label for="id_emplacement" class="col-sm-2 control-label">Emplacement</label> <div class="col-sm-10"> <?php // read the bouteille categories from the database include_once 'objects/Emplacement.php'; $emplacement = new Emplacement($db); $stmt = $emplacement->read(); // put them in a select drop-down echo "<select class='form-control' name='id_emplacement'>"; echo "<option>Choisir l'emplacement ...</option>"; while ($row_aoc = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row_aoc); // current aoc of the product must be selected if ($bouteille->id_emplacement == $id) { echo "<option value='{$id}' selected>"; } else { echo "<option value='{$id}'>"; } echo "{$lieu}</option>"; } echo "</select>";
/** * Fetch Emplacement which references this Joueurs. Will return null in case reference is invalid. * `joueurs`.`id_emplacement` -> `emplacement`.`id_emplacement` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return Emplacement */ public function fetchEmplacement(PDO $db, $sort = null) { $filter = array(Emplacement::FIELD_ID_EMPLACEMENT => $this->getIdEmplacement()); $result = Emplacement::findByFilter($db, $filter, true, $sort); return empty($result) ? null : $result[0]; }
<img src="lib/tablesorter/addons/pager/icons/last.png" class="last" alt="Last" /> <select class="pagesize" title="Nombre de vins / page"> <option value="10">10</option> <option value="20">20</option> <option value="50">50</option> <option value="100">100</option> </select> <select class="gotoPage" title="Choisir la page"></select> </div> <?php // display the products if there are any if ($num > 0) { $aoc = new AOC($db); $type = new Type($db); $emplacement = new Emplacement($db); echo "<div id='modal_confirm_yes_no' title='Confirm'></div>"; echo "<table class='table table-striped table-hover table-responsive tablesorter' id='allVins'>"; echo "<thead><tr>"; echo "<th>Nom</th>"; echo "<th class='colMagnum'> </th>"; echo "<th>Qté</th>"; echo "<th class='colCouleur'>Type</th>"; echo "<th class='filter-select filter-onlyAvail'>Emplacement</th>"; echo "<th class='filter-select filter-onlyAvail'>Millesime</th>"; echo "<th class='filter-select filter-onlyAvail'>Apogée</th>"; echo "<th>AOC</th>"; echo "<th class='filter-select filter-onlyAvail'>Achat</th>"; echo "</tr></thead>"; echo "<tfoot><tr>"; echo "<th>Nom</th>";
/** * get single Emplacement instance from a DOMElement * * @param DOMElement $node * @return Emplacement */ public static function fromDOMElement(DOMElement $node) { $o = new Emplacement(); $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES)); $o->notifyPristine(); return $o; }