<?
$host = "localhost";
$user = "";
$pass = "";
$dbname = "aerothai";
//เชื่อมต่อฐานข้อมูล
$connect = @mysql_connect($host, $user, $pass) or die("<b><font color=red size=3>ติดต่อฐานข้อมูลไม่ได้</b>");
// เลือกฐานข้อมูล
@mysql_select_db($dbname, $connect) or die("<B><font color=red size=3>เลือกฐานข้อมูลไม่ได้</b>");
//เลือกตารางจาก id
$Link = "SELECT * FROM equipment";
$result = mysql_query($Link) or die ("เลือกตารางไม่ได้");
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<script language="javascript1.2" type="text/javascript">
function CheckDate()
{
var subject = document.getElementById('subject').value;
alert(subject);
}
function getListmenu()
{
var objlistbedtype = window.parent.document.getElementById('listmenu');
var objbedtype = window.parent.document.getElementById('menuchoose');
var loop=0;
var lengths=objlistbedtype.length;
for(var i=0;i<lengths;i++)
{
if(objlistbedtype.options!=null)
{
if(objlistbedtype.options.selected)
{
objbedtype.options[objbedtype.length] = new Option(objlistbedtype.options.text,objlistbedtype.options.value);
objlistbedtype.options=null;
Choose2();
}
}
}
}
function Choose2()
{
var listmenu = window.parent.document.getElementById('listmenu');
var menuchoose = window.parent.document.getElementById('menuchoose');
var loop=0;
var lengths=listmenu.length;
for(var i=0;i<lengths;i++)
{
if(listmenu.options!=null)
{
if(listmenu.options.selected)
{
menuchoose.options[menuchoose.length] = new Option(listmenu.options.text,listmenu.options.value);
listmenu.options=null;
Choose2();
}
}
}
}
function RemoveFromList(Obj)
{
var listmenu = window.parent.document.getElementById('listmenu');
var menuchoose = window.parent.document.getElementById('menuchoose');
var loop=0;
var lengths=menuchoose.length;
for(var i=0;i<lengths;i++)
{
if(menuchoose.options!=null)
{
if(menuchoose.options.selected)
{
listmenu.options[listmenu.length] = new Option(menuchoose.options.text,menuchoose.options.value);
menuchoose.options=null;
RemoveFromList(Obj);
}
}
}
}
function savedate()
{
funcMultipleSelectAll('menuchoose');
document.myForm.submit();
}