<?php

// +---------------------------------------------+
// |     Copyright  2008 - 2018 weenCompany      |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+

if(@file_exists('../install'))
{
	error_reporting(E_ALL & ~E_NOTICE);
	$needDeleteInstall = 1;
	LogIn();
}


define('IN_ADMIN', true);
define('IN_WEENCOMPANY', true);
define('ADMIN_LOGIN', true);
define('MOD_ACCESS', true);


$rootpath = "./../";

include($rootpath . 'includes/core.php');

SetPageCharacterSet();

function LogIn()
{
	global $needDeleteInstall, $logininfo;
	if($needDeleteInstall)
	{
	  $logininfo ='提示: 請在刪除系統安裝目錄(./install/)後繼續!';
	  $disabled =  ' disabled="disabled" style="cursor:default;"';
	}else{
	  $inputfocus = 'onLoad="document.forms.wcloginform.loginusername.focus()"';
	}
	

  echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html>
        <head>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>weenCompany聞名企業網站系統(CWS)管理登錄</title>
        <link rel=stylesheet href=\'./styles/advanced/login.css\' />
        <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
        <!--
        if(top.location != self.location)
        {
          top.location.replace(self.location)
        }
        -->
        </SCRIPT>

        </head>

        <body id="page-login" '. $inputfocus .' >
		
		<div class="login-container">
        <div class="login-box">
            <form action="index.php" method="post" name="wcloginform">
                <fieldset class="login-form">
                    <h2>weenCompany聞名企業網站系統 - 管理登錄</h2>
                    <div id="messages">' . $logininfo . '</div>
                    <div class="input-box input-left"><label for="username">用戶名:</label><br/>
                        <input type="text" id="username" name="loginusername" value="" class="required-entry input-text" '.$disabled .'/></div>
                    <div class="input-box input-right"><label for="login">密碼:</label><br/>
                        <input type="password" id="login" name="loginpassword" class="required-entry input-text" value="" '.$disabled .'/></div>
                    <div class="clear"></div>
                    <div class="form-buttons" style="margin-right:8px;"><input type="submit" class="form-button" value="登 錄" '.$disabled .'/></div>
					<div style="margin-left:8px;"><a href="forgotpass.php" target="_parent" class="normal">找回密碼?</a>&nbsp;</div>
                </fieldset>
                <p class="legal" align="right"><a href="http://www.weentech.com" target="_blank" class="normal">聞泰網絡</a> <font color=#FF9900>&copy;</font><font class="copyright">'.date("Y").'</font>&nbsp;</p>
            </form>
            <div class="bottom"></div>
        </div>
		</div>
	</body>
    </html>';

  exit();
}

echo '<html>
      <head>
      <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
      <!--
      if(top.location != self.location)
      {
        top.location.replace(self.location)
      }
      -->
      </SCRIPT>

      <title>weenCompany聞名企業網站系統(CWS)</title>
      </head>

      <frameset cols="185,*" framespacing="0" border="0" frameborder="0" frameborder="no">
        <frame src="menu.php" name="leftFrame" scrolling="yes" frameborder="0" border="no" />
		<frame src="mphome.php" name="mainFrame" scrolling="YES" />
	  </frameset>

      <noframes>
        <body>對不起，您的瀏覽器不支持框架，程序無法運行！</body>
      </noframes>
      </html>';

?>
