|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /home/pathumthani_integration/integration/application/industry/ |
Upload File : |
<? session_start() ;
header("Content-Type: text/html; charset=windows-874");
set_time_limit(0) ;
include_once("../../config/config_epm.inc.php");
include_once("manage_user.inc.php");
?>
<!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=tis-620" />
<title><?=$title_name?></title>
<script language="javascript">
function mOvr(src,clrOver){
if (!src.contains(event.fromElement)) src.bgColor = clrOver;
}
function mOut(src,clrIn){
if (!src.contains(event.toElement)) src.bgColor = clrIn;
}
</script>
<style type="text/css">
<!--
A:link {
FONT-SIZE: 12px;color: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif";TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:visited {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:active {
FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:hover {
FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
.style1 {color: #FF0000}
.style2 {font-size: 24px}
.h_menu {color:#FF9900}
-->
.bg_th{
background-image:url(images/horiz-bg.png);
background-repeat:repeat-x;
font-weight:bold;
color:#FFFFFF;
text-align:center;
}
</style>
<script language=JavaScript>
function Conf(object) {
if (confirm("แน่ใจว่าจะลบข้อมูล")==true) {
return true;
}
return false;
}
function CheckIsIE()
{
if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') { return true;}
else { return false; }
}
function PrintThisPage()
{
if (CheckIsIE() == true)
{
parent.iframe1.focus();
parent.iframe1.print();
}
else
{
window.frames['iframe1'].focus();
window.frames['iframe1'].print();
}
}
var updateIframe = function() {
document.getElementById( 'myIframe' ).src = 'book_insert_attach.php';
}
</script>
</head>
<body>
<?
include("header.php");
if($_GET['runid_del']){
mysql_query("DELETE FROM pathumthani_integration.industry_produce WHERE runid='".$_GET['runid_del']."' ");
}
?>
<img src="images/unpublish_f2.png" width="30" height="30" border="0" align="absmiddle" /><strong style="color:#000033; font-size:18px;"> ข้อมูลแหล่งผลิต </strong><br /><br />
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#B4B4B4">
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td bgcolor="#FFFFFF">
<form id="form1" name="form1" method="post" action="" onsubmit="return CheckForm(this)">
<table width="85%" border="0" align="center">
<tr>
<?
$strSQL_1 = "
SELECT industry_produce.* , industry_produce_type.name AS type_name
FROM
industry_produce
Inner Join industry_produce_type ON industry_produce_type.runid = industry_produce.type_id
ORDER By update_time DESC
";
?>
<td width="77%" align="left">
<?php
$rsConn = mysql_db_query($dbname,$strSQL_1);
$all_row = mysql_num_rows($rsConn);
$board_row_per_page = 20;
$total_page = ceil($all_row/$board_row_per_page);
$page = ($_GET['page'])?$_GET['page']:1;
$page = ($page > $total_page)?$total_page:$page;
$page = ($page <= 0)?1:$page;
$limit_start = ($page==1)?0:(($page*$board_row_per_page)-$board_row_per_page);
$limit_end = $board_row_per_page;
if($View==''){
$strSQL_1 .= " LIMIT ".$limit_start.", ".$limit_end;
$num = $limit_start ;
}
if(isset($cols)&&isset($sort)){
$solink="&cols=$cols&sort=$sort";
}
$text_search = "";
$prev_page = $page - 1; $prev_page = ($prev_page <= 1)?1:$prev_page;
$prev = "self.location='".$PHP_SELF."?".$strSearch.$text_search."&search=$search&page=$prev_page$link$solink'";
$next_page = $page + 1; $next_page = ($next_page >= $total_page)?$total_page:$next_page;
$next = "self.location='".$PHP_SELF."?".$strSearch.$text_search."&search=$search&page=$next_page$link$solink'";
$prev_Tenpage=$page-$board_row_per_page;$prev_Tenpage=($prev_Tenpage<= 1)?1:$prev_Tenpage;
$prevTen = "self.location='".$PHP_SELF."?".$strSearch.$text_search."&search=$search&page=$prev_Tenpage$link$solink'";
$nextTenPage=$page+$board_row_per_page;$next_TenPage=($next_TenPage >= $total_page)?$total_page:$next_TenPage;
$nextTen = "self.location='".$PHP_SELF."?".$strSearch.$text_search."&search=$search&page=$nextTenPage$link$solink'";
?>
<? if($View==""){$Klink="?".$text_search."&View=All"; $CSh="ข้อมูลทั้งหมด"; $Klink2="?".$text_search."&View=";}else{$Klink="?".$text_search."&View=";$CSh="ข้อมูล ".$board_row_per_page." รายการล่าสุด";$Klink2="?".$text_search."&View=All";}?>
ทั้งหมด <b> <font color="#CC0000">
<?=number_format($all_row);?>
</font> </b> รายการ
<? if($View==""){?>
แบ่งเป็น <b><font color="#0033CC">
<?=number_format($total_page);?>
</font></b> หน้า
<? }?>
<a href="<?=$Klink?>"><img src="img/Search-Add.gif" alt="<?=$CSh?>" width="16" height="16" border="0" /></a>
<? if($View==''){?>
<? if($page==1){?>
<img src="img/page_div_icon/xFirst.gif" />
<? }else{?>
<img src="img/page_div_icon/First.gif" align="absmiddle" border="0" width="10" height="12" onclick="<?=$prevTen;?>" onMouseOver="style.cursor='hand';"/>
<? }?>
<? if($page==1){?>
<img src="img/page_div_icon/xPrevious.gif" />
<? }else{?>
<img src="img/page_div_icon/Previous.gif" align="absmiddle" border="0" width="7" height="12" onclick="<?=$prev;?>" onMouseOver="style.cursor='hand';"/>
<? }?>
<?php
$board_link_num = $board_row_per_page;
$ii = 1;
if ( $board_link_num > $total_page ){
$loop_page = $total_page;
} else {
$bx = ceil($board_link_num / 2);
$pp = $page - $bx;
$pn = $page + $bx;
$loop_page = $pn;
$ii = $pp;
if ( $total_page <= $loop_page ) {
$loop_page = $total_page;
$ii = $loop_page - ($board_link_num -1);
}
if ( $ii < 1 ) {
$ii = 1;
$loop_page = $ii + ($board_link_num -1);
}
}
for($i=$ii;$i<=$loop_page;$i++){
if ( $i==$page || !$page ) {
$txt = "<b>$i</b>";
} else {
$txt = $i;
}
?>
<a href="<?=$PHP_SELF;?>?Sort=<?=$Sort;?>&search=<?=$search?>&<?=$text_search?>&page=<?=$i;?><?=$strSearch;?>"><?=$txt;?>
</a>
<?
} # for
?>
<? if($page==$loop_page){?>
<img src="img/page_div_icon/xNext.gif" />
<? }else{?>
<img src="img/page_div_icon/Next.gif" align="absmiddle" border="0" width="7" height="12" onClick="<?=$next;?>" onMouseOver="style.cursor='hand';"/>
<? }?>
<? if($page==$loop_page){?>
<img src="img/page_div_icon/xLast.gif" />
<? }else{?>
<img src="img/page_div_icon/Last.gif" align="absmiddle" border="0" width="10" height="12" onClick="<?=$nextTen;?>" onMouseOver="style.cursor='hand';"/>
<?
}
}#End View=
?>
</td>
<td width="23%" align="right"><a href="industry_produce_insert.php?att_type_id=0"><img src="images/add.png" alt="เพิ่มข้อมูลแหล่งผลิต" title="เพิ่มข้อมูลแหล่งผลิต" border="0" align="absmiddle" /><a href="industry_produce_insert.php?att_type_id=0"> เพิ่มข้อมูลแหล่งผลิต</a></td>
</tr>
</table>
<table width="85%" border="0" align="center" bgcolor="#EEEEEE" cellpadding="3" cellspacing="1">
<tr class="bg_th">
<!--<td width="52" align="center"><strong>ลำดับที่</strong></td>-->
<td align="center" width="40">ลำดับที่</td>
<td align="center" width="100"><strong>ประเภทแหล่งผลิต</strong></td>
<td align="center" width="150"><strong>ชื่อแหล่งผลิต</strong></td>
<td align="center" width="200">รายละเอียด</td>
<td align="center" width="60"><strong>การจัดการ</strong></td>
</tr>
<?
/*$strSQL_1 = "
SELECT industry_produce.* , industry_produce_type.name AS type_name
FROM
industry_produce
Inner Join industry_produce_type ON industry_produce_type.runid = industry_produce.type_id
ORDER By update_time DESC
";*/
$rsConn_1 = mysql_db_query($dbname,$strSQL_1);
$i=0;
while ( $Result_1 = mysql_fetch_assoc($rsConn_1)) {
$i++;
//$color = ( $i % 2 == 0 ) ? "#EFEFEF" : "#FFFFFF" ;
$color = "#FFFFFF" ;
$rowNumb = ($i+($board_link_num*$page)-$board_link_num);
?>
<tr bgcolor="<?=$color?>">
<?php /*?><td align="center"><?=$i?></td><?php */?>
<td align="center"><?=$rowNumb?></td>
<td align="left"><?=$Result_1['type_name']?></td>
<td align="left"><?=$Result_1['name']?></td>
<td align="left"><?=nl2br($Result_1['detail'])?></td>
<td align="center">
<a href="industry_produce_insert.php?runid=<?=$Result_1['runid']?>&edit=1"><img src="img/icon-write.png" alt="แก้ไข" title="แก้ไข" width="16" height="16" border="0" align="absmiddle" /></a>
<a href="?runid_del=<?=$Result_1['runid']?>" onClick="return Conf(this)"><img src="img/icon-delete.png" alt="ลบ" title="ลบ" width="16" height="16" border="0" align="absmiddle" /></a> </td>
</tr>
<? }?>
</table>
</form>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>