use php include to translate language

This commit is contained in:
豆振江 2017-09-08 15:01:08 +08:00
parent ee4ba8657f
commit 57f7973114
32 changed files with 702 additions and 1120 deletions

View file

@ -1,11 +1,12 @@
<?php
require_once ("core.php");
define('IN_SYS', true);
require_once ("core.php");
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - News</title>
<title><?=$title?> - <?php echo $LANG['contact_us']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
@ -24,7 +25,9 @@
<section class="section-wrap">
<div class="container">
<div class="row">
<div class="hidden-xs col-sm-12 col-md-12 termsHead"><h1 data-i18n="contact_us">Contact Us</h1></div>
<div class="hidden-xs col-sm-12 col-md-12 termsHead">
<h1><?php echo $LANG['contact_us']; ?></h1>
</div>
<div class="col-sm-12 col-md-12">
<h2>Contact</h2>
<p>If you have any problems or have the need to contact us to ask a question,
@ -33,7 +36,7 @@
<p>For technical support please look at the <a href="http://byet.net/forumdisplay.php?f=28" target="_blank">Knowledge Base</a></p>
</div>
<div class="col-sm-12 col-md-12">
<h2 data-i18n="address">Address</h2>
<h2><?php echo $LANG['address']; ?></h2>
<p>Shanghai China.</p>
</div>
<div class="col-sm-12 col-md-12">

View file

@ -1,28 +1,34 @@
<?php
$title = "UIISC";
$title_s = "UIISC";
$author = 'Crogram Inc.';
$description = "uiisc, freewebhost, webhost, Crogram";
$rooturl = $_SERVER['HTTP_HOST'];
$domain = preg_replace('/^www\./', '', $rooturl);
$static_release = "crogram_build_20161230";
$static_bootstrap_css = "ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css";
function curlrequest($url, $data, $method="post") {
$ch = curl_init(); // 初始化CURL句柄
curl_setopt($ch, CURLOPT_URL, $url); // 设置请求的URL
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // 设为TRUE把curl_exec()结果转化为字串,而不是直接输出
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); // 设置请求方式
curl_setopt($ch, CURLOPT_REFERER,$url); // 构造来路
curl_setopt($ch, CURLOPT_HTTPHEADER,array("X-HTTP-Method-Override: $method")); // 设置HTTP头信息
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 设置提交的字符串
$document = curl_exec($ch); // 执行预定义的CURL
if(!curl_errno($ch)) {
$info = curl_getinfo($ch);
echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
} else {
echo 'Curl error: ' . curl_error($ch);
}
curl_close($ch);
// $document=preg_replace("/[\t\n\r]+/","",$document);
return $document;
}
if(!defined('IN_SYS')) {
// exit('禁止访问');
header("Location:"."index.php");
exit;
}
include_once 'lang.php';
$title = "UIISC";
$title_s = "UIISC";
$author = 'Crogram Inc.';
$description = "uiisc, freewebhost, webhost, Crogram";
$rooturl = $_SERVER['HTTP_HOST'];
$domain = preg_replace('/^www\./', '', $rooturl);
$static_release = "crogram_build_20161230";
$static_bootstrap_css = "ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css";
function curlrequest($url, $data, $method="post") {
$ch = curl_init(); // 初始化CURL句柄
curl_setopt($ch, CURLOPT_URL, $url); // 设置请求的URL
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // 设为TRUE把curl_exec()结果转化为字串,而不是直接输出
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); // 设置请求方式
curl_setopt($ch, CURLOPT_REFERER,$url); // 构造来路
curl_setopt($ch, CURLOPT_HTTPHEADER,array("X-HTTP-Method-Override: $method")); // 设置HTTP头信息
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 设置提交的字符串
$document = curl_exec($ch); // 执行预定义的CURL
if(!curl_errno($ch)) {
$info = curl_getinfo($ch);
echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
} else {
echo 'Curl error: ' . curl_error($ch);
}
curl_close($ch);
// $document=preg_replace("/[\t\n\r]+/","",$document);
return $document;
}

View file

@ -1,15 +1,30 @@
<?php
if(!defined('IN_SYS')) {
// exit('禁止访问');
header("Location:"."index.php");
exit;
}
?>
<footer class="navbar navbar-default navbar-fixed-bottom">
<div class="container">
<div class="navbar-inner navbar-content-center" style="padding-top:15px;">
<ul class="navbar-left list-inline text-center text-muted credit">
<li>&copy; 2017 <a href="./index.php"><?=$title_s?></a> &nbsp;&nbsp;&nbsp; Powered By <a href="https://crogram.com" target="blank">Crogram</a> & <a href="https://ifastnet.com" target="blank">iFastNet</a></li>
<li>&copy; 2017 <a href="./index.php"><?=$title_s?></a> &nbsp;&nbsp;&nbsp; Powered By <a href="https://crogram.com" target="blank">Crogram</a> & <a href="https://ifastnet.com" target="blank">iFastNet</a></li>
</ul>
<ul class="legal navbar-right list-inline text-center">
<li><a href="./index.php" data-i18n="home">Home</a></li>
<li><a href="./legal_terms.php" data-i18n="tos">Terms of service</a></li>
<li><a href="./contact.php" data-i18n="contact_us">Contact us</a></li>
<li><a href="//help.<?=$domain?>" data-i18n="help">Help</a></li>
<li><a href="./news.php" data-i18n="news">News</a></li>
<li class="dropup">
<div class="dropdown-toggle" id="changelanguage" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a href="#"><?php echo $languages[$current_language]; ?></a>
<span class="caret"></span>
</div>
<ul class="dropdown-menu" aria-labelledby="changelanguage">
<?php foreach($languages as $key=>$value) {
echo '<li><a href="javascript://" onclick="change_language(\'',$key,'\')">',$languages[$key],'</a></li>';}
?>
</ul>
</li>
<li><a href="./contact.php"><?php echo $LANG['contact_us']; ?></a></li>
<li><a href="//help.<?=$domain?>"><?php echo $LANG['help']; ?></a></li>
</ul>
</div>
</div>
@ -18,5 +33,17 @@
<script src="//ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
<!--<script src="//cdn.bootcss.com/jquery.pjax/1.9.6/jquery.pjax.min.js"></script>-->
<script src="./js/ie10-viewport-bug-workaround.js"></script>
<script src="./js/jquery.i18n.properties.min.js"></script>
<script src="./js/languages.js?_=<?=$static_release?>"></script>
<script src="./js/common.js?_=<?=$static_release?>"></script>
<script type="text/javascript">
var domain = "<?php echo $lang->getDomain();?>";
var cur_language = "<?php echo $current_language;?>";
function change_language(lan) {
setCookie('lang', lan, 1, '/', domain, false);
if (cur_language == lan) {
return;
}
<?php if(!$_POST) { ?>
document.location.reload();
<?php } ?>
}
</script>

141
include/language.php Normal file
View file

@ -0,0 +1,141 @@
<?php
// $languages = array();
// $languages['zh-CN']['name'] = 'china';
// $languages['zh-CN']['image'] = 'flag1.jpg';
// $languages['en-US']['name'] = 'english';
// $languages['en-US']['image'] = 'flag2.jpg';
$languages = array(
'en-US' => 'English',
'zh-CN' => '简体中文',
'zh-HK' => '繁體中文(香港)',
'zh-TW' => '繁體中文(台湾)'
);
class Language
{
public $language_area;
public $language_country;
public $language_dir;
public $dir;
public function __construct()
{
$this->dir = str_replace("\\", "/", dirname(__FILE__)) . "/language/";
$this->initDefaultLanguage();
if (empty($this->language_country) && !empty($this->language_area)) {
$this->language_country = substr($this->language_area, 0, strpos($this->language_area, "-"));
}
$this->initLanguageDir();
}
/*
取得语言文件的绝对路径
*/
public function getFileDir($file)
{
$dir = $this->dir;
if (file_exists($this->getLanguageDir() . $file)) {
return $this->getLanguageDir() . $file;
} else {
if (file_exists($dir . $this->language_area . "/" . $file)) {
return $dir . $this->language_area . "/" . $file;
} else {
if (file_exists($dir . $this->language_country . "/" . $file)) {
return $dir . $this->language_country . "/" . $file;
} else {
if (file_exists($dir . "en-US/" . $file)) {
return $dir . "en-US/" . $file;
} else {
return false;
}
}
}
}
}
/*
取得当前使用语言的文件夹
*/
public function getLanguageDir()
{
return $this->language_dir;
}
/*
初始化语言文件夹
*/
private function initLanguageDir()
{
$dir = $this->dir;
if (file_exists($dir . $this->language_area) && !empty($this->language_area)) {
$this->language_dir = $dir . $this->language_area . '/';
} else {
if (file_exists($dir . $this->language_country) && !empty($this->language_country)) {
$this->language_dir = $dir . $this->language_country . '/';
} else {
$this->language_dir = $dir . 'en-US/';
}
}
}
/*
初始化默认语言
*/
public function initDefaultLanguage()
{
if ($this->getCookieLanguage()) {
return;
}
$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
preg_match_all("/[\\w-]+/", $language, $language);
$this->language_area = $language[0][0];
@($this->language_country = $language[0][1]);
$this->setCookieLanguage();
}
/*
从cookie中导入语言种类
*/
public function getCookieLanguage()
{
if (!@empty($_COOKIE['lang'])) {
$language = $_COOKIE['lang'];
if (strpos($language, "-")) {
$this->language_area = $language;
} else {
$this->language_country = $language;
}
return true;
}
return false;
}
/*
把当前的语言种类放到cookie中
*/
public function setCookieLanguage($lang = "")
{
if (empty($lang)) {
$lang = $this->language_area;
}
if (empty($lang)) {
$lang = $this->language_country;
}
if (empty($lang)) {
return false;
}
setcookie("lang", $lang, time() + 365 * 24 * 3600, "/", $this->getDomain());
return true;
}
public function getDomain()
{
if (empty($this->domain)) {
$domain = $_SERVER['SERVER_NAME'];
if (strcasecmp($domain, "localhost") === 0) {
$this->domain = $domain;
return $this->domain;
}
if (preg_match("/^(\\d+\\.){3}\\d+\$/", $domain, $domain_temp)) {
$this->domain = $domain_temp[0];
return $this->domain;
}
preg_match_all("/\\w+\\.\\w+\$/", $domain, $domain);
$this->domain = $domain[0][0];
return $this->domain;
} else {
return $this->domain;
}
}
}

View file

@ -0,0 +1,43 @@
<?php
$LANG = array(
'language' => 'English',
'home' => 'Home',
'production' => 'Product',
'news' => 'News',
'contact' => 'Contact',
'contact_us' => 'Contact Us',
'help' => 'Help',
'login' => 'Login',
'signup' => 'Signup',
'username' => 'Username',
'input_username' => 'Please Input Username',
'password' => 'Password',
'input_password' => 'Please Input Password',
'email' => 'Email',
'input_email' => 'Please Input Email Address',
'site_category' => 'Site Category',
'personal' => 'Personal',
'business' => 'Business',
'hobby' => 'Hobby',
'forum' => 'Forum',
'adult' => 'Adult',
'dating' => 'Dating',
'software_download' => 'Software / Download',
'choose_from_below' => 'Choose from Below',
'site_language' => 'Site Language',
'english' => 'English',
'non_english' => 'Non English',
'security_code' => 'Security Code',
'input_security_code' => 'Please Input Security Code',
'input_security_code_above' => 'Please Input Security Code Above',
'legal_information' => 'Legal Information',
'privacy_policy' => 'Privacy Policy',
'tos' => 'Terms of service',
'cancellation_refund' => 'Cancellation & Refund',
'payment_methods' => 'Payment Methods & Information',
'signup_free_hosting' => 'Sign Up For Free Hosting',
'remember_me' => 'Remember me',
'please_login' => 'Please sign in',
'lost_password' => 'Lost your password?',
'address' => 'Address'
);

View file

@ -0,0 +1,43 @@
<?php
$LANG = array(
'language' => 'Chinese_simplified',
'home' => '主页',
'production' => '产品',
'news' => '新闻',
'contact' => '联系',
'contact_us' => '联系我们',
'help' => '帮助',
'login' => '登录',
'signup' => '注册',
'username' => '用户名',
'input_username' => '请输入用户名',
'password' => '密码',
'input_password' => '请输入密码',
'email' => '电子邮箱地址',
'input_email' => '请输入电子邮箱地址',
'site_category' => '网站类型',
'personal' => '个人',
'business' => '商业',
'hobby' => '爱好',
'forum' => '论坛',
'adult' => '成人',
'dating' => '约会',
'software_download' => '软件/下载',
'choose_from_below' => '下拉选择',
'site_language' => '网站语言',
'english' => '英文',
'non_english' => '非英文',
'security_code' => '验证码',
'input_security_code' => '输入验证码',
'input_security_code_above' => '请输入上面图中验证码',
'legal_information' => '法律信息',
'privacy_policy' => '隐私政策',
'tos' => '服务条款',
'cancellation_refund' => '取消与退款',
'payment_methods' => '支付方式',
'signup_free_hosting' => '注册免费空间',
'remember_me' => '记住我',
'please_login' => '请登录',
'lost_password' => '忘记密码了?',
'address' => '地址'
);

View file

@ -0,0 +1,44 @@
<?php
$LANG = array(
'language' => 'Chinese_traditional',
'home' => '主頁',
'production' => '產品',
'news' => '新聞',
'contact' => '聯繫',
'contact_us' => '聯繫我們',
'help' => '幫助',
'login' => '登錄',
'signup' => '註冊',
'username' => '用戶名',
'input_username' => '請輸入用戶名',
'password' => '密碼',
'input_password' => '請輸入密碼',
'email' => '電子郵箱地址',
'input_email' => '請輸入電子郵箱地址',
'site_category' => '網站類型',
'personal' => '個人',
'business' => '商業',
'hobby' => '愛好',
'forum' => '論壇',
'adult' => '成人',
'dating' => '約會',
'software_download' => '軟件/下載',
'choose_from_below' => '下拉選擇',
'site_language' => '網站語言',
'english' => '英文',
'non_english' => '非英文',
'security_code' => '驗證碼',
'input_security_code' => '輸入驗證碼',
'input_security_code_above' => '請輸入上面圖中驗證碼',
'legal_information' => '法律信息',
'privacy_policy' => '隱私政策',
'tos' => '服務條款',
'cancellation_refund' => '取消與退款',
'payment_methods' => '支付方式',
'signup_free_hosting' => '註冊免費空間',
'remember_me' => '記住我',
'please_login' => '請登錄',
'lost_password' => '忘記密碼了?',
'address' => '地址'
);

View file

@ -0,0 +1,44 @@
<?php
$LANG = array(
'language' => 'Chinese_traditional',
'home' => '主頁',
'production' => '產品',
'news' => '新聞',
'contact' => '聯繫',
'contact_us' => '聯繫我們',
'help' => '幫助',
'login' => '登錄',
'signup' => '註冊',
'username' => '用戶名',
'input_username' => '請輸入用戶名',
'password' => '密碼',
'input_password' => '請輸入密碼',
'email' => '電子郵箱地址',
'input_email' => '請輸入電子郵箱地址',
'site_category' => '網站類型',
'personal' => '個人',
'business' => '商業',
'hobby' => '愛好',
'forum' => '論壇',
'adult' => '成人',
'dating' => '約會',
'software_download' => '軟件/下載',
'choose_from_below' => '下拉選擇',
'site_language' => '網站語言',
'english' => '英文',
'non_english' => '非英文',
'security_code' => '驗證碼',
'input_security_code' => '輸入驗證碼',
'input_security_code_above' => '請輸入上面圖中驗證碼',
'legal_information' => '法律信息',
'privacy_policy' => '隱私政策',
'tos' => '服務條款',
'cancellation_refund' => '取消與退款',
'payment_methods' => '支付方式',
'signup_free_hosting' => '註冊免費空間',
'remember_me' => '記住我',
'please_login' => '請登錄',
'lost_password' => '忘記密碼了?',
'address' => '地址'
);

View file

@ -1,8 +1,9 @@
<?php
require_once ("core.php");
define('IN_SYS', true);
require_once ("core.php");
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?></title>
@ -21,30 +22,30 @@
<body>
<?php include ("nav.php"); ?>
<div class="jumbotron">
<div class="container">
<h1>Instant activation</h1>
<p>Free hosting accounts are activated instantly, no need to wait for manual approval, you can start building your pages immediately! A powerful Vista Panel control panel is provided to manage your website, packed with hundreds of great features including Email, FTP add-on domain ...</p>
<p>
<a class="btn btn-lg btn-primary" href="./signup.php" role="button">More &raquo;</a>
</p>
</div>
<div class="container">
<h1>Instant activation</h1>
<p>Free hosting accounts are activated instantly, no need to wait for manual approval, you can start building your pages immediately! A powerful Vista Panel control panel is provided to manage your website, packed with hundreds of great features including Email, FTP add-on domain ...</p>
<p>
<a class="btn btn-lg btn-primary" href="./signup.php" role="button">More &raquo;</a>
</p>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Automated features!</h2>
<img src="images/img6.jpg" alt="server" class="img-rounded">
<!--<p class="text-danger">As of v8.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.</p>-->
<p>We provide free FTP, PHP 5.3, MySQL and our very popular feature: The Automatic Script Installer Fantastico can install many popular scripts such as PHPbb2 and PHPbb3, Wordpress, Zen-Cart, osCommerce, MyBB, UseBB, MyLittle Forum, 4images, Coppermine, SMF, Joomla, e107, XOOPS, PHP Wind, CuteNews, Mambo, WikiWig and many more! No need to wait a long time uploading files, Our Automatic Script Installer deploys your files in seconds!.</p>
</div>
<div class="col-md-6">
<h2>Quotas and forum</h2>
<img src="images/img5.jpg" alt="server" class="img-rounded">
<p>Combined with our high bandwidth, space provisions and excellent sub-domain options, make us the optimal option. Our very popular Community Forums has been taken up excellently and active members are growing steadily, hence resulting in a better hosting and friendly experience..</p>
<h3>Cluster servers</h3>
<p>We are using a powerful cluster of webservers that are all interconnected to act as one giant super computer.</p>
</div>
<div class="row">
<div class="col-md-6">
<h2>Automated features!</h2>
<img src="images/img6.jpg" alt="server" class="img-rounded">
<!--<p class="text-danger">As of v8.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.</p>-->
<p>We provide free FTP, PHP 5.3, MySQL and our very popular feature: The Automatic Script Installer Fantastico can install many popular scripts such as PHPbb2 and PHPbb3, Wordpress, Zen-Cart, osCommerce, MyBB, UseBB, MyLittle Forum, 4images, Coppermine, SMF, Joomla, e107, XOOPS, PHP Wind, CuteNews, Mambo, WikiWig and many more! No need to wait a long time uploading files, Our Automatic Script Installer deploys your files in seconds!.</p>
</div>
<div class="col-md-6">
<h2>Quotas and forum</h2>
<img src="images/img5.jpg" alt="server" class="img-rounded">
<p>Combined with our high bandwidth, space provisions and excellent sub-domain options, make us the optimal option. Our very popular Community Forums has been taken up excellently and active members are growing steadily, hence resulting in a better hosting and friendly experience..</p>
<h3>Cluster servers</h3>
<p>We are using a powerful cluster of webservers that are all interconnected to act as one giant super computer.</p>
</div>
</div>
</div>
<?php include ("footer.php"); ?>
</body>

13
js/common.js Normal file
View file

@ -0,0 +1,13 @@
function setCookie(name, value, expires, path, domain, secure) {
var today = new Date();
today.setTime(today.getTime());
if (expires) {
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date(today.getTime() + (expires));
document.cookie = name + '=' + escape(value) +
((expires) ? ';expires=' + expires_date.toGMTString() : '') + //expires.toGMTString()
((path) ? ';path=' + path : '') +
((domain) ? ';domain=' + domain : '') +
((secure) ? ';secure' : '');
}

View file

@ -1,554 +0,0 @@
/******************************************************************************
* jquery.i18n.properties
*
* Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
* MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
*
* @version 1.2.2
* @url https://github.com/jquery-i18n-properties/jquery-i18n-properties
* @inspiration Localisation assistance for jQuery (http://keith-wood.name/localisation.html)
* by Keith Wood (kbwood{at}iinet.com.au) June 2007
*
*****************************************************************************/
(function ($) {
$.i18n = {};
/** Map holding bundle keys (if mode: 'map') */
$.i18n.map = {};
/**
* Load and parse message bundle files (.properties),
* making bundles keys available as javascript variables.
*
* i18n files are named <name>.js, or <name>_<language>.js or <name>_<language>_<country>.js
* Where:
* The <language> argument is a valid ISO Language Code. These codes are the lower-case,
* two-letter codes as defined by ISO-639. You can find a full list of these codes at a
* number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html
* The <country> argument is a valid ISO Country Code. These codes are the upper-case,
* two-letter codes as defined by ISO-3166. You can find a full list of these codes at a
* number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
*
* Sample usage for a bundles/Messages.properties bundle:
* $.i18n.properties({
* name: 'Messages',
* language: 'en_US',
* path: 'bundles'
* });
* @param name (string/string[], optional) names of file to load (eg, 'Messages' or ['Msg1','Msg2']). Defaults to "Messages"
* @param language (string, optional) language/country code (eg, 'en', 'en_US', 'pt_BR'). if not specified, language reported by the browser will be used instead.
* @param path (string, optional) path of directory that contains file to load
* @param mode (string, optional) whether bundles keys are available as JavaScript variables/functions or as a map (eg, 'vars' or 'map')
* @param cache (boolean, optional) whether bundles should be cached by the browser, or forcibly reloaded on each page load. Defaults to false (i.e. forcibly reloaded)
* @param encoding (string, optional) the encoding to request for bundles. Property file resource bundles are specified to be in ISO-8859-1 format. Defaults to UTF-8 for backward compatibility.
* @param callback (function, optional) callback function to be called after script is terminated
*/
$.i18n.properties = function (settings) {
// set up settings
var defaults = {
name: 'Messages',
language: '',
path: '',
mode: 'vars',
cache: false,
encoding: 'UTF-8',
async: false,
checkAvailableLanguages: false,
callback: null
};
settings = $.extend(defaults, settings);
// Try to ensure that we have at a least a two letter language code
settings.language = this.normaliseLanguageCode(settings.language);
var languagesFileLoadedCallback = function (languages) {
settings.totalFiles = 0;
settings.filesLoaded = 0;
// load and parse bundle files
var files = getFiles(settings.name);
if (settings.async) {
for (var i = 0, j = files.length; i < j; i++) {
// 1 for the base.
settings.totalFiles += 1;
// 2. with language code (eg, Messages_pt.properties)
var shortCode = settings.language.substring(0, 2);
if (languages.length == 0 || $.inArray(shortCode, languages) != -1) {
// 1 for the short code file
settings.totalFiles += 1;
}
// 3. with language code and country code (eg, Messages_pt_BR.properties)
if (settings.language.length >= 5) {
var longCode = settings.language.substring(0, 5);
if (languages.length == 0 || $.inArray(longCode, languages) != -1) {
// 1 for the long code file
settings.totalFiles += 1;
}
}
}
}
var defaultFileName, shortFileName, longFilename;
for (var k = 0, m = files.length; k < m; k++) {
// 1. load base (eg, Messages.properties)
defaultFileName = settings.path + files[k] + '.properties';
// 2. with language code (eg, Messages_pt.properties)
var shortCode = settings.language.substring(0, 2);
if (languages.length == 0 || $.inArray(shortCode, languages) != -1) {
shortFileName = settings.path + files[k] + '_' + shortCode + '.properties';
}
// 3. with language code and country code (eg, Messages_pt_BR.properties)
if (settings.language.length >= 5) {
var longCode = settings.language.substring(0, 5);
if (languages.length == 0 || $.inArray(longCode, languages) != -1) {
longFileName = settings.path + files[k] + '_' + longCode + '.properties';
}
}
loadAndParseFiles([defaultFileName,shortFileName,longFileName], settings);
defaultFileName = shortFileName = longFileName = null;
}
// call callback
if (settings.callback && !settings.async) {
settings.callback();
}
};
if (settings.checkAvailableLanguages) {
$.ajax({
url: settings.path + 'languages.json',
async: settings.async,
cache: false,
success: function (data, textStatus, jqXHR) {
languagesFileLoadedCallback(data.languages || []);
}
});
} else {
languagesFileLoadedCallback([]);
}
};
/**
* When configured with mode: 'map', allows access to bundle values by specifying its key.
* Eg, jQuery.i18n.prop('com.company.bundles.menu_add')
*/
$.i18n.prop = function (key /* Add parameters as function arguments as necessary */) {
var value = $.i18n.map[key];
if (value == null)
return '[' + key + ']';
var phvList;
if (arguments.length == 2 && $.isArray(arguments[1]))
// An array was passed as the only parameter, so assume it is the list of place holder values.
phvList = arguments[1];
// Place holder replacement
/**
* Tested with:
* test.t1=asdf ''{0}''
* test.t2=asdf '{0}' '{1}'{1}'zxcv
* test.t3=This is \"a quote" 'a''{0}''s'd{fgh{ij'
* test.t4="'''{'0}''" {0}{a}
* test.t5="'''{0}'''" {1}
* test.t6=a {1} b {0} c
* test.t7=a 'quoted \\ s\ttringy' \t\t x
*
* Produces:
* test.t1, p1 ==> asdf 'p1'
* test.t2, p1 ==> asdf {0} {1}{1}zxcv
* test.t3, p1 ==> This is "a quote" a'{0}'sd{fgh{ij
* test.t4, p1 ==> "'{0}'" p1{a}
* test.t5, p1 ==> "'{0}'" {1}
* test.t6, p1 ==> a {1} b p1 c
* test.t6, p1, p2 ==> a p2 b p1 c
* test.t6, p1, p2, p3 ==> a p2 b p1 c
* test.t7 ==> a quoted \ s tringy x
*/
var i;
if (typeof(value) == 'string') {
// Handle escape characters. Done separately from the tokenizing loop below because escape characters are
// active in quoted strings.
i = 0;
while ((i = value.indexOf('\\', i)) != -1) {
if (value.charAt(i + 1) == 't')
value = value.substring(0, i) + '\t' + value.substring((i++) + 2); // tab
else if (value.charAt(i + 1) == 'r')
value = value.substring(0, i) + '\r' + value.substring((i++) + 2); // return
else if (value.charAt(i + 1) == 'n')
value = value.substring(0, i) + '\n' + value.substring((i++) + 2); // line feed
else if (value.charAt(i + 1) == 'f')
value = value.substring(0, i) + '\f' + value.substring((i++) + 2); // form feed
else if (value.charAt(i + 1) == '\\')
value = value.substring(0, i) + '\\' + value.substring((i++) + 2); // \
else
value = value.substring(0, i) + value.substring(i + 1); // Quietly drop the character
}
// Lazily convert the string to a list of tokens.
var arr = [], j, index;
i = 0;
while (i < value.length) {
if (value.charAt(i) == '\'') {
// Handle quotes
if (i == value.length - 1)
value = value.substring(0, i); // Silently drop the trailing quote
else if (value.charAt(i + 1) == '\'')
value = value.substring(0, i) + value.substring(++i); // Escaped quote
else {
// Quoted string
j = i + 2;
while ((j = value.indexOf('\'', j)) != -1) {
if (j == value.length - 1 || value.charAt(j + 1) != '\'') {
// Found start and end quotes. Remove them
value = value.substring(0, i) + value.substring(i + 1, j) + value.substring(j + 1);
i = j - 1;
break;
}
else {
// Found a double quote, reduce to a single quote.
value = value.substring(0, j) + value.substring(++j);
}
}
if (j == -1) {
// There is no end quote. Drop the start quote
value = value.substring(0, i) + value.substring(i + 1);
}
}
}
else if (value.charAt(i) == '{') {
// Beginning of an unquoted place holder.
j = value.indexOf('}', i + 1);
if (j == -1)
i++; // No end. Process the rest of the line. Java would throw an exception
else {
// Add 1 to the index so that it aligns with the function arguments.
index = parseInt(value.substring(i + 1, j));
if (!isNaN(index) && index >= 0) {
// Put the line thus far (if it isn't empty) into the array
var s = value.substring(0, i);
if (s != "")
arr.push(s);
// Put the parameter reference into the array
arr.push(index);
// Start the processing over again starting from the rest of the line.
i = 0;
value = value.substring(j + 1);
}
else
i = j + 1; // Invalid parameter. Leave as is.
}
}
else
i++;
}
// Put the remainder of the no-empty line into the array.
if (value != "")
arr.push(value);
value = arr;
// Make the array the value for the entry.
$.i18n.map[key] = arr;
}
if (value.length == 0)
return "";
if (value.length == 1 && typeof(value[0]) == "string")
return value[0];
var str = "";
for (i = 0; i < value.length; i++) {
if (typeof(value[i]) == "string")
str += value[i];
// Must be a number
else if (phvList && value[i] < phvList.length)
str += phvList[value[i]];
else if (!phvList && value[i] + 1 < arguments.length)
str += arguments[value[i] + 1];
else
str += "{" + value[i] + "}";
}
return str;
};
function callbackIfComplete(settings) {
if (settings.async) {
settings.filesLoaded += 1;
if (settings.filesLoaded === settings.totalFiles) {
if (settings.callback) {
settings.callback();
}
}
}
}
function loadAndParseFiles(filenames, settings) {
if (filenames!=null && filenames.length > 0) {
loadAndParseFile(filenames[0],settings,function(){
filenames.shift();
loadAndParseFiles(filenames,settings)
});
}
}
/** Load and parse .properties files */
function loadAndParseFile(filename, settings,next) {
if (filename!=null) {
$.ajax({
url: filename,
async: settings.async,
cache: settings.cache,
dataType: 'text',
success: function (data, status) {
parseData(data, settings.mode);
next();
callbackIfComplete(settings);
},
error: function (jqXHR, textStatus, errorThrown) {
console.log('Failed to download or parse ' + filename);
callbackIfComplete(settings);
}
});
}
}
/** Parse .properties files */
function parseData(data, mode) {
var parsed = '';
var parameters = data.split(/\n/);
var regPlaceHolder = /(\{\d+})/g;
var regRepPlaceHolder = /\{(\d+)}/g;
var unicodeRE = /(\\u.{4})/ig;
for (var i = 0; i < parameters.length; i++) {
parameters[i] = parameters[i].replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // trim
if (parameters[i].length > 0 && parameters[i].match("^#") != "#") { // skip comments
var pair = parameters[i].split('=');
if (pair.length > 0) {
/** Process key & value */
var name = decodeURI(pair[0]).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // trim
var value = pair.length == 1 ? "" : pair[1];
// process multi-line values
while (value.match(/\\$/) == "\\") {
value = value.substring(0, value.length - 1);
value += parameters[++i].replace(/\s\s*$/, ''); // right trim
}
// Put values with embedded '='s back together
for (var s = 2; s < pair.length; s++) {
value += '=' + pair[s];
}
value = value.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // trim
/** Mode: bundle keys in a map */
if (mode == 'map' || mode == 'both') {
// handle unicode chars possibly left out
var unicodeMatches = value.match(unicodeRE);
if (unicodeMatches) {
for (var u = 0; u < unicodeMatches.length; u++) {
value = value.replace(unicodeMatches[u], unescapeUnicode(unicodeMatches[u]));
}
}
// add to map
$.i18n.map[name] = value;
}
/** Mode: bundle keys as vars/functions */
if (mode == 'vars' || mode == 'both') {
value = value.replace(/"/g, '\\"'); // escape quotation mark (")
// make sure namespaced key exists (eg, 'some.key')
checkKeyNamespace(name);
// value with variable substitutions
if (regPlaceHolder.test(value)) {
var parts = value.split(regPlaceHolder);
// process function args
var first = true;
var fnArgs = '';
var usedArgs = [];
for (var p = 0; p < parts.length; p++) {
if (regPlaceHolder.test(parts[p]) && (usedArgs.length == 0 || usedArgs.indexOf(parts[p]) == -1)) {
if (!first) {
fnArgs += ',';
}
fnArgs += parts[p].replace(regRepPlaceHolder, 'v$1');
usedArgs.push(parts[p]);
first = false;
}
}
parsed += name + '=function(' + fnArgs + '){';
// process function body
var fnExpr = '"' + value.replace(regRepPlaceHolder, '"+v$1+"') + '"';
parsed += 'return ' + fnExpr + ';' + '};';
// simple value
} else {
parsed += name + '="' + value + '";';
}
} // END: Mode: bundle keys as vars/functions
} // END: if(pair.length > 0)
} // END: skip comments
}
eval(parsed);
}
/** Make sure namespace exists (for keys with dots in name) */
// TODO key parts that start with numbers quietly fail. i.e. month.short.1=Jan
function checkKeyNamespace(key) {
var regDot = /\./;
if (regDot.test(key)) {
var fullname = '';
var names = key.split(/\./);
for (var i = 0; i < names.length; i++) {
if (i > 0) {
fullname += '.';
}
fullname += names[i];
if (eval('typeof ' + fullname + ' == "undefined"')) {
eval(fullname + '={};');
}
}
}
}
/** Make sure filename is an array */
function getFiles(names) {
return (names && names.constructor == Array) ? names : [names];
}
/** Ensure language code is in the format aa_AA. */
$.i18n.normaliseLanguageCode = function (lang) {
if (!lang || lang.length < 2) {
lang = (navigator.languages) ? navigator.languages[0]
: (navigator.language || navigator.userLanguage /* IE */ || 'en');
}
lang = lang.toLowerCase();
lang = lang.replace(/-/,"_"); // some browsers report language as en-US instead of en_US
if (lang.length > 3) {
lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
}
return lang;
};
/** Unescape unicode chars ('\u00e3') */
function unescapeUnicode(str) {
// unescape unicode codes
var codes = [];
var code = parseInt(str.substr(2), 16);
if (code >= 0 && code < Math.pow(2, 16)) {
codes.push(code);
}
// convert codes to text
var unescaped = '';
for (var i = 0; i < codes.length; ++i) {
unescaped += String.fromCharCode(codes[i]);
}
return unescaped;
}
/* Cross-Browser Split 1.0.1
(c) Steven Levithan <stevenlevithan.com>; MIT License
An ECMA-compliant, uniform cross-browser split method */
var cbSplit;
// avoid running twice, which would break `cbSplit._nativeSplit`'s reference to the native `split`
if (!cbSplit) {
cbSplit = function (str, separator, limit) {
// if `separator` is not a regex, use the native `split`
if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
if (typeof cbSplit._nativeSplit == "undefined")
return str.split(separator, limit);
else
return cbSplit._nativeSplit.call(str, separator, limit);
}
var output = [],
lastLastIndex = 0,
flags = (separator.ignoreCase ? "i" : "") +
(separator.multiline ? "m" : "") +
(separator.sticky ? "y" : ""),
separator = new RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
separator2, match, lastIndex, lastLength;
str = str + ""; // type conversion
if (!cbSplit._compliantExecNpcg) {
separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
}
/* behavior for `limit`: if it's...
- `undefined`: no limit.
- `NaN` or zero: return an empty array.
- a positive number: use `Math.floor(limit)`.
- a negative number: no limit.
- other: type-convert, then use the above rules. */
if (limit === undefined || +limit < 0) {
limit = Infinity;
} else {
limit = Math.floor(+limit);
if (!limit) {
return [];
}
}
while (match = separator.exec(str)) {
lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
if (lastIndex > lastLastIndex) {
output.push(str.slice(lastLastIndex, match.index));
// fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
if (!cbSplit._compliantExecNpcg && match.length > 1) {
match[0].replace(separator2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) {
match[i] = undefined;
}
}
});
}
if (match.length > 1 && match.index < str.length) {
Array.prototype.push.apply(output, match.slice(1));
}
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= limit) {
break;
}
}
if (separator.lastIndex === match.index) {
separator.lastIndex++; // avoid an infinite loop
}
}
if (lastLastIndex === str.length) {
if (lastLength || !separator.test("")) {
output.push("");
}
} else {
output.push(str.slice(lastLastIndex));
}
return output.length > limit ? output.slice(0, limit) : output;
};
cbSplit._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
cbSplit._nativeSplit = String.prototype.split;
} // end `if (!cbSplit)`
String.prototype.split = function (separator, limit) {
return cbSplit(this, separator, limit);
};
})(jQuery);

View file

@ -1,61 +0,0 @@
/******************************************************************************
* jquery.i18n.properties
*
* Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
* MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
*
* @version 1.2.2
* @url https://github.com/jquery-i18n-properties/jquery-i18n-properties
* @inspiration Localisation assistance for jQuery (http://keith-wood.name/localisation.html)
* by Keith Wood (kbwood{at}iinet.com.au) June 2007
*
*****************************************************************************/
!function($){function callbackIfComplete(e){e.async&&(e.filesLoaded+=1,e.filesLoaded===e.totalFiles&&e.callback&&e.callback())}function loadAndParseFile(e,a){$.ajax({url:e,async:a.async,cache:a.cache,dataType:"text",success:function(e,r){parseData(e,a.mode),callbackIfComplete(a)},error:function(r,t,n){console.log("Failed to download or parse "+e),callbackIfComplete(a)}})}function parseData(data,mode){for(var parsed="",parameters=data.split(/\n/),regPlaceHolder=/(\{\d+})/g,regRepPlaceHolder=/\{(\d+)}/g,unicodeRE=/(\\u.{4})/gi,i=0;i<parameters.length;i++)if(parameters[i]=parameters[i].replace(/^\s\s*/,"").replace(/\s\s*$/,""),parameters[i].length>0&&"#"!=parameters[i].match("^#")){var pair=parameters[i].split("=")
if(pair.length>0){for(var name=decodeURI(pair[0]).replace(/^\s\s*/,"").replace(/\s\s*$/,""),value=1==pair.length?"":pair[1];"\\"==value.match(/\\$/);)value=value.substring(0,value.length-1),value+=parameters[++i].replace(/\s\s*$/,"")
for(var s=2;s<pair.length;s++)value+="="+pair[s]
if(value=value.replace(/^\s\s*/,"").replace(/\s\s*$/,""),"map"==mode||"both"==mode){var unicodeMatches=value.match(unicodeRE)
if(unicodeMatches)for(var u=0;u<unicodeMatches.length;u++)value=value.replace(unicodeMatches[u],unescapeUnicode(unicodeMatches[u]))
$.i18n.map[name]=value}if("vars"==mode||"both"==mode)if(value=value.replace(/"/g,'\\"'),checkKeyNamespace(name),regPlaceHolder.test(value)){for(var parts=value.split(regPlaceHolder),first=!0,fnArgs="",usedArgs=[],p=0;p<parts.length;p++)!regPlaceHolder.test(parts[p])||0!=usedArgs.length&&-1!=usedArgs.indexOf(parts[p])||(first||(fnArgs+=","),fnArgs+=parts[p].replace(regRepPlaceHolder,"v$1"),usedArgs.push(parts[p]),first=!1)
parsed+=name+"=function("+fnArgs+"){"
var fnExpr='"'+value.replace(regRepPlaceHolder,'"+v$1+"')+'"'
parsed+="return "+fnExpr+";};"}else parsed+=name+'="'+value+'";'}}eval(parsed)}function checkKeyNamespace(key){var regDot=/\./
if(regDot.test(key))for(var fullname="",names=key.split(/\./),i=0;i<names.length;i++)i>0&&(fullname+="."),fullname+=names[i],eval("typeof "+fullname+' == "undefined"')&&eval(fullname+"={};")}function getFiles(e){return e&&e.constructor==Array?e:[e]}function unescapeUnicode(e){var a=[],r=parseInt(e.substr(2),16)
r>=0&&r<Math.pow(2,16)&&a.push(r)
for(var t="",n=0;n<a.length;++n)t+=String.fromCharCode(a[n])
return t}$.i18n={},$.i18n.map={},$.i18n.properties=function(e){var a={name:"Messages",language:"",path:"",mode:"vars",cache:!1,encoding:"UTF-8",async:!1,checkAvailableLanguages:!1,callback:null}
e=$.extend(a,e),e.language=this.normaliseLanguageCode(e.language)
var r=function(a){e.totalFiles=0,e.filesLoaded=0
var r=getFiles(e.name)
if(e.async)for(var t=0,n=r.length;n>t;t++){e.totalFiles+=1
var s=e.language.substring(0,2)
if(0!=a.length&&-1==$.inArray(s,a)||(e.totalFiles+=1),e.language.length>=5){var l=e.language.substring(0,5)
0!=a.length&&-1==$.inArray(l,a)||(e.totalFiles+=1)}}for(var i=0,g=r.length;g>i;i++){loadAndParseFile(e.path+r[i]+".properties",e)
var s=e.language.substring(0,2)
if(0!=a.length&&-1==$.inArray(s,a)||loadAndParseFile(e.path+r[i]+"_"+s+".properties",e),e.language.length>=5){var l=e.language.substring(0,5)
0!=a.length&&-1==$.inArray(l,a)||loadAndParseFile(e.path+r[i]+"_"+l+".properties",e)}}e.callback&&!e.async&&e.callback()}
e.checkAvailableLanguages?$.ajax({url:e.path+"languages.json",async:e.async,cache:!1,success:function(e,a,t){r(e.languages||[])}}):r([])},$.i18n.prop=function(e){var a=$.i18n.map[e]
if(null==a)return"["+e+"]"
var r
2==arguments.length&&$.isArray(arguments[1])&&(r=arguments[1])
var t
if("string"==typeof a){for(t=0;-1!=(t=a.indexOf("\\",t));)a="t"==a.charAt(t+1)?a.substring(0,t)+" "+a.substring(t++ +2):"r"==a.charAt(t+1)?a.substring(0,t)+"\r"+a.substring(t++ +2):"n"==a.charAt(t+1)?a.substring(0,t)+"\n"+a.substring(t++ +2):"f"==a.charAt(t+1)?a.substring(0,t)+"\f"+a.substring(t++ +2):"\\"==a.charAt(t+1)?a.substring(0,t)+"\\"+a.substring(t++ +2):a.substring(0,t)+a.substring(t+1)
var n,s,l=[]
for(t=0;t<a.length;)if("'"==a.charAt(t))if(t==a.length-1)a=a.substring(0,t)
else if("'"==a.charAt(t+1))a=a.substring(0,t)+a.substring(++t)
else{for(n=t+2;-1!=(n=a.indexOf("'",n));){if(n==a.length-1||"'"!=a.charAt(n+1)){a=a.substring(0,t)+a.substring(t+1,n)+a.substring(n+1),t=n-1
break}a=a.substring(0,n)+a.substring(++n)}-1==n&&(a=a.substring(0,t)+a.substring(t+1))}else if("{"==a.charAt(t))if(n=a.indexOf("}",t+1),-1==n)t++
else if(s=parseInt(a.substring(t+1,n)),!isNaN(s)&&s>=0){var i=a.substring(0,t)
""!=i&&l.push(i),l.push(s),t=0,a=a.substring(n+1)}else t=n+1
else t++
""!=a&&l.push(a),a=l,$.i18n.map[e]=l}if(0==a.length)return""
if(1==a.length&&"string"==typeof a[0])return a[0]
var g=""
for(t=0;t<a.length;t++)g+="string"==typeof a[t]?a[t]:r&&a[t]<r.length?r[a[t]]:!r&&a[t]+1<arguments.length?arguments[a[t]+1]:"{"+a[t]+"}"
return g},$.i18n.normaliseLanguageCode=function(e){return(!e||e.length<2)&&(e=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage||"en"),e=e.toLowerCase(),e=e.replace(/-/,"_"),e.length>3&&(e=e.substring(0,3)+e.substring(3).toUpperCase()),e}
var cbSplit
cbSplit||(cbSplit=function(e,a,r){if("[object RegExp]"!==Object.prototype.toString.call(a))return"undefined"==typeof cbSplit._nativeSplit?e.split(a,r):cbSplit._nativeSplit.call(e,a,r)
var t,n,s,l,i=[],g=0,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.sticky?"y":""),a=new RegExp(a.source,c+"g")
if(e+="",cbSplit._compliantExecNpcg||(t=new RegExp("^"+a.source+"$(?!\\s)",c)),void 0===r||0>+r)r=1/0
else if(r=Math.floor(+r),!r)return[]
for(;(n=a.exec(e))&&(s=n.index+n[0].length,!(s>g&&(i.push(e.slice(g,n.index)),!cbSplit._compliantExecNpcg&&n.length>1&&n[0].replace(t,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(n[e]=void 0)}),n.length>1&&n.index<e.length&&Array.prototype.push.apply(i,n.slice(1)),l=n[0].length,g=s,i.length>=r)));)a.lastIndex===n.index&&a.lastIndex++
return g===e.length?!l&&a.test("")||i.push(""):i.push(e.slice(g)),i.length>r?i.slice(0,r):i},cbSplit._compliantExecNpcg=void 0===/()??/.exec("")[1],cbSplit._nativeSplit=String.prototype.split),String.prototype.split=function(e,a){return cbSplit(this,e,a)}}(jQuery)

View file

@ -1,25 +0,0 @@
jQuery.i18n.properties({
name: 'lang',
path: './locales/',
mode: 'both',
// language: 'zh_CN',
checkAvailableLanguages: true,
async: true,
cache: true,
callback: function () {
jQuery("html").attr("lang", jQuery.i18n.normaliseLanguageCode());
$("[data-i18n]").each(function () {
var elem = $(this), localizedValue = jQuery.i18n.map[elem.data("i18n")];
if (elem.is("input[type=text]") || elem.is("input[type=password]") || elem.is("input[type=email]")) {
elem.attr("placeholder", localizedValue);
} else if (elem.is("input[type=button]") || elem.is("input[type=submit]")) {
elem.attr("value", localizedValue);
} else {
elem.text(localizedValue);
}
});
if (window.location.pathname == "/login.php") {
jQuery("input[name=language]").attr("value", jQuery.i18n.map["language"])
}
}
});

23
lang.php Normal file
View file

@ -0,0 +1,23 @@
<?php
if(!defined('IN_SYS')) {
// exit('禁止访问');
header("Location:"."index.php");
exit;
}
include_once (dirname ( __FILE__ ) . '/include/language.php');
$lang = new Language();
// print_r($lang->language_area);
$current_language = getCurrentLanguage();
// print_r($current_language);
function getCurrentLanguage() {
global $lang, $languages;
if (array_key_exists ( $lang->language_area, $languages )) {
return $lang->language_area;
} else if (array_key_exists ( $lang->language_country, $languages )) {
return $lang->language_country;
} else {
return 'en-US';
}
}
$language_file=$lang->getFileDir('language.php');
include($language_file);

View file

@ -1,10 +1,11 @@
<?php
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/portal/cancellation-refund.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
define('IN_SYS', true);
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/portal/cancellation-refund.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - Cancellation & Refund</title>
@ -87,10 +88,10 @@
<div class="panel-heading"><i class="glyphicon glyphicon-list-alt"></i> Other legal information</div>
<div class="panel-body">
<ul>
<li><a href="./legal_terms.php" data-i18n="tos">Terms of Service</a></li>
<li class="active" data-i18n="cancellation_refund">Cancellation &amp; Refund</li>
<li><a href="./legal_privacy.php" data-i18n="privacy_policy">Privacy Policy</a></li>
<li><a href="./legal_payment-methods.php" data-i18n="payment_methods">Payment Methods &amp; Information</a></li>
<li><a href="./legal_terms.php"><?php echo $LANG['tos']; ?></a></li>
<li class="active"><?php echo $LANG['cancellation_refund']; ?></li>
<li><a href="./legal_privacy.php"><?php echo $LANG['privacy_policy']; ?></a></li>
<li><a href="./legal_payment-methods.php"><?php echo $LANG['payment_methods']; ?></a></li>
</ul>
</div>
</div>

View file

@ -1,13 +1,14 @@
<?php
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/payment-methods.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
define('IN_SYS', true);
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/payment-methods.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - Payment Methods & Information</title>
<title><?=$title?> - <?php echo $LANG['payment_methods']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
@ -23,74 +24,74 @@
<body>
<?php include ("nav.php"); ?>
<div class="container">
<div class="row">
<section class="section-wrap title">
<div class="container">
<h2 class="text-center">Payment Methods</h2>
<p class="text-center">Payment methods information</p>
<div class="row">
<section class="section-wrap title">
<div class="container">
<h2 class="text-center"><?php echo $LANG['payment_methods']; ?></h2>
<p class="text-center">Payment methods information</p>
</div>
</section>
<section class="section-wrap paymentsInfo">
<div class="container">
<div class="row">
<div class="hidden-xs col-sm-12 col-md-12 termsHead"><h1><?php echo $LANG['payment_methods']; ?></h1></div>
<div class="col-sm-12 col-md-12">
<p>We currently accept payments using 3 major payment gateways:</p>
<ul>
<li><strong>Paypal</strong> - using credit cards and paypal accounts</li>
<li><strong>WorldPay</strong> - instant credit cards payments</li>
<li><strong>2CheckOut</strong> - instant and recurrent credit cards payments as well as paypal payments where countries support it.</li>
</ul>
</div>
</div>
</div>
</section>
<section class="section-wrap sectionPaymentLogos">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<img src="./images/payment/paypal.jpg" border="0" alt="Paypal payments">
<img src="./images/payment/poweredByWorldPay.gif" border="0" alt="Worldpay payments">
<img src="./images/payment/2co11.jpg" border="0" alt="2CheckOut payments">
</div>
</section>
<section class="section-wrap paymentsInfo">
<div class="container">
<div class="row">
<div class="hidden-xs col-sm-12 col-md-12 termsHead"><h1>Payment Methods</h1></div>
<div class="col-sm-12 col-md-12">
<p>We currently accept payments using 3 major payment gateways:</p>
<ul>
<li><strong>Paypal</strong> - using credit cards and paypal accounts</li>
<li><strong>WorldPay</strong> - instant credit cards payments</li>
<li><strong>2CheckOut</strong> - instant and recurrent credit cards payments as well as paypal payments where countries support it.</li>
</ul>
</div>
</div>
<div class="col-sm-12 col-md-12">
<img src="./images/payment/visa_debit.gif" border="0" alt="Visa Debit payments supported by WorldPay">
<img src="./images/payment/visa_electron.gif" border="0" alt="Visa Electron payments supported by WorldPay">
<img src="./images/payment/mastercard.gif" border="0" alt="Mastercard payments supported by WorldPay">
<img src="./images/payment/maestro.gif" border="0" alt="Maestro payments supported by WorldPay">
<img src="./images/payment/AMEX.gif" border="0" alt="American Express payments supported by WorldPay">
<img src="./images/payment/diners.gif" border="0" alt="Diners payments supported by WorldPay">
<img src="./images/payment/JCB.gif" border="0" alt="JCB payments supported by WorldPay">
<img src="./images/payment/laser.gif" border="0" alt="Laser payments supported by WorldPay">
<img src="./images/payment/ELV.gif" border="0" alt="ELV payments supported by WorldPay">
</div>
</section>
<section class="section-wrap sectionPaymentLogos">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<img src="./images/payment/paypal.jpg" border="0" alt="Paypal payments">
<img src="./images/payment/poweredByWorldPay.gif" border="0" alt="Worldpay payments">
<img src="./images/payment/2co11.jpg" border="0" alt="2CheckOut payments">
</div>
<div class="col-sm-12 col-md-12">
<img src="./images/payment/visa_debit.gif" border="0" alt="Visa Debit payments supported by WorldPay">
<img src="./images/payment/visa_electron.gif" border="0" alt="Visa Electron payments supported by WorldPay">
<img src="./images/payment/mastercard.gif" border="0" alt="Mastercard payments supported by WorldPay">
<img src="./images/payment/maestro.gif" border="0" alt="Maestro payments supported by WorldPay">
<img src="./images/payment/AMEX.gif" border="0" alt="American Express payments supported by WorldPay">
<img src="./images/payment/diners.gif" border="0" alt="Diners payments supported by WorldPay">
<img src="./images/payment/JCB.gif" border="0" alt="JCB payments supported by WorldPay">
<img src="./images/payment/laser.gif" border="0" alt="Laser payments supported by WorldPay">
<img src="./images/payment/ELV.gif" border="0" alt="ELV payments supported by WorldPay">
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section-wrap">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 terms_policies_menu">
<div class="panel panel-default">
<div class="panel-heading">
<i class="glyphicon glyphicon-list-alt"></i> Other legal information
</div>
<div class="panel-body">
<ul>
<li><a href="./legal_terms.php"><?php echo $LANG['tos']; ?></a></li>
<li><a href="./legal_cancellation-refund.php"><?php echo $LANG['cancellation_refund']; ?></a></li>
<li><a href="./legal_privacy.php"><?php echo $LANG['privacy_policy']; ?></a></li>
<li class="active"><?php echo $LANG['payment_methods']; ?></li>
</ul>
</div>
</div>
</section>
<section class="section-wrap">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 terms_policies_menu">
<div class="panel panel-default">
<div class="panel-heading"><i class="glyphicon glyphicon-list-alt"></i> Other legal information</div>
<div class="panel-body">
<ul>
<li><a href="./legal_terms.php" data-i18n="tos">Terms of Service</a></li>
<li><a href="./legal_cancellation-refund.php" data-i18n="cancellation_refund">Cancellation &amp; Refund</a></li>
<li><a href="./legal_privacy.php" data-i18n="privacy_policy">Privacy Policy</a></li>
<li class="active" data-i18n="payment_methods">Payment Methods &amp; Information</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<?php include ("footer.php"); ?>
</body>

View file

@ -1,13 +1,14 @@
<?php
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/privacy.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
define('IN_SYS', true);
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/privacy.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - Privacy Policy</title>
<title><?=$title?> - <?php echo $LANG['privacy_policy']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
@ -26,7 +27,7 @@
<div class="row">
<section class="section-wrap title">
<div class="container">
<h2 class="text-center">Privacy Policy</h2>
<h2 class="text-center"><?php echo $LANG['privacy_policy']; ?></h2>
<p class="text-center">Privacy policy information</p>
</div>
</section>
@ -97,10 +98,10 @@
</div>
<div class="panel-body">
<ul>
<li><a href="./legal_terms.php" data-i18n="tos">Terms of Service</a></li>
<li><a href="./legal_cancellation-refund.php" data-i18n="cancellation_refund">Cancellation &amp; Refund</a></li>
<li class="active" data-i18n="privacy_policy">Privacy Policy</li>
<li><a href="./legal_payment-methods.php" data-i18n="payment_methods">Payment Methods &amp; Information</a></li>
<li><a href="./legal_terms.php"><?php echo $LANG['tos']; ?></a></li>
<li><a href="./legal_cancellation-refund.php"><?php echo $LANG['cancellation_refund']; ?></a></li>
<li class="active"><?php echo $LANG['privacy_policy']; ?></li>
<li><a href="./legal_payment-methods.php"><?php echo $LANG['payment_methods']; ?></a></li>
</ul>
</div>
</div>

View file

@ -1,13 +1,14 @@
<?php
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/portal/terms.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
define('IN_SYS', true);
require_once ("core.php");
// $html = file_get_contents('https://ifastnet.com/portal/terms.php');
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - Terms of Service</title>
<title><?=$title?> - <?php echo $LANG['tos']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
@ -26,7 +27,7 @@
<div class="row">
<section class="section-wrap title">
<div class="container">
<h2 class="text-center">Terms of Service</h2>
<h2 class="text-center"><?php echo $LANG['tos']; ?></h2>
<p class="text-center">Service conditions and policies</p>
</div>
</section>
@ -857,10 +858,10 @@
</div>
<div class="panel-body">
<ul>
<li class="active" data-i18n="tos">Terms of Service</li>
<li><a href="./legal_cancellation-refund.php" data-i18n="cancellation_refund">Cancellation &amp; Refund</a></li>
<li><a href="./legal_privacy.php" data-i18n="privacy_policy">Privacy Policy</a></li>
<li><a href="./legal_payment-methods.php" data-i18n="payment_methods">Payment Methods &amp; Information</a></li>
<li class="active"><?php echo $LANG['tos']; ?></li>
<li><a href="./legal_cancellation-refund.php"><?php echo $LANG['cancellation_refund']; ?></a></li>
<li><a href="./legal_privacy.php"><?php echo $LANG['privacy_policy']; ?></a></li>
<li><a href="./legal_payment-methods.php"><?php echo $LANG['payment_methods']; ?></a></li>
</ul>
</div>
</div>

View file

@ -1,10 +0,0 @@
msg_hello = Hello
msg_world = World
msg_complex = Good morning {0}! \
Are you OK? \
This is a multi-line property :)
msg_url = http://localhost/webapp/servletName?solution={0}
msg_multi_placeholder = It\'s a {0} day... let\'s go {1}?
msg_multi_placeholder_corrected = It''s a {0} day... let''s go {1}?

View file

@ -1,39 +0,0 @@
language = English
home = Home
production = Product
news = News
contact = Contact
contact_us = Contact Us
help = Help
login = Login
signup = Signup
username = Username
input_username = Please Input Username
password = Password
input_password = Please Input Password
email = Email
input_email = Please Input Email Address
site_category = Site Category
personal = Personal
business = Business
hobby = Hobby
forum = Forum
adult = Adult
dating = Dating
software_download = Software / Download
choose_from_below = Choose from Below
site_language = Site Language
english = English
non_english = Non English
security_code = Security Code
input_security_code = Please Input Security Code
input_security_code_above = Please Input Security Code Above
legal_information = Legal Information
privacy_policy = Privacy Policy
tos = Terms of service
cancellation_refund = Cancellation & Refund
payment_methods = Payment Methods & Information
signup_free_hosting = Sign Up For Free Hosting
remember_me = Remember me
please_login = Please sign in
lost_password = Lost your password?

View file

@ -1,39 +0,0 @@
language = English
home = Home
production = Product
news = News
contact = Contact
contact_us = Contact Us
help = Help
login = Login
signup = Signup
username = Username
input_username = Please Input Username
password = Password
input_password = Please Input Password
email = Email
input_email = Please Input Email Address
site_category = Site Category
personal = Personal
business = Business
hobby = Hobby
forum = Forum
adult = Adult
dating = Dating
software_download = Software / Download
choose_from_below = Choose from Below
site_language = Site Language
english = English
non_english = Non English
security_code = Security Code
input_security_code = Please Input Security Code
input_security_code_above = Please Input Security Code Above
legal_information = Legal Information
privacy_policy = Privacy Policy
tos = Terms of service
cancellation_refund = Cancellation & Refund
payment_methods = Payment Methods & Information
signup_free_hosting = Sign Up For Free Hosting
remember_me = Remember me
please_login = Please sign in
lost_password = Lost your password?

View file

@ -1,12 +0,0 @@
language = Korean
home = 홈 페이지
production = 생산
contact = 접촉
contact_us = 연락
login = 로그인
signup = 가입과
legal_information = 법률 정보
privacy_policy = 개인 정보 보호 정책
tos = 이용 약관
cancellation_refund = 취소 및 환불
payment_methods = 지불 방법

View file

@ -1,40 +0,0 @@
language = Chinese_simplified
home = 主页
production = 产品
news = 新闻
contact = 联系
contact_us = 联系我们
help = 帮助
login = 登录
signup = 注册
username = 用户名
input_username = 请输入用户名
password = 密码
input_password = 请输入密码
email = 电子邮箱地址
input_email = 请输入电子邮箱地址
site_category = 网站类型
personal = 个人
business = 商业
hobby = 爱好
forum = 论坛
adult = 成人
dating = 约会
software_download = 软件/下载
choose_from_below = 下拉选择
site_language = 网站语言
english = 英文
non_english = 非英文
security_code = 验证码
input_security_code = 输入验证码
input_security_code_above = 请输入上面图中验证码
legal_information = 法律信息
privacy_policy = 隐私政策
tos = 服务条款
cancellation_refund = 取消与退款
payment_methods = 支付方式
signup_free_hosting = 注册免费空间
remember_me = 记住我
please_login = 请登录
lost_password = 忘记密码了?
address = 地址

View file

@ -1,40 +0,0 @@
language = Chinese_traditional
home = 主頁
production = 產品
news = 新聞
contact = 聯繫
contact_us = 聯繫我們
help = 幫助
login = 登錄
signup = 註冊
username = 用戶名
input_username = 請輸入用戶名
password = 密碼
input_password = 請輸入密碼
email = 電子郵箱地址
input_email = 請輸入電子郵箱地址
site_category = 網站類型
personal = 個人
business = 商業
hobby = 愛好
forum = 論壇
adult = 成人
dating = 約會
software_download = 軟件/下載
choose_from_below = 下拉選擇
site_language = 網站語言
english = 英文
non_english = 非英文
security_code = 驗證碼
input_security_code = 輸入驗證碼
input_security_code_above = 請輸入上面圖中驗證碼
legal_information = 法律信息
privacy_policy = 隱私政策
tos = 服務條款
cancellation_refund = 取消與退款
payment_methods = 支付方式
signup_free_hosting = 註冊免費空間
remember_me = 記住我
please_login = 請登錄
lost_password = 忘記密碼了?
address = 地址

View file

@ -1 +0,0 @@
{"languages":["zh_CN","zh_TW","en_US","en_GB","ko_KR"]}

View file

@ -1,39 +1,40 @@
<?php
require_once ("core.php");
define('IN_SYS', true);
require_once ("core.php");
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - Login</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
<meta name="author" content="<?=$author?>">
<link href="favicon.ico?_=<?=$static_release?>" rel="icon">
<link href="//<?=$static_bootstrap_css?>" rel="stylesheet">
<link href="./css/style.css?_=<?=$static_release?>" rel="stylesheet"><!--[if lt IE 9]>
<script src="./js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="./js/ie-emulation-modes-warning.js"></script><!--[if lt IE 9]>
<script src="//apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="//apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script><![endif]-->
<meta charset="utf-8">
<title><?=$title?> - <?php echo $LANG['login']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
<meta name="author" content="<?=$author?>">
<link href="favicon.ico?_=<?=$static_release?>" rel="icon">
<link href="//<?=$static_bootstrap_css?>" rel="stylesheet">
<link href="./css/style.css?_=<?=$static_release?>" rel="stylesheet"><!--[if lt IE 9]>
<script src="./js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="./js/ie-emulation-modes-warning.js"></script><!--[if lt IE 9]>
<script src="//apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="//apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script><![endif]-->
</head>
<body>
<?php include ("nav.php"); ?>
<div class="container">
<form class="form-signin" role="form" action="//cpanel.<?=$domain?>/login.php" method="post" name="login">
<h2 class="form-signin-heading" data-i18n="please_login">Please sign in</h2>
<input type="text" name="uname" class="form-control" placeholder="Username" data-i18n="input_username" required autofocus>
<input type="password" name="passwd" class="form-control" placeholder="Password" data-i18n="input_password" required>
<input type="hidden" name="language" value="English" data-i18n="language">
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"><span data-i18n="remember_me">Remember me</span>
<a href="//cpanel.<?=$domain?>/lostpassword.php" data-i18n="lost_password">Lost your password?</a>
</label>
</div>
<button type="submit" name="submit" class="btn btn-lg btn-primary btn-block" data-i18n="login">Sign in</button>
</form>
<form class="form-signin" role="form" action="//cpanel.<?=$domain?>/login.php" method="post" name="login">
<h2 class="form-signin-heading"><?php echo $LANG['please_login']; ?></h2>
<input type="text" name="uname" class="form-control" placeholder="<?php echo $LANG['input_username']; ?>" required autofocus>
<input type="password" name="passwd" class="form-control" placeholder="<?php echo $LANG['input_password']; ?>" required>
<input type="hidden" name="language" value="<?php echo $LANG['language']; ?>">
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"><span><?php echo $LANG['remember_me']; ?></span>
<a href="//cpanel.<?=$domain?>/lostpassword.php"><?php echo $LANG['lost_password']; ?></a>
</label>
</div>
<button type="submit" name="submit" class="btn btn-lg btn-primary btn-block"><?php echo $LANG['login']; ?></button>
</form>
</div>
<?php include ("footer.php"); ?>
</body>

80
nav.php
View file

@ -1,40 +1,46 @@
<?php
if(!defined('IN_SYS')) {
// exit('禁止访问');
header("Location:"."index.php");
exit;
}
?>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php"><?=$title_s?></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.php" data-i18n="home">Home</a></li>
<!--<li><a href="product.php" data-i18n="production">Product</a></li>-->
<li><a href="contact.php" data-i18n="contact">Contact</a></li>
<li><a href="//help.<?=$domain?>" data-i18n="help">Help</a></li>
<li class="dropdown"><a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">Others <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="javascript:void(0)" data-i18n="home">home</a></li>
<li><a href="javascript:void(0)" data-i18n="other">Another action</a></li>
<li><a href="javascript:void(0)" data-i18n="home">Something else here</a></li>
<li><a href="javascript:void(0)" data-i18n="tos">Terms of service</a></li>
<li class="divider"></li>
<li class="dropdown-header" data-i18n="legal_information">Legal Information</li>
<li><a href="./legal_terms.php" data-i18n="tos">Terms of Service</a></li>
<li><a href="./legal_cancellation-refund.php" data-i18n="cancellation_refund">Cancellation & Refund</a></li>
<li><a href="./legal_privacy.php" data-i18n="privacy_policy">Privacy Policy</a></li>
<li><a href="./legal_payment-methods.php" data-i18n="payment_methods">Payment Methods & Information</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="./index.php" data-i18n="home">Home</a></li>
<li><a href="./login.php" data-i18n="login">Login</a></li>
<li><a href="./signup.php" data-i18n="signup">Signup</a></li>
</ul>
</div>
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php"><?=$title_s?></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.php"><?php echo $LANG['home']; ?></a></li>
<!--<li><a href="product.php"><?php echo $LANG['production']; ?></a></li>-->
<li><a href="contact.php"><?php echo $LANG['contact']; ?></a></li>
<li><a href="//help.<?=$domain?>"><?php echo $LANG['help']; ?></a></li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">Others <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="javascript:void(0)"><?php echo $LANG['home']; ?></a></li>
<li><a href="javascript:void(0)"><?php echo $LANG['tos']; ?></a></li>
<li class="divider"></li>
<li class="dropdown-header"><?php echo $LANG['legal_information']; ?></li>
<li><a href="./legal_terms.php"><?php echo $LANG['tos']; ?></a></li>
<li><a href="./legal_cancellation-refund.php"><?php echo $LANG['cancellation_refund']; ?></a></li>
<li><a href="./legal_privacy.php"><?php echo $LANG['privacy_policy']; ?></a></li>
<li><a href="./legal_payment-methods.php"><?php echo $LANG['payment_methods']; ?></a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="./index.php"><?php echo $LANG['home']; ?></a></li>
<li><a href="./login.php"><?php echo $LANG['login']; ?></a></li>
<li><a href="./signup.php"><?php echo $LANG['signup']; ?></a></li>
</ul>
</div>
</div>
</nav>

View file

@ -1,11 +1,12 @@
<?php
require_once ("core.php");
define('IN_SYS', true);
require_once ("core.php");
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?> - News</title>
<title><?=$title?> - <?php echo $LANG['news']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">

View file

@ -1,11 +1,11 @@
<?php
require_once ("core.php");
$domain = "uiisc.com";
$post_data = $_POST;
print_r($post_data);
$data = file_get_contents("php://input");
$url = "http://order.".$domain."/register.php";
// $data = $post_data;
$return = curlrequest($url, $post_data, "post");
require_once ("core.php");
$domain = "uiisc.com";
$post_data = $_POST;
print_r($post_data);
$data = file_get_contents("php://input");
$url = "http://order.".$domain."/register.php";
// $data = $post_data;
$return = curlrequest($url, $post_data, "post");
var_dump($return);exit;
var_dump($return);exit;

View file

@ -1,10 +1,11 @@
<?php
require_once ("core.php");
$domain = "uiisc.com";
// $html = file_get_contents("http://cpanel.".$domain."/lostpassword.php");
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
$password_reset_token_id = "b374b5bd4e35d2cadd98caa77d68c19a";
$logged_ipaddress = "116.228.234.98";
define('IN_SYS', true);
require_once ("core.php");
$domain = "uiisc.com";
// $html = file_get_contents("http://cpanel.".$domain."/lostpassword.php");
// preg_match('/<footer[^>]*id="footer"[^>]*>(.*?) <//footer>/si', $html, $match);
$password_reset_token_id = "b374b5bd4e35d2cadd98caa77d68c19a";
$logged_ipaddress = "116.228.234.98";
?>
<!DOCTYPE html>
<html lang="en">

View file

@ -1,16 +1,17 @@
<?php
require_once ("core.php");
// $security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,99999999999999991000));
$security_id = $_GET["id"];
define('IN_SYS', true);
require_once ("core.php");
// $security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,99999999999999991000));
$security_id = $_GET["id"];
header('Content-Type:image/png');
$url = "http://order.uiisc.com/image.php?id=".$security_id."";//图片链接
$ch = curl_init();
// Cookie:PHPSESSID=121b1127dcded8702c6a1e702c40eca4
curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch,CURLOPT_COOKIE,'PHPSESSID=121b1127dcded8702c6a1e702c40eca4'); // 如果不需要cookies就删除这条语句
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT,0); // 忽略超时
curl_setopt($ch, CURLOPT_NOBODY, false);
$str = curl_exec($ch);
curl_close($ch);
header('Content-Type:image/png');
$url = "http://order.uiisc.com/image.php?id=".$security_id."";//图片链接
$ch = curl_init();
// Cookie:PHPSESSID=121b1127dcded8702c6a1e702c40eca4
curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch,CURLOPT_COOKIE,'PHPSESSID=121b1127dcded8702c6a1e702c40eca4'); // 如果不需要cookies就删除这条语句
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT,0); // 忽略超时
curl_setopt($ch, CURLOPT_NOBODY, false);
$str = curl_exec($ch);
curl_close($ch);

View file

@ -1,30 +1,31 @@
<?php
require_once ("core.php");
define('IN_SYS', true);
require_once ("core.php");
$security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,PHP_INT_MAX));
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $current_language; ?>">
<head>
<meta charset="utf-8">
<title><?=$title?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
<meta name="author" content="<?=$author?>">
<link href="favicon.ico?_=<?=$static_release?>" rel="icon">
<link href="//<?=$static_bootstrap_css?>" rel="stylesheet">
<link href="./css/style.css?_=<?=$static_release?>" rel="stylesheet"><!--[if lt IE 9]>
<script src="./js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="./js/ie-emulation-modes-warning.js"></script><!--[if lt IE 9]>
<script src="//apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="//apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script><![endif]-->
<meta charset="utf-8">
<title><?=$title?> - <?php echo $LANG['signup']; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="description" content="<?=$description?>">
<meta name="author" content="<?=$author?>">
<link href="favicon.ico?_=<?=$static_release?>" rel="icon">
<link href="//<?=$static_bootstrap_css?>" rel="stylesheet">
<link href="./css/style.css?_=<?=$static_release?>" rel="stylesheet"><!--[if lt IE 9]>
<script src="./js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="./js/ie-emulation-modes-warning.js"></script><!--[if lt IE 9]>
<script src="//apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="//apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script><![endif]-->
</head>
<body>
<?php include ("nav.php"); ?>
<div class="container">
<div class="panel panel-default">
<div class="panel-body">
<h2 data-i18n="signup_free_hosting">Sign Up For Free Hosting</h2>
<h2><?php echo $LANG['signup_free_hosting']; ?></h2>
<p>You can sign up here for fast free PHP & MySQL hosting including a free sub domain. Fill out the form below and your free hosting account will be created. <em>Enjoy :)</em></p>
</div>
</div>
@ -39,63 +40,63 @@ require_once ("core.php");
<form class="form-horizontal" role="form" method=post action="//order.<?=$domain?>/register.php"><!--remote_reg.php-->
<input type="hidden" name="plan_name" value="free webhosting">
<div class="form-group">
<label for="inputUsername" class="col-sm-4 control-label" data-i18n="username">Username</label>
<label for="inputUsername" class="col-sm-4 control-label"><?php echo $LANG['username']; ?></label>
<div class="col-sm-5">
<input type="text" name="username" class="form-control" id="inputUsername" placeholder="Username" data-i18n="input_username" value="<?php if (isset($_GET['username'])) { echo $_GET['username']; }?>">
<input type="text" name="username" class="form-control" id="inputUsername" placeholder="<?php echo $LANG['input_username']; ?>" value="<?php if (isset($_GET['username'])) { echo $_GET['username']; }?>">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-sm-4 control-label" data-i18n="password">Password</label>
<label for="inputPassword" class="col-sm-4 control-label"><?php echo $LANG['password']; ?></label>
<div class="col-sm-5">
<input type="password" name="password" class="form-control" id="inputPassword" placeholder="Password" data-i18n="input_password">
<input type="password" name="password" class="form-control" id="inputPassword" placeholder="<?php echo $LANG['input_password']; ?>">
</div>
</div>
<div class="form-group">
<label for="inputEmail" class="col-sm-4 control-label" data-i18n="email">Email Address</label>
<label for="inputEmail" class="col-sm-4 control-label"><?php echo $LANG['email']; ?></label>
<div class="col-sm-5">
<input type="email" name="email" class="form-control" id="inputEmail" placeholder="Email Address" data-i18n="input_email" value="<?php if (isset($_GET['email'])) { echo $_GET['email']; }?>">
<input type="email" name="email" class="form-control" id="inputEmail" placeholder="<?php echo $LANG['input_email']; ?>" value="<?php if (isset($_GET['email'])) { echo $_GET['email']; }?>">
</div>
</div>
<div class="form-group">
<label for="inputCategory" class="col-sm-4 control-label" data-i18n="site_category">Site Category</label>
<div class="col-sm-5">
<select class="form-control" name="website_category" id="inputCategory">
<option data-i18n="choose_from_below">Choose from Below</option>
<option data-i18n="personal">Personal</option>
<option data-i18n="business">Business</option>
<option data-i18n="hobby">Hobby</option>
<option data-i18n="forum">Forum</option>
<option data-i18n="dating">Dating</option>
<option data-i18n="software_download">Software / Download</option>
</select>
</div>
<label for="inputCategory" class="col-sm-4 control-label"><?php echo $LANG['site_category']; ?></label>
<div class="col-sm-5">
<select class="form-control" name="website_category" id="inputCategory">
<option><?php echo $LANG['choose_from_below']; ?></option>
<option><?php echo $LANG['personal']; ?></option>
<option><?php echo $LANG['business']; ?></option>
<option><?php echo $LANG['hobby']; ?></option>
<option><?php echo $LANG['forum']; ?></option>
<option><?php echo $LANG['dating']; ?></option>
<option><?php echo $LANG['software_download']; ?></option>
</select>
</div>
</div>
<div class="form-group">
<label for="inputLanguage" class="col-sm-4 control-label" data-i18n="site_language">Site Language</label>
<label for="inputLanguage" class="col-sm-4 control-label"><?php echo $LANG['site_language']; ?></label>
<div class="col-sm-5">
<select class="form-control" name="website_language" id="inputLanguage">
<option data-i18n="choose_from_below">Choose from Below</option>
<option><?php echo $LANG['choose_from_below']; ?></option>
<option data-i18n="english">English</option>
<option data-i18n="non_english">Non-English</option>
</select>
</div>
</div>
<div class="form-group">
<label for="inputID" class="col-sm-4 control-label" data-i18n="security_code">Security Code</label>
<label for="inputID" class="col-sm-4 control-label"><?php echo $LANG['security_code']; ?></label>
<div class="col-sm-5">
<img width="90px" height="25px" src="./security_code.php?id=<?=$security_id?>">
<input type="hidden" name="id" class="form-control" id="inputID" placeholder="ID" value="<?=$security_id?>">
<input type="hidden" name="id" class="form-control" id="inputID" value="<?=$security_id?>">
</div>
</div>
<div class="form-group">
<label for="inputSecurityCode" class="col-sm-4 control-label" data-i18n="input_security_code">Enter Security Code</label>
<label for="inputSecurityCode" class="col-sm-4 control-label"><?php echo $LANG['input_security_code']; ?></label>
<div class="col-sm-5">
<input type="text" name="number" class="form-control" id="inputSecurityCode" placeholder="Input Above Security Code" data-i18n="input_security_code_above">
<input type="text" name="number" class="form-control" id="inputSecurityCode" placeholder="<?php echo $LANG['input_security_code_above']; ?>">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-6">
<button type="submit" name="submit" class="btn btn-default" data-i18n="signup">Register</button>
<button type="submit" name="submit" class="btn btn-default"><?php echo $LANG['signup']; ?></button>
</div>
</div>
</form>