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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502
| <?php
/* Nom du programme : afficheForm.php
* Description : Ce script affiche un formulaire qui demande l'adresse du client
*
*/
?>
<head>
<style>
.formulaire{
background-color:white;
color:blue;
}
.champ{
color:#A44094;
}
p {
margin: 0.5em 0;
}
</style>
<script type="text/javascript">
function surligne(champ, erreur) // Fonction qui colore les champs mal remplis en rouge pâle .
{
if(erreur)
champ.style.backgroundColor = "#fba";
else
champ.style.backgroundColor = "";
}
function verif(champ) // Fonction contrôlant si les champs marqués onblur="verif(this)" ne sont pas vides .
{
if(champ.value == "")
{
surligne ( champ, true);
return false;
}
else
{
surligne ( champ, false);
return true;
}
}
</script>
</head>
<?php
function char($text) //Fonction permettant de retirer les accents d'une chaîne de caractères
{
$text = htmlentities($text, ENT_NOQUOTES, "UTF-8");
$text = htmlspecialchars_decode($text);
return $text;
}
echo "<html>
<head><title>Devis en ligne</title></head>
<body bgcolor = #0C3A6D>";
$infos = array( "prénom"=>"Prénom :",
"nom"=>"Nom :",
"adresse"=>"Adresse :",
"codepostal"=>"Code postal :",
"ville"=>"Ville : ",
"email"=>"Adresse Email :",
"fixe"=>"Téléphone fixe :",
"portable"=>"Téléphone portable :");
$prestation = "Installation - Mise en service ADSL + Téléphone (Configuration Simple)";
$prestation1 = char($prestation);
$prestation2 = "Installation - Mise en service ADSL + Téléphone (Configuration Complexe)";
$prestation3 = char($prestation2);
$prestation4 = "Installation - Mise en Service de décodeurs TNT";
$prestation5 = char($prestation4);
$prestation6 = "Installation - Mise en Service de TV avec TNT intégrée";
$prestation7 = char($prestation6);
$prestation8 = "Installation - Mise en Service de Décodeurs ADSL pour TV numérique";
$prestation9 = char($prestation8);
$prestation10 = "Installation - Décodeur CANALSAT";
$prestation11= char($prestation10);
$prestation12 = "Installation - Home cinéma";
$prestation13= char($prestation12);
$prestation14 = "Formation - Formation sur l'utilisation des périphériques associés au PC";
$prestation15 = char($prestation14);
$prestation16 = "Formation - Formation sur l'utilisation des appareils photos numériques";
$prestation17 = char($prestation16);
$prestation18 = "Formation - Formation sur l'utilisation des camescopes numériques";
$prestation19 = char($prestation18);
$prestation20 = "Formation - Formation sur l'utilisation du courrier électronique";
$prestation21 = char($prestation20);
$prestation22 = "Formation - Formation sur l'utilisation des messageries instantanées";
$prestation23 = char($prestation22);
$prestation24 = "Formation - Formation sur l'utilisation d'albums photos numériques";
$prestation25 = char($prestation24);
$prestation26 = "Formation - Formation sur l'utilisation des décodeurs TNT";
$prestation27 = char($prestation26);
$prestation28 = "Création - Création de site web";
$prestation29 = char($prestation28);
$prestation30 = "Création - Création de logiciels spécifiques";
$prestation31 = char($prestation30);
$prestation32 = "Création - Création d'une page Facebook";
$prestation33 = char($prestation32);
$prestation34 = "Création - Création d'une boutique en ligne";
$prestation35 = char($prestation34);
$prestation36 = "SAV - Recherche et achat de pièces détachées";
$prestation37 = char($prestation36);
$prestation38 = "SAV - Enlèvement du PC";
$prestation39 = char($prestation38);
$prestation40 = "SAV - Enlèvement des périphériques PC";
$prestation41 = char($prestation40);
$prestation42 = "SAV - Enlèvement Téléviseur - Décodeur - Chaîne HIFI";
$prestation43 = char($prestation42);
$prestation44 = "SAV - Service après vente - TNT";
$prestation45 = char($prestation44);
$prestation46 = "SAV - Service après vente - TV";
$prestation47 = char($prestation46);
$prestation48 = "SAV - Enlèvement d'un téléphone mobile";
$prestation49 = char($prestation48);
$prestation50 = "Dépannage - Dépannage informatique 1 heure";
$prestation51 = char($prestation50);
$prestation52 = "Dépannage - Dépannage informatique 2 heures";
$prestation53 = char($prestation52);
$prestation54 = "Dépannage - Dépannage informatique 3 heures";
$prestation55 = char($prestation54);
$Config_Nbre = array(1=> "0","1","2","3","4");
$Config_Prestations_Installation = array(1=> "Aucune prestation","Installation - Mise en service PC",$prestation1,$prestation3,$prestation5,
$prestation7,$prestation9,$prestation11,"Installation - Mise en service Antivirus","Installation - Mise en service Logiciels",$prestation13);
$Config_Prestations_Formations = array(1=> "Aucune prestation","Formation - Formation sur l'utilisation du PC",$prestation15,"Formation - Formation sur l'utilisation des terminaux ADSL",$prestation17,
$prestation19,$prestation21,$prestation23,$prestation25,"Formation - Formation Internet",$prestation27,"Formation - Forfait de formation de 1h","Formation - Forfait de formation de 2h",
"Formation - Forfait de formation de 3h","Formation - Forfait de formation de 4h","Formation - Forfait de formation de 5h","Formation - Forfait de formation de 6h",
"Formation - Forfait de formation de 7h","Formation - Forfait de formation de 8h","Formation - Forfait de formation de 9h","Formation - Forfait de formation de 10h"
);
$Config_Prestations_Création = array(1=> "Aucune prestation",$prestation29,$prestation31,$prestation33,$prestation35
);
$Config_Prestations_SAV = array(1=> "Aucune prestation",$prestation37,$prestation39,$prestation41,$prestation43,$prestation45,$prestation47,$prestation49);
$Config_Prestations_Dépannage = array(1=> "Aucune prestation",$prestation51,$prestation53,$prestation55);
echo "<p align = 'center'>
<b><font size='4'><font color = '#A44094'>Devis en ligne</font></b><hr>";
echo "<form action = 'testChamps.php' method = 'POST'>
<p align = 'center'>
<b><font color = '#5882FA'>De manière à remplir le devis en ligne, vous devez entrer vos coordonnées dans le formulaire ci dessous,</font></b></p>
<p align = 'center'>
<b><font color = '#5882FA'>puis choisir des prestations ainsi que leur nombre.</font></b></p>
<table width = '95%' border ='0' cellpathing = '0' cellpading = '2'>\n";
?>
<TABLE BORDER = 0 ALIGN="center">
<?php
foreach ($infos as $champ=>$info)
{
echo "<tr><td style = 'text-align : right; font-weight: bold' class='champ'> $info</td>
<td><input type = 'text' name='$champ' size = '50' maxlength = '50' class='formulaire' onblur='verif(this)'></td>
</tr>";
}
echo "<br>";
?>
</TABLE>
<TABLE BORDER = 0 ALIGN="center">
<h4><font color="#5882FA"><center>Choix des prestations</center></font></h4>
<TR><TD><font color="#0CD448"><b>Prestations d'installation : </b></font></TD><TD>
<?php
//Construction de la liste des prestations d'installation
$prestation ="1";
echo "<select name = 'config_installation' style='width:450px;'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=11; $n++) //Boucle sur le nombre de configurations informatiques
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Prestations_Installation[$n]\n"; //Affichage du tableau des configurations informatique
}
echo "</select>\n";
?>
</TD><TD><font color="#0CD448"><b>Nombre : </b></font></TD><TD>
<?php
//Construction de la liste du nombre de prestation d'installation
$prestation ="1";
echo "<select name = 'config_nbre_installation'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=5; $n++) //Boucle sur le nombre de prestation d'installation
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Nbre[$n]\n"; //Affichage du tableau du nbre de prestations
}
echo "</select>\n";
?>
</TD></TR>
<TR><TD><font color="#0CD448"><b>Prestations de formation : </b></font></TD><TD>
<?php
//Construction de la liste des prestations de formation
$prestation ="1";
echo "<select name = 'config_formation' style='width:450px;'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=21; $n++) //Boucle sur le nombre de configurations de formation
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Prestations_Formations[$n]\n"; //Affichage du tableau des configurations de formation
}
echo "</select>\n\n";
?>
</TD><TD><font color="#0CD448"><b>Nombre : </b></font></TD><TD>
<?php
//Construction de la liste du nombre de prestation de formation
$prestation ="1";
echo "<select name = 'config_nbre_formation'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=5; $n++) //Boucle sur le nombre de prestations de formation
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Nbre[$n]\n"; //Affichage du tableau du nbre de prestations
}
echo "</select>\n";
?>
</TD></TR>
<TR><TD><font color="#0CD448"><b>Prestations de création : </b></font></TD><TD>
<?php
//Construction de la liste des prestations de création
$prestation ="1";
echo "<select name = 'config_création' style='width:450px;'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=5; $n++) //Boucle sur le nombre de configurations de création
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Prestations_Création[$n]\n"; //Affichage du tableau des configurations de création
}
echo "</select>\n\n";
?>
</TD><TD><font color="#0CD448"><b>Nombre : </b></font></TD><TD>
<?php
//Construction de la liste du nombre de prestation de création
$prestation ="1";
echo "<select name = 'config_nbre_création'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=5; $n++) //Boucle sur le nombre de prestations de création
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Nbre[$n]\n"; //Affichage du tableau du nbre de prestations
}
echo "</select>\n";
?>
</TD></TR>
<TR><TD><font color="#0CD448"><b>Prestations de SAV : </b></font></TD><TD>
<?php
//Construction de la liste des prestations de SAV
$prestation ="1";
echo "<select name = 'config_sav' style='width:450px;'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=8; $n++) //Boucle sur le nombre de configurations de SAV
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Prestations_SAV[$n]\n"; //Affichage du tableau des configurations de SAV
}
echo "</select>\n\n";
?>
</TD><TD><font color="#0CD448"><b>Nombre : </b></font></TD><TD>
<?php
//Construction de la liste du nombre de prestation de SAV
$prestation ="1";
echo "<select name = 'config_nbre_sav'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=5; $n++) //Boucle sur le nombre de prestations de SAV
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Nbre[$n]\n"; //Affichage du tableau du nbre de prestations
}
echo "</select>\n";
?>
</TD></TR>
<TR><TD><font color="#0CD448"><b>Prestations de dépannage : </b></font></TD><TD>
<?php
//Construction de la liste des prestations de dépannage
$prestation ="1";
echo "<select name = 'config_dépannage' style='width:450px;'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=4; $n++) //Boucle sur le nombre de configurations de dépannage
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Prestations_Dépannage[$n]\n"; //Affichage du tableau des configurations de dépannage
}
echo "</select>\n\n";
?>
</TD><TD><font color="#0CD448"><b>Nombre : </b></font></TD><TD>
<?php
//Construction de la liste du nombre de prestation de dépannage
$prestation ="1";
echo "<select name = 'config_nbre_dépannage'>\n"; //Pour le fichier de traitement
for ($n=1;$n<=5; $n++) //Boucle sur le nombre de prestations de dépannage
{
echo "<option value =$n";
if ($prestation == $n) //Sélection du numéro de la configuration sélectionné
{
echo " selected";
}
echo "> $Config_Nbre[$n]\n"; //Affichage du tableau du nbre de prestations
}
echo "</select>\n";
?>
</TD></TR>
</TABLE>
<TABLE BORDER = 0 ALIGN="center">
<?php
echo "<br>";
echo "<tr>
<td colspan ='4' style = 'text-align : center'>
<input type = 'submit' value = 'Envoi des données'>";
echo "</td></tr></table></form>";
?>
</TABLE>
</body></html> |
Partager