Hacked By AnonymousFox

Current Path : C:/AppServ/www/th/controlweb/manage/mod_link01/
Upload File :
Current File : C:/AppServ/www/th/controlweb/manage/mod_link01/config_mainpage.php

<? 
include("../lib/session.php"); 
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
?>
<html><!-- InstanceBegin template="/Templates/_WebEngine-Adminpanel.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title> <?=$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">
<style type="text/css">
<!--
.style1 {color: #8F5E1A}
.style2 {color: #774E15}
-->
</style>
</head>

<body background="../../images/bg.gif"  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">  
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td background="../../images/bg_menu.jpg"><table width="99%" border="0" cellpadding="0" cellspacing="0">
              <tr style="display:none ">
                <td><table width="95%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td bgcolor="#00FFFF">ffffffffffff</td>
                    <td>ffffffffffff</td>
                    <td>ffffffffffff</td>
                    <td>ffffffffffff</td>
                    <td>ffffffffffff</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="0" bgcolor="#174D13">&nbsp;</td>
              </tr>
            </table></td>
            <td width="11" background="../../images/r_menu.jpg"><p>&nbsp;</p>
            <p>&nbsp;</p></td>
          </tr>
          <tr>
            <td valign="top" bgcolor="#EEEFE6"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>
					
                      <table   width=100% border=0 cellpadding=1 cellspacing=0 class=defaults id="content">
					   
                        <tr valign="top" >
                          <td vAlign=center bgColor=#22711C height=1><strong></strong></td>
                          <td align="center" valign="top" bgcolor="#22711C">                          <div align="right"><font color="#FFCC66"><strong><img src="../../images/icon/h1.gif" width="14" height="14" border="0" align="absmiddle">&nbsp;&nbsp;</strong></font><strong><font color="#FFFFFF">Welcome to SIPA Administrator.&nbsp;&nbsp;&nbsp;</font></strong></div></td>
                        </tr>
                        <tr valign="top">
                          <td width="196" align="center" bgcolor="#A3E69D"> <br>
                              <!--Start Menu ----------------------------------------------------------------------------------->
                              <? if(strlen($System_Session_User_ID)==0) { ?>
							 
                              <? if($alert=="yes") { ?>
                              <table width="90%" border="0" cellpadding="1" cellspacing="0" class="messagebox_alert">
                                <form name="myLoginForm" method="post" action="../../system/login.php" onSubmit="
with(document.myLoginForm) {
	if(inputUserName.value=='') {
		inputUserName.focus();
		return false;
	}
	if(inputPassword.value=='') {
		inputPassword.focus();
		return false;
	}
}
				">
                                  <tr align="center">
                                    <td height="40" colspan="2">Incorrect your<br>
                                UserName or Password.</td>
                                  </tr>
                                </form>
                              </table>
                              <br>
                              <? } ?>
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td height="22" align="center" bgcolor="#C8943C" class="menu_table_header">Administrator Login</td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="80" align="center" valign="middle">
                                    <form name="myLoginForm" method="post" action="../system/login.php" onSubmit=" 
with(document.myLoginForm) {
	if(inputUserName.value=='') {
		inputUserName.focus();
		return false;
	}
	if(inputPassword.value=='') {
		inputPassword.focus();
		return false;
	}
}
				">
                                      <table border="0" cellspacing="0" cellpadding="1">
                                        <tr>
                                          <td colspan="2"><font color="#990000"><strong>UserName</strong></font></td>
                                        </tr>
                                        <tr>
                                          <td width="10">&nbsp;</td>
                                          <td><input name="inputUserName" type="text" class="input_left" id="inputUserName3" size="15" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td colspan="2"><font color="#990000"><strong>Password</strong></font></td>
                                        </tr>
                                        <tr>
                                          <td width="10">&nbsp;</td>
                                          <td><input name="inputPassword" type="password" class="input_left" id="inputPassword" size="15" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td width="10">&nbsp;</td>
                                          <td align="right"><input name="Submit" type="submit" class="button_th_normal" value="LogIn"></td>
                                        </tr>
                                      </table>
                                    </form></td>
                                </tr>
                              </table>
                              <? } else { ?>
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <form action="../../template/?" method="post" name="myMenuForm" id="myMenuForm">
                                  <input type="hidden" name="SystemMenuID">
                                  <input type="hidden" name="SystemModuleKey">
                                </form>
                                <tr>
                                  <td height="22" align="center" class="menu_table_header">Main Menu</td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../home/home.php'; document.myMenuForm.submit();">
                                    <table width="100%" height="22" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
                                      <tr>
                                        <td width="22" align="center"><img src="../images/icon/ico516.gif" width="16" height="14"></td>
                                        <td>Home</td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_shadow"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <? if($System_Session_User_ID==0) { ?>
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../system/module_management.php'; document.myMenuForm.submit();"><table width="100%" height="22" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
                                      <tr>
                                        <td width="22" align="center"><img src="../images/icon/ico509.gif" width="16" height="13"></td>
                                        <td>Menu Bulider</td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_shadow"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <? } ?>
                                <? if($System_Session_User_ID>0) { ?>
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../system/user_information.php'; document.myMenuForm.submit();"><table width="100%" height="22" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
                                      <tr>
                                        <td width="22" align="center"><img src="../images/icon/ico559.gif" width="15" height="16"></td>
                                        <td>User Information</td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_shadow"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <? } ?>
                                <? if($System_Session_Level=="Admin") { ?>
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../system/user_management.php'; document.myMenuForm.submit();"><table width="100%" height="22" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
                                      <tr>
                                        <td width="22" align="center"><img src="../images/icon/ico051.gif" width="13" height="19"></td>
                                        <td>Manage User Admin</td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_shadow"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <? } ?>
                                <!---------------------------------------------------------------------------->
                                <? if($System_Session_User_ID>0) { ?>
                                <?
$sql = "SELECT * FROM ".$System_TableName_Menu." ORDER BY ".$System_TableName_Menu."_Order ASC ";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$MenuRecordCount=MYSQL_NUMROWS($Query);

$index=1;
if($MenuRecordCount>0) {
	while($index<$MenuRecordCount+1) {
		$Row=MYSQL_FETCH_ARRAY($Query);
		if( isUserOnMenu($System_Session_User_ID,$Row[$System_TableName_Menu."_ID"]) ) {
		?>
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
with(document.myMenuForm) {
	SystemMenuID.value=<?=$Row[$System_TableName_Menu."_ID"]?>; 
	SystemModuleKey.value='<?=$Row[$System_TableName_Menu."_ModuleKey"]?>'; 
	action='<?=$Row[$System_TableName_Menu."_LinkPath"]?>'; 
	submit();
}
"><table width="100%" height="22" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
                                      <tr>
                                        <td width="22" align="center">
										<img src="<?=$Row[$System_TableName_Menu."_Icon"]?>"></td>
                                        <td>
                                          <?=$Row[$System_TableName_Menu."_Name"]?>
                                        </td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_shadow"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <? 
		}
		$index++;
	}
}
?>
                                <? } ?>
                                <!---------------------------------------------------------------------------->
                                <tr>
                                  <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                                <tr>
                                  <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../system/logout.php'; document.myMenuForm.submit();"><table width="100%" height="22" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
                                      <tr>
                                        <td width="22" align="center"><img src="../images/icon/ico569.gif" width="13" height="13"></td>
                                        <td>Logout</td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                                  <td height="1" class="menu_table_bg_shadow"><img src="../../images/blank.gif" width="1" height="1"></td>
                                </tr>
                              </table>
                              <? } ?>
                              <!--End Menu ----------------------------------------------------------------------------------->                              <p>&nbsp;</p>
                              <p>&nbsp;</p>
                              <p>&nbsp;</p>
                              <p>&nbsp;</p>
                              <p>&nbsp;</p>                              <p>&nbsp;</p>
                              <p>&nbsp;</p>
                              <p>&nbsp;</p>
                              <p>&nbsp;</p>
                              <p><br>
                                  <br>                          
                          </p></td>
                          
                        <td width="806" align="center" valign="top" bgcolor="#FFFFFF"> 
                          <? if(strlen($System_Session_User_ID)>0) { ?>
                          <!-- InstanceBeginEditable name="Programmable Region" --><br>
                    <table width="98%" height="22" border="0" cellpadding="2" cellspacing="0" class="table_header">
                      <tr> 
                        <td width="30" align="center"><img src="<?=getMenuIcon($SystemMenuID)?>"></td>
                        <td> 
                          <?=getMenuName($SystemMenuID)?>
                          - Link List</td>
                      </tr>
                    </table>
                    <table width="97%" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td height="1" class="table_col3"><img src="../images/blank.gif" width="10" height="2"></td>
                      </tr>
                      <form action="?" method="post" name="myPageRedirectForm" id="myPageRedirectForm">
                        <!--<input name="GroupID" type="hidden" id="GroupID" value="<?=$GroupID?>"> -->
                        <input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
                        <input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
                        <tr> 
                          <td height="20" align="right"> <table height="20" border="0" cellpadding="0" cellspacing="0">
                              <tr> 
                                <td width="5" align="left" valign="bottom" class="table_col2"><img src="images/tab-w.gif" width="1" height="1"></td>
                                <td width="100" align="center" class="table_col2"><a href="#" onClick="
document.myPageRedirectForm.action='index.php';
document.myPageRedirectForm.submit();
								"><strong>Link Level1</strong></a></td>
                                <td width="20" class="table_col2"><img src="images/tab-w-slop-down.gif" width="20" height="20"></td>
							  
                                <td width="5" align="left" valign="bottom" class="table_col2"><img src="images/tab-w.gif" width="1" height="1"></td>
                                <td width="100" align="center" class="table_col2"><span style="color: #000066"><strong><a href="#" class="link_headbar" style="color: #660000" onClick="
document.myPageRedirectForm.action='link.php';
document.myPageRedirectForm.submit();
">Link Level2</a></strong></span></td>
                                <td width="20" class="table_col2"><img src="images/tab-w-slop-down.gif" width="20" height="20"></td>
<td width="5" align="left" valign="bottom" class="table_col3"><img src="images/tab-w.gif" width="1" height="1"></td>
                                <td width="100" align="center" class="table_col3"><strong><a href="#" class="link_headbar" style="color: #660000" onClick="
document.myPageRedirectForm.action='config_mainpage.php';
document.myPageRedirectForm.submit();
">Config</a></strong></td>
                                <td width="20" class="table_col3"><img src="images/tab-w-slop-down.gif" width="20" height="20"></td>
							    <td width="30">&nbsp;</td>
                              </tr>
                            </table></td>
                        </tr>
                      </form>
                    </table>
                    <script language="JavaScript" src="../lib/popup.js" type="text/JavaScript"></script>
                    <? 
## Load Module Configuration Variable ############################################
include("config.php");

 if($action=="") { 
 	  $sql="SELECT * FROM ".$System_TableName_MenuConfig." WHERE ".$System_TableName_MenuConfig."_ModuleKey='".$SystemModuleKey."' AND ".$System_TableName_MenuConfig."_Name='DispalyStyle' ";
	  $Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
	  $RecordCount=MYSQL_NUMROWS($Query);
	  $Row=MYSQL_FETCH_ARRAY($Query);
	  if($RecordCount>0){
	  		$inputDisplayStyle=$Row[$System_TableName_MenuConfig."_Value"];
	  }else{
	  		$sql="INSERT INTO ".$System_TableName_MenuConfig."(".$System_TableName_MenuConfig."_ModuleKey,".$System_TableName_MenuConfig."_Name,".$System_TableName_MenuConfig."_Value)VALUES('$SystemModuleKey','DispalyStyle','$Display_Dedault')";
	  		$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
			$inputDisplayStyle=$Display_Dedault;
	  }
	 
?>
                    <br>
                    <br>
                    <table width="500" border="0" cellpadding="0" cellspacing="1" class="table_border">
                      <form action="link.php" method="post" name="myReturnForm" id="myReturnForm">
                        <input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
                        <input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
                        <input name="admin" type="hidden" id="admin" value="<?=$admin?>">
                        <input name="action" type="hidden" id="action" value="">
                      </form>
                      <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="admin" type="hidden" id="admin" value="<?=$admin?>">
                        <input name="action" type="hidden" id="action" value="update">
                          <tr> 
                          <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="mytable_inner">
                              <tr align="center"> 
                                <td height="24" colspan="2" align="center" class="table_header">Display</td>
                              </tr>
                              <tr> 
                                <td width="140" height="24" align="right" class="table_col1"> Display Style&nbsp; </td>
                                <td class="table_col2"><input name="inputDisplayStyle" type="radio" value="Both" <? if($inputDisplayStyle=="Both"){ echo "checked";}?>>
                                  &nbsp;Both&nbsp;&nbsp;&nbsp;&nbsp;
                                <input name="inputDisplayStyle" type="radio" value="Link" <? if($inputDisplayStyle=="Link"){ echo "checked";}?>>
                                &nbsp;Link Only&nbsp;&nbsp;&nbsp;&nbsp;
                                <input name="inputDisplayStyle" type="radio" value="Picture" <? if($inputDisplayStyle=="Picture"){ echo "checked";}?>>
                                &nbsp;Picture Only</td>
                              </tr>														    
                            </table>
                            <table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
                              <tr align="right"> 
                                <td height="30" colspan="4" align="center" class="table_footer"> 
                                  <table width="300" border="0" cellspacing="0" cellpadding="2">
                                    <tr align="center"> 
                                      <td>  <input name="btAdd" type="button" class="button_60" id="btAdd" value="Update" onClick="document.myForm.submit();">                                      </td>
                                      <td> <input name="btCalcel" type="button" class="button_60" id="btCalcel" onClick="
if(confirm('Are you sure to return to list?')) {
	document.myReturnForm.submit();
}
						" value="Cancel"> </td>
                                    </tr>
                                  </table></td>
                              </tr>
                            </table></td>
                        </tr>
                      </form>
                    </table>
                    <? 
//########################################################
} else if ($action=="update") { 
		$sql = "UPDATE ".$System_TableName_MenuConfig." SET ".$System_TableName_MenuConfig."_Value='$inputDisplayStyle',".$System_TableName_MenuConfig."_Name='DispalyStyle'  WHERE ".$System_TableName_MenuConfig."_ModuleKey='".$SystemModuleKey."'" ;
		$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
?>                    
                    <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="admin" type="hidden" id="admin" value="<?=$admin?>">
                      <input name="action" type="hidden" id="action">
                    </form>
                    <script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
                    <br>
   <? }?>
      <!-- InstanceEndEditable --> 
                          <? }  ?>
                          <p>&nbsp;</p></td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            <td background="../../images/ling_r.gif">&nbsp;</td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="1" bgcolor="#164B12"><div align="right">
        <table width="100%"  border="0">
          <tr>
            <td><div align="right"><font color="#FFCC66"><strong><img src="../../images/icon/boy.gif" width="16" height="16" border="0" align="absmiddle">&nbsp;<font color="#FFFFFF">&nbsp;</font></strong></font><font color="#FFFFFF"><strong>Contactus Management.&nbsp;&nbsp;&nbsp;</strong></font></div></td>
          </tr>
        </table>
      </div></td>
    </tr>
  </table>
</div>
</body>
<!-- InstanceEnd --></html>
<? 
include("../lib/disconnect.php");
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox