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


Viewing file:     EditPlanList.php (13.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
 session_start
();
 include(
"../../include/FunctionDB.php");
  include(
"../../include/Function.php");
 if (
session_is_registered("valid_user"))
 {
$Username $valid_user;
ConnectDB();
  
$sql ="SELECT * FROM personal_tb WHERE Username='$Username'";
  
$result mysql_query($sql) or die("Cannot Select").mysql_error();
  
$rs mysql_fetch_array($result);
  
$Teacher_code $rs[Teacher_code];
/////////////////////////////////////////////////////
 //$sql ="SELECT * FROM tech_plan_tb WHERE Teacher_code='$Teacher_code'";
//  $result1= mysql_query($sql) or die("Cannot Select").mysql_error();
//  $num = mysql_num_rows($result1);
  
$strSQL ="Select * From tech_plan_tb Where Teacher_code='$Teacher_code'";
if (! 
$Page)
$Page 1;
$Pre_Page $Page 1;
$Next_Page $Page +1;
$Per_Page =20;
$result mysql_query($strSQL);

$Page_start = ($Per_Page*$Page) - $Per_Page;
$Num_Rows mysql_num_rows($result);

if( 
$Num_Rows <= $Per_Page)
      
$Num_Pages 1;
else if ((
$Num_Rows $Per_Page) == 0)
       
$Num_Pages = ($Num_Rows $Per_Page);
     else
        
$Num_Pages = ($Num_Rows $Per_Page) + 1;
$Num_Pages = (int)$Num_Pages;

if (( 
$Page $Num_Pages) || ($Page 0))
  echo
"Page $Page More than $Num_Pages";
$strSQL .=" LIMIT $Page_start,$Per_Page" ;
$result mysql_query($strSQL) or die("Error $result".mysql_error()); 
$num mysql_num_rows$result );

 
?>
<html>
<head>
<title>Plan </title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" href="../../css/style1.css" type="text/css">
</head>

<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#DBEFF7">
        <tr bgcolor="#DBEFF7" background="../Image/bart1.jpg">
          <td height="24" colspan="4" background="../Image/bart1.jpg" bgcolor="#0066CC" ><img src="../../Image/Ponallogo.jpg" width="550" height="71"></td>
        </tr>
        <tr bgcolor="#DBEFF7" background="../Image/bart1.jpg"> 
          <td width="20%" height="24" bgcolor="#DBEFF7" background="../../Image/bart1.jpg" class="table" > 
            <div align="center"><font size="2" face="Tahoma"><strong><a href="../menu_teacher.php" class="d">กลับหน้าหลัก</a></strong></font></div></td>
          <td width="20%" height="24" bgcolor="#DBEFF7" background="../../Image/bart1.jpg" class="table" > 
            <div align="center"><font size="2" face="Tahoma"><strong><a href="Frmplan.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d">เพิ่ม</a></strong></font></div></td>
          <td width="20%" height="24" bgcolor="#DBEFF7" background="../../Image/bart1.jpg" class="table" > 
            <div align="center" ><font size="2" face="Tahoma"><strong><a href="PlanList.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d">แสดงทั้งหมด</a></strong></font></div></td>
          <td width="20%" height="24" bgcolor="#DBEFF7" background="../../Image/bart1.jpg" class="table" > 
            <div align="center"><font size="2" face="Tahoma"><strong><a href="../../logout.php" class="d">Logout</a></strong></font></div></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td><div align="center"><font color="#003366" size="2" face="Tahoma"><strong>ขณะนี้ 
        อ. </strong></font> <font color="#993333" size="2" face="Tahoma"><strong><?php echo $rs[Teacher_name]?> 
        &nbsp;<?php echo $rs[Teacher_lastname]?> </strong></font><font color="#003366" size="2" face="Tahoma"><strong>กำลังใช้งานระบบ</strong> 
        </font></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" style="border:1px solid gray">
  <form action="DelPlan.php" method="post">
    <tr > 
      <td colspan="9" bgcolor="#D3E4F8"> <div align="center"><font color="#FFFF99" size="4" face="Tahoma"><strong> 
          <font color="#FF0000">แก้ไข</font> <font color="#003366">รายการแผนการสอนรายวิชา</font></strong></font></div></td>
    </tr>
    <tr bordercolor="#006633"> 
      <td width="3%" bgcolor="#CCCCCC"> 
        <div align="center"><font color="#993333" size="2" face="Tahoma"><strong>ลบ</strong></font></div></td>
      <td width="3%" bgcolor="#CCCCCC">
<div align="center"><font color="#003366" size="2" face="Tahoma"><b>no.</b></font></div></td>
      <td width="9%" bgcolor="#CCCCCC">
<div align="center"><font color="#003366" size="2" face="Tahoma"><b>รหัสวิชา</b></font></div></td>
      <td width="39%" bgcolor="#CCCCCC">
<div align="center"><font color="#003366" size="2" face="Tahoma"><b>ชื่อวิชา</b></font></div></td>
      <td width="14%" bgcolor="#CCCCCC">
<div align="center"><font color="#003366" size="2" face="Tahoma"><b>ภาคการสอน</b></font></div></td>
      <td width="13%" bgcolor="#CCCCCC">
<div align="center"><font color="#003366" size="2" face="Tahoma"><b>วันที่เิ่ริ่มสอน</b></font></div></td>
      <td width="9%" bgcolor="#CCCCCC">
<div align="center"><font color="#003366" size="2" face="Tahoma"><b>รายละเอียด</b></font></div></td>
      <td width="5%" bgcolor="#CCCCCC">
<div align="center"><font color="#993333" size="2" face="Tahoma"><strong><font color="#003399">แก้ไข</font>&nbsp;</strong></font></div></td>
      <td width="5%" bgcolor="#CCCCCC">
<div align="center"><font color="#FF0000" size="2" face="Tahoma"><strong>ลบ</strong></font></div></td>
    </tr>
    <?
$i 
1;
 while(
$row mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
    <tr bordercolor="#eeeeee" > 
      <td align=center bgcolor="#eeeeee" > <input type="checkbox" name="checkbox[]" value="<? echo $row[Plan_code?>"></td>
      <td align=center bgcolor="#eeeeee" ><strong><font color="#000000" size="2" face="Tahoma"> 
        <? 
        $no 
= ($Per_Page * ( $Page -1))+$i ;
        echo 
$no;
        
?>
        </font></strong></td>
      <td align=center bgcolor="#eeeeee" > <div align="center"> <font color="#003366" size="2" face="Tahoma"> 
          <?php
            $Subject_no 
$row[Subject_no];
            
$sql3 "Select * From subject_tb Where Subject_no='$Subject_no'";
            
$result3 mysql_query($sql3) or die("Error".mysql_error());
            
$rss3 mysql_fetch_array($result3);
            echo
"$rss3[Subject_code]";
            
?>
          </font> </div></td>
      <td align=center bordercolor="#eeeeee" bgcolor="#eeeeee" > <div align="left"><font color="#003366" size="2" face="Tahoma"> 
          <?php 
             $Subject_no 
$row["Subject_no"];
            
$strSQL1 "SELECT * FROM subject_tb WHERE Subject_no='$Subject_no' ";
            
$res1mysql_query($strSQL1) or die("Error".mysql_error());
            
$rs1 mysql_fetch_array($res1);
            echo
"$rs1[Subject_name]";
           
    
?>
          </font></div></td>
      <td bgcolor="#eeeeee"> <div align="left"><font color="#003366" size="2" face="Tahoma"> 
          <?php 
             $Method_code 
$row["Method_code"];
            
$strSQL2 "SELECT * FROM method_tb WHERE Method_code='$Method_code' ";
            
$result2mysql_query($strSQL2);
              
$rs2 mysql_fetch_array($result2);
            echo
"$rs2[Method_name]";
           
    
?>
          </font></div></td>
      <td bgcolor="#eeeeee" > <div align="center"><font color="#003366" size="2" face="Tahoma"> 
          <?php 
       $sday 
$row[Start_date];
    
$yearthai explode("-",$sday);
    
$day =      intval($yearthai[2]);
    
$month =  intval($yearthai[1]);
    
$year =     intval($yearthai[0]);     
          
//////////////////
 //   $yearthai =  $day ;
  
$m getThaiSubMonth($month);
    
$year getYear($year);
     echo
"$day"." "."$m"." "."$year";
    
?>
          </font></div></td>
      <td bordercolor="#eeeeee" bgcolor="#eeeeee" > <div align="center"><font color="#000000" size="2" face="Tahoma">&nbsp;<a href="ShowTechPlan.php?Teacher_code=<? echo $row[Teacher_code]?>&Plan_code=<?echo $row[Plan_code]?>" class="g">แผนการสอน</a></font></div></td>
      <td bgcolor="#eeeeee" > <div align="center"><font size="2" face="Tahoma"><a href="FrmEditplan.php?Plan_code=<? echo $row[Plan_code]?>&&Teacher_code=<? echo $row[Teacher_code]?>"><img src="../../Image/edit.gif" width="15" height="12" border="0"></a></font></div></td>
      <td bgcolor="#eeeeee" ><div align="center"><font size="2" face="Tahoma" class="c"><strong> 
          <script language="JavaScript">
function Conf<?=$row[Plan_code];?>0(object) {
    if (confirm("คุณต้องการลบข้อมูล [<?php echo " $row[Plan_code] $row[Training_name]  "?>] หรือไม่?") == true) {
        return true;
    }
    return false;
}
</script>
          <a href="DelPlan2.php?Plan_code=<?php echo $row[Plan_code]; ?>"> <img src="../../Image/del.gif" alt=" Delete " width="11" height="12" border="0" align="absmiddle" onClick="return Conf<?=$row[Plan_code];?>0(this)"></a></strong></font></div></td>
    </tr>
    <?
    $count
=1;
     }
else
{
?>
    <tr bordercolor="#FFFFFF"> 
      <td align="center" bgcolor="#FFFFFF" ><input type="checkbox" name="checkbox[]2" value="<? echo $row[Plan_code?>"></td>
      <td align="center" bgcolor="#FFFFFF" ><strong><font color="#000000" size="2" face="Tahoma"> 
        <? 
        $no 
= ($Per_Page * ( $Page -1))+$i ;
        echo 
$no;
        
?>
        </font></strong></td>
      <td align=center bordercolor="#eeeeee" bgcolor="#FFFFFF" > <div align="center"> 
          <font color="#003366" size="2" face="Tahoma"> 
          <?php
            $Subject_no 
$row[Subject_no];
            
$sql3 "Select * From subject_tb Where Subject_no='$Subject_no'";
            
$result3 mysql_query($sql3) or die("Error".mysql_error());
            
$rss3 mysql_fetch_array($result3);
            echo
"$rss3[Subject_code]";
            
?>
          </font> </div></td>
      <td align="center" bgcolor="#FFFFFF" > 
        <div align="left"><font color="#003366" size="2" face="Tahoma"> 
          <?php 
             $Subject_no 
$row["Subject_no"];
            
$strSQL1 "SELECT * FROM subject_tb WHERE Subject_no='$Subject_no' ";
            
$res1mysql_query($strSQL1) or die("Error".mysql_error());
            
$rs1 mysql_fetch_array($res1);
            echo
"$rs1[Subject_name]";
           
    
?>
          </font></div></td>
      <td bgcolor="#FFFFFF"> <div align="left"><font color="#003366" size="2" face="Tahoma"> 
          <?php 
             $Method_code 
$row["Method_code"];
            
$strSQL2 "SELECT * FROM method_tb WHERE Method_code='$Method_code' ";
            
$result2mysql_query($strSQL2);
              
$rs2 mysql_fetch_array($result2);
            echo
"$rs2[Method_name]";
           
    
?>
          </font></div></td>
      <td bgcolor="#FFFFFF" > <div align="center"><font color="#003366" size="2" face="Tahoma"> 
          <?php 
       $sday 
$row[Start_date];
    
$yearthai explode("-",$sday);
    
$day =      intval($yearthai[2]);
    
$month =  intval($yearthai[1]);
    
$year =     intval($yearthai[0]);     
          
//////////////////
 //   $yearthai =  $day ;
  
$m getThaiSubMonth($month);
    
$year getYear($year);
     echo
"$day"." "."$m"." "."$year";
    
?>
          </font></div></td>
      <td bgcolor="#FFFFFF" > <div align="center"><font color="#000000" size="2" face="Tahoma">&nbsp;<a href="ShowTechPlan.php?Teacher_code=<? echo $row[Teacher_code]?>&Plan_code=<?echo $row[Plan_code]?>" class="g">แผนการสอน</a></font></div></td>
      <td bgcolor="#FFFFFF" ><div align="center"><font size="2" face="Tahoma"><a href="FrmEditplan.php?Plan_code=<? echo $row[Plan_code]?>&&Teacher_code=<? echo $row[Teacher_code]?>"><img src="../../Image/edit.gif" width="15" height="12" border="0"></a></font></div></td>
      <td bgcolor="#FFFFFF" ><div align="center"><font size="2" face="Tahoma" class="c"><strong> 
          <script language="JavaScript">
function Conf<?=$row[Plan_code];?>0(object) {
    if (confirm("คุณต้องการลบข้อมูล [<?php echo " $row[Plan_code] $row[Training_name]  "?>] หรือไม่?") == true) {
        return true;
    }
    return false;
}
</script>
          <a href="DelPlan2.php?Plan_code=<?php echo $row[Plan_code]; ?>"> <img src="../../Image/del.gif" alt=" Delete " width="11" height="12" border="0" align="absmiddle" onClick="return Conf<?=$row[Plan_code];?>0(this)"></a></strong></font></div></td>
    </tr>
    <?
$count
=0;
}
$i++;
 }    
CloseDB();
?>
    <tr> 
      <td colspan="9" align="center" bgcolor="#CCCCCC"> <div align="center"><font color="#003366" size="2" face="Tahoma">ทั้งหมด 
          <? echo $num ?> รายการ</font></div></td>
    <tr> 
      <td height="24" colspan="9" align="center" bgcolor="#D3E4F8"> <input type="submit" name="Submit" value="   ลบ   "></td>
  </form>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#99CCFF">
  <tr> 
    <td align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="Tahoma11"> 
      <div align="center"><font color="#FFFFFF"> <font color="#FFFFFF" size="3" face="MS Sans Serif"><strong> 
        <font color="#003366" size="2" face="Tahoma"><?php echo $Num_Pages;?></font></strong></font><font color="#003366" size="2" face="Tahoma"><strong>&nbsp;หน้า</strong></font> 
        <font color="#003366" size="2" face="Tahoma"><strong> 
        <?php
if ($Pre_Page)
   echo
"<a href=\"$PHP_SELF?Page=$Pre_Page\" class=\"PageLink\"><font =\"Ms San serif\" size=\"2\"><b>&lt;&lt; Previus</b> </font></a>";

   for(
$i=1;$i<=$Num_Pages;$i++)
   {
    if(
$i != $Page)
         echo
" [<a href=\"$PHP_SELF?Page=$i\" class=\"PageLink\"><font =\"Ms San serif\" size=\"2\"><b>$i</b></font></a>] ";
    else
        echo
"<b>$i</b>";
   }
if(
$Page != $Num_Pages)
 echo
"<a href=\"$PHP_SELF?Page=$Next_Page\" class=\"PageLink\"><font =\"Ms San serif\" size=\"2\"><b> Next &gt;&gt;</b> </font></a>";
 
?>
        </strong></font> </font> </div></td>
  </tr>
</table>
</body>
</html>
<?php 
    
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
       echo
"Please Login ";
}
?>

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