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


Viewing file:     addDocCommentSign.php (8.87 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "template.php";
include_once 
"../class/clsDocCommentSign.php";
include_once 
"../link/function.php";
include_once 
"funct.php";

$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);

$oDcs = new doccommentsign($oC);
$oDcs2 = new doccommentsign($oC);
$oDcs1 = new doccommentsign($oC);
$obj = new doccommentsign($oC);
$obj2 = new doccommentsign($oC);

                
$Topp=$oDcs2->GetMinOrderS();
                
$Bottomp=$oDcs2->GetMaxOrderS();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<br>
<table  width=703  align="center">
<tr><td height="150">
<fieldset>
            <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="?mm=1">จัดการข้อมูลพื้นฐานในงานสารบรรณ</a>
      <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">ข้อความบันทึกต่อเนื่อง (ลงนาม)</font></legend>
      <br>
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" style="border-collapse:collapse">
      <tr>
              <td  height="25" colspan="3" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"><strong><? if($edDocComment==1){  echo "แก้ไข"; }?>ข้อความบันทึกต่อเนื่อง (ลงนาม)
<br></strong></font></td>
      </tr>
      </table>
      <table width="75%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#DADADA" style="border-collapse:collapse">
      <form name="aa"  METHOD="POST" action="<?php echo $PHP_SELF;?>">
      <? if($edDocComment==1){ 
                  
$oDcs1->SearchByKey($dCsID);
                
$oDcs1->GetRecord();
       } 
?>
      <tr>
                  <td width="33%" height="22" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>">&nbsp;&nbsp;<strong>ข้อความบันทึกต่อเนื่อง</strong></td>
              <td width="0%" align="center"><strong>:</strong></td><td width="72%"><input name="commentS" type="text" size="50" maxlength="255" value="<? if($edDocComment==1){  echo $oDcs1->commentS;  } ?>"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">*</font></td>
      </tr> 
        <? if($edDocComment==1){ ?>
      <tr>
                  <td width="33%" height="22" >&nbsp;&nbsp;<strong>การใช้งาน</strong></td>
              <td width="0%" align="center"><strong>:</strong></td><td width="72%"><input type="checkbox" name="commentUse" value="Y" <? if($oDcs1->commentUse=='Y'){  echo "checked";} ?>></td>
      </tr>
      <? }?>
        <tr><td height="22" colspan="3" align="center"><br>
        <? if($edDocComment==1){ ?>
        <input type="submit" name="editDocComment" value="แก้ไข" onclick="return checkFormatedit();">
        <input type="hidden" name="dCsID" value="<? echo $dCsID;?>">
        <? }else{ ?><input type="submit" name="addDocComment" value="บันทึก" onclick="return checkFormat();"> <? ?>
        <? if($edDocComment==1){ ?>
        <input type="button" name="cEdit"  value="ยกเลิก"  onclick="cancleEdit();">
        <? ?>
        <input type="hidden" name="method">
        <input type="hidden" name="MaxRow" value="<? echo ($Bottomp+1); ?>">
        </td></tr></form>
      </table> <form name="bb"  METHOD="POST" action="<?php echo $PHP_SELF;?>">
      <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
      </table><a name="b"></a>
       <table width="88%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA"  style="border-collapse:collapse">
                <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_1"]; ?>">
                <td width="7%" align="center" height="22"><strong>ลำดับ</strong></td>
                <td width="73%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_4"]; ?>"><strong>ข้อความบันทึกต่อเนื่อง (ลงนาม) 
</strong></font></td>
                <td width="5%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_4"]; ?>"><strong>แก้ไข</strong></font></td>
                <td width="5%" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_4"]; ?>"><strong>ใช้งาน</strong></font></td>
                <td width="8%" colspan="2" align="center"><font  size="2">&nbsp;</font></td>
                </tr>            
                <?
                
                $i
=0;
                
$oDcs->RSdoccommentsignAll();
                while(
$oDcs->GetRecord()){
                if((
$i%2) == 0)   
                                              echo 
"<tr bgcolor=\"#FFFFFF\" height=22 >";
                                        else
                                              echo 
"<tr bgcolor=\"".$GLOBALS["COLOR_BG_TD_16"]."\"  height=22 align=\"left\">";
                
?>
                    <td align="center" height="22" ><? echo ($i+1); ?></td><td>&nbsp;<?  echo $oDcs->commentS;?></td>
                    <td align="center"><img src="../picture/textedit3.gif" alt="แก้ไข"  border="0" align="absmiddle" onclick="goEdit('<? echo $oDcs->dCsID?>');" style="cursor:pointer;">
                    </td>
                    <td align="center"><? if($oDcs->commentUse=='Y'){ ?><img src="../picture/apply.gif"  border="0" align="absmiddle"><? }?></td>
                    <td width="4%" align="center" valign="middle">
              <? if($Topp!=$oDcs->orderS){ ?><a href="addDocCommentSign.php?method=changeSeq&typeb=Top&dCsID=<? echo $oDcs->dCsID;   ?>&orderS=<? echo $oDcs->orderS;   ?>">
              <img src="../picture/up.gif" alt="เลื่อนขึ้น"   border="0" style="cursor:pointer;"></a><? }else{   echo "&nbsp;"; } ?>
              </td>
              <td width="4%" align="center"  valign="middle">
              <? if($Bottomp!=$oDcs->orderS){ ?><a href="addDocCommentSign.php?method=changeSeq&typeb=Bottom&dCsID=<? echo $oDcs->dCsID;   ?>&orderS=<? echo $oDcs->orderS;   ?>">
              <img src="../picture/down.gif" alt="เลื่อนลง"border="0" style="cursor:pointer;"></a><? }else{   echo "&nbsp;"; }  ?> 
              </td>
                    </tr>
                <? $i++;
                }
                if(
$i==0){
                
?>
                <tr><td colspan="6" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>">** 
                      ไม่ปรากฏรายการในฐานข้อมูล **</font></td></tr>
                <? }?>
                <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"]; ?>"><td colspan="6" align="right" height="22">
                <table border="0" width="100%"><tr>
                <td width="72%">&nbsp;</td>
                <td width="28%" align="right">รวม <strong><?php echo $i;?></strong> รายการ</td>
                </tr></table>
                </td></tr>        
          
        </table>
         <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DADADA"  style="border-collapse:collapse">
        </table><br><input type="hidden" name="dCsID"><input type="hidden" name="edDocComment"><input type="hidden" name="delDocComment"> <input type="hidden" name="method">
        <input type="hidden" name="page_id" value="<? echo $page_id?>">
        </form>
</fieldset><br><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><b>หมายเหตุ : </b>* หมายถึง ต้องกรอกข้อมูลให้สมบูรณ์</font>
</td>
</tr>
</table>
</body>
</html>

<?
############process#################################
if($method=="addDocComment" && $addDocComment=="บันทึก"){
    
$obj->AddNew();
    
$obj->dCsID=$obj->GetNextCode();
    echo 
"dCsID=".$obj->dCsID."<br>";
    
$obj->commentS=$commentS;
    echo 
"commentS=".$obj->commentS."<br>";
    
$obj->orderS=$MaxRow;
    
$obj->commentUse='Y';
    
$obj->Save();
    
header("Location: addDoccommentSign.php");
}else if(
$method=="editDocComment" && $editDocComment=="แก้ไข"){
    
$obj->SearchByKey($dCsID);
    
$obj->GetRecord();
    
$obj->Edit();
    
$obj->dCsID=$dCsID;
    echo 
"dCsID=".$obj->dCsID."<br>";
    
$obj->commentS=$commentS;
    echo 
"commentS=".$obj->commentS."<br>";
    
$obj->commentUse=$commentUse;
    
$obj->Save();
    
header("Location: addDocCommentSign.php");
}else if(
$method=="changeSeq"){ 
    
    if(
$typeb=="Top"){
        
$obj->SearchBydCsIDlimitPreSeq($orderS); 
        
$obj->GetRecord();
        
        
$preseqBox=$obj->orderS;

            
$obj->Edit();
            
$obj->dCsID=$obj->dCsID;
            
$obj->orderS=$orderS;
            
$obj->Save();
            
            
$obj2->SearchByKey($dCsID); 
            
$obj2->GetRecord();
            
$obj2->Edit();
            
$obj2->dCsID=$obj2->dCsID;
            
$obj2->orderS=$preseqBox;
            
$obj2->Save();

    }else if(
$typeb=="Bottom"){
            
$obj->SearchBydCsIDlimitNextSeq($orderS); 
            
$obj->GetRecord();
        
        
$nextseqBox=$obj->orderS;

            
$obj->Edit();
            
$obj->dCsID=$obj->dCsID;
            
$obj->orderS=$orderS;
            
$obj->Save();
            
            
$obj2->SearchByKey($dCsID); 
            
$obj2->GetRecord();
            
$obj2->Edit();
            
$obj2->dCsID=$obj2->dCsID;
            
$obj2->orderS=$nextseqBox;
            
$obj2->Save();
    }
    
header("Location: addDocCommentSign.php");
    
}
####################################################
?>
<script language="javascript">
function goEdit(dcsid){  
        document.bb.dCsID.value=dcsid;
        document.bb.edDocComment.value=1;
        document.bb.submit();
}
function cancleEdit(){   
        document.aa.submit();
}
function checkFormat(){
        if(document.aa.commentS.value == ""){
                alert("กรุณากรอกข้อความบันทึกต่อเนื่อง");
                document.aa.commentS.focus();
                return false;
        }
        var agree=confirm("คุณต้องการบันทึกข้อมูลข้อความบันทึกต่อเนื่อง\nแน่นอนใช่หรือไม่ ?");
        if (agree){
            document.aa.method.value="addDocComment";
            return true;
        }else{
            return false ;
        }
}

function checkFormatedit(){
        if(document.aa.commentS.value == ""){
                alert("กรุณากรอกข้อความบันทึกต่อเนื่อง");
                document.aa.commentS.focus();
                return false;
        }
        var agree=confirm("คุณต้องการแก้ไขข้อมูลข้อความบันทึกต่อเนื่อง\nแน่นอนใช่หรือไม่ ?");
        if (agree){
            document.aa.method.value="editDocComment";
            return true;
        }else{
            return false ;
        }
}
</script>

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