-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert.php
204 lines (175 loc) · 6.46 KB
/
insert.php
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
<!DOCTYPE html PUBLIC "-W3C/DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf8_spanish_ci">
<meta name="viewport" content="initial-scale=1.0">
<title>Insertar</title>
<link rel="stylesheet" href="includes2/standardize.css">
<link rel="stylesheet" href="includes2/index-grid.css">
<link rel="stylesheet" href="includes2/styles.css">
<SCRIPT language=JavaScript type=text/javascript src="reloadInsert.js"></script>
</head>
<?php require "mysqli_connect.php"; ?>
<?php require "queries.php"; ?>
<body class="body index clearfix">
<header class="_container clearfix">
<p class="logo logo-1">Importaciones - Exportaciones</p>
<section class="main main-1 clearfix">
<div class="acontainer clearfix">
<?php
echo"
<form method=post class='db clearfix' name=f1 action='searchAction.php'>";
?>
<!------ORIGEN LABELS----->
<label class='form-label form-label-1'>Pais</label>
<label class='form-label form-label-2'>Ciudad</label>
<label class='form-label form-label-3'>Puerto </label>
<p class='origen'>Origen</p>
<?php
#First Dropdown ---pais origen---
echo"
<select class='pais1' name='pais1' onchange=\"reload(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer2) as $noticia2) {
if($noticia2['pais_id']==@$pais1){
echo "<option selected value='$noticia2[pais_id]'>$noticia2[name]</option>"."<BR>";
} else {
echo "<option value='$noticia2[pais_id]'>$noticia2[name]</option>";
}
}
echo "</select>";
?>
<?php
#Second Dropdown ---ciudad origen---
echo "
<select class='ciudad1' name='ciudad1' onchange=\"reload3(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer) as $noticia) {
if($noticia['ciudad_id']==@$ciudad1){
echo "<option selected value='$noticia[ciudad_id]'>$noticia[name]</option>"."<BR>";
} else {
echo "<option value='$noticia[ciudad_id]'>$noticia[name]</option>";
}
}
echo "</select>";
?>
<?php
#Third Dropdown ---puerto origen---
echo "
<select class='puerto1' name='puerto1' onchange=\"reload4(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer3) as $noticia) {
if($noticia['puerto_id']==@$puerto1){
echo "<option selected value='$noticia[puerto_id]'>$noticia[name]</option>"."<BR>";
} else {
echo "<option value='$noticia[puerto_id]'>$noticia[name]</option>";
}
}
echo "</select>";
?>
<!------ORIGIN LABELS----->
<label class="form-label form-label-4">Pais</label>
<label class="form-label form-label-5">Ciudad</label>
<label class="form-label form-label-6">Puerto </label>
<p class="destino">Destino</p>
<?php
#Fourth Dropdown ---pais desino---
echo "
<select class='pais2' name='pais2' onchange=\"reload5(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer4) as $noticia2) {
if($noticia2['pais_id']==@$pais2){
echo "<option selected value='$noticia2[pais_id]'>$noticia2[name]</option>"."<BR>";
} else {
echo "<option value='$noticia2[pais_id]'>$noticia2[name]</option>";
}
}
echo "</select>";
?>
<?php
#Fifth Dropdown ---ciudad destino---
echo "
<select class='ciudad2' name='ciudad2' onchange=\"reload6(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer5) as $noticia) {
if($noticia['ciudad_id']==@$ciudad2){
echo "<option selected value='$noticia[ciudad_id]'>$noticia[name]</option>"."<BR>";
} else {
echo "<option value='$noticia[ciudad_id]'>$noticia[name]</option>";
}
}
echo "</select>";
?>
<?php
#Sixth Dropdown ---puerto destiono---
echo "
<select class='puerto2' name='puerto2' onchange=\"reload7(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer6) as $noticia) {
if($noticia['puerto_id']==@$puerto2){
echo "<option selected value='$noticia[puerto_id]'>$noticia[name]</option>"."<BR>";
} else {
echo "<option value='$noticia[puerto_id]'>$noticia[name]</option>";
}
}
echo "</select>";
?>
<!--LOGISTICA LABELS-->
<label class="form-label form-label-7">Tipo</label>
<label class="form-label form-label-8">Proveedor</label>
<p class="logistica">Logistica</p>
<?php
#Seventh Dropdown ---logistica---
echo"
<select class='logistica_tipo' name='logistica' onchange=\"reload8(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer7) as $noticia2) {
if($noticia2['logistica_id']==@$logistica){
echo "<option selected value='$noticia2[logistica_id]'>$noticia2[name]</option>"."<BR>";
} else {
echo "<option value='$noticia2[logistica_id]'>$noticia2[name]</option>";
}
}
echo "</select>";
?>
<!--PROVEEDOR LABEL-->
<?php
#Eigth Dropdown ---proveedor---
echo "
<select class='logistica_prov' name='proveedor' onchange=\"reload9(this.form)\">
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer8) as $noticia) {
if($noticia['proveedor_id']==@$proveedor){
echo "<option selected value='$noticia[proveedor_id]'>$noticia[name]</option>"."<BR>";
} else {
echo "<option value='$noticia[proveedor_id]'>$noticia[name]</option>";
}
}
echo "</select>";
?>
<!--CONTENEDOR LABEL-->
<label class="form-label form-label-9">Nombre</label>
<p class="contenedor">Contenedor</p>
<?php
echo "
<select class='contenedor_nombre' name='contenedor'>
<option value=''>Seleccionar</option>";
foreach ($dbo->query($quer9) as $noticia) {
if($noticia['contenedor_id']==@$contenedor){
echo "<option selected value='$noticia[contenedor_id]'>$noticia[name]</option>"."<BR>";
} else {
echo "<option value='$noticia[contenedor_id]'>$noticia[name]</option>";
}
}
echo "</select>";
?>
<label class="form-label form-label-11">Precio</label>
<input class="precio" name="precio" type="text">
<button class="submit">Insertar</button>
</form>
<div class="line"></div>
</div>
</section>
</header>
</body>
</html>