-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.php
365 lines (331 loc) · 7.94 KB
/
report.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
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
<?php
session_start();
if(!session_is_registered(myusername)){
header("location:index.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PROJECT REPORT SUMEDANG</title>
<style type="text/css">
body{
margin:0;
padding:0;
background : #33A1DE
line-height: 1.5em;
}
b{font-size: 110%;}
em{color: red;}
#maincontainer{
width: 1150px; /*Width of main container*/
margin: 0 auto; /*Center container on page*/
}
.logo {
float: left;
height: 76px;
width: 60px;
margin: 0px;
}
.nmlogo {
float: right;
font-family: Verdana, Geneva, sans-serif;
font-size: 16px;
margin-top: 20px;
padding-right: 5cm;
}
#topsection{
height: 100px; /*Height of top section*/
}
#topsection h1{
margin: 0;
}
#contentwrapper{
float: left;
width: 100%;
}
#contentcolumn{
/*margin-left: 200px; Set left margin to LeftColumnWidth*/
float: left;
width: 1150px; /*Width of left column*/
margin-left: 0px; /*Set left margin to -(MainContainerWidth)*/
background: #33A1DE;
}
#leftcolumn{
float: left;
width: 200px; /*Width of left column*/
margin-left: -840px; /*Set left margin to -(MainContainerWidth)*/
background: #C8FC98;
}
#footer{
clear: left;
width: 100%;
background: #33A1DE;
text-align: center;
padding: 4px 0;
}
#footer a{
color: #FFF;
}
.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
margin-top: 0;
}
table,td,th
{
border:1px solid #E0EEEE;
}
table
{
width:100%;
}
th
{
height:50px;
}
#nav-menu ul
{
list-style: none;
padding: 0;
margin: 0;
}
#nav-menu li
{
float: left;
margin: 0 0.15em;
}
#nav-menu li a
{
background: url('http://localhost/report2/css-nav.gif') #fff bottom left repeat-x;
height: 2em;
line-height: 2em;
float: left;
width: 9em;
display: block;
border: 0.1em solid #dcdce9;
color: #33A1DE;
text-decoration: none;
text-align: center;
}
#nav-menu li a:hover
{
text-decoration: underline;
}
/* Hide from IE5-Mac \*/
#nav-menu li a
{
float: none
}
/* End hide */
#nav-menu
{
width:1150px
}
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<script language='JavaScript'>
function confirm_entry()
{
var yes=confirm('Are you sure you want to submit the form?');
if (yes)
return true ;
else
alert("You decided to not submit the form!");
return false ;
}
</script>
</head>
<body>
<div id="maincontainer">
<div id="topsection"> <div class="innertube">
<div class="logo"><img src="http://111.221.40.153/test/NOKIA.JPG" width="150" height="90" /></div>
<div class="nmlogo"><h1>Project Report Sumedang</h1></div>
</div></div>
<div id="nav-menu">
<ul>
<li><a href="http://111.221.40.153/report2/report.php">Input Report</a></li>
<li><a href="http://111.221.40.153/report2/tampil.php">View Report</a></li>
<li><a href="#">Edit Report</a></li>
<li><a href="#">Download Report</a></li>
<li><a href="http://111.221.40.153/report2/logout.php">Logout</a></li>
</ul>
</div>
<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube"><form action="input.php" name="formfrmAdd" method="post" onsubmit="return confirm_entry();" >
Total Report :
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<?
for($i=1;$i<=1000;$i++)
{
if($_GET["Line"] == $i)
{
$sel = "selected";
}
else
{
$sel = "";
}
?>
<option value="<?=$_SERVER["PHP_SELF"];?>?Line=<?=$i;?>" <?=$sel;?>><?=$i;?></option>
<?
}
?>
</select>
<br>
</br>
<table id="test">
<tr>
<!--<th width="198"> <div align="center">GA ID </div></th>//-->
<th><div>GA NAME </div></th>
<th><div>FDC DATE </div></th>
<th><div>PROJECT FILE </div></th>
<th><div>ACTIVITY </div></th>
<th><div>HOUR </div></th>
<th><div>PLOT ID </div></th>
<th><div>CAR MILEAGE </div></th>
<th><div>STATUS </div></th>
<th><div>COMMENT </div></th>
</tr>
<?
$line = $_GET["Line"];
if($line == 0){$line=1;}
for($i=1;$i<=$line;$i++)
{
?>
<tr>
<td><div><select name="txtGaName<?=$i;?>"></div>
<option value="0" >
<option value="Arie Febrianto" >Arie Febrianto
<option value="Diensa Refranto" >Diensa Refranto
<option value="Ika Rahayu" >Ika Rahayu
<option value="Mohammad Rezi" >Mohammad Rezi
<option value="Vindy Triany" >Vindy Triany
<option value="other">Other
</select>
</td>
<td>
<?
$today = date("Y-m-d");
?>
<div><select name="txtFDCDate<?=$i;?>"></div>
<option value="<?echo $today;?>" ><?echo $today;?></option>
</select>
</td>
<td><input type="text" name="txtProjectFile<?=$i;?>"></td>
<td>
<div><select name="txtActivity<?=$i;?>"></div>
<option value="" > </option>
<option value="FDC NAV AND POI" >FDC NAV AND POI</option>
<option value="FDC DOWNTIME" >FDC DOWNTIME</option>
<option value="FDC PREPARATION" >FDC PREPARATION</option>
<option value="FDC POSPROCESSING" >FDC POSPROCESSING</option>
<option value="FDC QIL" >FDC QIL</option>
<option value="FDC TRAVEL" >FDC TRAVEL</option>
</select>
</td>
<td>
<div><select name="txtHour<?=$i;?>"></div>
<option value="0" > </option>
<option value="0.5" >0.5</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="2.5" >2.5</option>
<option value="3" >3</option>
<option value="3.5" >3.5</option>
<option value="4" >4</option>
<option value="4.5" >4.5</option>
<option value="5" >5</option>
<option value="5.5" >5.5</option>
<option value="6" >6</option>
<option value="6.5" >6.5</option>
<option value="7" >7</option>
<option value="7.5" >7.5</option>
<option value="8" >8</option>
<option value="8.5" >8.5</option>
<option value="9" >9</option>
<option value="9.5" >9.5</option>
<option value="10" >10</option>
<option value="10.5" >10.5</option>
<option value="11" >11</option>
<option value="11.5" >11.5</option>
<option value="12" >12</option>
<option value="12" >12.5</option>
</select>
</td>
<?
//Select info from MySQL
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="gisservicepower2012"; // Mysql password
$db_name="project_report"; // Database name
$tbl_name="plot_sumedang"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$query = "SELECT grid FROM plot_sumedang";
$result = mysql_query($query);
?>
<td>
<div><select name="txtPlotid<?=$i;?>"></div>
<?
//for each row we get from mysql, echo a form input
while ($row = mysql_fetch_array($result)) {
echo "<option value=\"$row[grid]\">$row[grid]</option>\n";
}
?>
</select>
</td>
<td><input type="text" name="txtCarMileage<?=$i;?>"></td>
<td>
<div><select name="txtStatus<?=$i;?>"></div>
<option value="0" ></option>
<option value="10%" >10%</option>
<option value="15%" >15%</option>
<option value="20%" >20%</option>
<option value="25%" >25%</option>
<option value="30%" >30%</option>
<option value="35%" >35%</option>
<option value="40%" >40%</option>
<option value="45%" >45%</option>
<option value="50%" >50%</option>
<option value="55%" >55%</option>
<option value="60%" >60%</option>
<option value="65%" >65%</option>
<option value="70%" >70%</option>
<option value="75%" >75%</option>
<option value="80%" >80%</option>
<option value="85%" >85%</option>
<option value="90%" >90%</option>
<option value="95%" >95%</option>
<option value="100%" >100%</option>
</select>
</td>
<td align="left"><input type="text" name="txtComment<?=$i;?>"></td>
</tr>
<?
}
?>
</table>
<br>
</br>
<input type="submit" name="submit" value="submit">
<input type="hidden" name="hdnLine" value="<?=$i;?>">
<!--<a href='php_mysql_multiple_insert3.php'>View Your Report : </a></td>-->
</form>
</div>
</div>
</div>
<div id="footer">Copyright <a href="http://kernel32dl.blogspot.com/">©</a> 2012 | Project Report Sumedang. All Rights Reserved.</div>
</div>
</body>
</html>