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 130 131 132 133 134 135 136 137 138 139 140 141 142
| <?php
if($confirm==0)
{
echo'
<p><strong>Vous ètes sur le point de modifier linformation suivante :</strong></p>
<center><p>
<table border=1 bordercolor="#7996DE">
<tr>
<td align="left">';
$_SESSION['num_info']=$_POST['modifier_info'];
$num_info=$_SESSION['num_info'];
$connect=mysql_connect('localhost','root','');
mysql_select_db('bureau_commercial',$connect);
$connect=mysql_connect('localhost','root','');
mysql_select_db('bureau_commercial',$connect);
$req=mysql_query('SELECT libelle_info, description_info, jour_info, mois_info, annee_info
FROM information WHERE num_info='.$num_info) or die(mysql_error());
while($resultat=mysql_fetch_array($req))
{
$num_info=$resultat['num_info'];
$description_info=$resultat['description_info'];
$jour_info=$resultat['jour_info'];
$mois_info=$resultat['mois_info'];
$annee_info=$resultat['annee_info'];
}
echo '
<form name="form1" method="post" action="confirme_modif_info.php?confirm=1">
<table width="729">
<tr>
<td colspan="2"> Libellé :
<input name="libelle_info" type="text" size="98" value="'.$libelle_info.'"></td>
</tr>
<tr>
<td width="525" rowspan="2">
Description :
<textarea name="description_info" cols="80" rows="12">'.$description_info.'</textarea>
</td>';
echo'
</select>
</td>
</tr>
</table>
<P> Date : jour
<select name="jour" size="1">
<option value="'.$jour_info.'">'.$jour_info.'</option>
<option value="00">pas de jour particulier</option>
<option value="01">01</option> <option value="02">02</option> <option value="03">03</option>
<option value="04">04</option> <option value="05">05</option> <option value="06">06</option>
<option value="07">07</option> <option value="08">08</option> <option value="09">09</option>
<option value="10">10</option> <option value="11">11</option> <option value="12">12</option>
<option value="13">13</option> <option value="14">14</option> <option value="15">15</option>
<option value="16">16</option> <option value="17">17</option> <option value="18">18</option>
<option value="19">19</option> <option value="20">20</option> <option value="21">21</option>
<option value="22">22</option> <option value="23">23</option> <option value="24">24</option>
<option value="25">25</option> <option value="26">26</option> <option value="27">27</option>
<option value="28">28</option> <option value="29">29</option> <option value="30">30</option>
<option value="31">31</option>
</select>
mois
<select name="mois" size="1">
<option value="'.$mois_info.'">'.$mois_info.'</option>
<option value="00">pas de mois particulier</option>
<option value="01">01</option> <option value="02">02</option> <option value="03">03</option>
<option value="04">04</option> <option value="05">05</option> <option value="06">06</option>
<option value="07">07</option> <option value="08">08</option> <option value="09">09</option>
<option value="10">10</option> <option value="11">11</option> <option value="12">12</option>
</select>
année
<select name="annee" size="1">
<option value="'.$annee_info.'">'.$annee_info.'</option>
<option value="2007">2007</option>
<option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option>
<option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option>
<option value="2014">2014</option> <option value="2015">2015</option> <option value="2016">2016</option>
<option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option>
<option value="2020">2020</option>
</select>
</p>
<p align="right">
<input type="submit" name="Envoyer" value="Modifier">
</p>
</div>
<p> </p>
</form>';
echo'
</td>
</tr>
</table>
<br>
</p></center>
<p align="center">
<br>';
}
if ($confirm==1)
{
$libelle_info=$_POST['libelle_info']; $description_info=$_POST['description_info'];
$jour_info=$_POST['jour_info']; $mois_info=$_POST['mois_info']; $annee_info=$_POST['annee_info'];
echo '
<table border=1 bordercolor="#7996DE">
<tr>
<td align="left">';
$num_cli=$_SESSION['num_cli'];
$connect=mysql_connect('localhost','root','');
mysql_select_db('bureau_commercial',$connect);
mysql_query("UPDATE information
SET libelle_info='$libelle_info', description_info='$description_info', jour_info='$jour_info',
mois_info='$mois_info', annee_info='$annee_info'
WHERE num_info='".$num_info."'");
echo' <br><br><br> Linformation a bien était modifiée. <br><br><br><br><br><br>
</td>
</tr>
</table>
<br>
</p>
<p align="center"><a href="accueil.php" class="Style14">Retour à l\'accueil</a><br>';
session_destroy();
}
?> |
Partager