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


Viewing file:     2551-11-11-1.0.01-updateDBReg.php (13.42 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once "template.php";
showHeader();

include_once 
"../class/clsReg_SysSemesterDes.php";
include_once 
"../class/clsReg_StudentMaster.php";
include_once 
"../class/clsReg_Level.php";
include_once 
"../class/clsReg_Program.php";
include_once 
"../class/clsReg_Prefix.php";
include_once 
"../class/clsReg_EnrollItem.php";
include_once 
"../class/clsReg_Class.php";
include_once 
"../class/clsReg_ClassOpenFor.php";
include_once 
"../class/clsReg_ClassInStructor.php";
include_once 
"../class/clsReg_Course.php";
include_once 
"../class/clsReg_Officer.php";
include_once 
"../class/clsReg_ClassTimeTable.php";
include_once 
"../class/clsReg_Day.php";
include_once 
"../class/clsReg_Period.php";
//include_once "../class/clsReg_AcadYearConfig.php";
include_once "../class/clsStudentAssess.php";
include_once 
"../class/clsRegistration.php";
include_once 
"../class/clsClassInStructorAssess.php";
include_once 
"../class/clsOfficerAssess.php";
include_once 
"../class/clsCourseAssess.php";
include_once 
"../class/clsClassAssess.php";
include_once 
"../class/clsClassOpenForAssess.php";
include_once 
"../class/clsUpdateTable.php";
include_once 
"../class/clsTimeTableAssess.php";
include_once 
"../class/clsWeekDateAssess.php";
include_once 
"../class/clsSysStudyTypeAssess.php";
include_once 
"../link/function.php";
include_once 
"../class/clsReg_TimeTable.php";
include_once 
"../class/clsReg_MainExternalPlace.php";
include_once 
"../class/clsReg_SubExternalPlace.php";
include_once 
"../class/clsReg_Building.php";
include_once 
"../class/clsReg_Room.php";
include_once 
"../class/clsReg_WeekDate.php";
include_once 
"../class/clsReg_SysStudyType.php";

?>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<?

if(!$acadYear)
    
$acadYear $GLOBALS["ACADYEAR"];
if(!
$semester)
    
$semester $GLOBALS["SEMESTER"];

$oCR = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_REG'], $GLOBALS['USER_REG'], $GLOBALS['PASSWORD_REG']);

$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);

$msgFlag = -1;

//die ("$oCR, $oCA");
//print_r($oCA);
//print_r($oCR);

include_once("processUpdateDBReg.php");

?>
<!--<form name=formdata method=post>-->
<form name=formdata method=post action="<?php echo $PHP_SELF;?>">
<input type="hidden" name="method" value="<?=$method?>">
<input type="hidden" name="formUpdate" value="<?=$formUpdate?>">

<?
$oUT 
=  new UpdateTable($oCA);
$oUT->RSUpdateTable();

$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semester);
$oSse->GetRecord();

$i 1;

?>
<br>
<table  width=740  align=center  border="0" cellpadding="0" cellspacing="0">
<tr><td>
<fieldset>
        <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php?mm=1">ข้อมูลพื้นฐานของระบบ</a> 
        <img src="../picture/ico3.gif" align="absmiddle" border="0">ปรับปรุงข้อมูลทะเบียนนักศึกษา</font></legend>
<br><br>
  <table width="624" align="center" border="0" cellpadding="0" cellspacing="0">
    <tr > 
      <td width="628" height="27" class="colinput1"> <div align="center"><strong>ปรับปรุงข้อมูลทะเบียนนักศึกษา</strong></div></tr>
  </table>
  <table width="623" border="0" align="center" cellspacing="1"  cellpadding="2" bgcolor = "silver">
    <tr class="TableHeaderBgColor"> 
       <td height="22" align="center">ปรับปรุงข้อมูล</td>
      <td width="103" align="center">ปีการศึกษา</td>
      <td width="109" align="center">ภาคการศึกษา</td>
      <td align="center">วัน-เดือน-ปี / เวลา</td>
      <td align="center">ดำเนินการ</td>
    </tr>
    <? 
while($oUT->GetRecord()){  ?>
   <? if($method == "FormEdit$i"){ ?>
    <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>" > 
      <td width="180" heigth = "22">&nbsp; <span class="fontMark2">*</span> <?echo $oUT->nameTable?></td>
          <td align="center">
            <? if($oUT->upTid == 4){?>
                <input name="inputAcadyear" type="text"  value = "<? echo $acadYear ?>" size="4" maxlength="4"  onKeyPress="if((event.keyCode < 48 && event.keyCode !=  13) || event.keyCode > 57 ){ alert('กรอกได้เฉพาะตัวเลขเท่านั้น !!'); return false; }">
            <? }else{ 
                echo 
"<span class = \"fontMark4\">";
                if(
$oUT->acadYear == '0'){ echo "-"; }else{ echo $oUT->acadYear; }
                echo 
"</span>";
             } 
// end else oUT->upTid == 4?>
          </td>
            <td align="center"> 
              <? if($oUT->upTid == 4){  ?>
                          <select name="selectSemester">
                        <?php
                            $oSse
->RSSysSemesterDes();
                            while(
$oSse->GetRecord()) {
                                if(
$oSse->semester == $semester){
                                    echo 
"<option value=\"$oSse->semester\" selected>$oSse->semesterName</option>";
                                }else{
                                    echo 
"<option value=\"$oSse->semester\">$oSse->semesterName</option>";
                                }
                            } 
// end while oSse ?>
                         </select> 
              <? } else { 
                     echo 
"<span class = \"fontMark4\">";
                        if(
$oUT->semester == '0'){ 
                            echo 
"-"
                        }else{  
                            
$oSse->SearchByKey($oUT->semester);  $oSse->GetRecord(); echo $oSse->semesterName;
                         }
                    echo 
"</span>";
                } 
// ?>            
            </td>
        <?    $oSse->SearchByKey($oUT->semester);
                
$oSse->GetRecord();
        
?>
            <td width="160" align="center"> 
              <? if($oUT->dateUp == '0000-00-00'){ 
                        echo  
"-";
                   }else{
                   
                        echo 
abbreDate2($oUT->dateUp,'/') ;
                        echo 
"(".$oUT->timeUp.")";
                    }
            
?>
            </td>
            <td width="80" align="center"> 
              <? if($oUT->upTid == 4){?>
              <a href ="javascript:doFormMain(<? echo $i ?>,'','')"><img src="../picture/save.gif" alt="บันทึกการอัพเดท" border="0" ></a> 
              <? }else{ ?>
              <a href ="javascript:doFormMain(<? echo $i ?>,'<? echo $acadYear?>','<? $oSse->SearchByKey($semester);  $oSse->GetRecord(); echo $oSse->semesterName ?>')"><img src="../picture/save.gif" alt="บันทึกการอัพเดท" border="0" ></a> 
              <? ?>
            </td>
       </tr>
      <? }else{  // for if method FormEdit ?>
      <tr  class="colinput5"> 
         <td width="180" heigth = "22">&nbsp; <span class="fontMark2">*</span> <?echo $oUT->nameTable?></td>
          <td align="center"><? if($oUT->acadYear == '0'){ echo "-"; }else{ echo $oUT->acadYear; }?></td>
            <td align="center">
                <? if($oUT->semester == '0'){ 
                            echo 
"-"
                        }else{  
                            
$oSse->SearchByKey($oUT->semester);  $oSse->GetRecord(); echo $oSse->semesterName;
                     }
?>
              <? //echo $oSse->semesterName; ?>
            </td>
            <td width="160" align="center">
              <? if($oUT->dateUp == '0000-00-00'){ 
                        echo  
"-";
                   }else{
                   
                        echo 
abbreDate2($oUT->dateUp,'/') ;
                        echo 
"(".$oUT->timeUp.")";
                    }
            
?>
            </td>
            <td width="80" align="center"><a href ="javascript:doFormEdit(<? echo $i ?>)"><img src="../picture/edit1.gif" alt="แก้ไขการอัพเดท" border="0" ></a></td>
        </tr>
      <? // end else ?>

    <? $i++;
//end while oUT


?>
  </table>
        <table width="624" align="center" border="0">
          <tr>
            <td width="618"><font color="<?php echo $GLOBALS["COLOR_FONT_5"];?>" size="2">&nbsp;&nbsp;<a href ="javascript:doFormMain(<? echo $i ?>,'<? echo $acadTmp ?>','<? $oSse->SearchByKey($selectSemesterTmp);  $oSse->GetRecord(); echo $oSse->semesterName;?>')"><img src="../picture/info.png"  border="0" ></a>&nbsp;<u>คำแนะนำ</u> : ควรปรับปรุงข้อมูลหลังจากที่มีการเพิ่มถอนรายวิชาแล้ว </font></td>
          </tr>
        </table>
        <br>
     <table  width=477 height="55"  border="0" align="center" cellpadding="1" cellspacing="1"  bgcolor="#0080C0">
    <? if($msgFlag == 1) { ?>
    <tr align="center" bgcolor="#FFFFFF">
            <td width="580" align="center"><span class="fontMark7">ปรับปรุง<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> 
              "<? echo $nameTable ?>" </font>ในปีการศึกษา<? echo $inputAcadyear ?> 
              <? $oSse->SearchByKey($selectSemester);  $oSse->GetRecord(); echo $oSse->semesterName ?>
              <br>
              </span><span class="fontMark7">
              <? $oUT->SearchByKey($upTid); $oUT->GetRecord(); ?>
              ณ วันที่ <? echo abbreDate2($oUT->dateUp,'/'?> <? echo "เวลา" ?><? echo $oUT->timeUp ?></span><br>
              <span class = "fontMark2"> เรียบร้อยแล้ว </span></td>
    </tr>
    <? } else if($msgFlag == 0) {?>
    <tr align="center" bgcolor="#FFFFFF">
            <td width="580"align="center"><span class="fontMark7"><b> ไม่สามารถปรับปรุงข้อมูลได้ 
              </b><br>
               เนื่องจากไม่พบ<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> 
              "<? echo $nameTable ?>"&nbsp;</font>ในปีการศึกษา<? echo $inputAcadyear ?> 
              <? $oSse->SearchByKey($selectSemester);  $oSse->GetRecord(); echo $oSse->semesterName ?>
              </span></td>
    </tr>
<? ?>
    </table><br>
        <table width="580" align="center">
          <tr> 
            <td width="526"><input type="button" name="back2" value="กลับเมนูหลัก" onClick=" location.href = 'index.php?mm=1'"></td>
          </tr>
        </table>
        <br>
  </fieldset><br>
  <table width="742" border="0">
          <tr> 
            <td height="22"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><b>หมายเหตุ 
              : </b></font></td>
            <td colspan="2"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><img src="../picture/edit1.gif" alt="แก้ไขการอัพเดท" border="0" > 
              หมายถึง เลือกเแก้ไขหรือเลือกปรับปรุงข้อมูล โดยข้อมูลจะแบ่งออกเป็น 
              4 ส่วนคือ ข้อมูลนักศึกษา ข้อมูลอาจารย์ ข้อมูลรายวิชา </font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td width="15">&nbsp;</td>
            <td width="651"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">และข้อมูลการลงทะเบียน</font> 
              <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">โดยข้อมูลนักศึกษา 
              ข้อมูลอาจารย์ และข้อมูลรายวิชาจะปรับปรุงเป็นปีการศึกษาและภาคการศึกษาปัจจุบัน</font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">สำหรับข้อมูลการลงทะเบียน 
              สามารถเลือกปรับปรุงปีการศึกษา และภาคการศึกษาเองได้</font></td>
          </tr>
          <tr> 
            <td width="62">&nbsp;</td>
            <td colspan="2"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><img src="../picture/save.gif" alt="บันทึกการอัพเดท" border="0" > 
              หมายถึง ยืนยันการบันทึกข้อมูล ซึ่งเมื่อกดยืนยันระบบจะทำการปรับปรุงข้อมูล 
              ซึ่งเมื่อปรับปรุงข้อมูลสำเร็จแล้วจะแสดงผลการบันทึก</font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> 
              โดยแสดงเป็นปีการศึกษา ภาคการศึกษา และวันที่/เวลาปรับปรุงล่าสุด ดังตารางข้างบน 
              และจะแสดงข้อความแสดงผลลัพธ์ท้ายตาราง</font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">ทั้งในกรณีที่ปรับปรุงข้อมูลสำเร็จหรือไม่สำเร็จ</font></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
        </table>
  </td> 
  </tr>
  </table>
  
</form>
  <!--------------------------------------------------------------------->
  <!--------------------------------------------------------------------->
  <? showFooter(); ?>
  <br>
  <!--------------------------------------------------------------------->
<!--put javascript here-->
<script language="javascript">
function doFormEdit(i){
        document.formdata.method.value="FormEdit"+i;
        document.formdata.submit();
}

function doFormMain(i,txt1,txt2){
    document.formdata.method.value="FormStart";
    if(i==1){
            if(confirm('ต้องการปรับปรุงข้อมูลนักศึกษาเป็น '+"'ปีการศึกษา"+  txt1 + " " +  txt2 +"'"+' ใช่หรือไม่ !')){
                document.formdata.formUpdate.value="FormStdMaster";
                document.formdata.submit();    
            }
    }else if(i == 2){
            if(confirm('ต้องการปรับปรุงข้อมูลอาจารย์เป็น '+"'ปีการศึกษา"+  txt1 + " " +  txt2 +"'"+' ใช่หรือไม่ !')){
                document.formdata.formUpdate.value="FormOfficer";
                document.formdata.submit();    
            }
    }else if(i == 3){
            if(confirm('ต้องการปรับปรุงข้อมูลรายวิชาเป็น '+"'ปีการศึกษา"+  txt1 + " " +  txt2 +"'"+' ใช่หรือไม่ !')){
                document.formdata.formUpdate.value="FormCourse";
                document.formdata.submit();    
            }
    }else if(i == 4){
            if(document.formdata.inputAcadyear.value == ""){
                alert("กรุณากรอกปีการศึกษา !");
            }else{
                var txt3 = document.formdata.inputAcadyear.value;
                var txt4 = document.formdata.selectSemester.value;
                var semName;

                if(txt4 == 1){
                    semName = "ภาคการศึกษาที่1";
                }else if(txt4 == 2){
                    semName = "ภาคการศึกษาที่2";
                }else if(txt4 == 3){
                    semName = "ภาคฤดูร้อน";
                }
            
                if(confirm('ต้องการปรับปรุง้อมูลการลงทะเบียนนักศึกษาเป็น '+"'ปีการศึกษา"+  txt3 + " " +  semName +"'"+' ใช่หรือไม่ !')){
                    document.formdata.formUpdate.value="FormReg";
                    document.formdata.submit();    
                }
            }
    }
}

function doFormAll(){
    document.formdata.method.value="FormStartAll";
    document.formdata.formUpdate.value="FormAll";
    document.formdata.submit();
}
</script>
<? 
$oCA
->Disconnect();
$oCR->Disconnect();
?>

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