!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/mis/eassess_OLD/class/   drwxr-xr-x
Free 50.99 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:     clsEsa_ResultRQPj.php (4.64 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class ResultRQPj extends clsDB{

    var 
$result;

    var 
$rsRQPjid;
    var 
$doPjid;
    var 
$sectionRQid;
    var 
$RQid;
    var 
$point;

    var 
$xbar;
    var 
$sd;
    var 
$section;
    var 
$per;
    var 
$num;

    function 
ResultRQPj(&$c){
        
$this->c=$c->c;
        
$this->DB=$c->db;
    }

    function 
GetNextCode(){
        
$this->SetQuery("select max(rsRQPjid) as num from ea_ResultRQPj");
        if (
$result=$this->GetResult()) {
            return 
$result['num']+1;
        }
    }

    function 
Save(){
    
//--ข้อมูลในอ๊อบเจ๊กเป็นข้อมูลใหม่หรือข้อมูลเดิม --1:ข้อมูลใหม่  2:ข้อมูลเดิม
        
if ($this->status==1){
            
//uncomment a line below if your table use ID as running number
            
$this->resultRQid=$this->GetNextCode();
            
$sql "insert into ea_ResultRQPj values(
                '$this->rsRQPjid',
                '$this->doPjid',
                '$this->sectionRQid',
                '$this->RQid',
                '$this->point'
                )"
;
        }else {
            
$sql "update ea_ResultRQPj set 
                doPjid='$this->doPjid', 
                sectionRQid='$this->sectionRQid', 
                RQid='$this->RQid', 
                point='$this->point' 
                where rsRQPjid='$this->rsRQPjid'"
;
        }
        return 
$this->Dml($sql);
    }

    function 
GetRecord(){
        if (
$this->result $this->GetResult()) {
            
$this->rsRQPjid $this->result['rsRQPjid'];
            
$this->doPjid $this->result['doPjid'];
            
$this->sectionRQid $this->result['sectionRQid'];
            
$this->RQid $this->result['RQid'];
            
$this->point $this->result['point'];
            
$this->xbar $this->result['xbar'];
            
$this->sd $this->result['sd'];
            
$this->per $this->result['per'];
            
$this->num $this->result['num'];
            return 
1;
        }else {
            return 
0;
        }
    }

    function 
RSXbarSD($acadYear$semester$assid$defineid$pjid$stdid$RQid$sectionRQid){
        
$cond '';
        
$cond.= ($defineid!='%')? " AND df.defineid = $defineid" '' ;
        
$cond.= ($pjid!='%')? " AND da.pjId = $pjid" '' ;
        
$cond.= ($stdid!='%')? " AND da.stdId = $stdid" '' ;
        
$cond.= ($RQid!='%')? " AND rrq.RQid = $RQid" '' ;
        
$cond.= ($sectionRQid!='%')? " AND rrq.sectionRQid = $sectionRQid" '' ;
        
$sql "
            SELECT (r1.xbar/r2.score)*100 AS per, r1.xbar AS xbar, r1.sd AS sd
            FROM
            (
                SELECT rrq.sectionRQid, avg( point ) AS xbar,  STDDEV(point) AS sd
                FROM DefineAssessment df
                INNER JOIN ea_DoProject da ON df.defineid = da.defineid
                INNER JOIN ea_ResultRQPj rrq ON rrq.doPjid = da.doPjid
                WHERE df.acadYear = '$acadYear'
                AND df.semester = '$semester'
                AND df.assid = '$assid'
                $cond
                GROUP BY rrq.RQid, rrq.sectionRQid
            )r1,(
                SELECT MAX(score) AS score
                FROM HeaderQuestion hq
                INNER JOIN DetailScore ds ON ds.Hsid = hq.Hsid
                WHERE hq.assid = '$assid'
            )r2 
            "
;
        if (
$this->SetQuery($sql)){ 
            return 
1;
        }else {
            return 
0;
        }
    }

    function 
CountPoint($acadYear$semester$assid,$xRQid,$defineid,$pjid,$stdid,$xscore){
        
$cond '';
        
$cond.= ($defineid!='%')? " AND df.defineid = $defineid" '' ;
        
$cond.= ($pjid!='%')? " AND da.pjId = $pjid" '' ;
        
$cond.= ($stdid!='%')? " AND da.stdId = $stdid" '' ;
        
$this->SetQuery("select count(point) as num 
                    FROM DefineAssessment df
                    INNER JOIN ea_DoProject da ON df.defineid = da.defineid
                    INNER JOIN ea_ResultRQPj rrq ON rrq.doPjid = da.doPjid
                    WHERE df.acadYear = '$acadYear'
                    AND df.semester = '$semester'
                    AND df.assid = '$assid'
                    AND rrq.RQid = '$xRQid' 
                    AND point = '$xscore' 
                    $cond "
);
        
$result $this->GetResult();
        return 
$result['num'];
    }

    function 
SearchPointByDoidSectionRQid($xdoid,$xsectionRQid){
        if (
$this->SetQuery("select point  
                    from ea_ResultRQPj
                    where  doPjid = '$xdoid' 
                    and  sectionRQid = '$xsectionRQid' 
                    order by RQid"
)){ 
            return 
1;
        }else {
            return 
0;
        }
    }
}
?>

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