Viewing file: formatDocNo.php (10.55 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/function.php"; include_once "../class/clsDocType.php"; include_once "../class/clsRunningDoc.php"; include_once "../class/clsSysConfig.php"; include_once "../link/keyThai.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC); $oDt = new doctype($oC); $oRd = new runningdoc($oC); $oSys = new sysConfig($oC);
$maxgroup=$oDP->SearchMaxDocGroup(); $oSys->SearchByKey($free); $oSys->GetRecord(); $InputThai=$oSys->SearchByInputThai(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body> <iframe id="addDocNo" name="addDocNo" src="" style="width:$0px;height:0px;border:0"></iframe> <br> <table width=703 align="center"> <tr><td height="150"> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">ЁСґЎТГўйНБЩЕѕЧй№°Т№г№§Т№КТГєГГі</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="?mm=1">µС駤иТЛ№С§КЧНГТЄЎТГ</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">µС駤иТ·ХиЛ№С§КЧНўН§Л№иЗВ§Т№бЕРГЩ»бєє</font></legend><br> <form name="ff" action="processFormatDocNo.php" method="post" target="addDocNo"> <table width="90%" height="22" border="0" align="center"><tr> <? if($s=="1"){ ?> <td align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"><strong> єС№·ЦЎГЩ»бєє·ХиЛ№С§КЧНГТЄЎТГаГХВєГйНВбЕйЗ</strong></font></td> <? } ?> </tr> <tr><td align="right"><a href="printFormatDocNoHTML.php" target="_blank"><img src="../picture/print.gif" width="15" height="14" border="0"></a> <a href="printFormatDocNoex.php" target="_blank"><img src="../picture/ico_excel.gif" title="ѕФБѕм excel" border="0" style="cursor:pointer;"></a> </td></tr> <tr><td> <strong>·ХиЛ№С§КЧНўН§Н§¤мЎГ</strong> <input name="formatDoc" id="formatDoc" type="text" size="17" maxlength="32" value="<? echo a2th($oSys->sysDocNo); ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInput('<? echo $InputThai; ?>','formatDoc')"> <br><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">(ЛЕС§ЁШґ·ХиЛ№С§КЧНўН§Н§¤мЎГ <? echo a2th('Кё 0203.'); ?> гЛйаѕФиБўйНБЩЕаЕў·ХиЛ№С§КЧНўН§Л№иЗВ§Т№µиН·йТВ <br>аЄи№ ·ХиЛ№С§КЧНўН§ ЗКК.ўН№бЎи№ "<? echo a2th('Кё 0203.082'); ?>") </font> </td></tr> </table> <br> <table width="70%" height="22" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_17'];?>"> <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_15'];?>" height="22"> <td width="36%" align="center"><font size="2"><strong>Є№ФґЛ№С§КЧН</strong></font></td> <td width="27%" align="center"><font size="2"><strong>ГЩ»бєє·ХиЛ№С§КЧНКи§<br><a href="#info_docNo">[<img src="../picture/bookmark.gif" border="0"> ґЩГЩ»бєєґйТ№ЕиТ§]</a></strong></font></td> </tr> <? $oDt->RSdoctype(); while($oDt->GetRecord()){ if($oDt->DtP=="1"){ echo "<tr height=22><td colspan=5 align=\"left\"> "; if($oDt->DtPDtID=="0"){ echo "<strong>"; }else{ echo " - "; } echo $oDt->DtName; if($oDt->DtPDtID=="0"){ echo "<strong></td></tr>"; } }else{ ?> <tr height=22> <td align="left"> <? if($oDt->DtPDtID=="0"){ echo "<strong>"; }else{ echo " - "; } echo $oDt->DtName; if($oDt->DtPDtID=="0"){ echo "<strong>"; } ?></td> <td align="center"> <input name="sendNoPrefix[<? echo $oDt->DtID; ?>]" id="sendNoPrefix[<? echo $oDt->DtID; ?>]" type="text" size="17" maxlength="32" value="<? echo $oDt->sendNoPrefix; ?>" onkeypress="return chkNoKey(event)" onKeyUp="CheckInputIdx('<? echo $InputThai; ?>','sendNoPrefix','<? echo $oDt->DtID; ?>')" <? if($Toedit!=1){ echo 'disabled'; }?>> <? if($Toedit!=1){ ?> <input name="sendNoPrefix[<? echo $oDt->DtID; ?>]" id="sendNoPrefix[<? echo $oDt->DtID; ?>]" type="hidden" size="17" maxlength="32" value="<? echo $oDt->sendNoPrefix; ?>" ><? }?> </td> </tr> <? } //show } //while ?> </table> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" > <tr><td align="left"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> (ГРєєдґйЎУЛ№ґГЩ»бєє·ХиЛ№С§КЧНўН§Л№иЗВ§Т№µТБГРаєХВє§Т№КТГєГГідЗйбЕйЗ ¶йТµйН§ЎТГбЎйдў гЛйЎґ»ШиБбЎйдў) <input type="button" name="a" value="бЎйдў" onClick="location.href = 'formatDocNo.php?Toedit=1'"> </font></td></tr> </table> <table width="100%" height="137" border="0" align="center" cellpadding="0" cellspacing="0" ><tr> <td height="135"> <a name="info_docNo"><br> <table width="90%" height="137" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse" > <tr> <td width="45%" height="135"> <table width="100%" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_12'];?>"> <tr> <td width="52%" align="left"><img src="../picture/bookmark.gif" border="0" > <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> <strong>ГЩ»бєє·ХиЛ№С§КЧНўН§Л№иЗВ§Т№</strong></font></td> </tr> <tr height="23"> <td align="left"> <strong>%o ·ХиЛ№С§КЧНўН§Н§¤мЎГ<br> аЄи№ <? echo a2th($oSys->sysDocNo); ?></strong></td> </tr> <tr height="23"> <td align="left"> <strong>%d аЕў·ХиЛ№иЗВ§Т№</strong></td> </tr> <tr height="23"> <td align="left"> <strong>%r аЕў·РаєХВ№Ки§Л№С§КЧН</strong></td> </tr> <tr height="23"> <td align="left"> <strong>%y »Х»СЁЁШєС№ (ѕ.И.)</strong></td> </tr> <tr height="23"> <td align="left"> <strong>%p Л№С§КЧНаЗХВ№ (З.)</strong></td> </tr> </table></td> <td width="55%" > <table width="100%" bgcolor="<?php echo $GLOBALS['COLOR_BG_TABLE_5'];?>"> <tr> <td width="52%" align="left"><img src="../picture/blank1.gif" width="19" height="23" border="0" style="cursor:pointer;" onClick = "editWpDept('<? echo $oDP->deptId; ?>','<? echo $oWG->workGpId; ?>')"> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"> <strong>µСЗНВиТ§ ЎТГЎУЛ№ґГЩ»бєє·ХиЛ№С§КЧНўН§Л№иЗВ§Т№</strong></font></td> </tr> <tr height="23"> <td align="left"> <strong>%o.%d/%p%r</strong> => <? echo a2th($oSys->sysDocNo.".01/З.158"); ?></td> </tr> <tr height="23"> <td align="left"> <strong>%o/%y/%r/%d </strong> => <? echo a2th($oSys->sysDocNo."/2550/158/01"); ?></td> </tr> <tr height="23"> <td align="left"> <strong>%r/%y</strong> => <? echo a2th("158/2550"); ?></td> </tr> <tr height="23"> <td> </td> </tr> <tr height="23"> <td> </td> </tr> </table> </td> </tr> </table></a></td> </tr> </table> <table align="center" width="90%"> <tr><td > </td></tr> <tr><td colspan="2" align="center"> <input type="submit" name="setDocNo" value="єС№·ЦЎ" onClick="return checkFormat();"> <input type="button" name="cancel" value="ВЎаЕФЎ" onClick="location.href = '?mm=1'"> <input type="hidden" name="method" id="method"> </td></tr> </table></form> </fieldset> <table width="704" border="0" align="center"> <tr height=25> <td width="105" align="left" ><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> <strong>ЛБТВаЛµШ : </strong> </font></td> <td width="589" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">- ЎГіХЛ№С§КЧНЄ№Фґгґж·ХидБиБХЎТГгКиўйНБЩЕГЩ»бєє·ХиЛ№С§КЧНўН§Л№иЗВ§Т№ г№ЄиН§ </font> <input name="textfield" id="textfield" type="text" size="5" maxlength="2" disabled> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> </font></td> </tr> <tr> <td width="105"> </td> <td width="589" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> ЁРЛБТВ¶Ц§Л№С§КЧНЄ№Фґ№Сй№дБиБХўйНБЩЕГЩ»бєє·ХиЛ№С§КЧНўН§Л№иЗВ§Т№</font></td> </tr> <tr> <td width="105"> </td> <td width="589" align="left"> <font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">- <img src="../picture/new.gif" border="0" > ¤ЕФЎаѕЧиНєС№·ЦЎаЕў·ХиЛ№иЗВ§Т№ўН§бµиЕРЛ№иЗВ§Т№ (%d)</font></td> </tr> </table> </td> </tr> </table> </body> </html>
<script language="javascript"> function checkFormat(){ if (document.ff.formatDoc.value=="") { alert('ЎГШіТЎГНЎ·ХиЛ№С§КЧНўН§Н§¤мЎГ'); document.ff.formatDoc.focus(); return false ; } var agree=confirm("¤ШіµйН§ЎТГєС№·ЦЎўйНБЩЕ·ХиЛ№С§КЧНКи§гЄиЛГЧНдБи ?"); if (agree){ return true ; }else{ return false ; } } </script>
|