1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
| <form class="new_user_form" role="form" id="new" method="post">
<div class="col-md-12 field-box">
<label for="date">Date :<span class="help-required"></span></label>
<div class="col-md-9">
<input type="text" id="date" name="date" value="<?php echo $date ?>" class="form-control required" aria-required="true" />
</div>
</div>
<div class="col-md-12 field-box">
<label for="lieu">Lieu:<span class="help-required"></span></label>
<div class="col-md-9">
<input class="form-control required" type="text" name="lieu" id="lieu" value="<?php echo $lieu ?>" role="input" aria-required="true" />
</div>
</div>
<div class="col-md-12 field-box">
<label for="type">Type:<span class="help-required"></span></label>
<div class="col-md-9 col-md-push-1">
<select style="width:250px" class="select2 type required" id="type" name="type" aria-required="true">
<option></option>
<?php
//Appel de la fonction pour récupérer les valeur possible d'un champ type enum
$enumFields = getEnumFieldValues('detail', 'type', $connexion);
foreach($enumFields as $value):
$value=str_replace("'","",$value);
if($value == $type):
?>
<option value="<?php echo $value ?>" selected="selected"><?php echo $value; ?></option>
<?php
else:
?>
<option value="<?php echo $value ?>"><?php echo $value ?></option>
<?php
endif;
endforeach;
?>
</select>
</div>
</div>
<div class="col-md-12 field-box" id="div5" name="div5">
<label for="div5">champ5:<span class="help-required"></span></label>
<div class="col-md-9">
<input class="form-control" type="text" name="champ5" id="champ5" value="<?php echo $champ5?>" role="input"/>
</div>
</div>
<div class="col-md-12 field-box" id="div1" name="div1">
<label for="div1">champ1 :<span class="help-required"></span></label>
<div class="col-md-9">
<input class="form-control" type="text" name="champ1 " id="champ1 " value="<?php echo $champ1 ?>" role="input" onkeyup="calcul(); replace();" />
</div>
</div>
<div class="col-md-12 field-box" id="div2" name="div2">
<label for="div2">champ2:<span class="help-required"></span></label>
<div class="col-md-9 col-md-push-1">
<select style="width:250px" class="form-control" id="champ2" name="champ2" onchange="calcul();">
<?php
$req2 = "Select id AS id, tx
From champ
Order by tx";
//Exécution de la requête
$res2 = $connexion->query($req2);
//Tant qu'il y a des enregistrements, on les affiche
while($row2 = $res2->fetch()):
if($row2['id'] == $champ2):
?>
<option value="<?php echo $row2['id'] ?>" selected="selected"><?php echo $row2['tx']; ?></option>
<?php
else:
?>
<option value="<?php echo $row2['id']?>"><?php echo $row2['tx']; ?></option>
<?php
endif;
endwhile;
?>
</select>
</div>
</div>
<div class="col-md-12 field-box" id="div3" name="div3">
<label for="div3">champ3 :</label>
<div class="col-md-9">
<label type="text" name="champ3" id="champ3 " value="<?php echo $champ3?>"></label>
</div>
</div>
<div class="col-md-12 field-box" id="div4" name="div4">
<label for="div4">champ4 :</label>
<div class="col-md-9">
<label type="text" name="champ4" id="champ4 " value="<?php echo $champ4?>"></label>
</div>
</div>
<div class="col-md-12 field-box" id="div6" name="div6">
<label for="div6">champ6:<span class="help-required"></span></label>
<div class="col-md-9">
<input class="form-control" type="text" name="champ6 " id="champ6" value="<?php echo $champ6?>" role="input" onkeyup="replace();"/>
</div>
</div>
<div class="col-md-11 field-box actions">
<input type="submit" value="Ajouter" name="submit" id="submitButton" class="btn-glow primary" title="Cliquez ici pour ajouter!" />
</div>
</form> |