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
| <?php
include "config.php";
$valeur=$_GET['Type'];
if (isset($_COOKIE["ValidUserAdmin"]))
{
?>
<HTML>
<HEAD>
<TITLE>Gestion d'Immatriculation</TITLE>
<LINK REL="STYLESHEET" HREF="style.css">
</HEAD>
<BODY> <?PHP include "header.php"; ?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="95%">
<TR>
<TD VALIGN="TOP">
<?PHP include "leftmenu.php"; ?>
<IMG SRC="images/blank_.gif" WIDTH="180" HEIGHT="1" BORDER="0"></TD>
<TD WIDTH="100%" VALIGN="TOP" ALIGN="LEFT">
<font color="#FF802B">VEHICULE</font>
<?php
if (isset($_POST["op"]) && ($_POST["op"]=="AddProperty"))
{
if (!$userfile) {$userfile = "";}
else {
do_upload();
}
// Enter the details submitted into the Database.
mysql_connect($server, $DBusername, $DBpassword) or die ("$DatabaseError 12");
mysql_select_db($database);
mysql_query( "LOCK TABLES $vehicule_table WRITE" ); # Lock the tables for writing to
mysql_query("INSERT INTO $vehicule_table (
Numero_Serie,
Type,
Declaration_Douane,
Numero_BL,
Gamme,
Version
)
VALUES (
'".$_POST['Numero_Serie']."',
'".$_POST['Type']."',
'".$_POST['Declaration_Douane']."',
'".$_POST['Numero_BL']."',
'".$_POST['Gamme']."',
'".$_POST['Version']."'
)")or die ("$DatabaseError 48");
mysql_query( "UNLOCK TABLES" ); # Unlock the tables
print "<br><br><br>";
print "<br><br><br><p align=\"center\"><b>Le nouveau Véhicule <b>".$_POST['Numero_Serie']."</b>) est ajouté avec succès.</b></p>";
print "<p align=\"center\"><a href=\"vehicule_add.php\">Cliquer ici</a> pour ajouter un autre Véhicule</p>";
print "<br>";
}
else
{
?>
<form method="post" enctype="multipart/form-data">
<input name="op" type="hidden" value="AddProperty">
<input name="DateAdded" type="hidden" value="<?php print "$dateadded"; ?>">
<br>
<TABLE WIDTH="95%" border="0" ALIGN="CENTER" CELLPADDING="5" CELLSPACING="1" BGCOLOR="#000066">
<TR>
<TD width="165" BGCOLOR="#FF802B">
<P><b>Type:</b></P></TD>
<TD BGCOLOR="#f3f3f3">
<P>
<INPUT TYPE="TEXT" NAME="Type" SIZE="20" MAXLENGTH="50" value=<? print $Type;?>> <a href="#" onClick=" window.open('type_edit.php?Type=form&ch=Type','Type','width=500,height=800,scrollbars=0').focus();"><img src="petitbouton.gif" border="0"/></a></P></TD></P></TD>
</TR>
<TR>
<TD width="165" BGCOLOR="#FF802B">
<P><b>Gamme:</b></P></TD>
<TD BGCOLOR="#f3f3f3">
<P>
<INPUT TYPE="TEXT" NAME="Gamme" SIZE="20" MAXLENGTH="50"></P></TD></P></TD>
</TR>
<TR>
<TD width="165" BGCOLOR="#FF802B">
<P><b>Version:</b></P></TD>
<TD BGCOLOR="#f3f3f3">
<P>
<INPUT TYPE="TEXT" NAME="Version" SIZE="20" MAXLENGTH="50"> </a></P></TD></P></TD>
</TR>
<TR>
<TD width="165" BGCOLOR="#FF802B">
<P><b>Numéro de Série:</b></P></TD>
<TD BGCOLOR="#f3f3f3">
<P>
<INPUT TYPE="TEXT" NAME="Numero_Serie" SIZE="20" MAXLENGTH="50"></P></TD>
</TR>
<TR>
<TD width="165" BGCOLOR="#FF802B">
<P><b>Déclaration de douane:</b></P></TD>
<TD BGCOLOR="#f3f3f3">
<INPUT TYPE="TEXT" NAME="Declaration_Douane" SIZE="20" MAXLENGTH="50"value=<? print $Declaration_Douane;?>> <a href="#" onClick=" window.open('expeditiont.php?Declaration_Douane=form&ch=Declaration_Douane','Declaration_Douane','width=400,height=800,scrollbars=0').focus();"><img src="petitbouton.gif" border="0"/></a></P></TD></P></TD>
</TD>
</TR>
<TR>
<TD width="165" BGCOLOR="#FF802B">
<P><b>Numéro BL:</b></P></TD>
<TD BGCOLOR="#f3f3f3">
<P>
<INPUT TYPE="TEXT" NAME="Numero_BL" SIZE="20" MAXLENGTH="50">
</P></TD>
</TR>
</TABLE>
<br>
<p align="center"> <input value="Ajout d'un Véhicule" type="submit" class="textinput" ONCLICK="return confirm('Confirmez vous l'ajout de ce véhicule?');"></p>
</form>
<?php
}
?></TD>
</TR>
</TABLE><?PHP include "footer.php"; ?>
</BODY>
</HTML>
<?php
}
else
{
header("Location: login_error.php");
exit;
}
?> |
Partager