Hacked By AnonymousFox
<?
include("../../lib/session.php");
include("../../lib/config.php");
include("../../lib/connect.php");
include("../../lib/function.php");
?>
<html><!-- InstanceBegin template="/Templates/WebEngine-Adminpanel-Popup.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Web Engine :
<?=$System_Variable_Title?>
</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="../css/mystyle.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr valign="top">
<td width="77%" align="center" valign="top" bgcolor="#FFFFFF"><!-- InstanceBeginEditable name="Programmable Region" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<?
## Load Module Configuration Variable ############################################
include("config.php");
## Default Value ############################################
$SystemModule_defaultPageSize = 10;
$SystemModule_defaultPageShow = 1;
$SystemModule_MaxPage = 20;
$SystemModule_ReduceRange = 10; // +,- from current page show
$SystemModule_ASCDESC = "DESC";
$SystemModule_OrderBy = $myModule_Table_Document."_ID";
#########################################################
?>
<?
# Check to set default value #########################
if($PageSize=="") { $PageSize = $SystemModule_defaultPageSize; }
if($PageShow=="") { $PageShow = $SystemModule_defaultPageShow; }
if($ASCDESC=="") { $ASCDESC = $SystemModule_ASCDESC; }
if($OrderBy=="") { $OrderBy = $SystemModule_OrderBy; }
if($action=="switchorder") {
if($ASCDESC=="ASC") { $ASCDESC = "DESC"; } else { $ASCDESC="ASC"; }
}
# Count total record size #########################
$sql = "SELECT * FROM cm_council";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("<br><br><b><font color=#FF0000>ไม่สามารถใช้งานระบบได้<br>หากคุณเข้าใช้งานเป็นครั้งแรก<br><a href=\"#\" onClick=\"Popup('popupCreateDatabaseWindow','createdatabase.php',220,180,1);\">กรุณาคลิ๊กที่นี่</a><br>เพื่อทำการสร้างฐานข้อมูลใหม่</font></b>\n");
$sql = "SELECT * FROM cm_council";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$TotalRecordCount=MYSQL_NUMROWS($Query);
# Find max page size #########################
if($TotalRecordCount>$PageSize) {
$NoOfPage= ceil($TotalRecordCount/$PageSize);
} else {
$NoOfPage=1;
}
# Recover page show into range #########################
if($PageShow>$NoOfPage) { $PageShow=$NoOfPage; }
# Select only paging range #########################
$RecordStart = ($PageShow-1)*$PageSize;
$sql = "SELECT * FROM cm_council";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$RecordCount=MYSQL_NUMROWS($Query);
?>
<script language="JavaScript" type="text/JavaScript">
function Paging_CheckAll(objCheckHeader,txtCheckBoxFirstName,intTotalItems) {
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
document.getElementById(txtCheckBoxFirstName+i).checked = objCheckHeader.checked;
return true;
}
function Paging_CheckAllHandle(objCheckHeader,txtCheckBoxFirstName,intTotalItems) {
var isCheckedAll = true;
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(!document.getElementById(txtCheckBoxFirstName+i).checked)
isCheckedAll = false;
objCheckHeader.checked = isCheckedAll;
return true;
}
function Paging_CountChecked(txtCheckBoxFirstName,intTotalItems) {
var intChecked = 0;
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(document.getElementById(txtCheckBoxFirstName+i).checked)
intChecked ++;
return intChecked ;
}
function Paging_CheckedThisItem(objCheckHeader,indexing,txtCheckBoxFirstName,intTotalItems) {
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(i==indexing) {
document.getElementById(txtCheckBoxFirstName+i).checked = true;
} else {
document.getElementById(txtCheckBoxFirstName+i).checked = false;
}
objCheckHeader.checked = false;
return true;
}
</script>
<table width="95%" height="22" border="0" cellpadding="2" cellspacing="0">
<form action="?" method="post" name="myHeaderButton" id="myHeaderButton" onSubmit="return false;">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<tr valign="bottom">
<td> </td>
</tr>
</form>
</table>
<table width="98%" height="26" border="0" cellpadding="0" cellspacing="0" class="table_toolbar">
<form action="?" method="post" name="myToolbarForm" id="myToolbarForm" onSubmit="return false;">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<tr>
<td width="5" align="left" valign="top"> <img src="../images/bgborder1w.gif" width="5" height="5"></td>
<td align="right" valign="bottom"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Found
<?=$TotalRecordCount?>
record</td>
<td width="10"> </td>
<? if($PageShow>1) { ?>
<td width="21" align="center"> <img src="../images/controlpage/playset_start.gif" width="21" height="21"
onMouseOver="this.src='../images/controlpage/playset_start_active.gif'; this.style.cursor='hand';"
onMouseOut="this.src='../images/controlpage/playset_start.gif';"
onClick="document.myForm.PageShow.value=1; document.myForm.submit();"></td>
<? } else { ?>
<td width="21" align="center"><img src="../images/controlpage/playset_start_disable.gif" width="21" height="21"></td>
<? } ?>
<? if($PageShow>1) { ?>
<td width="21" align="center"> <img src="../images/controlpage/playset_backward.gif" width="21" height="21"
onMouseOver="this.src='../images/controlpage/playset_backward_active.gif'; this.style.cursor='hand';"
onMouseOut="this.src='../images/controlpage/playset_backward.gif';"
onClick="document.myForm.PageShow.value--; document.myForm.submit();"></td>
<? } else { ?>
<td width="21" align="center"><img src="../images/controlpage/playset_backward_disable.gif" width="21" height="21"></td>
<? } ?>
<td width="21" align="center"> <img src="../images/controlpage/playset_stop.gif" width="21" height="21"
onMouseOver="this.src='../images/controlpage/playset_stop_active.gif'; this.style.cursor='hand';"
onMouseOut="this.src='../images/controlpage/playset_stop.gif';"
onClick="
with(document.myForm) {
PageShow.value='';
PageSize.value='';
ASCDESC.value='';
OrderBy.value='';
submit();
}
"></td>
<? if($PageShow<$NoOfPage) { ?>
<td width="21" align="center"> <img src="../images/controlpage/playset_forward.gif" width="21" height="21"
onMouseOver="this.src='../images/controlpage/playset_forward_active.gif'; this.style.cursor='hand';"
onMouseOut="this.src='../images/controlpage/playset_forward.gif';"
onClick="document.myForm.PageShow.value++; document.myForm.submit();"></td>
<? } else { ?>
<td width="10" align="center"><img src="../images/controlpage/playset_forward_disable.gif" width="21" height="21"></td>
<? } ?>
<? if($PageShow<$NoOfPage) { ?>
<td width="10" align="center"><img src="../images/controlpage/playset_end.gif" width="21" height="21"
onMouseOver="this.src='../images/controlpage/playset_end_active.gif'; this.style.cursor='hand';"
onMouseOut="this.src='../images/controlpage/playset_end.gif';"
onClick="document.myForm.PageShow.value='<?=$NoOfPage?>'; document.myForm.submit();"></td>
<? } else { ?>
<td width="10" align="center"><img src="../images/controlpage/playset_end_disable.gif" width="21" height="21"></td>
<? } ?>
</tr>
</table></td>
<td width="5" align="right" valign="top"><img src="../images/bgborder2w.gif" width="5" height="5"></td>
</tr>
</form>
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="1" class="table_border">
<tr>
<td bgcolor="#FFFFFF"> <table width="100%" border="1" cellpadding="1" cellspacing="1" style="border-collapse:collapse">
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="action" type="hidden" id="action">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="SelectStatus" type="hidden" id="SelectStatus">
<tr align="center" class="menu_table_header">
<td width="38" height="24" align="center" bgcolor="#FFDCBD">ID</td>
<td width="546" height="24" bgcolor="#FFDCBD">Name</td>
</tr>
<?
$index=1;
if($RecordCount>0) {
while($index<$RecordCount+1) {
if($myClassRow=="table_row1") { $myClassRow="table_row2"; } else { $myClassRow="table_row1"; }
$Row=MYSQL_FETCH_ARRAY($Query);
?>
<tr class="<?=$myClassRow?>" onMouseOver="this.className='table_rowover'" onMouseOut="this.className='<?=$myClassRow?>'">
<td width="38" height="24" align="center">
<?=$RecordStart+$index?> </td>
<td height="24"> <a href="#" onClick="setDocument(<?=$Row[cm_council_No]?>,'<?=$Row[cm_council_Name]?>')">
<?=$Row[cm_council_Name]?>
</a></td>
</tr>
<?
$index++;
}
} else { ?>
<tr class="table_row1">
<td height="80" colspan="2" align="center"> Data not found!</td>
</tr>
<? } ?>
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="<?=$index-1?>">
</form>
</table>
<table width="100%" height="4" border="0" cellpadding="0" cellspacing="0">
<form action="?" method="post" name="mySearchForm" id="mySearchForm" onSubmit="return false;">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<tr align="right">
<td height="4" colspan="4" align="right" class="table_footer"><img src="../images/blank.gif" width="10" height="4"> </td>
</tr>
</form>
</table></td>
</tr>
</table>
<script language="JavaScript" type="text/JavaScript">
function setDocument(mydocid,mydocsubject) {
window.opener.document.myForm.inputCouncilID.value=mydocid;
window.opener.document.getElementById('divCouncil1').innerHTML= "<b><font color=\"#990000\">"+mydocsubject+"</font></b>";
}
</script>
<span class="table_col3">
<input name="btClose" type="button" class="button_100" id="btClose" value="Close" onClick="window.close(); ">
</span></td>
</tr>
<tr>
<td height="30" align="center" valign="middle" class="table_col3"> </td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox