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


Viewing file:     AddFormDurable.php (19.99 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

    session_start
();
    
    
/**  Define Validate Access  */
    
define'_VALID_ACCESS');

    
/**  Check Session User Login  */
    
if( !session_is_registered("valid_user") && !session_is_registered("Priority") ) {
        echo 
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
        echo 
"<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
        echo 
"<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
        exit();
    } 
    else {
        
/**  Configuration  */
        
require_once( "../configuration.php" );
        require_once( 
$_Config_absolute_path "/includes/framework.php" );
        require_once( 
"../include/Function.php" );
        
    
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
        
/**  Config Table for This Page  */
        
$myTable "personal_tb";
        
$myTable1 "budget_year_tb"
        
$myTable2 ="durable_type_tb";
        
$query " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId WHERE Teacher_code='$Teacher_code' ";
        
$result $dbObj->execQuery($query);
        
$rss $dbObj->fetchArray($result);
        
$query1 " SELECT *  FROM  $myTable1   ";
        
$result1 $dbObj->execQuery($query1);
        
$rs $dbObj->fetchObject($result1);
    } 
# else
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title><?=$_Config_sitename;?></title>
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script type="text/javascript" src="../js/calendarDateInput2.js"></script>
<script language="javascript">
function checkData() {
var formObj = document.pc;
    if( (formObj.Acc_name.value == "" ) && (formObj.Room_name.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Acc_name.style.backgroundColor='#F1F9FC'; formObj.Room_name.focus(); return false; }
     if(formObj.Acc_name.value == "" ) { alert("กรุณากรอก  ครุภัณฑ์"); formObj.Acc_name.style.backgroundColor='#F1F9FC'; formObj.Acc_name.focus(); return false;} 
     if(formObj.Room_name.value == "" ) { alert("กรุณากรอก สถานที่ ตั้งครุภัณฑ์"); formObj.Room_name.style.backgroundColor='#F1F9FC'; formObj.Room_name.focus(); return false;} 
     if(formObj.Fix_History.value == "" ) { alert("กรุณากรอก  สาเหตุอาการ"); formObj.Fix_History.style.backgroundColor='#F1F9FC'; formObj.Fix_History.focus(); return false;}     
    else return true ;
}
</script>

<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//-->
</script>
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
    
include("../templates/incHeader.php");
?>
<table width="1001" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="198" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
    <td width="803" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
      <table width="791" border="0" cellspacing="0" cellpadding="0">
      <form id="pc" name="pc" method="post" action="InsertDura.php?Teacher_code=<?=$Teacher_code;?>" onSubmit="return checkData();">
      <tr>
        <td width="791">&nbsp;</td>
      </tr>
      <tr>
        <td height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a> &raquo; <a href="PersonalFrom.php">ฟอร์มขอแจ้งซ่อมครุภัณฑ์</a> &raquo; <a href="FormDurableList.php?Teacher_code=<?=$Teacher_code;?>">ข้อมูลการขอซ่อมสิ่งของ/ครุภัณฑ์</a> &raquo; <span class="NOTE">ใบขอซ่อมสิ่งของวัสดุและครุภัณฑ์</span></span></strong></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="center">
          <table width="770" border="0" cellpadding="0" cellspacing="3">
            <tr height="31">
              <td height="20" colspan="4" align="center" class="PATRON11">รายงานความต้องการซ่อมวัสดุและครุภัณฑ์</td>
            </tr>
            <tr height="31">
              <td height="17" colspan="4" align="center" class="PATRON11"><hr /></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="4" l><table width="786" height="20" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="right">วันที่&nbsp;</td>
                  <td><script>DateInput('mDate', true,'DD/MM/YYYY','<?=date("d/m/Y");?>');</script></td>
                </tr>
                <tr>
                  <td width="485">ส่วนราชการ
                    <?php
         $collegeCode 
=  $rss["collegeCode"];
         
$sql "Select * From  college Where collegeStatus ='1'";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[collegeName] ";
         
?></td>
                  <td width="301"></td>
                  </tr>
                </table></td>
              </tr>
            <td width="157" height="29" align="left">ที่ สธ.......</td>
              <td width="188" height="29" align="left">&nbsp;</td>
              <td height="29" colspan="2" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
              </tr>
            <tr height="29">
              <td height="29" colspan="2" align="left">เรื่อง  
                <select name="durableCode" id="durableCode">
                  <?php
                
//$durableCode = $rs['durableCode'];    
                
                
$strSQL3 " SELECT * FROM  $myTable2  " ;// WHERE  durableCode='$durableCode' ";
                
$result3 $dbObj->execQuery($strSQL3);
                
                
$strSQL4 " SELECT * FROM $myTable2    ";
                
$result4 $dbObj->execQuery($strSQL4);
                
                while( 
$rs3 $dbObj->fetchArray($result3) ) {
                    echo 
"<option value=\"$rs3[durableCode]\">$rs3[durableName]</option>\n";
                    
                    
//while( $rs4 = $dbObj->fetchArray($result4) ) {
                    //    echo "<option value=\"$rs4[durableCode]\">$rs4[durableName]</option>\n";
                //    } 
                

            
?>
                  </select></td>
              <td width="156"></td>
              <td width="254"></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="4" align="left">เรียน &nbsp; ผู้อำนวยการ 
                <?php
         $collegeCode 
=  $rss["collegeCode"];
         
$sql "Select * From  college Where collegeStatus ='1'";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[collegeName] ";
         
?>
                </td>
              </tr>
            <tr height="29">
              <td height="25" colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;เนื่องจาก งาน/ภาค/ฝ่าย
                <input name="Faculty_name" type="text" id="Faculty_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value=" <?php
                     $Faculty_code 
=  $rss["Faculty_code"];
                     
$sql "Select * From   faculty_tb Where Faculty_code='$Faculty_code'";
                      
$result1 mysql_query($sql) or die("Error".mysql_error());
                      
$rs2 mysql_fetch_array($result1);
                      echo 
"$rs2[Faculty_name] ";
                     
?>" size="30" />
                &nbsp; 
                <input name="Faculty_code" type="hidden" id="Faculty_code" value="<?  echo $rs2['Faculty_code'];?>" />
                มีความประสงค์ที่จะต้องการซ่อมครุภัณฑ์/สิ่งของ</td>
              </tr>
            <tr height="29">
              <td height="29" colspan="4" align="left">ครุภัณฑ์ ชื่อ 
                <input name="Acc_name" type="text" id="Acc_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="50" />
                รหัสครุภัณฑ์ <input name="Acc_code" type="text" id="Acc_code" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" />
                <a href="javascript:;" onclick="MM_openBrWindow('AccCode.php?Acc_type_code=2','Detail','scrollbars=yes,width=750,height=450')"><img src="../images/icons/search.gif" alt="เลือกครุภัณฑ์" width="15" height="19" border="0" align="absmiddle" /></a>
                <input name="code" type="hidden" id="code" />
                <input name="AccId" type="hidden" id="AccId" />
                <input name="Acc_type_code" type="hidden" id="Acc_type_code" />
                </td>
              </tr>
            
            <tr height="29">
              <td height="29" colspan="4" align="left">สถานที่ตั้งครุภัณฑ์ 
                <input name="Room_name" type="text" id="Room_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="50" />
                ห้อง 
                <input name="Room_code" type="text" id="Room_code" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" />
                <a href="javascript:;" onclick="MM_openBrWindow('RoomCode.php','Detail','scrollbars=yes,width=750,height=350')"><img src="../images/icons/search.gif" alt="เลือกสถานที่ตั้ง" width="15" height="19" border="0" align="absmiddle" /></a>
                <input name="roomId" type="hidden" id="roomId" />
                <input name="Room_type" type="hidden" id="Room_type" />
                </font></td>
              </tr>
            <tr height="29">
              <td height="26" colspan="4" align="left">ชำรุดเนื่องจาก
                <input name="Fix_History" type="text" id="Fix_History" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="60" />
                ปีงบประมาณ
                
                <input name="Budget_year" type="text" id="Budget_year" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs->Budget_year;?>" size="4" maxlength="5"  /></td>
              </tr>
            <tr height="29">
              <td height="26" colspan="4" align="left">ความเห็นทั่วไปและข้อเสนอแนะ
                <input name="Store" type="text" id="Store" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="60" />
                </td>
              </tr>
            <tr height="29">
              <td height="16" colspan="4" align="left">สถานะการดำเนินงาน 
                <input name="Status2" type="text" id="Status2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="20" disabled="disabled"  />
                </td>
              </tr>
            <tr height="29">
              <td height="26" colspan="4" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จึงเรียนเสนอมาเพื่อโปรดพิจารณา</td>
              </tr>
            <tr height="29">
              <td height="29" colspan="4" align="left"><table width="771" border="0" align="center" cellpadding="0" cellspacing="3">
                <tr>
                  <th width="296" align="center" scope="col">
                    <input name="Detail_name5" type="text" id="Detail_name5" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled"  />
                    </th>
                  <th width="337" align="center" class="ALERT" scope="col">&nbsp;</th>
                  </tr>
                <tr>
                  <td height="27" align="center">ลงชื่อ.................................หัวหน้าภาค/ฝ่าย</td>
                  <td align="center">ลงชื่อ.................................ผู้แจ้งซ่อม</td>
                  </tr>
                <tr>
                  <td height="25" align="center">(
                    <?php
                         
//$Teacher_code =  $rss["TeacherId"];
                         
$sql "Select *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where  Faculty_code ='$Faculty_code'  and   TeacherId='1'  ";
                          
$result1 mysql_query($sql) or die("Error".mysql_error());
                         
$rs2 mysql_fetch_array($result1);
                          echo 
"$rs2[First_name]$rs2[Teacher_name] &nbsp;&nbsp;$rs2[Teacher_lastname]";
                     
?>
                    )
                    <input name="TeacherId" type="hidden" id="TeacherId" value="<? echo $rs2["Teacher_code"]?>" /></td>
                  <td align="center">( <? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp; <? echo $rss[Teacher_lastname]?>
                    <input name="Teacher_code" type="hidden" id="Teacher_code" value="<? echo $rss['Teacher_code']?>" /></td>
                  </tr>
                <tr>
                  <td align="center">ตำแหน่ง.
                    <input name="Name" type="text" id="Name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25"  value=" <? $PositionId =  $rs2["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " />
                    </td>
                  <td align="center">ตำแหน่ง.
                    <input name="Name2" type="text" id="Name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25"  value=" <? $PositionId =  $rss["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " />
                    </td>
                  </tr>
                </table></td>
              </tr>
            <tr height="29">
              <td height="16" colspan="4" align="left"><hr /></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="4" align="left"><table width="780" align="center">
                <tr>
                  <th width="379" scope="col">(1) บันทึกหน่วยงานซ่อมบำรุง</th>
                  <th width="375" scope="col">(2) บันทึกผู้ตรวจรับงาน</th>
                  </tr>
                <tr>
                  <td><input type="radio" name="Detail" id="Detail6" value="1" disabled="disabled"  />
                    ซ่อมเองได้</td>
                  <td><input type="radio" name="Detail" id="Detail2" value="1" disabled="disabled"  />                          
                    ใช้งานได้ตามปกติ</td>
                  </tr>
                <tr>
                  <td>
                    <input type="radio" name="Detail" id="Detail" value="2" disabled  />
                    
                    ซ่อมเองได้แต่ต้องจัดซื้อวัสดุ( ตามรายละเอียดแนบมา)</td>
                  <td><input type="radio" name="Detail" id="Detail3" value="2" disabled="disabled"  />
                    ไม่สามารถใช้งานอีกต่อไป</td>
                  </tr>
                <tr>
                  <td><input type="radio" name="Detail" id="Detail7" value="3" disabled="disabled"  />
                    สมควรส่งซ่อมภายนอก</td>
                  <td><input type="radio" name="Detail" id="Detail4" value="3" disabled="disabled"  />
                    ความเห็นอื่นๆ
                    <input name="Detail_name2" type="text" id="Detail_name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled"  />
                    </td>
                  </tr>
                <tr>
                  <td><label>
                    <input type="radio" name="Detail" id="Detail" value="4" disabled  />
                    </label>
                    ความเห็นอื่นๆ
                    <input name="Detail_name" type="text" id="Detail_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled  />
                    </td>
                  <td>&nbsp;</td>
                  </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  </tr>
                <tr>
                  <td align="center">ลงชื่อ
                    <input name="name2" type="text" id="name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="20" disabled="disabled"  />
                    ผู้ตรวจซ่อม</td>
                  <td align="center">ลงชื่อ
                    <input name="name" type="text" id="name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="20" disabled="disabled"  />
                    ผู้ตรวจรับ</td>
                  </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td align="center">&nbsp;</td>
                  </tr>
                <tr>
                  <td align="center">วันที่.....เดือน..........พ.ศ.......&hellip;</td>
                  <td align="center">วันที่......เดือน...........พ.ศ.......</td>
                  </tr>
                <tr>
                  <td><hr /></td>
                  <td><hr /></td>
                  </tr>
                <tr>
                  <td>(3) บันทึกงานอาคารและสถานที่</td>
                  <td>(4) ความเห็นและคำสั่งผู้อำนวยการ</td>
                  </tr>
                <tr>
                  <td align="center">
                    <input name="Detail_name3" type="text" id="Detail_name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled"  />
                    </td>
                  <td align="center">
                    <input name="Detail_name4" type="text" id="Detail_name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled"  />
                    </td>
                  </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td><input name="Flag" type="checkbox" id="Flag" value="1" disabled="disabled" />
                    อนมัติ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input name="Flag" type="checkbox" id="Flag" value="2" disabled="disabled" />
                    ไม่อนุมัติ</td>
                  </tr>
                <tr>
                  <td height="29" align="center">ลงชื่อ..................................</td>
                  <td align="center">ลงชื่อ..................................</td>
                  </tr>
                <tr>
                  <td height="26" align="center">ตำแหน่ง..................................</td>
                  <td align="center">ตำแหน่ง..................................</td>
                  </tr>
                <tr>
                  <td align="center">วันที่.....เดือน...........พ.ศ.......</td>
                  <td align="center">วันที่.....เดือน...........พ.ศ.......</td>
                  </tr>
                <tr>
                  <td height="15"></td>
                  <td></td>
                  </tr>
                <tr>
                  <td colspan="2"><hr /></td>
                  </tr>
                </table></td>
              </tr>
            </table>
          <input type="submit" name="Submit" value="บันทึก" class="WIDTH60 CURSOR-HAND" />
  &nbsp;
  <input name="Reset" type="reset" class="WIDTH60 CURSOR-HAND" id="Reset" value="รีเซ็ต" />
  &nbsp;&nbsp;
  <input name="Button" type="button" id="Reset" value="ยกเลิก" class="CURSOR-HAND WIDTH60" onclick="location.href='FormDurableList.php?Teacher_code<?=$Teacher_code;?>'" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr></form>
    </table>
   </fieldset></td>
  </tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
    
/**  Free Resource */
    
$dbObj->freeresult($result);
    
    
/**  Close the Database  */
    
$dbObj->disconn();
    
    
/**  Unset Class  */
    
unset($dbObj);
?>

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