Viewing file: showlinedocTable.php (10.57 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once("../../class/clsConnection.php");
include_once("../../class/clsDB.php");
include_once "../global.php";
include_once "../link/function.php";
include_once "../link/functionshow.php";
include_once "funct.php";
include_once "../class/clsDocuments.php";
include_once "../class/clsDocReceiveSend.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDoc = new Documents($oC);
$oDoc1 = new Documents($oC);
$oRs = new DocReceiveSend($oC);
$oDoc->SearchByKey($searchDoc); $oDoc->GetRecord();
?>
<html>
<head>
<title>µÃǨÊͺàÊé¹·Ò§¡ÒÃÊè§Ë¹Ñ§Ê×Í</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
</head>
<body><br>
<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> <strong><img src="../picture/showlinedoc2.gif" border="0" > µÃǨÊͺàÊé¹·Ò§¡ÒÃÊè§Ë¹Ñ§Ê×Í </strong>
</font>
<table border="0" align="center" width="98%">
<tr><td align="left"><font size="2"> <strong>·Õè˹ѧÊ×Í
: </strong> <? if($oDoc->DocNo!=""){ echo $oDoc->DocNo; } ?></font></td>
</tr>
<tr><td align="left"><font size="2"> <strong>àÃ×èͧ
: </strong> <? if($oDoc->DocSubject!=""){ echo $oDoc->DocSubject; } ?></font></td></tr>
<tr><td><hr color="#C87904"></td></tr>
</table>
<?
showsteplinedoc($searchDoc,$tab);
?>
<?
showstatussendreceivedoc($searchDoc,$GLOBALS["COLLEGEID"]);?>
<!-- ============================================================================ -->
<!-- === CHAIN ADD 2015/07/29 - àÊé¹·Ò§¢Í§Ë¹Ñ§Ê×Í·ÕèÍéÒ§¶Ö§ =============================== -->
<!-- ============================================================================ -->
<br><hr><br>
<?php
$oDoc1->searchDocRefByDocIDDocName($searchDoc, th2a($oDoc->DocNo), th2a($oDoc->DocSubject));
while($oDoc1->GetRecord()){ //print_r($oDoc1);
?>
<table border="0" align="center" width="98%">
<tr><td align="left"><font size="2"> <strong>·Õè˹ѧÊ×Í
: </strong> <? if($oDoc1->DocNo!=""){ echo $oDoc1->DocNo; } ?></font></td>
</tr>
<tr><td align="left"><font size="2"> <strong>àÃ×èͧ
: </strong> <? if($oDoc1->DocSubject!=""){ echo $oDoc1->DocSubject; } ?></font></td></tr>
<tr><td><hr color="#C87904"></td></tr>
</table>
<?php
// echo $oDoc1->DocID." - ".$oDoc1->DocNo." - ".$oDoc1->DocSubject." - ".$oDoc1->DocDateCreate;
showsteplinedocRef($oDoc1->DocID,$tab);
echo "<br>";
}
?>
<!-- ============================================================================ -->
</body>
</html>
<!-- ============================================================================ -->
<!-- === CHAIN ADD 2015/07/29 - àÊé¹·Ò§¢Í§Ë¹Ñ§Ê×Í·ÕèÍéÒ§¶Ö§ =============================== -->
<!-- ============================================================================ -->
<?php
function showsteplinedocRef($searchDoc,$tab){
// include_once("../../class/clsConnection.php");
// include_once("../../class/clsDB.php");
// include_once "../global.php";
// include_once "../class/clsDocuments.php";
// include_once "../class/clsDocReceiveSend.php";
include_once "../class/clsDocLineConfig.php";
include_once "../class/clsDocLinePosition.php";
include_once "../class/clsPerson.php";
include_once "../class/clsDepartment.php";
//include_once "../link/function.php";
include_once "getPrefix.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
// $oDoc = new Documents($oC);
$oRs0 = new DocReceiveSend($oC);
$oRs1 = new DocReceiveSend($oC);
$oRs2 = new DocReceiveSend($oC);
$oRs3 = new DocReceiveSend($oC);
$oRs4 = new DocReceiveSend($oC);
$oRs5 = new DocReceiveSend($oC);
$oDlc = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oPS = new person($oC);
$oPS2 = new person($oC);
$oDlc1 = new DocLineConfig($oC);
$oDlp1 = new docLinePosition($oC);
$oPS1 = new person($oC);
$oPS2 = new person($oC);
$oDP = new Department($oC);
$oDP1 = new Department($oC);
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=tis-620\">";
if($tab!=""){
$tab=" ".$tab;
}else{
$tab=" ";
}
?>
<table border="0" align="center" width="98%" >
<?
$oRs0->SearchByDocIDDsID3($searchDoc);
if($oRs0->GetRecord()=="1"){
$oDlc->SearchByKey($oRs0->DlcID);
$oDlc->GetRecord();
$oDlp->SearchByKey($oDlc->DlpID);
$oDlp->GetRecord();
$oPS->SearchByKey($oRs0->DrsReceivePersonId);
$oPS->GetRecord();
$oRs5->SearchByDocIDDsID0($searchDoc);
$oRs5->GetRecord();
echo "<tr><td>";
if($tab==" "){
echo "<img src=\"../picture/reg.png\" title=\"\" border=\"0\" >"; //$oRs0->DocID;
echo " <strong>".$oDlp->DlpName." ".$oDP->SearchDeptName($oDlc->deptId)." </strong> <font color=\"#000099\">".GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName."</font> ";
list($DocD,$DocT) = preg_split('[ ]',$oRs0->DrsSendDate);
if($oRs0->DrsSendDate!="0000-00-00 00:00:00"){ if($oRs0->DrsSendEndDoc=="Y"){ echo "[Çѹ·ÕèÂصÔ˹ѧÊ×Í"; }else{ echo "[Çѹ·ÕèÊè§"; } echo ":: ".abbreDate2forCheck($DocD,'/')." ".a2th($DocT)."]"; } echo "<br>";
}
$oRs2->SearchByDrsFromDrsIDcaseps($oRs0->DrsID);
while($oRs2->GetRecord()){
$oPS2->SearchByKey($oRs2->personId);
$oPS2->GetRecord();
echo $tab."<img src=\"../picture/linesub.gif\" title=\"\" border=\"0\" ><font color=\"#000099\">"; //$oRs2->personId;
echo " ".GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName."</font> ";
if($oRs2->DrsMainPs=='Y'){
echo "[¼ÙéÃѺ¼Ô´ªÍºËÅÑ¡]";
}
if($oRs2->DrsSendToPs=='Y'){
$oDP->SearchByKey($oPS2->deptId);
$oDP->GetRecord();
echo "<font color=\"#FF0000\">(".$oDP->deptName." : Ê觴èǹ)</font>";
}
if($oRs2->DrsSendDocNew!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = preg_split('[ ]',$oRs2->DrsSendDocNew);
echo "[Êè§à¾ÔèÁàµÔÁ ".abbreDate2forCheck($DocD2,'/')." ".a2th($DocT2)."]";
}
if($oRs2->DsID=="4" && $oRs2->DrsDocReceiveDate=="0000-00-00 00:00:00"){
echo "[à»Ô´Ë¹Ñ§Ê×Í]";
}else if($oRs2->DsID=="5" && $oRs2->DrsDocReceiveDate=="0000-00-00 00:00:00"){
echo "[à»Ô´á¿éÁ˹ѧÊ×Í]";
}else if($oRs2->DsID=="5" && $oRs2->DrsDocReceiveDate!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = preg_split('[ ]',$oRs2->DrsDocReceiveDate);
echo "[Çѹ·ÕèÃѺ·ÃÒº:: ".abbreDate2forCheck($DocD2,'/')." ".a2th($DocT2)."]";
}
if($oRs2->DrsDelete=='Y'){ echo '[ź˹ѧÊ×Í]'; }
if($oRs2->DrsDeleteAdmin=='Y'){ echo '[ź˹ѧÊ×͡óվÔàÈÉ]'; }
if($oRs2->DsID=="7" && $oRs2->DrsDocReceiveDate!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = preg_split('[ ]',$oRs2->DrsDocReceiveDate);
echo "[Çѹ·Õèá¨é§¡ÒÃÊ觼Դ:: ".abbreDate2forCheck($DocD2,'/')." ".a2th($DocT2)." Ê觡ÅѺ:: ".searchDlcIDPsDept($oRs2->DrsSendBackDlcID)."]";
}
if($oRs2->DrsMainPs=='Y'){
list($DocD3,$DocT3) = preg_split('[ ]',$oRs5->DrsDocDueDate);
if($oRs2->DocRefAnsDate!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = preg_split('[ ]',$oRs2->DocRefAnsDate);
if($DocD2>$oRs5->DrsDocDueDate){
$resultshow='ËÅѧàÇÅÒ¡Ó˹´ '.abbreDate2forCheck($DocD2,'/');
}else if($DocD2==$oRs5->DrsDocDueDate){
$resultshow='µÒÁàÇÅÒ¡Ó˹´ '.abbreDate2forCheck($DocD2,'/');
}else{
$resultshow='¡è͹àÇÅÒ¡Ó˹´ '.abbreDate2forCheck($DocD2,'/');
}
}else{
$resultshow="ÂѧäÁè´Óà¹Ô¹¡ÒÃ";
}
echo "<br>".$tab." <font color=#330000><strong>ÃÐÂÐàÇÅÒ´Óà¹Ô¹¡Òà ::</strong></font> ".abbreDate2forCheck($DocD3,'/')." ".a2th($DocT3);
echo "<br>".$tab." <font color=#330000><strong>ʶҹСÒôÓà¹Ô¹§Ò¹ ::</strong></font> ".$resultshow;
}
echo "<br>";
}
$oRs1->SearchByDrsFromDrsIDcasedept($oRs0->DrsID);
while($oRs1->GetRecord()){
$oDlc1->SearchByKey($oRs1->DlcID);
$oDlc1->GetRecord();
$oDlp1->SearchByKey($oDlc1->DlpID);
$oDlp1->GetRecord();
$oPS1->SearchByKey($oRs1->DrsReceivePersonId);
$oPS1->GetRecord();
echo $tab."<img src=\"../picture/linesub.gif\" title=\"\" border=\"0\" ><img src=\"../picture/reg.png\" title=\"\" border=\"0\" ><strong>"; //echo $oRs1->DocID;
echo " ".$oDlp1->DlpName." ".$oDP1->SearchDeptName($oDlc1->deptId)."</strong>";
if($oRs1->DrsSendDocNew!="0000-00-00 00:00:00"){
list($DocD2,$DocT2) = preg_split('[ ]',$oRs1->DrsSendDocNew);
echo " [Êè§à¾ÔèÁàµÔÁ ".abbreDate2forCheck($DocD2,'/')." ".a2th($DocT2)."] ";
}
if($oRs1->DrsMainDept=='Y'){ echo ' [˹èǧҹÃѺ¼Ô´ªÍºËÅÑ¡]'; }
if($oRs1->DrsReceivePersonId!='0'){
$psreceive=$oRs1->DrsReceivePersonId;
echo " <strong>::</strong> <font color=\"#000099\">".GetPrefix($oPS1->prefixId).$oPS1->fName." ".$oPS1->lName."</font> ";
}
$oRs3->SearchByDrsFromDrsID($oRs1->DrsID);
$oRs3->GetRecord();
if($oRs3->DsID=="1" || $oRs3->DsID=="6" || $oRs3->DsID=="7"){
list($DocD1,$DocT1) = preg_split('[ ]',$oRs3->DrsReceiveDate);
echo "["; if($oRs3->DsID=="1"){ echo "Çѹ·ÕèŧÃѺ"; }else if($oRs3->DsID=="6"){ echo "Çѹ·ÕèäÁèŧÃѺ"; }else if($oRs3->DsID=="7"){ echo "Çѹ·Õèá¨é§¡ÒÃÊ觼Դ"; } echo ":: ".abbreDate2forCheck($DocD1,'/')." ".a2th($DocT1);
if($oRs3->DsID=="7"){ echo " Ê觡ÅѺ:: ".searchDlcIDPsDept($oRs3->DrsSendBackDlcID); }
echo "]";
}
$oRs4->SearchByDocIDDsID3($oRs1->DocID);
if($oRs4->GetRecord()=="1"){
if($oRs4->DrsSendDate!="0000-00-00 00:00:00"){
$pstosend=$oRs4->DrsPsIDCreate;
if(($pstosend!=$psreceive) && $pstosend!='' && $pstosend!='0'){
$oPS2->SearchByKey($pstosend);
$oPS2->GetRecord();
echo " <font color=\"#000099\">".GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName."</font> ";
}
list($DocD3,$DocT3) = preg_split('[ ]',$oRs4->DrsSendDate);
if($oRs4->DrsSendEndDoc=="Y"){ echo "[Çѹ·ÕèÂصÔ˹ѧÊ×Í"; }else{ echo "[Çѹ·ÕèÊè§"; }
echo ":: ".abbreDate2forCheck($DocD3,'/')." ".a2th($DocT3)."]";
}
}
echo "<br>";
showsteplinedocRef($oRs1->DocID,$tab);
}
echo "</td></tr>";
}
?>
</table>
<?
}
?>
<!-- ============================================================================ -->
|