<?php

$form = "<div style='width:600px;height:200px;margin:auto;padding-top:20%;font-size:13px;'>
<p>Please Enter Your Password</p>
<form name='form1' style='position:relative;' method='post' action=''>
	<p style='width:15%;float:left;'>UserName</p>
	<p style='float:left;'>
		<input name='username' type='text' id='username'>
	</p>
	<p style='width:9%;clear:both'>Password</p>
	<p style='float:left; position:absolute;top: 50%; left: 15%;' >
		<input name='password' type='password' id='password'>&nbsp;&nbsp;
		<input type='submit' name='Submit' value='Confirm'>&nbsp;&nbsp;
		<input type='checkbox' name='remember'> Remember Password
	</p>
</form></div>";

if(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2) == 'zh'){
	$allow_zh= $_COOKIE['allow_zh'];
	if(!$allow_zh){
		if($_POST){
			if(md5($_POST['password'])!=md5("CWSpeeding2018")){
				echo $form;
				exit;
			}else{
				setcookie('allow_zh',true);
			}
		}else{
			echo $form;
			exit;
		}
	}
}

// Version
define('VERSION', '3.0.3.2');

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	header('Location: install/index.php');
	exit;
}

// Startup
require_once(DIR_SYSTEM . 'startup.php');

start('catalog');