Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > ต้องการให้ข้อมูลที่เช็คค่าว่ามันซ้ำกับข้อมูลเดิมนั้น ให้โชว์เด้งไปเพจใหม่ รบกวนช่วยทีนะค่ะ



 

ต้องการให้ข้อมูลที่เช็คค่าว่ามันซ้ำกับข้อมูลเดิมนั้น ให้โชว์เด้งไปเพจใหม่ รบกวนช่วยทีนะค่ะ

 



Topic : 075473



โพสกระทู้ ( 3 )
บทความ ( 0 )



สถานะออฟไลน์
Facebook



Code (PHP)
<?php require_once('../Connections/rs_qa.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 = "";
$MM_donotCheckaccess = "true";

// *** 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 == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "../login/loginfail.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 (!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;
}
}

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;
}
}

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;
}
}

$currentPage = $_SERVER["PHP_SELF"];

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;
}
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO tbliability (Id_lia, Id_dep, Id_indicator) VALUES (%s, %s, %s)",
                       GetSQLValueString($_POST['Id_lia'], "int"),
                       GetSQLValueString($_POST['Id_dep'], "text"),
                       GetSQLValueString($_POST['Id_indicator'], "text"));

  mysql_select_db($database_rs_qa, $rs_qa);
  $Result1 = mysql_query($insertSQL, $rs_qa) or die(del_liability.php());
  
}

mysql_select_db($database_rs_qa, $rs_qa);
$query_rs_admin = "SELECT * FROM tbmember";
$rs_admin = mysql_query($query_rs_admin, $rs_qa) or die(mysql_error());
$row_rs_admin = mysql_fetch_assoc($rs_admin);
$totalRows_rs_admin = mysql_num_rows($rs_admin);

$maxRows_rs_lia = 10;
$pageNum_rs_lia = 0;
if (isset($_GET['pageNum_rs_lia'])) {
  $pageNum_rs_lia = $_GET['pageNum_rs_lia'];
}
$startRow_rs_lia = $pageNum_rs_lia * $maxRows_rs_lia;

mysql_select_db($database_rs_qa, $rs_qa);
$query_rs_lia = "SELECT * FROM tbliability ORDER BY Id_dep,Id_indicator ASC";
$query_limit_rs_lia = sprintf("%s LIMIT %d, %d", $query_rs_lia, $startRow_rs_lia, $maxRows_rs_lia);
$rs_lia = mysql_query($query_limit_rs_lia, $rs_qa) or die(mysql_error());
$row_rs_lia = mysql_fetch_assoc($rs_lia);

if (isset($_GET['totalRows_rs_lia'])) {
  $totalRows_rs_lia = $_GET['totalRows_rs_lia'];
} else {
  $all_rs_lia = mysql_query($query_rs_lia);
  $totalRows_rs_lia = mysql_num_rows($all_rs_lia);
}
$totalPages_rs_lia = ceil($totalRows_rs_lia/$maxRows_rs_lia)-1;

mysql_select_db($database_rs_qa, $rs_qa);
$query_rs_dep = "SELECT * FROM tbdeparmant";
$rs_dep = mysql_query($query_rs_dep, $rs_qa) or die(mysql_error());
$row_rs_dep = mysql_fetch_assoc($rs_dep);
$totalRows_rs_dep = mysql_num_rows($rs_dep);

mysql_select_db($database_rs_qa, $rs_qa);
$query_rs_indicator = "SELECT * FROM tbindicator";
$rs_indicator = mysql_query($query_rs_indicator, $rs_qa) or die(mysql_error());
$row_rs_indicator = mysql_fetch_assoc($rs_indicator);
$totalRows_rs_indicator = mysql_num_rows($rs_indicator);

$queryString_rs_lia = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rs_lia") == false && 
        stristr($param, "totalRows_rs_lia") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rs_lia = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_rs_lia = sprintf("&totalRows_rs_lia=%d%s", $totalRows_rs_lia, $queryString_rs_lia);

$queryString_rs_dep = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rs_dep") == false && 
        stristr($param, "totalRows_rs_dep") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rs_dep = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_rs_dep = sprintf("&totalRows_rs_dep=%d%s", $totalRows_rs_dep, $queryString_rs_dep);

$queryString_rs_admin = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rs_admin") == false && 
        stristr($param, "totalRows_rs_admin") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_rs_admin = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_rs_admin = sprintf("&totalRows_rs_admin=%d%s", $totalRows_rs_admin, $queryString_rs_admin);
?>
<script language="JavaScript">
<!--
function confirm_entry()
{
input_box=confirm("Click OK or Cancel to Continue");
if (input_box==true)

{ 
// Output when OK is clicked
alert ("You clicked OK"); 
}

else
{
// Output when Cancel is clicked
alert ("You clicked cancel");
}

}
-->
</script>
<html>
<head>
<title>ส่วนการจัดการข้อมูลสำหรับผู้ดูแลระบบ | งานประกันคุณภาพตามเกณฑ์สำนักงานคณะกรรมการการอุดมศึกษา</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
	background-color: #999999;
}
}
A:visited {
 COLOR: #000 /*The color of the visited link*/
}
A:hover {
 COLOR: #60F/*The color of the mouseover or 'hover' link*/
}

.style3 {
	font-size: 12px;
	font-family: Tahoma;
}
a {
	acolor: #000; 
	text-decoration: none;
}
A:visited {
 COLOR: #000 /*The color of the visited link*/
}
A:hover {
 COLOR: #F00/*The color of the mouseover or 'hover' link*/
}

ul#ul-list {list-style-type: none; padding: 0; margin: 2;}
ul#ul-list li {border-bottom: #999 solid 1px;}
ul#ul-list li a {color: #000; text-decoration: none;}
ul#ul-list li a:hover {color: #f00;}
.style5 {color: #FFFFFF}

#slider {
    width: 710px; /* important to be same as image width */
    height: 250px; /* important to be same as image height */
    position: relative; /* important */
	overflow: hidden; /* important */
}
#slider ul { list-style-type: none;}
#sliderContent {
    width: 710px; /* important to be same as image width or wider */
    position: absolute;
	top: 0;
	margin-left: 0;
}
.sliderImage {
    float: left;
    position: relative;
	display: none;
}
.clear {
	clear: both;
}
body {
	background-color: #999999;
}
.style1 {font-size: 14px}
.style2 {
	color: #40B6D2;
	font-family: Tahoma;
}
.style4 {
	font-size: 12px;
	font-family: Tahoma;
	color: #25B7E0;
}
.style5 {font-family: Tahoma}
.style7 {font-size: 12px}
.style8 {color: #FFFFFF}
.style10 {font-family: Tahoma; font-size: 10px; }
.style11 {font-family: Tahoma; font-size: 12px; }
.style13 {
	font-size: 24px;
	font-weight: bold;
	color: #0000FF;
}
-->
</style>
<script src="../admin/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="../admin/jquery.min.js" type="text/javascript"></script>
<script src="../admin/s3Slider.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#slider').s3Slider({
            timeOut: 3000
        });
    });
</script> 
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="../css/bus_body.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style14 {color: #FFFFFF}
.style14 {	font-family: "MS Serif", "New York", serif;
	color: #000;
	font-weight: normal;
	font-size: 12px;
}
.style15 {color: #FFFFFF}
.style15 {	font-family: "MS Serif", "New York", serif;
	color: #000;
	font-weight: normal;
	font-size: 12px;
}
.style17 {color: #FFFFFF}
.style17 {	font-family: "MS Serif", "New York", serif;
	color: #000;
	font-weight: normal;
	font-size: 12px;
}
-->
</style>
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/bt_2_01.png','../images/bt_2_02.png', '../images/bt_2_03.png','../images/bt_2_05.png','../images/bt_2_06.png','../images/bt_2_07.png','../images/bt_2_08.png')">

<?
	$Log_state=$_SESSION['MM_Log_state'];
	$Id_dep=$_SESSION['MM_Id_dep'];
	$Id_mas=$_SESSION['MM_Id_mas'];
    $Name_attendant_1=$_SESSION['MM_Name_attendant_1'];
 	$Surname_attendant_1=  $_SESSION['MM_Surname_attendant_1'];	
	$Email_attendant_1=  $_SESSION['MM_Email_attendant_1'];	
?>
<!-- ImageReady Slices (main.jpg) -->
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tr>
  <td rowspan="6" width="10" background="../images/main_1_01.png">&nbsp;</td>
  <td height="10" colspan="2" bgcolor="#37b2d1">&nbsp;</td>
  <td rowspan="6" width="10" background="../images/main_1_03.png">&nbsp;</td>
</tr>
<tr>
  <td width="586" height="10" bgcolor="#37b2d1">&nbsp;</td>
  <td width="384" bgcolor="#37b2d1" class="style10"><span class="style1">คุณ<?php echo $Name_attendant_1; ?>&nbsp;&nbsp; <?php echo $Surname_attendant_1; ?>&nbsp;&nbsp;ผู้ดูแลระบบ&nbsp;|&nbsp;</span><a href="<?php echo $logoutAction ?>">&nbsp;<span class="style1">ออกจากระบบ</span></a></span></td>
  </tr>
<tr>
		<td height="150" colspan="2"><img src="../images/header.jpg" width="970" height="150"></td>
  </tr>
	<tr>
		<td colspan="2"><table width="970" border="0" cellspacing="0" cellpadding="0">
	     
      </table></td>
    </tr>
    
<tr>
	  <td height="150" colspan="2" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
	        <td width="228" align="center" valign="top"><table width="227" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td width="100%"><img src="../admin/images/menu_1.png" width="228" height="38" alt="" /></td>
              </tr>
	          <tr>
	            <td align="center"><table width="224"  border="0" align="center" cellpadding="0" cellspacing="0" >
	              <tr>
	                <td width="224" align="left" valign="top" class="style3"><ul id="ul-list">
	                  <li class="style5"><a href="../admin/admin.php"><img src="../images/icon_1.jpg" width="17" height="20" border="0">ข้อมูลผู้ใช้ระบบ</a></li>
                       <li class="style5"><a href="add_liability.php"><img src="../images/icon_1.jpg" alt="" border="0" />กำหนดผู้รับผิดชอบตามตัวบ่งชี้</a></li>
	                  </ul></td>
	                </tr>
	              </table></td>
              </tr>
	          <tr>
	            <td align="center"><table width="227" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td width="100%"><img src="../admin/images/menu_2.png" width="228" height="38" alt="" /></td>
	                </tr>
	              <tr>
	                <td align="center"><table width="230"  border="0" align="center" cellpadding="0" cellspacing="0" >
	                  <tr>
	                    <td width="230" align="left" valign="top" class="style3"><ul id="ul-list">
	                      <li class="style5"><img src="../images/icon_1.jpg" alt="" /><a href="../year/show_year.php">กำหนดปีการประเมิน</a></li>
	                      <li class="style5"><a href="../elements/show_elements.php"><img src="../images/icon_1.jpg" alt="" border="0" />กำหนดองค์ประกอบคุณภาพ</a></li>
	                      </ul></td>
	                    </tr>
	                  </table></td>
	                </tr>
                </table></td>
              </tr>
	          <tr>
	            <td align="center"><table width="227" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td width="100%"><img src="../admin/images/menu_3.png" width="228" height="38" alt="" /></td>
	                </tr>
	              <tr>
	                <td align="center"><table width="220"  border="0" align="center" cellpadding="0" cellspacing="0" >
	                  <tr>
	                    <td width="220" align="left" valign="top" class="style3"><ul id="ul-list">
	                      <li class="style5"><a href="../news/show_news.php"><img src="../images/icon_1.jpg" alt="" border="0" />กำหนดข่าวประชาสัมพันธ์</a></li>
	                      </ul></td>
	                    </tr>
	                  </table></td>
	                </tr>
                </table></td>
              </tr>
	          <tr>
	            <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td><img src="../admin/images/menu_4.png" width="228" height="38"></td>
	                </tr>
	              <td width="230" align="left" valign="top" class="style3"><ul id="ul-list">
	                      <li class="style5"><img src="../images/icon_1.jpg" alt="" /><a href="../year/show_year.php">กำหนดรายงานประเมินตนเอง</a></li>
                           <li class="style5"><img src="../images/icon_1.jpg" alt="" /><a href="../year/show_year.php">กำหนดรายงานหลักฐานรายตัวชี้วัด</a></li>
                            <li class="style5"><img src="../images/icon_1.jpg" alt="" /><a href="../year/show_year.php">กำหนดรายงานสรุปตามองค์ประกอบ</a></li>
                             <li class="style5"><a href="../liability/report_liability.php"><img src="../images/icon_1.jpg" alt="" border="0" />กำหนดรายงานสรุปผู้รับผิดชอบตัวบ่งชี้</a></li>
	                      </ul></td>
	                </tr>
                </table></td>
              </tr>
        </table></td>
	        <td width="742" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td height="30" colspan="4" bgcolor="#666666" class="style4">&nbsp;<span class="style1"><strong>ข้อมูลผู้ใช้ระบบ&nbsp;| กำหนดผู้รับผิดชอบตามตัวบ่งชี้</strong></span></td>
                 
              </tr>
	          <tr>
	            <td colspan="4">&nbsp;</td>
              </tr>
	          <tr>
	            <td colspan="3">&nbsp;</td>
	            <td class="style5"><strong>กำหนดผู้รับผิดชอบตามตัวบ่งชี้ของหน่วยงานและสาขา</strong></td>
              </tr>
	          <tr>
	            <td colspan="4"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
	              <tr>
	                <td><img src="../admin/images/form.png" width="703" height="28"></td>
	                </tr>
                </table></td>
              </tr>
	          <tr>
	            <td height="10" colspan="4"><form method="post" name="form1" action="<?php echo $editFormAction; ?>">
                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr valign="baseline">
                        <td colspan="2" align="right" nowrap bgcolor="#CCCCCC" class="style6">&nbsp;</td>
                      <tr valign="baseline" class="style5">
                        <td width="145" align="right" nowrap bgcolor="#CCCCCC" class="style6"><span class="style11">หน่วยงานและสาขา&nbsp;</span>:</td>
                        <td width="117" bgcolor="#CCCCCC"><span id="spryselect2">
                          <select name="Id_dep">
                            <option value="" selected>-กรุณาเลือกหน่วยงานและสาขา-</option>
                            <?php
do {  

?>
                            <option value="<?php echo $row_rs_dep['Id_dep']?>"><?php echo $row_rs_dep['Name_dep']; ?></option>
                            <?php
} while ($row_rs_dep = mysql_fetch_assoc($rs_dep));
  $rows = mysql_num_rows($rs_dep);
  if($rows > 0) {
      mysql_data_seek($rs_dep, 0);
	  $row_rs_dep = mysql_fetch_assoc($rs_dep);
  }
?>
                          </select>
                        <span class="selectRequiredMsg">กรุณาเลือกหน่วยงานและสาขา</span></span></td>
                      <tr valign="baseline" class="style5">
                        <td align="right" nowrap bgcolor="#CCCCCC" class="style6"><span class="style11">รายตัวบ่งชี้ </span>:</td>
                        <td bgcolor="#CCCCCC"><span id="spryselect1">
                          <select name="Id_indicator">
                            <option value="">-กรุณาเลือกตัวบ่งชี้-</option>
                            <?php
do {  

?>
                            <option value="<?php echo $row_rs_indicator['Id_indicator']?>"><?php echo $row_rs_indicator['Order_indicator']; ?>&nbsp;<?php echo $row_rs_indicator['Name_indicator']; ?></option>
                            <?php
} while ($row_rs_indicator = mysql_fetch_assoc($rs_indicator));
  $rows = mysql_num_rows($rs_indicator);
  if($rows > 0) {
      mysql_data_seek($rs_indicator, 0);
	  $row_rs_indicator = mysql_fetch_assoc($rs_indicator);
  }
?>
                          </select>
                        <span class="selectRequiredMsg">กรุณาเลือกตัวบ่งชี้</span></span></td>
                      <tr valign="baseline" bgcolor="#CCCCCC">
                        <td align="right" nowrap>&nbsp;</td>
                        <td><input type="submit" value="ตกลง"></td>
                      </tr>
                      <tr valign="baseline" bgcolor="#666666">
                        <td height="28" align="right" nowrap>&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                    </table>
                    <input type="hidden" name="MM_insert" value="form1">
                </form></td>
              </tr>
	          <tr>
	            <td colspan="4">&nbsp;</td>
              </tr>
	          <tr>
	            <td colspan="3">&nbsp;</td>
	            <td width="98%" class="style5"><strong>ข้อมูลรายตัวชี้วัดของหน่วยงานและสาขาที่รับผิดชอบ </strong></td>
              </tr>
	          <tr>
	            <td colspan="4"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
	              <tr bgcolor="#666666" class="style3">
	                <td width="27%" class="style12">&nbsp;&nbsp;&nbsp;หน่วยงานและสาขา</td>
	                <td width="3%" class="style12">&nbsp;</td>
	                <td height="30" class="style12">รายตัวบ่งชี้ที่รับผิดชอบ</td>
	                <td width="8%" class="style12">ลบ</td>
	                <td width="11%" class="style3">เกณฑ์ตัวชี้วัด</td>
	                </tr>
                  
                  <?php do { ?>
                  <? 
$iLoop++;
$bgcolor = ( ($iLoop%2)==0 )? "#CCCCCC" : "#F5F5F5" ;
?>
                    <tr class="style5" bgcolor="<?php echo $bgcolor ;?>" >
                      <td class="style5">
                        <?php 
	      mysql_select_db($database_connect, $rs_qa);
		$query_rs_dep = sprintf("SELECT * FROM tbdeparmant where Id_dep = '%s'",$row_rs_lia['Id_dep']);
		$rs_dep = mysql_query($query_rs_dep , $rs_qa) or die(mysql_error());
		$row_rs_dep = mysql_fetch_assoc($rs_dep );
		$totalRows_rs_dep  = mysql_num_rows($rs_dep );
	  echo $row_rs_dep ['Name_dep'];  ?>
                      </td>
                      <td class="style5">
                        <?php 
	      mysql_select_db($database_connect, $rs_qa);
		$query_rs_indicator = sprintf("SELECT * FROM tbindicator where Id_indicator = '%s'",$row_rs_lia['Id_indicator']);
		$rs_indicator = mysql_query($query_rs_indicator , $rs_qa) or die(mysql_error());
		$row_rs_indicator = mysql_fetch_assoc($rs_indicator );
		$totalRows_rs_indicator  = mysql_num_rows($rs_indicator );
	  echo $row_rs_indicator ['Order_indicator'];  ?>
                      </td>
                      <td height="26" class="style5">
                        <?php 
	      mysql_select_db($database_connect, $rs_qa);
		$query_rs_indicator = sprintf("SELECT * FROM tbindicator where Id_indicator = '%s'",$row_rs_lia['Id_indicator']);
		$rs_indicator = mysql_query($query_rs_indicator , $rs_qa) or die(mysql_error());
		$row_rs_indicator = mysql_fetch_assoc($rs_indicator );
		$totalRows_rs_indicator  = mysql_num_rows($rs_indicator );
	  echo $row_rs_indicator ['Name_indicator'];  ?>
                      </td>
                      <td height="26" class="style9" ><a href="del_liability.php?Id_indicator=<?php echo $row_rs_lia['Id_indicator']; ?>"onClick="return confirm('ยืนยันการลบ')"><u>ลบ</u></a></td>
                      <td class="style9"><a href="liability2.php?Id_indicator=<?php echo $row_rs_indicator['Id_indicator']; ?>" class="style9"><u>แสดง</u></a><a href="Summary_liability.php" class="style9"></a></td>
                    </tr>
                    <?php } while ($row_rs_lia = mysql_fetch_assoc($rs_lia)); ?>
                </table>
                  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="27%" height="3" bgcolor="#666666"><table border="0">
                          <tr>
                            <td><?php if ($pageNum_rs_lia > 0) { // Show if not first page ?>
                                <a href="<?php printf("%s?pageNum_rs_lia=%d%s", $currentPage, 0, $queryString_rs_lia); ?>"><img src="../First.gif" width="18" height="18" border="0"></a>
                            <?php } // Show if not first page ?></td>
                            <td><?php if ($pageNum_rs_lia > 0) { // Show if not first page ?>
                                <a href="<?php printf("%s?pageNum_rs_lia=%d%s", $currentPage, max(0, $pageNum_rs_lia - 1), $queryString_rs_lia); ?>"><img src="../Previous.gif" width="18" height="18" border="0"></a>
                            <?php } // Show if not first page ?></td>
                            <td><?php if ($pageNum_rs_lia < $totalPages_rs_lia) { // Show if not last page ?>
                                <a href="<?php printf("%s?pageNum_rs_lia=%d%s", $currentPage, min($totalPages_rs_lia, $pageNum_rs_lia + 1), $queryString_rs_lia); ?>"><img src="../Next.gif" width="18" height="18" border="0"></a>
                            <?php } // Show if not last page ?></td>
                            <td><?php if ($pageNum_rs_lia < $totalPages_rs_lia) { // Show if not last page ?>
                                <a href="<?php printf("%s?pageNum_rs_lia=%d%s", $currentPage, $totalPages_rs_lia, $queryString_rs_lia); ?>"><img src="../Last.gif" width="18" height="18" border="0"></a>
                            <?php } // Show if not last page ?></td>
                          </tr>
                      </table></td>
                      <td width="49%" bgcolor="#666666">&nbsp;</td>
                      <td width="24%" bgcolor="#666666" class="style7">&nbsp;
ข้อมูลลำดับที่ <?php echo ($startRow_rs_lia + 1) ?> ถึง <?php echo min($startRow_rs_lia + $maxRows_rs_lia, $totalRows_rs_lia) ?> <br>
จากทั้งหมด <?php echo $totalRows_rs_lia ?></td>
                    </tr>
                  </table></td>
              </tr>
	          <tr>
	            <td colspan="4">&nbsp;</td>
              </tr>
	          <tr>
	            <td colspan="4">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
        </table></td>
  </tr>
	
	
	<tr>
		<td  height="64" colspan="2"  bgcolor="25accc" class="style1"><?php require('../footage.html'); ?></td>
	</tr>
</table>
<!-- End ImageReady Slices -->
<script type="text/javascript">
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2");
</script>
</body>
</html>
<?php
mysql_free_result($rs_lia);

mysql_free_result($rs_admin);


mysql_free_result($rs_dep);

mysql_free_result($rs_indicator);
?>





Tag : PHP, Action Script







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-03-13 17:31:23 By : nuch_pornnapa View : 795 Reply : 1
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

คุณจะให้ดูอะไรครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-14 06:38:54 By : webmaster
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ต้องการให้ข้อมูลที่เช็คค่าว่ามันซ้ำกับข้อมูลเดิมนั้น ให้โชว์เด้งไปเพจใหม่ รบกวนช่วยทีนะค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่