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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
| <php
include "../config.php" ;
?>
<?php
include "../entetebis.php";
?>
<link rel="stylesheet" href="../style/template.css" type="text/css" />
<script language="javascript">
function verifier(){
if((document.form.nom.value != '')
&& (document.form.prenom.value !='')
&& (document.form.jour.value !='')
&& (document.form.mois.value !='')
&& (document.form.an.value !='')
&& (document.form.jours.value !='')){
return(confirm('voulez-vous vraiment ajouter cette personne ?'))
}
else {
document.form.nom.focus();
document.form.prenom.focus();
document.form.jour.focus();
document.form.mois.focus();
document.form.an.focus();
document.form.jours.focus();
alert("un ou plusieurs champs ne sont pas remplis");
}
return false;
}
</script>
<body>
<table border=0 width="30%">
<td width="30%">
<div id="bgcolor">
<div id="font">
<center><h4>nouveau salarié</h4></center>
</div>
</div>
</td>
</table>
<table border=0 width="30%">
<form name="form" method="post" action="insert.php">
<tr><label><td><b>nom </td><td>:</td></b><td><input type="text" name="nom" /> </td></label></tr></br>
<tr><label><td><b>prénom </td><td>:</td></b><td><input type="text" name="prenom" /> </td></label></tr></br>
<tr><label><td><b>date de naissance</td><td>:</td></b><td>
<p>
<input type="text" style="width:26px" name="jour" size="2" maxlength="2" /> -
<input type="text" style="width:26px" name="mois" size="2" maxlength="2" /> -
<input type="text" style="width:40px" name="an" size="4" maxlength="4" />
</p>
<tr><label><td><b>service</td><td>:</td></b>
<td><label><?php echo '<select name="services">';?>
<?php $reponse=mysql_query
("select * from services");
while ($boucle=mysql_fetch_assoc($reponse)) {
echo '<option value="'.$boucle['type_service'].'">'.$boucle['type_service'].'</option></label>';
}?> </select>;
</tr>
<tr><label><td><b>contrat</td><td>:</td></b>
<br>
<td><label><?php echo '<select name="contrats">'; ?>
<?php
$reponses=mysql_query("select * from contrats");
while ($boucles=mysql_fetch_assoc($reponses)) {
echo '<option value="'.$boucles['num_contrat'].'">'.$boucles['type_contrat'].'</option></label>';
}
mysql_close();
?>
</select>')
</tr>
<tr><label><td><b>jours de congés</td><td>:</td></b><td><input type="text" name="jours" style="width:26px" maxlength="2"/></td></label></tr></br>
<tr><label><td><b>journée locales</td><td>:</td></b><td><input type="checkbox" name="journeelocale" /></td></label></tr></select>
</table> </br>
<table border=0 width="30%">
<p>
<td width="30%">
<center><input type="submit" onclick="return(verifier());" value="envoyer le formulaire" />
</td>
</p>
</table>
</form> |