public function read($input) { $xfer = 0; $fname = null; $ftype = 0; $fid = 0; $xfer += $input->readStructBegin($fname); while (true) { $xfer += $input->readFieldBegin($fname, $ftype, $fid); if ($ftype == TType::STOP) { break; } switch ($fid) { case 0: if ($ftype == TType::MAP) { $this->success = array(); $_size241 = 0; $_ktype242 = 0; $_vtype243 = 0; $xfer += $input->readMapBegin($_ktype242, $_vtype243, $_size241); for ($_i245 = 0; $_i245 < $_size241; ++$_i245) { $key246 = ''; $val247 = new Type(); $xfer += $input->readString($key246); $val247 = new Type(); $xfer += $val247->read($input); $this->success[$key246] = $val247; } $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }
<div class="col-sm-10"> <input type="text" name='nom' class="form-control" id="nomBouteille" value='<?php echo $bouteille->nom; ?> ' > </div> </div> <div class="form-group"> <label for="id_type" class="col-sm-2 control-label">Type</label> <div class="col-sm-10"> <?php // read the bouteille categories from the database include_once 'objects/Type.php'; $type = new Type($db); $stmt = $type->read(); // put them in a select drop-down echo "<select class='form-control' name='id_type'>"; echo "<option>Choisir le type ...</option>"; while ($row_cepage = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row_cepage); // current cepage of the product must be selected if ($bouteille->id_type == $id) { echo "<option value='{$id}' selected>"; } else { echo "<option value='{$id}'>"; } echo "{$libelle}</option>"; } echo "</select>"; ?>
public function read($input) { $xfer = 0; $fname = null; $ftype = 0; $fid = 0; $xfer += $input->readStructBegin($fname); while (true) { $xfer += $input->readFieldBegin($fname, $ftype, $fid); if ($ftype == TType::STOP) { break; } switch ($fid) { case 0: if ($ftype == TType::MAP) { $this->success = array(); $_size188 = 0; $_ktype189 = 0; $_vtype190 = 0; $xfer += $input->readMapBegin($_ktype189, $_vtype190, $_size188); for ($_i192 = 0; $_i192 < $_size188; ++$_i192) { $key193 = ''; $val194 = new Type(); $xfer += $input->readString($key193); $val194 = new Type(); $xfer += $val194->read($input); $this->success[$key193] = $val194; } $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }