403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/comservices/backend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/comservices/backend//repair.php
<?php require_once('../Connections/comservice.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
}

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
	
  $logoutGoTo = "../index.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "0";
$MM_donotCheckaccess = "false";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && false) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "../index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) 
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "frmaddcase")) {
  $updateSQL = sprintf("UPDATE com_inform SET inform_detailrepair=%s, inform_status=%s, inform_remark=%s, date_closeorder=%s WHERE inform_id=%s",
                       GetSQLValueString($_POST['inform_detailrepair'], "text"),
                       GetSQLValueString($_POST['inform_status'], "text"),
                       GetSQLValueString($_POST['inform_remark'], "text"),
                       GetSQLValueString($_POST['date_closeorder'], "text"),
                       GetSQLValueString($_POST['inform_id'], "int"));

  mysql_select_db($database_comservice, $comservice);
  $Result1 = mysql_query($updateSQL, $comservice) or die(mysql_error());

  $updateGoTo = "for_admin.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $updateGoTo));
}

$colname_recmem = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_recmem = $_SESSION['MM_Username'];
}
mysql_select_db($database_comservice, $comservice);
$query_recmem = sprintf("SELECT * FROM com_member WHERE muser = %s", GetSQLValueString($colname_recmem, "text"));
$recmem = mysql_query($query_recmem, $comservice) or die(mysql_error());
$row_recmem = mysql_fetch_assoc($recmem);
$totalRows_recmem = mysql_num_rows($recmem);

$colname_recjobs = "-1";
if (isset($_GET['inform_id'])) {
  $colname_recjobs = $_GET['inform_id'];
}
mysql_select_db($database_comservice, $comservice);
$query_recjobs = sprintf("SELECT * FROM com_inform WHERE inform_id = %s", GetSQLValueString($colname_recjobs, "int"));
$recjobs = mysql_query($query_recjobs, $comservice) or die(mysql_error());
$row_recjobs = mysql_fetch_assoc($recjobs);
$totalRows_recjobs = mysql_num_rows($recjobs);
?>
<!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=utf-8" />
<title>ระบบแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ออนไลน์</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">


<!-- Bootstrap -->
<link href="../css/bootstrap.min.css" rel="stylesheet">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    
  <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.6.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.12.custom.min.js" type="text/javascript"></script>
<link href="css/smoothness/jquery-ui-1.8.12.custom.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />

    
    <script type="text/javascript">
	$(document) .ready(function() {
		$("#date_closeorde") .datepicker({
		dateFormat : "yy-mm-dd"
        
    });
  });   
    </script>
    
    
    
    
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#EEEEEE">
      <h3> ระบบแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ออนไลน์ </h3></td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="5">
  <tr>
    <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF"></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF"><b> <a href="#" class="list-group-item active"> แบบฟอร์มรับงานแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ คณะวิทยาการจัดการ </a> </b></td>
  </tr>
  <tr>
    <td align="left" bgcolor="#FFFFFF"></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF"><form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="frmaddcase" id="frmaddcase">
        <table width="80%" border="0" align="center" cellpadding="10" cellspacing="10">
          <tr>
            <td colspan="3" align="left">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="3" align="left">&nbsp; &nbsp;&nbsp;</td>
          </tr>
          <tr>
            <td height="30" align="right">เลขที่แจ้งซ่อม : &nbsp;</td>
            <td colspan="2"><?php echo $row_recjobs['inform_id']; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; วันที่แจ้ง&nbsp;:&nbsp; <?php echo $row_recjobs['inform_date']; ?>&nbsp; &nbsp;&nbsp; ผู้แจ้ง : &nbsp;<?php echo $row_recjobs['member_name']; ?></td>
          </tr>
          <tr>
            <td height="30" align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td width="24%" align="right">รหัสครุภัณฑ์ : &nbsp; </td>
            <td width="38%"><?php echo $row_recjobs['item_id']; ?>&nbsp; &nbsp;&nbsp; </td>
            <td width="38%">ประเภทปัญหา : &nbsp;<?php echo $row_recjobs['job_type']; ?></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td align="right" valign="top">อาการเสีย : &nbsp;</td>
            <td colspan="2" rowspan="2" align="left" valign="top"><font color="#0000FF"><?php echo $row_recjobs['inform_detail']; ?></font>
              <label for="inform_img"></label></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">ภาพประกอบ : &nbsp;</td>
            <td colspan="2"><?php echo $row_recjobs['inform_img']; ?></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">ที่ตั้งครุภัณฑ์ : &nbsp;</td>
            <td colspan="2"> <font color="#0000FF"> <?php echo $row_recjobs['inform_location']; ?> </font></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td align="right" valign="top">วิธีแก้ปัญหา/ซ่อม : &nbsp;</td>
            <td colspan="2"><textarea name="inform_detailrepair" cols="100" rows="3" id="inform_detailrepair"><?php echo $row_recjobs['inform_detailrepair']; ?></textarea></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">
           </td>
          </tr>
          <tr>
            <td align="right">สถานะการซ่อม : &nbsp;</td>
            <td colspan="2"><label for="inform_status"></label>
              <select name="inform_status" id="inform_status">
                <option value="waiting">รอดำเนินการ</option>
                <option value="repairing">กำลังซ่อม</option>
                <option value="close">ดำเนินการเสร็จสิ้น</option>
            </select></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td align="right" valign="top">หมายเหตุ : </td>
            <td colspan="2"><label for="inform_remark"></label>
            <textarea name="inform_remark" cols="100" rows="3" id="inform_remark"><?php echo $row_recjobs['inform_remark']; ?></textarea></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">วันที่ดำเนินการเสร็จสิ้น : </td>
            <td colspan="2"><label for="date_closeorder"></label>
            <input name="date_closeorder" type="date" id="date_closeorde" value="<?php echo $row_recjobs['date_closeorder']; ?>" /></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2" align="center"><button type="submit" class="btn btn-primary">บันทึก</button>
              &nbsp;&nbsp;&nbsp;
              <button type="reset" class="btn btn-primary">เคลียร์ข้อความ</button></td>
          </tr>
          <tr>
            <td align="right">&nbsp;</td>
            <td colspan="2" align="center"><input name="inform_id" type="hidden" id="inform_id" value="<?php echo $row_recjobs['inform_id']; ?>" /></td>
          </tr>
        </table>
        <input type="hidden" name="MM_update" value="frmaddcase" />
    </form></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
</table>
<p>&nbsp;</p>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#DFDFD9"><span class="glyphicon glyphicon-log-out"></span> <a href="<?php echo $logoutAction ?>">ออกจากระบบ</a></td>
  </tr>
</table>
<?php
include("../footer.php")


?>
<?php
mysql_free_result($recmem);

mysql_free_result($recjobs);
?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit