| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/CAR/ |
Upload File : |
<?php
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);
?>
<?php
include("dbconfig.php");
if ( $cmdSubmit == "Submit" )
{
if ( empty( $regist ) )
{
echo "<script language='JavaScript'>";
echo "alert('ไม่ได้กรอกทะเบียน');";
echo "history.back(1);";
echo "</script>";
exit() ;
}
// ป้องกันการกรอกแท็ก HTML จากผู้ใช
$name = htmlspecialchars($name);
$place = htmlspecialchars($place);
$pwd = htmlspecialchars($pwd);
// ป้อนกันการเกิด error ของ sql เมื่อ user ป้อน เครื่องหมาย "-" และ '-'
$name = addslashes($name);
$place = addslashes($place);
$pwd = addslashes($pwd);
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$sql = "update car set regist = '$regist',status= '$status',type = '$type' where id = '$id' " ;
$result = mysql_query($sql ) ;
if (!$result)
{
echo("เก็บเข้าฐานข้อมูลไม่ได้" . mysql_error() );
exit;
}
else
{
echo "<font size=3>บันทึกข้อมูลเรียบร้อยแล้ว <br>";
}
}
?>
<html>
<head>
<title>แก้ไขรถยนต์</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<LINK href="style.css" rel=stylesheet>
<STYLE type=text/css>
a:link{color:black;text-decoration:none;font-family:ms sans serif;}
a:visited{color:black;text-decoration:none;font-family:ms sans serif;}
a:hover{color:red;text-decoration:none;font-family:ms sans serif;}
td{font-size:10pt;font-family:ms sans serif;}
</STYLE>
<script language="JavaScript1.2">
<!--
/*
Auto Maximize Window Script- By Nick Lowe (nicklowe@ukonline.co.uk)
*/
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layersdocument.getElementById) {
if (top.window.outerHeight<screen.availHeighttop.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>
</head>
<body>
<TABLE height=82 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="BACKGROUND-COLOR: #f0f7ff" colSpan=2></TD>
</TR>
<TR bgColor=#c7d2e7>
<TD class=thwbold width="35%" height=25>
</TD>
<TD class=thsans vAlign=center align=right bgColor=#c7d1e7 height=25><A
href=""><IMG height=18
alt="" src="../images/youraccount.gif" width=18
align=absMiddle border=0></A> <A
href=""></A> <A
href=""><IMG height=18 alt=Help!
src="../images/q.gif" width=18 align=absMiddle border=0></A> <A href=""></A>
<IMG height=18
alt="" hspace=3 src="../images/cart.gif" width=18
align=absMiddle border=0><A
href=""></A> </TD>
</TR>
<TR>
<TD style="BACKGROUND-COLOR: black" colSpan=2></TD>
</TR>
<TR>
<TD style="BACKGROUND-COLOR: #f0f8ff" colSpan=2></TD>
</TR>
<TR vAlign=center bgColor=#216289>
<TD class=thwbold colSpan=2 height=21> <TABLE height="95%" cellSpacing=0 cellPadding=1 width="99%" align=center
border=0>
<TBODY>
<TR>
<TD width="10%" height="22"
align=middle><SPAN class=thsans2
id=n1><a href="index.php">หน้าแรก</a></SPAN></TD>
<TD
align=middle width="13%"> </TD>
<TD
align=middle width="10%"> </TD>
<TD
align=middle width="10%"> </TD>
<TD
align=middle width="14%"><SPAN
class=thsans2 id=n5></SPAN></TD>
<TD
align=middle width="16%"> </TD>
<TD
align=middle width="20%"><A
class=no_de href=" "></A><SPAN
class=thsans2 id=n5></SPAN></TD>
<TD class=thtahomasmall
align=middle width="7%"> </TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD style="BACKGROUND-COLOR: black; heigth: 1"
colSpan=2></TD>
</TR>
</TBODY>
</TABLE>
<?php
mysql_select_db($__db__);
mysql_query(" SET NAMES 'tis620'; ");
$lquery="select * from car where regist = '$regist'";
$lresult=mysql_query($lquery);
while ($lobject = mysql_fetch_object($lresult))
{
$id = $lobject ->id ;
$type = $lobject ->type ;
$status = $lobject ->status ;
$regist = $lobject -> regist ;
}
?>
<form name="form1" method="post" action="edit_car.php">
<TABLE cellSpacing=0 cellPadding=3 width="98%" align=center border=0>
<TBODY>
<TR>
<TD width="20%" height="126" vAlign=top> </TD>
<TD vAlign=top width="60%"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="100%" colSpan=2> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="91%"><IMG height=15 src="picture/home.gif"
width=16 align=absMiddle border=0> <SPAN
class=sidenev><font color="black">แก้ไขรายละอียดรถยนต์</font></SPAN></TD>
<TD width="9%" align=right><font color=#c7d2e7> </font>
<img
src="../images/maximize_button.gif"
name=open width=12 height="12" style="CURSOR: hand"> <img
src="picture/close_button.gif"
name=close width=12 height="12" style="CURSOR: hand"></TD>
</TR>
</TBODY>
</TABLE>
<TABLE width="100%" border=0>
<TBODY>
<TR>
<TD
style="BACKGROUND-IMAGE: url(pointsmall.gif); BACKGROUND-REPEAT: repeat-x"></TD>
</TR>
</TBODY>
</TABLE>
<DIV class=thtahomasmall
style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px"
align=right> </DIV>
<DIV id=news_newyear
style="BORDER-RIGHT: #c7d2e7 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #c7d2e7 1px solid; PADDING-LEFT: 3px; MARGIN-BOTTOM: 3px; PADDING-BOTTOM: 3px; BORDER-LEFT: #c7d2e7 1px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #c7d2e7 1px solid; BACKGROUND-COLOR: #f0f8ff">
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="14%">ทะเบียน</td>
<td width="86%"> <font size="2" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">
<input name="regist" type="text" id="pwd" value="<? echo $regist ;?>">
<input name="id" type="hidden" id="id" value="<? echo $id ; ?>">
</font></td>
</tr>
<tr>
<td height="28">ประเภท</td>
<td><select name="type" id="type">
<option value="<? echo $type ;?>"><? switch ($type)
{
case "1" ;
{ echo "รถยนต์ทั่วไป" ;
break ;
}
case "2" ;
{ echo "รถรีเฟอร์" ;
break ;
}
case "3" ;
{ echo "รถตู้" ;
break ;
}
}
?></option>
<option value="1">รถยนต์ทั่วไป</option>
<option value="2">รถรีเฟอร</option>
<option value="3">รถตู้</option>
</select> </td>
</tr>
<tr>
<td height="28">สถานะ</td>
<td><select name="status" id="status">
<option value="<? echo $status ;?>"><?
switch ($status)
{
case "1" ;
{ echo "ปกติ" ;
break ;
}
case "2" ;
{ echo "ซ่อม / เสีย" ;
break ;
}
case "3" ;
{ echo "จำหน่าย" ;
break ;
}
}
?></option>
<option value="1">ปกติ</option>
<option value="2">เสีย/ซ่อม2</option>
<option value="3">จำหน่าย</option>
</select>
</td>
</tr>
<tr>
<td height="28"> </td>
<td><input name="cmdSubmit" type="submit" id="cmdSubmit2" value="Submit"></td>
</tr>
</table>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
<BR> </TD>
</TR>
</TBODY>
</TABLE>
</form>
</body>
</html>