Hacked By AnonymousFox

Current Path : C:/AppServ/www/covid19/db/system/mod_dataoverall/
Upload File :
Current File : C:/AppServ/www/covid19/db/system/mod_dataoverall/popup_document_selecter6.php

<? 
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>&nbsp;</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">&nbsp;</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="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 height="24">
                          
                          <? 
                                 $sql="select * from cm_council order by cm_council_No asc";
                                 $Query=mysql_query($sql);
                                 while ($Row = mysql_fetch_array($Query)) { ?>
                                 <font color="#0335B0"><b><a href="#" onClick="setDocument(<?=$Row[cm_council_ID]?>,'<?=$Row[cm_council_Name]?>')"><?=$Row[cm_council_No]?>.<?=$Row[cm_council_Name]?></a></b></font>
                                 <br /><br />
                                 <? 
					  			$sql2="select * from cm_councillevel2 where cm_councillevel2_councilNo='$Row[cm_council_No]' order by cm_councillevel2_Order asc";
					  			$Query2=mysql_query($sql2);
					  			while ($Row2 = mysql_fetch_array($Query2)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#" onClick="setDocument1(<?=$Row[cm_councillevel2_ID]?>,'<?=$Row[cm_councillevel2_Name]?>')">
<?=$Row2[cm_councillevel2_No]?> 
<?=$Row2[cm_councillevel2_Name]?>
</a>
<br />
									 <? 
                                    $sql3="select * from cm_councillevel3 where cm_councillevel3_councillevel2No='$Row2[cm_councillevel2_ID]' order by cm_councillevel3_ID asc";
                                    $Query3=mysql_query($sql3);
                                    while ($Row3 = mysql_fetch_array($Query3)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$Row3[cm_councillevel3_No]?> 
<?=$Row3[cm_councillevel3_Name]?>
<br />
                                    	 <? 
                                    $sql4="select * from cm_councillevel4 where cm_councillevel4_councillevel3No='$Row3[cm_councillevel3_ID]' order by cm_councillevel4_ID asc";
                                    $Query4=mysql_query($sql4);
                                    while ($Row4 = mysql_fetch_array($Query4)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$Row4[cm_councillevel4_No]?> 
<?=$Row4[cm_councillevel4_Name]?>
<br />
                                    		<? 
                                    $sql5="select * from cm_councillevel5 where cm_councillevel5_councillevel4No='$Row4[cm_councillevel4_ID]' order by cm_councillevel5_ID asc";
                                    $Query5=mysql_query($sql5);
                                    while ($Row5 = mysql_fetch_array($Query5)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$Row5[cm_councillevel5_No]?> 
<?=$Row5[cm_councillevel5_Name]?>
<br />
                                    		<? 
                                    $sql6="select * from cm_councillevel6 where cm_councillevel6_councillevel5No='$Row5[cm_councillevel5_ID]' order by cm_councillevel6_ID asc";
                                    $Query6=mysql_query($sql6);
                                    while ($Row6 = mysql_fetch_array($Query6)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$Row6[cm_councillevel6_No]?> 
<?=$Row6[cm_councillevel6_Name]?>
<br />
                                    <? 
                                    $sql7="select * from cm_councillevel7 where cm_councillevel7_councillevel6No='$Row6[cm_councillevel6_ID]' order by cm_councillevel7_ID asc";
                                    $Query7=mysql_query($sql7);
                                    while ($Row7 = mysql_fetch_array($Query7)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$Row7[cm_councillevel7_No]?> 
<?=$Row7[cm_councillevel7_Name]?>
<br />
                                    <? 
                                    $sql8="select * from cm_councillevel8 where cm_councillevel8_councillevel7No='$Row7[cm_councillevel7_ID]' order by cm_councillevel8_ID asc";
                                    $Query8=mysql_query($sql8);
                                    while ($Row8 = mysql_fetch_array($Query8)) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$Row8[cm_councillevel8_No]?> 
<?=$Row8[cm_councillevel8_Name]?><br />
                               <? } } } } } } } }?>                          </td>
                      </tr>
                      <?
		$index++;
	}
} else {  ?>
                      <tr class="table_row1"> 
                        <td height="80" 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,mydocsrc) {
	window.opener.document.myForm.inputDocumentID6.value=mydocid;
	window.opener.document.getElementById('divDocumentSubject6').innerHTML= "<b><font color=\"#990000\">"+mydocsubject+"</font></b>";
}
			</script>
              <script language="JavaScript" type="text/JavaScript">
function setDocument1(mydocid,mydocsubject,mydocsrc) {
	window.opener.document.myForm.inputDocumentID6.value=mydocid;
	window.opener.document.getElementById('divDocumentSubject6').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">&nbsp;</td>
        </tr>
      </table>
      <!-- InstanceEndEditable --></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox