| 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 : |
<?php require_once('../Connections/comservice.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 = "../main.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
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;
}
}
$colname_recmem = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_recmem = $_SESSION['MM_Username'];
}
mysql_select_db($database_comservice, $comservice);
$query_recmem = sprintf("SELECT * FROM mis_member WHERE MEMBERCODE = %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);
$maxRows_show_inform = 10;
$pageNum_show_inform = 0;
if (isset($_GET['pageNum_show_inform'])) {
$pageNum_show_inform = $_GET['pageNum_show_inform'];
}
$startRow_show_inform = $pageNum_show_inform * $maxRows_show_inform;
$colname_show_inform = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_show_inform = $_SESSION['MM_Username'];
}
mysql_select_db($database_comservice, $comservice);
$query_show_inform = sprintf("SELECT * FROM com_inform WHERE member_name = %s ORDER BY inform_id DESC", GetSQLValueString($colname_show_inform, "text"));
$query_limit_show_inform = sprintf("%s LIMIT %d, %d", $query_show_inform, $startRow_show_inform, $maxRows_show_inform);
$show_inform = mysql_query($query_limit_show_inform, $comservice) or die(mysql_error());
$row_show_inform = mysql_fetch_assoc($show_inform);
if (isset($_GET['totalRows_show_inform'])) {
$totalRows_show_inform = $_GET['totalRows_show_inform'];
} else {
$all_show_inform = mysql_query($query_show_inform);
$totalRows_show_inform = mysql_num_rows($all_show_inform);
}
$totalPages_show_inform = ceil($totalRows_show_inform/$maxRows_show_inform)-1;
?>
<!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">
<title>Bootstrap 101 Template</title>
<!-- 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]-->
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#EEEEEE"><img src="../img/logo.gif" width="70" /><br />
<h3> ระบบแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ออนไลน์ คณะวิทยาการจัดการ </h3></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"><font color="#3366FF"><span class="glyphicon glyphicon-user"></span> ยินดีต้อนรับคุณ : <?php echo $row_recmem['MEMBERNAME']; ?> </font> <? print " Date : " . date("D d F Y " ); ?></td>
</tr>
<tr>
<td width="26%" align="center" bgcolor="#FFFFFF"> </td>
<td width="74%" align="left" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td rowspan="2" align="left" valign="top" bgcolor="#FFFFFF">
include ("menumember.php");
?>
</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30%" align="center" bgcolor="#E2E2E2">วันที่แจ้งซ่อม</td>
<td width="38%" height="30" align="center" bgcolor="#E2E2E2">อาการเสีย</td>
<td width="32%" align="center" bgcolor="#E2E2E2">สถานะแจ้งซ่อม</td>
</tr>
<tr>
<td align="center"> </td>
<td align="left">: </td>
<td align="center"> </td>
</tr>
</table>
<p> </p>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="16%" align="center" bgcolor="#E2E2E2">วันที่แจ้งซ่อม</td>
<td width="13%" align="center" bgcolor="#E2E2E2">รหัสครุภัณฑ์</td>
<td width="17%" height="30" align="center" bgcolor="#E2E2E2">ชื่ออุปกรณ์</td>
<td width="14%" align="center" bgcolor="#E2E2E2">ลักษณะงาน</td>
<td width="22%" align="center" bgcolor="#E2E2E2">อาการเสีย</td>
<td width="18%" align="center" bgcolor="#E2E2E2">สถานะแจ้งซ่อม</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_show_inform['inform_date']; ?></td>
<td><?php echo $row_show_inform['item_id']; ?></td>
<td><?php echo $row_show_inform['device_name']; ?></td>
<td><?php echo $row_show_inform['job_type']; ?></td>
<td align="left"><?php echo $row_show_inform['inform_detail']; ?></td>
<td><?php echo $row_show_inform['inform_status']; ?></td>
</tr>
<?php } while ($row_show_inform = mysql_fetch_assoc($show_inform)); ?>
</table>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"> </td>
</tr>
</table>
<p> </p>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#DFDFD9"><a href="<?php echo $logoutAction ?>">ออกจากระบบ</a></td>
</tr>
</table>
<?php
include("../footer.php") ?>
<?php
mysql_free_result($recmem);
mysql_free_result($show_inform);
?>
</body>
</html>