001.
<?php
require_once
(
'../../Connections/Myconnect.php'
); ?>
002.
<?php
003.
if
(!function_exists(
"GetSQLValueString"
)) {
004.
function
GetSQLValueString(
$theValue
,
$theType
,
$theDefinedValue
=
""
,
$theNotDefinedValue
=
""
)
005.
{
006.
if
(PHP_VERSION < 6) {
007.
$theValue
= get_magic_quotes_gpc() ?
stripslashes
(
$theValue
) :
$theValue
;
008.
}
009.
010.
$theValue
= function_exists(
"mysql_real_escape_string"
) ? mysql_real_escape_string(
$theValue
) : mysql_escape_string(
$theValue
);
011.
012.
switch
(
$theType
) {
013.
case
"text"
:
014.
$theValue
= (
$theValue
!=
""
) ?
"'"
.
$theValue
.
"'"
:
"NULL"
;
015.
break
;
016.
case
"long"
:
017.
case
"int"
:
018.
$theValue
= (
$theValue
!=
""
) ?
intval
(
$theValue
) :
"NULL"
;
019.
break
;
020.
case
"double"
:
021.
$theValue
= (
$theValue
!=
""
) ? doubleval(
$theValue
) :
"NULL"
;
022.
break
;
023.
case
"date"
:
024.
$theValue
= (
$theValue
!=
""
) ?
"'"
.
$theValue
.
"'"
:
"NULL"
;
025.
break
;
026.
case
"defined"
:
027.
$theValue
= (
$theValue
!=
""
) ?
$theDefinedValue
:
$theNotDefinedValue
;
028.
break
;
029.
}
030.
return
$theValue
;
031.
}
032.
}
033.
034.
035.
mysql_select_db(
$database_Myconnect
,
$Myconnect
);
036.
mysql_query(
"SET NAMES UTF8"
);
037.
$query_Recordset1
=
"SELECT * FROM form_use_car"
;
038.
$Recordset1
= mysql_query(
$query_Recordset1
,
$Myconnect
)
or
die
(mysql_error());
039.
$row_Recordset1
= mysql_fetch_assoc(
$Recordset1
);
040.
$totalRows_Recordset1
= mysql_num_rows(
$Recordset1
);
041.
?>
044.
<head>
045.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
046.
<title>Untitled Document</title>
047.
<style type=
"text/css"
>
048.
body {
049.
background-attachment:fixed;
050.
background-color: #E6E6E6;
051.
color: #CCC;
052.
}
053.
</style>
054.
<script type=
"text/javascript"
>
055.
function
MM_preloadImages() {
056.
var
d=document;
if
(d.images){
if
(!d.MM_p) d.MM_p=
new
Array();
057.
var
i,j=d.MM_p.length,a=MM_preloadImages.arguments;
for
(i=0; i<a.length; i++)
058.
if
(a[i].indexOf(
"#"
)!=0){ d.MM_p[j]=
new
Image; d.MM_p[j++].src=a[i];}}
059.
}
060.
function
MM_swapImgRestore() {
061.
var
i,x,a=document.MM_sr;
for
(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
062.
}
063.
function
MM_findObj(n, d) {
064.
var
p,i,x;
if
(!d) d=document;
if
((p=n.indexOf(
"?"
))>0&&parent.frames.length) {
065.
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
066.
if
(!(x=d[n])&&d.all) x=d.all[n];
for
(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
067.
for
(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
068.
if
(!x && d.getElementById) x=d.getElementById(n);
return
x;
069.
}
070.
071.
function
MM_swapImage() {
072.
var
i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=
new
Array;
for
(i=0;i<(a.length-2);i+=3)
073.
if
((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;
if
(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
074.
}
075.
</script>
076.
</head>
077.
078.
<body >
079.
<table width=
"1503"
height=
"678"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
>
080.
<tr>
081.
<th width=
"1503"
height=
"678"
colspan=
"2"
scope=
"row"
><table width=
"1503"
height=
"749"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
>
082.
<tr align=
"center"
>
083.
<th height=
"400"
colspan=
"8"
align=
"center"
valign=
"bottom"
scope=
"col"
><img src=
"../Photos/Admin_head .png"
width=
"1500"
height=
"400"
/></th>
084.
</tr>
085.
<tr align=
"center"
valign=
"top"
>
086.
<th width=
"150"
height=
"50"
bgcolor=
"#4F2F1F"
scope=
"row"
><a href=
"Report_Admin.php"
onmouseout=
"MM_swapImgRestore()"
onmouseover=
"MM_swapImage('Image11','','../Photos/bt_Ad_report(s).png',1)"
><img src=
"../Photos/bt_Ad_report.png"
name=
"Image11"
width=
"150"
height=
"50"
border=
"0"
id=
"Image11"
/></a><br /> </th>
087.
<th width=
"301"
bgcolor=
"#705347"
scope=
"row"
><a href=
"index_Admin.php"
onmouseout=
"MM_swapImgRestore()"
onmouseover=
"MM_swapImage('Image3','','../Photos/bt_Ad_home(s).png',1)"
><img src=
"../Photos/bt_Ad_home.png"
name=
"Image3"
width=
"300"
height=
"50"
border=
"0"
id=
"Image3"
/></a></th>
088.
<th width=
"301"
bgcolor=
"#705347"
scope=
"row"
><a href=
"request_Admin.php"
onmouseout=
"MM_swapImgRestore()"
onmouseover=
"MM_swapImage('Image4','','../Photos/bt_Ad_use(s).png',1)"
><img src=
"../Photos/bt_Ad_use.png"
name=
"Image4"
width=
"300"
height=
"50"
border=
"0"
id=
"Image4"
/></a></th>
089.
<th width=
"301"
bgcolor=
"#705347"
scope=
"row"
><a href=
"Statuscar1_Admin.php"
onmouseout=
"MM_swapImgRestore()"
onmouseover=
"MM_swapImage('Image5','','../Photos/bt_Ad_statuscar(s).png',1)"
><img src=
"../Photos/bt_Ad_statuscar.png"
name=
"Image5"
width=
"300"
height=
"50"
border=
"0"
id=
"Image5"
/></a></th>
090.
<th width=
"301"
bgcolor=
"#705347"
scope=
"row"
><a href=
"Showemp_Admin.php"
onmouseout=
"MM_swapImgRestore()"
onmouseover=
"MM_swapImage('Image6','','../Photos/bt_Ad_dataCus(s).png',1)"
><img src=
"../Photos/bt_Ad_dataCus .png"
name=
"Image6"
width=
"300"
height=
"50"
border=
"0"
id=
"Image6"
/></a></th>
091.
<th colspan=
"3"
align=
"left"
bgcolor=
"#4F2F1F"
scope=
"row"
><a href=
"Return_Admin.php"
onmouseout=
"MM_swapImgRestore()"
onmouseover=
"MM_swapImage('Image10','','../Photos/bt_Ad_return(s).png',1)"
> <img src=
"../Photos/bt_Ad_return.png"
name=
"Image10"
width=
"150"
height=
"50"
border=
"0"
id=
"Image10"
/></a></th>
092.
</tr>
093.
<tr align=
"center"
valign=
"top"
>
094.
<th height=
"51"
colspan=
"8"
align=
"center"
bgcolor=
"#4F2F1F"
scope=
"row"
><p> </p>
095.
<p>คำขอใช้รถจาก usr ทุกคน</p>
096.
<p> </p>
097.
<form id=
"form1"
name=
"form1"
method=
"post"
action=
"add.php"
>
098.
<table border=
"1"
>
099.
<tr>
100.
<td> </td>
101.
<td>ID_Order</td>
102.
<td>ID</td>
103.
<td>Name</td>
104.
<td>SName</td>
105.
<td>Department</td>
106.
<td>Part</td>
107.
<td>Email</td>
108.
<td>Phone</td>
109.
<td>Type_car</td>
110.
<td>Passenger</td>
111.
<td>Location</td>
112.
<td>Date_use_car</td>
113.
<td>Dateend_use_car</td>
114.
<td>Note_use_for</td>
115.
<td>option</td>
116.
</tr>
117.
<?php
do
{ ?>
118.
<tr>
119.
<td><input type=
"checkbox"
name=
"Check_1"
id=
"Check_1"
/>
120.
<label
for
=
"Check_1"
></label></td>
121.
<td><?php
echo
$row_Recordset1
[
'ID_Order'
]; ?></td>
122.
<td><?php
echo
$row_Recordset1
[
'ID'
]; ?></td>
123.
<td><?php
echo
$row_Recordset1
[
'Name'
]; ?></td>
124.
<td><?php
echo
$row_Recordset1
[
'SName'
]; ?></td>
125.
<td><?php
echo
$row_Recordset1
[
'Department'
]; ?></td>
126.
<td><?php
echo
$row_Recordset1
[
'Part'
]; ?></td>
127.
<td><?php
echo
$row_Recordset1
[
'Email'
]; ?></td>
128.
<td><?php
echo
$row_Recordset1
[
'Phone'
]; ?></td>
129.
<td><?php
echo
$row_Recordset1
[
'Type_car'
]; ?></td>
130.
<td><?php
echo
$row_Recordset1
[
'Passenger'
]; ?></td>
131.
<td><?php
echo
$row_Recordset1
[
'Location'
]; ?></td>
132.
<td><?php
echo
$row_Recordset1
[
'Date_use_car'
]; ?></td>
133.
<td><?php
echo
$row_Recordset1
[
'Dateend_use_car'
]; ?></td>
134.
<td><?php
echo
$row_Recordset1
[
'Note_use_for'
]; ?></td>
135.
<td> </td>
136.
</tr>
137.
<?php }
while
(
$row_Recordset1
= mysql_fetch_assoc(
$Recordset1
)); ?>
138.
</table>
139.
<p> </p>
140.
<p>
141.
<input type=
"submit"
name=
"btn_go"
id=
"btn_go"
value=
"Submit"
/>
142.
</p>
143.
</form>
144.
145.
<p> </p>
146.
<p> </p></th>
147.
</tr>
148.
<tr>
149.
<th height=
"20"
colspan=
"8"
bgcolor=
"#705347"
scope=
"row"
><img src=
"../Photos/Admin_lower.png"
width=
"1500"
height=
"200"
/></th>
150.
</tr>
151.
<tr>
152.
<th height=
"48"
colspan=
"8"
valign=
"top"
scope=
"row"
> </th>
153.
</tr>
154.
</table></th>
155.
</tr>
156.
</table>
157.
<map name=
"Map"
id=
"Map"
>
159.
<area shape=
"rect"
coords=
"422,9,455,20"
href=
"../index.html"
/>
162.
<area shape=
"rect"
coords=
"484,11,528,19"
href=
"#"
/>
163.
<area shape=
"rect"
coords=
"510,395,512,414"
href=
"#"
/>
164.
</map>
165.
166.
<map name=
"Map2"
id=
"Map2"
>
168.
</map>
169.
</body>
170.
</html>
171.
<?php
172.
mysql_free_result(
$Recordset1
);
173.
?>