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


Viewing file:     searchRepSumDocSendBack.php (9.44 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";
include_once 
"../class/clsDocLinePosition.php";
include_once 
"funct.php";
include_once 
"../link/keyThai.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);
$oDlp = new docLinePosition($oC);

$InputThai=$oSys->SearchByInputThai();
?>
<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="?mm=1">รายงาน</a>
    <img src="../picture/ico3.gif" width="10" border="0" align="absmiddle">รายงานหนังสือที่แจ้งส่งผิด แยกตามหน่วยงานย่อย</font>
    </legend>
        <form name="ff"  target="_blank">
    <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA" style="border-collapse:collapse">
        <? 

                $oDlc
->SearchByKey($DLCID); $oDlc->GetRecord(); 
                
$oDlp->SearchByKey($oDlc->DlpID);  $oDlp->GetRecord();
                if(
$oDlp->Gboss=="Y" || $oDlp->GSeeRepHign=="Y"  || $_SESSION['GroupID']==SearchGroupAdmin() || $oDlp->Gboss2=="Y"){  
                    
$seeAlldept=1;
        
?>
        <tr><td colspan="6" align="center" height="30"><strong>รายงานหนังสือที่ส่งผิด แยกตามหน่วยงานย่อย</strong></td></tr>
        <tr><td>&nbsp;</td></tr>
        <tr><td colspan="6" height="22"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>เลือกหน่วยงาน</strong></font></td></tr>
        <tr><td colspan="6">&nbsp;
                        <select name="deptId" id="deptId">
                      <option value="0">- เลือกหน่วยงาน -</option>
                      <? $oDP->SearchBydeptDateDocGroup($oDP->SearchMaxDocGroup());
                            while(
$oDP->GetRecord()){?>
                      <option value="<? echo $oDP->deptId;?><? if($oDP->deptId==$deptId){   echo "selected";  }?>><? echo $oDP->deptName?></option>
                      <? ?>
                    </select>
        </td></tr>
          <tr>
            <td colspan="6"><hr color="#000099"></hr>
            </td>
          </tr>
        <? }else{    
                if(
$_SESSION['GroupID']==SearchGroupUsers()){
                    
$personId=$oU->userPsCode;
                    
$oPS->SearchByKey($personId); $oPS->GetRecord(); 
                    
$oDP->SearchByKey($oPS->deptId);  $oDP->GetRecord(); 
                    
$deptId=$oDP->deptId;
                }else{
                    
$oDlc->SearchByKey($DLCID); $oDlc->GetRecord(); 
                    
$oDP->SearchByKey($oDlc->deptId);  $oDP->GetRecord(); 
                    
$deptId=$oDP->deptId;
                }
        
?>
        <input name="deptId" type="hidden" value="<? echo $deptId?>">
        <tr>
            <td colspan="6" align="center" height="22"><strong>รายงานหนังสือที่แจ้งส่งผิด แยกตามหน่วยงานย่อย<br>ฝ่าย:: <? echo $oDP->deptName?></strong></td>
          </tr>
          <tr><td>&nbsp;</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%">&nbsp;</td><td width="6%" >&nbsp;&nbsp;<input type="radio" name="selectVal"  id="selectVal1" value="1" checked onClick="radioSelectVal(1)"></td>
            <td colspan="4">ประจำปีปฎิทิน&nbsp;
              <input name="searchY" id="searchY" type="text" size="5" value=<?  echo Date('Y')+543?> onkeypress="return isNumberKey('<? echo $InputThai?>',event)"   >
              </td>
          </tr>
 <tr><td width="1%">&nbsp;</td>
            <td width="6%" >&nbsp;&nbsp;</td>
            <td colspan="4"  height="24">&nbsp;&nbsp;&nbsp;&nbsp;<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>" size="2"><strong>เลือกไตรมาสของวันที่แจ้งส่งผิด</strong></font><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2"> 
              (กรณีต้องการเลือกดูตามไตรมาส)</font></td>
          </tr>        
<tr><td width="1%">&nbsp;</td><td width="6%" >&nbsp;&nbsp;</td>
            <td colspan="4"  height="24">&nbsp;&nbsp;&nbsp;&nbsp;<input name="quarter" id="quarter1" type="radio" value="1" onclick="checkradio(1)">&nbsp;ไตรมาสที่ 1&nbsp;&nbsp;ม.ค. - มี.ค.</td></tr>
    <tr><td width="1%">&nbsp;</td><td width="6%" >&nbsp;&nbsp;</td>
            <td colspan="4"  height="24">&nbsp;&nbsp;&nbsp;&nbsp;<input name="quarter" id="quarter2"  type="radio" value="2" onclick="checkradio(2)">&nbsp;ไตรมาสที่ 2&nbsp;&nbsp;เม.ย. - มิ.ย.</td></tr>
<tr><td width="1%">&nbsp;</td><td width="6%" >&nbsp;&nbsp;</td>
            <td colspan="4"  height="24">&nbsp;&nbsp;&nbsp;&nbsp;<input name="quarter"  id="quarter3" type="radio" value="3" onclick="checkradio(3)">&nbsp;ไตรมาสที่ 3&nbsp;&nbsp;ก.ค. - ก.ย.</td></tr>
<tr><td width="1%">&nbsp;</td><td width="6%" >&nbsp;&nbsp;</td>
            <td colspan="4"  height="24">&nbsp;&nbsp;&nbsp;&nbsp;<input name="quarter" id="quarter4"  type="radio" value="4" onclick="checkradio(4)">&nbsp;ไตรมาสที่ 4&nbsp;&nbsp;ต.ค. - ธ.ค.</td></tr>
            <input name="quartervalue"  type="hidden">                                                          
<tr><td width="1%">&nbsp;</td><td width="6%" >&nbsp;&nbsp;<input type="radio" name="selectVal"  id="selectVal2" value="2" onClick="radioSelectVal(2)"></td><td width="11%">ตั้งแต่วันที่&nbsp;</td><td width="33%"><script>DateInput('DocDateCreateStart', true, 'DD/MM/YYYY','<?php echo getNowDateFw2();?>');</script></td><td width="2%" align="center">ถึง</td><td width="48%"><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('<? echo $seeAlldept?>');  else return false; "></td>
          </tr>
        </table><input name="selecttyped" id="selecttyped" type="hidden">
         </form></fieldset> 
         
</td>
</tr>
</table>
</body>
</html>    
<script language="javascript">
  function chkDate(){
  val=document.getElementById('selecttyped').value;    
    if(val == 2){
        f = document.ff;
        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(p) {
     var links;
    var typeshow;
    quartervalue=document.ff.quartervalue.value;
     if(p==1){
            if(document.ff.deptId.value==0){
                        alert("กรุณาเลือกหน่วยงาน");
                        document.ff.deptId.focus();
                        return false ;
            }
    }    
    
    if(document.getElementById('selecttyped').value == 1 || document.getElementById('selecttyped').value==''){
                if(quartervalue!=""){
                    var yearDoc = 0;
                    if(quartervalue=="1"){
                            var date1 = "01/01/"+(document.ff.searchY.value-543);
                            var date2 = "31/03/"+(document.ff.searchY.value-543);                    
                    }else if(quartervalue=="2"){
                            var date1 = "01/04/"+(document.ff.searchY.value-543);
                            var date2 = "30/06/"+(document.ff.searchY.value-543);                    
                    }else if(quartervalue=="3"){
                            var date1 = "01/07/"+(document.ff.searchY.value-543);
                            var date2 = "30/09/"+(document.ff.searchY.value-543);                    
                    }else if(quartervalue=="4"){
                            var date1 = "01/10/"+(document.ff.searchY.value-543);
                            var date2 = "31/12/"+(document.ff.searchY.value-543);                    
                    }
                }else{
                    var yearDoc = document.ff.searchY.value;
                    var date1 = 0;
                    var date2 = 0;                
                }

    }else if(document.getElementById('selecttyped').value == 2){
                var yearDoc = 0;
                
                var date1 = document.ff.DocDateCreateStart.value;
                var date2 = document.ff.DocDateCreateEnd.value;
    }

        var deptId = document.ff.deptId.value;

            links = "./printRepSumDocSendBackforDept.php?start="+date1+'&end='+date2+"&yearDoc="+yearDoc+"&deptId="+deptId;

    window.open(links,'','toolbar=0, scrollbars=1, location=0, status=1, menubar=1, resizable=1, width=1200, height=620, left = 70, top = 15');
}
function radioSelectType(val){
    document.getElementById('RPtype').value=val;
}
function radioSelectVal(val){
    document.getElementById('selecttyped').value=val;
    if(document.getElementById('selecttyped').value=="2"){
        document.getElementById('quarter1').checked=false;
        document.getElementById('quarter2').checked=false;
        document.getElementById('quarter3').checked=false;
        document.getElementById('quarter4').checked=false;
        document.ff.quartervalue.value="";
        document.getElementById('selecttyped').value="2";
    }else{
        document.getElementById('selecttyped').value="1";
    }
}
function checkradio(v){
    document.getElementById('selecttyped').value="1";
    document.getElementById('selectVal1').checked=true;
    if(document.ff.quartervalue.value==v){
        document.getElementById('quarter'+v).checked=false;
        document.ff.quartervalue.value="";
    }else{
        document.getElementById('quarter'+v).checked=true;
        document.ff.quartervalue.value=v;
    }
}
</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.0058 ]--