!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/directorBCNU/   drwxr-xr-x
Free 51 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 (20.87 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;

        
//=== SESSION
        
$Username $valid_user
        
        
        
/**  Config Table for This Page  */
        
$myTable1 "personal_tb";
        
$myTable2 "project_type_tb";
        
        
/**  Table  -->  personal_tb  */
        
$query00 " SELECT *  FROM $myTable1  WHERE Username='$Username' ";
        
$result00 $dbObj->execQuery($query00);
        
$rs00 $dbObj->fetchObject($result00);
            
$Teacher_code $rs00->Teacher_code;
        
        
$query " SELECT *  FROM $myTable2  
                               WHERE Faculty_code='$Faculty_code'  AND  Budget_Year='$Budget_Year'  AND  ProjectId='$ProjectId' "
;
        
$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>
<script type="text/javascript" src="../js/ajaxScript.js"></script>
<script language="javascript">
function checkData() {
var formObj = document.myForm;
    if( (formObj.Training_name.value == "" ) && (formObj.Budget_use.value == "" ) && (formObj.Budget_use.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบ" ); formObj.Training_name.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 if(formObj.Budget_use.value == "" ) { alert("กรุณากรอก จำนวนเงินที่ใช้"); formObj.Budget_use.style.backgroundColor='#F1F9FC'; formObj.Budget_use.focus(); return false; } 
    else if(formObj.Date.value == "" ) { alert("กรุณากรอก วัน/เดือน/ปี ที่ดำเนินการ"); formObj.Date.style.backgroundColor='#F1F9FC'; formObj.Date.focus(); return false; }
    else return true;
}
</script>
<title>ข้อมูลทั่วไปบุคลากร - ข้อมูลการแผนดำเนินการ - ข้อมูลแผนดำเนินการรายปี</title>
</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"><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="PlaningByYear.php?Teacher_code=<?=$Teacher_code;?>&amp;Faculty_code=<?=$Faculty_code;?>">ข้อมูลการแผนดำเนินการ</a> &raquo; <a href="PlanStdList.php?Teacher_code=<?=$Teacher_code;?>&amp;Budget_Year=<?=$Budget_Year;?>&amp;Faculty_code=<?=$Faculty_code;?>">ข้อมูลแผนดำเนินการรายปี</a></strong> <strong>&raquo;</strong>&nbsp;<a href="DetailRepPlaning.php?ProjectId=<? echo $rs[ProjectId]?>&amp;Project_code=<? echo $rs[Project_code]?>&amp;Faculty_code=<? echo $rs[Faculty_code]?>&amp;Teacher_code=<? echo $rs[Teacher_code]?> "><strong>รายงานการใช้เงินตามข้อย่อยแผน</strong></a> <a href="PlaningList.php?Teacher_code=<?=$Teacher_code;?>&amp;Budget_Year=<?=$Budget_Year;?>&amp;Faculty_code=<?=$Faculty_code;?>&amp;Project_code=<?=$Project_code;?>"></a><strong>&raquo; </strong> </a><a href="PlaningList.php?Teacher_code=<?=$Teacher_code;?>&amp;Budget_Year=<?=$Budget_Year;?>&amp;Faculty_code=<?=$Faculty_code;?>&amp;Project_code=<?=$Project_code;?>"></a> <span class="TEXT-GREEN10"><strong>เพิ่มข้อมูลแผน/โครงการดำเนินการ </strong></span></td>
      </tr>
      <tr>
        <td align="center">
        <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><span 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></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>
  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
                  <tr>
                    <td height="43"><a href="PlaningList.php?Teacher_code=<?=$Teacher_code;?>&amp;Budget_Year=<?=$Budget_Year;?>&amp;Faculty_code=<?=$Faculty_code;?>&amp;Project_code=<?=$Project_code;?>"></a>
                      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #F0F0F0">
                        <tr>
                          <td width="17%" height="25" align="right">รหัสหน่วยงาน</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="right">รหัสแผน</td>
                          <td>&nbsp;</td>
                          <td class="TEXT-DARK-BLUE10"><?php echo $rs['Orderlist']; ?></td>
                        </tr>
                        <tr>
                          <td height="25" align="right">ชื่อโครงการ/กิจกรรม</td>
                          <td>&nbsp;</td>
                          <td class="TEXT-DARK-BLUE10"><?php echo htmlspecialchars_decodenl2br$rs['Project_plan'] ) ); ?></td>
                        </tr>
                        <tr>
                          <td height="25" align="right">วัตถุประสงค์</td>
                          <td>&nbsp;</td>
                          <td class="TEXT-DARK-BLUE10"><?php echo htmlspecialchars_decodenl2br$rs['Orderlist_2'] ) ); ?></td>
                        </tr>
                        <tr>
                          <td align="right" valign="top" style="padding-top:3px;"><span class="TEXT-RED10"><sup>*</sup></span> รายละเอียดของ<br />
                            แผนดำเนินการ</td>
                          <td>&nbsp;</td>
                          <td style="padding-top:5px;"><font color="#0000FF" size="2" face="Tahoma">
                            <input name="Training_name" type="text" id="Training_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$_GET['Training_name'];?>" size="90" readonly="readonly" />
                          </font></td>
                        </tr>
                        <tr>
                          <td align="right">หมวดเงิน</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="right">ประเภทหมวดค่าใช้จ่าย</td>
                          <td align="center">&nbsp;</td>
                          <td height="25" align="left"><select name="MoneyId" id="MoneyId">
                              <?php
            
//$MoneyId  = $rs[MoneyId];             
            
$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="right">วันที่ตั้งงบประมาณ</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="right">ปีงบประมาณ พ.ศ.</td>
                          <td align="center">&nbsp;</td>
                          <td height="25" align="left" class="TEXT-DARK-BLUE10"><?php echo $rs['Budget_Year']; ?></td>
                        </tr>
                        <tr>
                          <td align="right" valign="top" style="padding-top:13px">จำนวนเงินที่ตั้ง<br />
                            งบประมาณรายเดือน</td>
                          <td align="center">&nbsp;</td>
                          <td height="25" align="left" valign="top" style="padding-top:8px"><table width="83%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                              <tr bgcolor="#F8F8F8">
                                <td width="16%" align="right" bgcolor="#FFFFFF">มกราคม </td>
                                <td width="37%" align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['January']; ?></strong></td>
                                <td width="15%" align="right" bgcolor="#FFFFFF">กรฏาคม</td>
                                <td width="32%" align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['July']; ?></strong></td>
                              </tr>
                              <tr bgcolor="#F8F8F8">
                                <td align="right" bgcolor="#FFFFFF">กุมภาพันธ์ </td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['February']; ?></strong></td>
                                <td align="right" bgcolor="#FFFFFF">สิงหาคม</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['Augus']; ?></strong></td>
                              </tr>
                              <tr bgcolor="#F8F8F8">
                                <td align="right" bgcolor="#FFFFFF">มีนาคม</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['March']; ?></strong></td>
                                <td align="right" bgcolor="#FFFFFF">กันยายน</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['September']; ?></strong></td>
                              </tr>
                              <tr bgcolor="#F8F8F8">
                                <td align="right" bgcolor="#FFFFFF">เมษายน</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['April']; ?></strong></td>
                                <td align="right" bgcolor="#FFFFFF">ตุลาคม</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['October']; ?></strong></td>
                              </tr>
                              <tr bgcolor="#F8F8F8">
                                <td align="right" bgcolor="#FFFFFF">พฤษภาคม</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['May']; ?></strong></td>
                                <td align="right" bgcolor="#FFFFFF">พฤศจิกายน</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['November']; ?></strong></td>
                              </tr>
                              <tr bgcolor="#F8F8F8">
                                <td align="right" bgcolor="#FFFFFF">มิถุนายน</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['June']; ?></strong></td>
                                <td align="right" bgcolor="#FFFFFF">ธันวาคม</td>
                                <td align="left" bgcolor="#FFFFFF" class="PADDING-LEFT-10 TEXT-DARK-BLUE10"><strong><?php echo $rs['December']; ?></strong></td>
                              </tr>
                            </table>
                              <table width="99%" border="0" 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(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></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" />
                                  บาท</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_use'] - $rs11['SumB1'] ;
              echo 
number_format($Sum3,2,'.',','); ?> " size="10" />
บาท </td>
                                </tr>
                            </table></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="9" style="text-align:center" />
                              <script type="text/javascript" src="../includes/popcalendar.js"></script>
                              <script language='JavaScript' type="text/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" style="text-align:center" onkeypress="return checkNumeric();"  onkeyup="checkBudget()" size="10" readonly="readonly"/>  บาท<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>
                             <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></table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr></form>
    </table>
   </fieldset></td>
  </tr></table>
</body></html>

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