| 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
//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 (!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 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);
mysql_select_db($database_comservice, $comservice);
$query_Recordset1 = "SELECT * FROM com_inform
WHERE inform_date >='".$_GET['start']."' AND inform_date <='".$_GET['end']."'";
$Recordset1 = mysql_query($query_Recordset1, $comservice) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!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>report</title>
<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" />
<style type="text/css">
body {
margin-top: 0px;
margin-bottom: 0px;
}
</style>
<script type="text/javascript">
$(document) .ready(function() {
$("#start, #end") .datepicker({
dateFormat : "yy-mm-dd"
});
});
</script>
<!--
<script type="text/javascript">
$(function(){
$("#date_range").submit(function(){
$.ajax({
type:"POST",
url:".weekly_concession.php?" + new Date().getTime(),
dataType:"text",
data:$(this).serialize(),
beforeSend:function(){
$("#loading").show();
},
success:function(response){
$("#report_result").append(response);
$("#loading").hide();
}
})
return false;
});
});
</script>
-->
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#EEEEEE">
<h3> ระบบแจ้งซ่อมครุภัณฑ์คอมพิวเตอร์ออนไลน์ </h3></td>
</tr>
<tr>
<td align="center" bgcolor="#EEEEEE"> </td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
</table>
<br>
<h3 align="center"> Show Report </h3>
<br>
<table width="90%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ccc">
<tr>
<td colspan="6" align="right" bgcolor="#FFFFFF"><strong>รวมงานซ่อมทั้งหมด <?php echo $totalRows_Recordset1 ?> รายการ</strong></td>
</tr>
<tr>
<td width="7%" align="center" bgcolor="#D6D6D6"><strong>date</strong></td>
<td width="10%" align="center" bgcolor="#D6D6D6"><strong>device_name</strong></td>
<td width="7%" align="center" bgcolor="#D6D6D6"><strong>job_type</strong></td>
<td width="50%" height="40" align="center" bgcolor="#D6D6D6"><strong>detail</strong></td>
<td width="10%" align="center" bgcolor="#D6D6D6"><strong>m.name</strong></td>
<td width="7%" align="center" bgcolor="#D6D6D6"><strong>status</strong></td>
</tr>
<?php do { ?>
<tr>
<td align="center"><?php echo date ('d-m-Y',strtotime($row_Recordset1['inform_date'])); ?></td>
<td align="center"><?php echo $row_Recordset1['device_name']; ?></td>
<td align="center"><?php echo $row_Recordset1['job_type']; ?></td>
<td align="left"><?php echo $row_Recordset1['inform_detail']; ?></td>
<td align="center"><?php echo $row_Recordset1['member_name']; ?></td>
<td align="center"><?php echo $row_Recordset1['inform_status']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<br />
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<input type="button" class="btn-primary btn-lg" value="Print" onclick="window.print() " />
</td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><a href="report.php">Back to Creat Report</a></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
<p> </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");?>
</body>
</html>
<?php
mysql_free_result($recmem);
mysql_free_result($Recordset1);
?>