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


Viewing file:     updateDBReg.php (16.8 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/clsTimeTableAssess.php";
include_once 
"../class/clsUpdateTable.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_rg_ExternalPlace.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";
include_once 
"../class/clsWeekDateAssess.php";
include_once 
"../class/clsDoAssessment.php";
include_once 
"../class/clsDefineAssessment.php";
include_once 
"../class/clsResultRQ.php";
include_once 
"../class/clsResultTQ.php";
include_once 
"../class/clsClassAssessTmp.php";
include_once 
"../class/clsClassInStructorAssessTmp.php";
include_once 
"../class/clsClassOpenForAssessTmp.php";
include_once 
"../class/clsTimeTableAssessTmp.php";
include_once 
"../class/clsRegistrationTmp.php";
include_once 
"../class/clsReg_rg_OFInDP.php";
include_once 
"../class/clsea_OFInDP.php";
include_once 
"../class/clsReg_rg_Department.php";
include_once 
"../class/clsea_Department.php";
include_once 
"../class/clsReg_rg_SysInstructorType.php";
include_once 
"../class/clsea_SysInstructorType.php";

include_once 
"../class/clsExternalPlace.php";
include_once 
"../class/clsMainExternalPlace.php";
include_once 
"../class/clsSubExternalPlace.php";
include_once 
"../class/clsBuilding.php";
include_once 
"../class/clsRoom.php";

$filename1 "updateDBRegist.php";
$filename2 "updateDBChk.php";
if(
file_exists($filename1) && file_exists($filename2)) {
    include_once(
"updateDBChk.php");
    if(
checkUpdateRegist()){
        include_once(
"updateDBRegist.php");
       
//updateRegist();
        
die();
    }
}
    
?>
<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']);

$orDy = new Day($oCR);
$orPr = new Period($oCR);
$orPr2 = new Period($oCR);
$oWDA = new WeekDateAssess($oCA);
$oaOF = new OfficerAssess($oCA);
$orSST = new rg_SysStudyType($oCR);
$oSST = new SysStudyTypeAssess($oCA);
$oDo = new DoAssessment($oCA);
$oDA = new DefineAssessment($oCA);
$oRrq = new ResultRQ($oCA);
$oRtq = new ResultTQ($oCA);

$msgFlag = -1;

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

include_once("processUpdateDBReg.php");
include_once(
"processUpdateDBRegTmp.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 == ) { ?>
    <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 == ) {?>
    <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></form>
        <? 
        $Do
=1;
        if(
$upTid == && $msgFlag!=0){  ?>
        <form method="POST" name="er" action="<?php echo $PHP_SELF;?>" >
        <input type="hidden" name="method" value="FormStart">
        <input type="hidden" name="copy" value="1">
        <input type="hidden" name="inputAcadyear" value="<?=$inputAcadyear;?>">
        <input type="hidden" name="selectSemester" value="<?=$selectSemester;?>">

          <tr align="center">
            <td  align="center" colspan="6" bgcolor="#FFFFFF"><input type="submit" name="ok" value="ยืนยันการปรับปรุงข้อมูล" title="การเปลี่ยนแปลงข้อมูลที่มีนักศึกษาเข้าประเมินแล้ว อาจทำให้ข้อมูลการประเมินผลผิดพลาด จำเป็นต้องลบข้อมูล" />
            </td>
          </tr>
         <?    
            
if($Do!=0){
        
?>
          <tr align="center">
            <td  align="center" colspan="6" bgcolor="#FFFFFF"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> " การยืนยันปรับปรุงข้อมูล จะทำการลบผลประเมินในรายสัปดาห์ ที่มีนักศึกษาเข้าประเมินแล้ว <img src="../picture/warn.png" border="0"  title="มีนักศึกษาเข้าประเมินแล้ว" /> <br >
             เพราะจะทำให้ข้อมูลการประเมินผลผิดพลาด "</font> </td>
          </tr>
          <? }else{ 
          
?>
          <tr align="center">
            <td  align="center" colspan="6" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> "ไม่พบการปรับปรุงข้อมูลที่กระทบต่อระบบประเมิน"</font> </td>
          </tr>
          <? }?>
        </table>
        </form>
        <? }
        
?>
    <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>
  <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>

  <!--------------------------------------------------------------------->
  <!--------------------------------------------------------------------->
  <!--------------------------------------------------------------------->
<!--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; //= document.formdata.semName.value;

                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();
}

    function toggle(target)
     {
        var row =1;
         while (document.getElementById(target+row)) {
             obj=document.getElementById(target+row);
             obj.style.display=( (obj.style.display=='none') ? '' : 'none');
             row++;
         }
     }
</script>
<? 
$oCA
->Disconnect();
$oCR->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.019 ]--