Viewing file: checkStatusDoc.php (4.69 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../link/function.php"; include_once "../class/clsDocType.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsDocLineConfig.php"; include_once "../class/clsPerson.php"; $oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDt = new doctype($oC); $oDP = new Department($oC); $oDlc = new DocLineConfig($oC); $oPS = new person($oC);
?> <html> <head> <script language="javascript" src="../source/calendarDateInput.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" align="center"> <tr><td > <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="checkStatusDoc.php">µÃǨÊͺàÊé¹·Ò§¡ÒÃÊè§Ë¹Ñ§Ê×Í</a> </font> </legend> <form name="ff" target="_blank"> <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse"> <tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>¤é¹ËÒ˹ѧÊ×Í</strong></font></td></tr> <tr><td width="1%"> </td><td width="2%" > </td><td colspan="4">àÅ¢·ÐàºÕ¹˹ѧÊ×Í ¨Ò¡ : <input name="DocTypeNoStart" id="DocTypeNoStart" type="text" size="5"> ¶Ö§ : <input name="DocTypeNoEnd" type="text" size="5" maxlength="23" ></td></tr> <tr><td width="1%"> </td><td width="2%" > </td><td colspan="4">·Õè˹ѧÊ×Í : <input name="DocNo" id="DocNo" type="text" size="20"></td></tr> <tr><td width="1%"> </td><td width="2%" > </td><td colspan="4">àÃ×èͧ : <input name="DocSubject" id="DocSubject" type="text" size="30"></td></tr> <tr><td colspan="6"><hr color="#000099"></hr></td></tr> <tr><td colspan="6"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>àÅ×Í¡ªèǧÇѹ·Õè¢Í§·ÐàºÕ¹˹ѧÊ×Í</strong></font></td></tr> <tr><td width="1%"> </td> <td width="2%" > <input name="checkselectDate" type="checkbox" value="Y"></td> <td width="19%">ÃÒ§ҹµÑé§áµèÇѹ·Õè </td><td width="24%"><script>DateInput('DocDateCreateStart', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td><td width="7%" align="center">¶Ö§</td><td width="47%"><script>DateInput('DocDateCreateEnd', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td></tr> <tr><td colspan="6"><hr color="#000099"></hr></td></tr> <tr><td colspan="6" align="right"><input name="" type="button" value="ÍÍ¡ÃÒ§ҹ" onClick = "if(chkDate()) sendPage(); else return false; "></td></tr> </table> </form></fieldset> </td> </tr> </table> </body> </html> <script language="javascript"> function chkDate(){ f = document.ff; if(f.checkselectDate.checked){ var date1 = f.DocDateCreateStart.value.split("/"); var date2 = f.DocDateCreateEnd.value.split("/"); //Set the two dates date1 = new Date(eval(date1[2]), eval(date1[1]-1), eval(date1[0])); date2 = new Date(eval(date2[2]), eval(date2[1]-1), eval(date2[0])); //Month is 0-11 in JavaScript //Set 1 day in milliseconds var one_day = 1000*60*60*24; //Calculate difference btw the two dates, and convert to days var diff = Math.ceil((date2.getTime()-date1.getTime())/(one_day)); if(diff < 0){ alert("¡ÃسҵÃǨÊͺªèǧ 'Çѹ·ÕèàÃÔèÁµé¹' ¤ÇùéÍ¡ÇèÒ 'Çѹ·ÕèÊÔé¹ÊØ´' !"); return false; }else{ return true; } }else{ return true; } } function sendPage() { var links; var DocSubject=document.ff.DocSubject.value; var DocNo=document.ff.DocNo.value; var DocTypeNoStart=document.ff.DocTypeNoStart.value; var DocTypeNoEnd=document.ff.DocTypeNoEnd.value;
if(document.ff.checkselectDate.checked){ var checkselectDate ="Y"; }else{ var checkselectDate=""; if(DocSubject=="" && DocNo=="" && DocTypeNoStart=="" && DocTypeNoEnd==""){ alert("¡ÃسÒàÅ×Í¡à§×è͹ä¢ã¹¡Òäé¹ËÒ !"); return false; } } if(DocTypeNoEnd==""){ DocTypeNoEnd=DocTypeNoStart; }else if(DocTypeNoStart==""){ DocTypeNoStart=DocTypeNoEnd; }
var yearDoc = 0; var date1 = document.ff.DocDateCreateStart.value; var date2 = document.ff.DocDateCreateEnd.value; filename="printDetailStatusDoc.php"; links = filename+"?DocSubject="+DocSubject+"&DocNo="+DocNo+"&DocTypeNoStart="+DocTypeNoStart+"&DocTypeNoEnd="+DocTypeNoEnd+'&start='+date1+'&end='+date2+"&yearDoc="+yearDoc+"&checkselectDate="+checkselectDate; window.location.href=links;
} function radioSelectType(val){ document.getElementById('RPtype').value=val; } function radioSelectVal(val){ document.getElementById('selectVal').value=val; } </script>
|