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


Viewing file:     Findurareport.php (13.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("./include/FunctionDB.php");
include(
"./include/Function.php");
include(
"admin_menu.php");
 
ConnectDB();
$strSQL "SELECT * FROM finance4_tb  Order By  Date_note";
if (! 
$Page)
$Page 1;
$Pre_Page $Page 1;
$Next_Page $Page +1;
$Per_Page 30;
$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); 
$num mysql_num_rows$result );
//$count = 0;
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="./source/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style42 {color: #000000; font-family: Tahoma; font-size: 14px;}
.style44 {font-size: 14px; font-family: Tahoma; }
.style45 {font-size: 14px}
-->
</style>
<table width="842" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td><br><fieldset>
            <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php" >หน้าหลัก</a> <img src="./picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="FinduraList.php">ข้อมูลงบครุภัณฑ์</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><img src="./picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" />ข้อมูลค่าครุภัณฑ์และสิ่งก่อสร้าง</font></legend>
            <label>
        <form id="form1" name="form1" method="post" action="">
          <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
            <tr>
              <td height="24" colspan="10"><font size="2" face="Tahoma"><img src="./picture/previous.gif" onclick="window.history.back()"  width="85" height="22" border="0" /></font></td>
            </tr>
            <tr>
              <td height="24" colspan="10">&nbsp;</td>
            </tr>
            <tr bordercolor="#003366">
              <td align="center" bgcolor="#E0EDE6"><span class="style45"></span></td>
              <td width="70" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">เดือน<br />
              </span></td>
              <td width="110" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">ครุภัณฑ์การศึกษา</span></td>
              <td width="77" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">สำนักงาน</span></td>
              <td width="101" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">โฆษณา/เผยแพร่</span></td>
              <td width="74" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">ก่อสร้าง</span></td>
              <td width="89" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">ไฟฟ้าและวิทยุ</span></td>
              <td width="103" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44">งานบ้านงานครัว</span></td>
              <td width="117" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style42">วัสดุทางการแพทย์</span></td>
              <td width="61" rowspan="2" align="center" bgcolor="#E0EDE6"><span class="style44"><font color="#FF0000">รวม</font></span></td>
            </tr>
            <tr bordercolor="#003366">
              <td width="27" align="center" bgcolor="#E0EDE6"><span class="style44"><font color="#003366"><b>No.</b></font></span></td>
            </tr>
            <?php
$i 
1;
 while(
$row mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
            <tr bordercolor="#FFCC99" bgcolor="#FFCCCC" >
              <td align="center" bgcolor="#FFFFFF" ><font color="#003300" size="2" face="Tahoma">
                <?=$i?>
              </font></td>
              <td align="center" bgcolor="#FFFFFF" ><font color="#003366" size="2" face="Tahoma">
                <?php 
       $sday 
$row[Date_note];
    
$yearthai explode("-",$sday);
    
$day =      intval($yearthai[2]);
    
$month =  intval($yearthai[1]);
    
$year =     intval($yearthai[0]);     
          
//////////////////
 //   $yearthai =  $day ;
  
$m getThaiSubMonth($month);
     echo
"$day"." "."$m"." "."$year";
    
?>
              </font></td>
              <td align="center" bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost1'],2,'.',',');?> </font></div></td>
              <td bgcolor="#FFFFFF"><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost2'],2,'.',',');?> </font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost3'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost4'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost5'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost6'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"><? echo number_format($row['Cost7'],2,'.',',');?></font><font color="#FF0000" size="2" face="Tahoma"> </font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#FF0000" size="2" face="Tahoma">
                  <?php
      $Sum4 
$row[Cost1] + $row[Cost2] + $row[Cost3] + $row[Cost4] + $row[Cost5] + $row[Cost6];
    echo 
number_format($Sum4,2,'.',',');
    
// echo"$Sum4";
      
?>
              </font></div></td>
            </tr>
            <?
    $count
=1;
     }
else
{
?>
            <tr bordercolor="#FFCC99" bgcolor="#FFCCCC">
              <td align="center" bgcolor="#FFFFFF" ><font color="#003300" size="2" face="Tahoma">
                <?=$i?>
              </font></td>
              <td align="center" bgcolor="#FFFFFF" ><font color="#003366" size="2" face="Tahoma">
                <?php 
       $sday 
$row[Date_note];
    
$yearthai explode("-",$sday);
    
$day =      intval($yearthai[2]);
    
$month =  intval($yearthai[1]);
    
$year =     intval($yearthai[0]);     
          
//////////////////
 //   $yearthai =  $day ;
  
$m getThaiSubMonth($month);
     echo
"$day"." "."$m"." "."$year";
    
?>
              </font></td>
              <td height="18" align="center" bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost1'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF"><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost2'],2,'.',',');?> </font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost3'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost4'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"> <? echo number_format($row['Cost5'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"><? echo number_format($row['Cost6'],2,'.',',');?></font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#0033CC" size="2" face="Tahoma"><? echo number_format($row['Cost7'],2,'.',',');?></font><font color="#FF0000" size="2" face="Tahoma"> </font></div></td>
              <td bgcolor="#FFFFFF" ><div align="right"><font color="#FF0000" size="2" face="Tahoma">
                  <?php
      $Sum4 
$row[Cost1] + $row[Cost2] + $row[Cost3] + $row[Cost4] + $row[Cost5] + $row[Cost6];
    echo 
number_format($Sum4,2,'.',',');
    
// echo"$Sum4";
      
?>
              </font></div></td>
            </tr>
            <?
$count
=0;
}
$i++;
 }    
?>
            <tr bgcolor="#E0EDE6" >
              <td align="center" bordercolor="#D1D1D1" bgcolor="#FFFFFF" ><strong><font color="#003300" size="2" face="Tahoma"> </font></strong></td>
              <td align="center" bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><font color="#FF0000" size="2" face="Tahoma"><strong>รวม</strong></font></td>
              <td align="center" bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql1 
"Select Sum(Cost1) as SumC1 From finance4_tb ";
          
$result1 mysql_query($sql1) or die("Erro".mysql_error());
          
$rss1 mysql_fetch_array($result1);
           echo 
number_format($rss1[SumC1],2,'.',',');
           
//echo"$rss1[SumC1]";
           
?>
              </font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF"><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql1 
"Select Sum(Cost2) as SumC2 From finance4_tb ";
          
$result1 mysql_query($sql1) or die("Erro".mysql_error());
          
$rss2 mysql_fetch_array($result1);
             echo 
number_format($rss2[SumC2],2,'.',',');
          
// echo"$rss2[SumC2]";
           
?>
              </font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql3 
"Select Sum(Cost3) as SumC3 From finance4_tb ";
          
$result3 mysql_query($sql3) or die("Erro".mysql_error());
          
$rss3 mysql_fetch_array($result3);
           echo 
number_format($rss3[SumC3],2,'.',',');
           
//echo"$rss3[SumC3]";
           
?>
              </font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql4 
"Select Sum(Cost4) as SumC4 From finance4_tb ";
          
$result4 mysql_query($sql4) or die("Erro".mysql_error());
          
$rss4 mysql_fetch_array($result4);
             echo 
number_format($rss4[SumC4],2,'.',',');
          
// echo"$rss4[SumC4]";
           
?>
              </font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql5 
"Select Sum(Cost5) as SumC5 From finance4_tb ";
          
$result5 mysql_query($sql5) or die("Erro".mysql_error());
          
$rss5 mysql_fetch_array($result5);
          echo 
number_format($rss5[SumC5],2,'.',',');
           
//echo"$rss5[SumC5]";
           
?>
              </font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql6 
"Select Sum(Cost6) as SumC6 From finance4_tb ";
          
$result6 mysql_query($sql6) or die("Erro".mysql_error());
          
$rss6 mysql_fetch_array($result6);
           echo 
number_format($rss6[SumC6],2,'.',',');
           
//echo"$rss6[SumC6]";
           
?>
              </font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#993333" size="2" face="Tahoma">
                  <?php
          $sql6 
"Select Sum(Cost7) as SumC6 From finance4_tb ";
          
$result6 mysql_query($sql6) or die("Erro".mysql_error());
          
$rss6 mysql_fetch_array($result6);
           echo 
number_format($rss6[SumC6],2,'.',',');
           
//echo"$rss6[SumC6]";
           
?>
              </font><font color="#FF0000" size="2" face="Tahoma"><strong> </strong></font></div></td>
              <td bordercolor="#DFDFDF" bgcolor="#FFFFFF" ><div align="right"><font color="#FF0000" size="2" face="Tahoma"><strong>
                  <?php
    $SumAll 
$rss1[SumC1] +  $rss2[SumC2] +  $rss3[SumC3]  + $rss4[SumC4] +  $rss5[SumC] +  $rss6[SumC6];
    echo 
number_format($SumAll,2,'.',',');
    
//  echo"$SumAll";
     
?>
              </strong></font></div></td>
            </tr>
            <tr>
              <td colspan="10" align="center"><div align="center"><font color="#000000" size="2" face="Tahoma">ทั้งหมด <? echo $num ?> รายการ</font></div></td>
            </tr>
          </table>
        </form>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#99CCFF">
              <tr>
                <td align="right" class="Tahoma11"><div align="center"><font color="#FFFFFF"> <font color="#000000" size="2" face="Tahoma">&nbsp;<?php echo $Num_Pages;?></font><font color="#000000" size="2" face="Tahoma">&nbsp;หน้า</font> <font color="#000000" size="2" face="Tahoma">
                    <?php
if ($Pre_Page)
   echo
"<a href=\"$PHP_SELF?Page=$Pre_Page\" class=\"PageLink\"><font =\"Ms San serif\" size=\"3\"><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=\"3\"><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=\"3\"><b> Next &gt;&gt;</b> </font></a>";
 
?>
                </font> </font> </div></td>
              </tr>
            </table>
        </fieldset><br>
        <font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิก<br>
        </font></td>
    </tr>
</table>

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