-
Notifications
You must be signed in to change notification settings - Fork 0
/
historyDetails.php
278 lines (213 loc) · 7.67 KB
/
historyDetails.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
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
<?php
//------------------------------------------------------------------------------
// Author: Denise
// Date : december/2003
//------------------------------------------------------------------------------
//include("dbglobals.inc.php");
include("session_mysql.php");
// Session
session_start();
sess_gc(get_cfg_var("session.gc_maxlifetime"));
include_once("request.class.php");
import_request_variables("gpc");
// Set Language
if (isset($SESSION_LANGUAGE))
$_SESSION['userLang']=$SESSION_LANGUAGE;
else
if (!isset($_SESSION['userLang'])) $_SESSION['userLang']='PT';
require ("history_".$_SESSION['userLang'].".php");
require ("cart_".$_SESSION['userLang'].".php");
//require ("../include/arrays_".$_SESSION['userLang'].".php");
require ("arrays_".$_SESSION['userLang'].".php");
// Globals
$dbcat = $GLOBALS["dbcatalog"];
// Mounting string
$strReqTit = " " . $strReqItem . " " . $reqId;
?>
<html>
<head>
<title><?=$strReqTit?></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Página principal do site da DGI (Divisão de Geração de Imagem)">
<meta name="author" content="Desenvolvimento Web - DGI">
<!-- Estilos -->
<link href="/catalogo/css/bootstrap.css" rel="stylesheet">
<link href="/catalogo/css/style.css" rel="stylesheet">
<link href="/catalogo/css/camera.css" rel="stylesheet">
<link href="/catalogo/css/icons.css" rel="stylesheet">
<!--
O arquivo abaixo define o configuração de cores a serem utilizadas
As opções disponíveis são:
skin-blue.css skin-green.css skin-red.css
skin-bluedark.css skin-green2.css skin-red2.css
skin-bluedark2.css skin-grey.css skin-redbrown.css
skin-bluelight.css skin-khaki.css skin-teal.css
skin-bluelight2.css skin-lilac.css skin-teal2.css
skin-brown.css skin-orange.css skin-yellow.css
skin-brown2.css skin-pink.css
-->
<link href="/catalogo/css/skin-blue.css" rel="stylesheet">
<link href="/catalogo/css/bootstrap-responsive.css" rel="stylesheet">
<script language="javascript">
<!--
function Delnumber(i,j,k,l,m)
{
params = "reqId="+i+"&";
params = params+"NumItem="+j+"&";
params = params+"action="+k+"&";
params = params+"index="+l+"&";
params = params+"ItemStat="+m;
// alert(params);
location.href="historyDetails.php?"+params;
}
-->
</script>
<!--?php include("css.php");?-->
</head>
<body>
<!--
Layout macro do site
As opções são:
boxed Toda estrutura do site encaixada em uma espécie de caixa, possuindo largura
wide Toda estrutura do site utilizando-se de toda a área disponivel, não possuindo margens
-->
<body class="wide" style="background-color:transparent; border-left:thin;border-left-color:#FFF; border-right-width:medium; border-right-color:#C03; border-top:thin; background-size: cover; position: relative; padding: 0px 0 0px; height:100%; padding-bottom:0px;">
<!--
Inicio da área principal
class body
-->
<div class="body" style="background-color:#FFFFFF; border-left:solid thin #FFF;border-left-color:#FFF; border-left-width:thin; border-right:solid thin #FFF;border-right-width:thin; border-right-color:#FFF; border-top:none; border-bottom:none; padding: 0px 0 0px; padding-bottom:0px;">
<div class="row-fluid" style="background-color:#FFFFFF;">
<br>
<center>
<form name="historyDetailsForm" method="POST" action="historyDetails.php">
<table width="50%" border="0" cellspacing="1" class="table table-hover">
<thead>
<tr><th colspan="5" align="left"><?=$strReqTit?></th></tr>
<tr>
<th><?=$strItem?></th>
<th><?=$strInfo?></th>
<th><?=$strMedia?></th>
<th><?=$strPrice?></th>
<th><?=$strReqStatus?></th>
</tr>
</thead>
<tbody>
<?php
if ($GLOBALS["stationDebug"])
{
echo "Session = $PHPSESSID User = ".$_SESSION['userId']." Language = ".$_SESSION['userLang']." <br>\n";
echo "Id cart = " . $ID;
}
// Seacrh the request and requestItens
searchReqByNumber($dbcat, $objReq, '', "", "", $reqId);
//echo " reqId = " . $reqId . " nitems = " . $objReq[0]->nItens;
if ($action == $strDelete and $ItemStat != -1)
{
$objReq[0]->itens[$index]->remove($NumItem,$reqId);
searchReqByNumber($dbcat, $objReq, '', "", "", $reqId);
if ($objReq[0]->nItens == 0) $objReq[0]->removeParc($reqId);
};
$total = 0;
// Search image
for($i=0; $i < $objReq[0]->nItens; $i++)
{
// Getting Status
for($indStatus=1; $indStatus <= $matReqItemStatusInt[0]; $indStatus++)
if($objReq[0]->itens[$i]->status == $matReqItemStatusInt[$indStatus]) break;
$ItemStat = $objReq[0]->itens[$i]->status;
switch ($ItemStat) {
case C:
case D:
case E:
case F:
$ItemStat = -1; // cannot be removed
break;
};
//Searching the scene
$sql = "SELECT * FROM Scene WHERE SceneId='". $objReq[0]->itens[$i]->sceneId."'";
$dbcat->query($sql) or $dbcat->error ($sql);
$itens = $dbcat->numRows();
if ($itens == 0)
die("Erro nas Cenas");
$row = $dbcat->fetchRow();
$dbcat->freeResult($results);
#
# Calculate item price (scene + media)
#
$media = $objReq[0]->itens[$i]->media;
searchMedia($dbcat, $objMedia, $media);
// $price = $objMedia[0]->getPrice($_SESSION['userLang']); // This is the media price
$price += $objReq[0]->itens[$i]->price; // We now add scene price ...
$total += $price; // ... and add to the total request price amount
// Display details
?>
<tr>
<td align="center"><?=$i+1?></td>
<td>
<table class="">
<?php
if(trim($objReq[0]->itens[$i]->productId)!="")
echo "<tr><td align=\"right\">$strProd</td><td></td><td>$prodId[$i]</td>";
?>
<tr><td align="right"><?=$strSatellite?></td><td></td><td><?=$row["Satellite"]?></td>
<tr><td align="right"><?=$strInstrument?></td><td></td><td><?=$row["Sensor"]?></td>
<tr><td align="right"><?=$strPath?></td><td></td><td><?=$row["Path"]?></td>
<tr><td align="right"><?=$strRow?></td><td></td><td><?=$row["Row"]?></td>
<tr><td align="right"><?=$strDate?></td><td></td><td><?=$row["Date"]?></td>
</table>
</td>
<td align="center"><?=$objReq[0]->itens[$i]->media?></td>
<td align="center">R$ <?=$price?></td>
<td align="center"><?=$matReqItemStatus[$indStatus]?></td>
</tr>
<?php
if ($ItemStat != -1)
{
?>
<tr><td align="center" colspan="5">
<input type="button" value="<?=$strDelete?>" name="action" onclick =
"javaScript:Delnumber('<?=$reqId?>','<?=$ItemNum = $objReq[0]->itens[$i]->numItem ?>','<?=$strDelete?>','<?=$i?>','<?=$ItemStat?>')">
</td>
</tr>
<?
};
?>
<?php
}
?>
<tr><td align="center">TOTAL</td><td colspan="2"></td><td align="center">R$ <?=$total?></td><td colspan="1"></td></tr>
<!--
<tr><td align="center" colspan="5">
<input type="button" value="<?=$strClose?>" name="action" ONCLICK="window.close();">
</td>
</tr>
-->
<!-- <input type=hidden name=submitted value=1> -->
<input type=hidden name=reqId value=<?=$reqId?>>
<input type=hidden name=del value="<?=$del?>">
</table>
</form>
<br>
</div>
</div>
<!--
Final da área principal
class body
-->
<!--
Inicio da seção de importação de arquivos e definição de
códigos inline Javascript e jQuery
-->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/catalogo/js/jquery.js"></script>
<script src="/catalogo/js/bootstrap.js"></script>
<script src="/catalogo/js/plugins.js"></script>
<script src="/catalogo/js/custom.js"></script>
<!--
Final da seção de importação de arquivos e definição de
códigos inline Javascript e jQuery
-->
</body>
</html>