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


Viewing file:     AddAbsent_031.php (22.03 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" );
        
    
        
/**  Create Database Object  */
        
$dbObj = new DBConn;
        
        
/**  Config Table for This Page  */
        
$myTable "personal_tb";
        
$myTable1 "budget_year_tb";
        
$myTable2 "history_accumu";
        
$query "SELECT *, prefixName as First_name FROM personal_tb 
                    LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId 
                    LEFT JOIN position_tb ON personal_tb.PositionId = position_tb.PositionId
                    LEFT JOIN faculty_tb ON personal_tb.Faculty_code = faculty_tb.Faculty_code 
                    LEFT JOIN district ON personal_tb.districtId = district.districtId 
                    LEFT JOIN amphur ON personal_tb.amphurId = amphur.amphurId 
                    LEFT JOIN province ON personal_tb.provinceId = province.provinceId
                    WHERE personal_tb.Teacher_code='"
.$_REQUEST['Teacher_code']."'";
        
$result $dbObj->execQuery($query);
        
$rss $dbObj->fetchArray($result);
        
$query1 " SELECT *  FROM  $myTable1   ";
        
$result1 $dbObj->execQuery($query1);
        
$rs $dbObj->fetchObject($result1);
        
$query2 " SELECT *  FROM  $myTable2  Where   Teacher_code='$Teacher_code'   and  Year ='$Year' and Times_total != ''  ";
        
$result2 $dbObj->execQuery($query2);
        
$rss2 $dbObj->fetchObject($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" />
<title>แบบใบลาพักผ่อน</title>
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script language="javascript" src="../js/calendarDateInput2.js"></script>
<script language="javascript" type="text/javascript">
function checkData() {
var formObj = document.form1;
    if( (formObj.Absent_code.value == "" ) && (formObj.Absent_times.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Absent_code.style.backgroundColor='#F1F9FC'; formObj.Absent_times.focus(); return false; }
     if(formObj.Absent_times.value == "" ) { alert("กรุณากรอก จำนวนวัน"); formObj.Absent_times.style.backgroundColor='#F1F9FC'; formObj.Absent_times.focus(); return false;} 
     if(formObj.Year.value == "" ) { alert("กรุณากรอก ปีงบประมาณ"); formObj.Year.style.backgroundColor='#F1F9FC'; formObj.Year.focus(); return false;}     
    else return true ;
}
</script>

</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="left" valign="top" style="padding:10px 0px 5px 10px"><fieldset><legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php">หน้าหลัก</a></font><img src="../picture/ico3.gif" width="10" height="10" align="absmiddle" border="0" /></font><a href="Menu_Form.php?Teacher_code=<?=$Teacher_code;?>">แบบฟอร์มราชการ</a></font><img src="../picture/ico3.gif" width="10" height="10" align="absmiddle" border="0" /></font><a href="FormAbsentAList.php?Teacher_code=<?=$Teacher_code;?>&Absent_code=3">ประวัติการลาพักผ่อน</a></font><img src="../picture/ico3.gif" width="10" height="10" align="absmiddle" border="0" /></font><strong><span class="NOTE">แบบใบลาพักผ่อน</span></strong></legend>
    
      <form id="form1" name="form1" method="post" action="InsertAbsent_03.php" onSubmit="return checkData();">
      <table width="780" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="center">
          <table width="753" border="0" cellpadding="0" cellspacing="4">
                  <tr height="31">
                    <td height="20" colspan="6" class="PATRON11" align="center">แบบใบลาพักผ่อน</td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="6"><span class="style1"> ส่วนราชการ <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></span></td>
                  </tr>
                  
                  <tr height="29">
                    <td height="29" colspan="6" align="right">
                        <script>DateInput('mDate', true, 'DD/MM/YYYY','<?=date("d/m/Y");?>');</script>                    </td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="3" align="left">เรื่อง  <font color="#0000FF" size="2" face="Tahoma">
                      <input name="Absent_code" type="text" id="Absent_code" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="ขอลาพักผ่อน" size="10" readonly/>
                      <input name="Absent_code" type="hidden" id="Absent_code" value="3" />
                    </font></td>
                    <td width="40"></td>
                    <td width="213"></td>
                    <td width="102"></td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="5" align="left">เรียน      ผู้อำนวยการ <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="106" 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" size="30"  value="<? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp;<? echo $rss[Teacher_lastname]?> " />
                    </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" size="30"  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] ";?>
         " />
                    </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" size="20"  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] "?>" />
                    </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" size="40"  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] "?> " />
                    </font><span class="style11">สถาบันพระบรมราชชนก</span></td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="6" align="left">มีวันลาพักผ่อนสะสม<font color="#0000FF" size="2" face="Tahoma">
                      <input name="Times_total" type="text" id="Times_total" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" onkeypress="checkNumeric()" value="<?=$rss2->Times_total;?>" size="3" maxlength="4" />
                    </font>วันทำการ    มีสิทธิลาพักผ่อนประจำปีนี้อีก 10 วันทำการ รวมเป็น<font color="#0000FF" size="2" face="Tahoma">
                    <input name="Times_sum" type="text" id="Times_sum" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=(($rss2->Times_total +10) > 30)?"30":$rss2->Times_total+10;?>" size="3" maxlength="2" />
                    </font>วันทำการ</td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="6" align="left">
                        <table>
                            <tr>
                                <td>ขอลาพักผ่อนตั้งแต่วันที่</td>
                                <td><script>DateInput('mDate1', true, 'DD/MM/YYYY','<?=date("d/m/Y");?>');</script></td>
                                <td>ถึงวันที่</td>
                                <td><script>DateInput('mDate2', true, 'DD/MM/YYYY','<?=date("d/m/Y");?>');</script></td>
                                <td>
                                    มีกำหนด
                                    <input name="Absent_times" type="text" id="Absent_times" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed; text-align:center" size="3" maxlength="4" onkeypress="checkNumeric()"/>
                                    วัน                                </td>
                            </tr>
                        </table>                    </td>
                  </tr>
                  
                  <tr height="29">
                    <td height="29" colspan="6" align="left">
                        ในระหว่างลาจะติดต่อข้าพเจ้าได้ที่
                        <input name="Address" type="text" id="Address" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss["Address"]."   ต.".$rss["districtName"]."  อ.".$rss["amphurName"]."   จ.".$rss['provinceName'];?>" size="60" readonly="readonly" />                    </td>
                  </tr>
                  <tr height="29">
                    <td height="13" colspan="3" align="left">ผู้รับมอบหมาย<font color="#0000FF" size="2" face="Tahoma">
                      <input name="InforName" type="text" id="InforName" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" />
                    </font></td>
                    <td></td>
                    <td></td>
                    <td></td>
                  </tr>
                  <tr height="29">
                    <td height="16"></td>
                    <td colspan="2">&nbsp;</td>
                    <td></td>
                    <td></td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31" align="right">&nbsp;</td>
                    <td width="104">&nbsp;</td>
                    <td width="160"></td>
                    <td colspan="3" align="left">                   </td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="3" align="center">สถิติการลาในปีงบประมาณนี้<font color="#0000FF" size="2" face="Tahoma">
                      <input name="Year" type="text" id="Year" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs->Budget_year;?>" size="3" maxlength="4" />
                    </font></td>
                    <td></td>
                    <td></td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31" colspan="3" align="center"><table width="296" border="1" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <th width="82" height="27" scope="col">ประเภทการลา</th>
                        <th width="83" align="center" scope="col">ลามาแล้ว</th>
                        <th width="62" align="center" scope="col">ลาครั้งนี้</th>
                        <th width="59" align="center" scope="col">รวมเป็น</th>
                      </tr>
                      <tr>
                        <td>พักผ่อน</td>
                        <td align="center"><?php         
          $Teacher_code 
$rss["Teacher_code"];
          
$sql1 "Select Sum(Absent_times) as SumB1 From history_absent_tb  Where  Teacher_code='$Teacher_code'   and  Year='$Year'  and  Absent_code='3'  and  code  != '$code'  " ;
          
$result1 mysql_query($sql1) or die("Erro".mysql_error());
          
$rss1 mysql_fetch_array($result1);
           echo 
number_format($rss1[SumB1],1,'.',',');
           
//echo"$rss1[SumC1]";
           
?>
                          </a></td>
                        <td align="center"><?=$rs1[Absent_code]==3?number_format($rs1['Absent_times'],1,'.',','):"0.0";?></td>
                        <td align="center"><?=$rs1[Absent_code]==3?number_format(($rss1[SumB1]+$rs1['Absent_times']),1,'.',','):number_format($rss1[SumB1],1,'.',',');?></td>
                      </tr>
                    </table></td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31" align="center">&nbsp;</td>
                    <td align="center">&nbsp;</td>
                    <td align="center">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31" align="left">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td align="center"><span class="style1">ขอแสดงความนับถือ</span></td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31" align="left">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>(ลงชื่อ)..................................</td>
                    <td></td>
                  </tr>
                  <tr height="29">
                    <td height="29">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td></td>
                    <td><div align="center">(<font color="#003366" size="2" face="Tahoma">..<? echo $rss[First_name]?> <? echo $rss[Teacher_name]?>&nbsp;<? echo $rss[Teacher_lastname]?></font>..)
                      <input type="hidden" name="Teacher_code" value="<? echo $Teacher_code?>" />
                    </div></td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="3" align="left"><span class="style2">ความเห็นผู้บังคับบัญชา</span></td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td colspan="3"><div align="center">.<font color="#0000FF" size="2" face="Tahoma">
                    <input name="Info_name3" type="text" id="Info_name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25" />
                    </font></div></td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="3" align="left">ลงชื่อ....................................ผู้ตรวจสอบ </td>
                    <td colspan="2">........................................</td>
                    <td></td>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="2" align="left">ตำแหน่ง...................................     </td>
                    <td align="left">                                        </td>
                    <td colspan="3" align="left">(<font size="2" face="Tahoma">
                    <?php
                         
//$Teacher_code =  $rss["TeacherId"];
                         
$sql "Select *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId 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>
                  </tr>
                  <tr height="29">
                    <td height="29" colspan="3" align="left">      วันที่......../................/.............. </td>
                    <td colspan="3" align="left">ตำแหน่ง.<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" size="25"  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] ";?>
         " />
                    </font></td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td colspan="3" align="left">         วันที่......เดือน..............พ.ศ......</td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31"></td>
                    <td></td>
                    <td></td>
                    <td align="left"><div align="center">คำสั่ง</div></td>
                    <td></td>
                    <td></td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td align="left">          </td>
                    <td colspan="2" align="left"><label>
                      <input type="checkbox" name="checkbox" value="checkbox" />
                    </label>
                        
                    อนุญาต          
                      <input type="checkbox" name="checkbox2" value="checkbox" />                     
                    ไม่อนุญาต</td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td colspan="2" align="left">.......................................................</td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td colspan="3" align="left">....................................................................</td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td colspan="3" align="left">         (ลงชื่อ)..................................……..</td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td colspan="3" align="left">(ตำแหน่ง)..........................................….</td>
                  </tr>
                  <tr height="29">
                    <td height="29"></td>
                    <td></td>
                    <td></td>
                    <td colspan="3" align="left">         วันที่.......เดือน...............พ.ศ.....</td>
                  </tr>
                  <tr height="31">
                    <td height="31"></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                  </tr>
                  <tr height="31">
                    <td height="31" colspan="6" align="center"><input type="submit" name="Submit" value="   บันทึก   " /> 
                  &nbsp;
                  <input name="Submit" type="reset" id="Submit" value="   ยกเลิก  " /></td>
                  </tr>
              </table>    </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    </form>
   </fieldset></td>
  </tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
    
/**  Free Resource */
    
$dbObj->freeresult($result);
    
    
/**  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.0116 ]--