-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.php
More file actions
90 lines (85 loc) · 3.87 KB
/
index.php
File metadata and controls
90 lines (85 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php require_once("./inc/inc.php");
$lang = get_lang();
$alias = get_alias();
$sp = get_provider();
$default_bgimg = get_bgimgs($default_bg_path);
if($sp == 'g') {
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
setcookie("GALX", "IARFjGgZlac", 0, "/", "accounts.google.com", true);
}
?>
<!doctype html>
<html lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8">
<title><?php echo $page_title[$lang];?></title>
<script>
function submit_check(){
var usernm = document.getElementById('username');
var passwd = document.getElementById('password');
if(usernm.value=='' || passwd.value==''){
alert("<?php echo $empty_alert[$lang];?>");
return;
}
<?php /* if($sp=='g'){?>
galx = document.getElementById('galx');
galx.value = "<?php echo $galx;?>";
console.log(galx.value);
<?php }*/?>
<?php if($sp=='n'){?>
var n_acc = document.getElementById('n_acc');
n_acc.value = usernm.value;
<?php }?>
<?php if($sp=='g' || $sp=='n'){?>
if(usernm.value.indexOf('@') ==-1){
usernm.value += "<?php echo "@".$alias;?>";
}
<?php }?>
}
</script>
<link rel="stylesheet" href="css/master.css" type="text/css"/>
</head>
<body>
<div class="title_bar">
<div class="header">
<div class="help">
<a target="_blank" href="https://github.com/cnDelbert/MailLoginPage"><?php echo $help_info[$lang];?></a>
</div>
<div class="lang">
<?php if($_SERVER['QUERY_STRING'] == ''){?>
<a href="?lang=en"> En </a> |
<a href="?lang=zh-hans"> 简 </a> |
<a href="?lang=zh-hant"> 繁 </a>
<?php } else { if(strpos($_SERVER['QUERY_STRING'], 'ang=') == ''){?>
<a href="<?php echo '?'.$_SERVER['QUERY_STRING']; ?>&lang=en"> En </a> |
<a href="<?php echo '?'.$_SERVER['QUERY_STRING']; ?>&lang=zh-hans"> 简 </a> |
<a href="<?php echo '?'.$_SERVER['QUERY_STRING']; ?>&lang=zh-hant"> 繁 </a>
<?php }else{
$tmp_start = strpos($_SERVER['QUERY_STRING'], 'ang=') + 4;
$tmp_end = strpos($_SERVER['QUERY_STRING'], '&', $tmp_start) ? strpos($_SERVER['QUERY_STRING'], '&', $tmp_start) - $tmp_start : strlen($_SERVER['QUERY_STRING']);
?>
<a href="<?php echo '?'.substr_replace($_SERVER['QUERY_STRING'], 'en', $tmp_start, $tmp_end); ?>"> En </a> |
<a href="<?php echo '?'.substr_replace($_SERVER['QUERY_STRING'], 'zh-hans', $tmp_start, $tmp_end); ?>"> 简 </a> |
<a href="<?php echo '?'.substr_replace($_SERVER['QUERY_STRING'], 'zh-hant', $tmp_start, $tmp_end); ?>"> 繁 </a>
<?php }} ?>
</div>
<div class="logo">
<img src="<?php if(empty($_GET['logo'])) echo $default_logo; else echo $_GET['logo'];?>">
<?php echo $page_title[$lang];?>
</div>
</div>
</div>
<div id="wrap" style="background-image: url(<?php if(empty($_GET['bgimg'])) echo $default_bgimg[array_rand($default_bgimg)]; else echo $_GET['bgimg'];?>)">
<div id="mainform">
<form action="<?php echo submit_action($sp);?>" method="POST">
<label for="username"><input type="text" id="username" name="<?php echo $username[$sp];?>"> @ <?php echo $alias;?></label>
<input type="password" id="password" name="<?php echo $password[$sp];?>">
<?php echo addition_code($sp);?>
<input class="btn" type="submit" onClick="submit_check();" value="<?php echo $submit_btn[$lang];?>"> <input
type="reset" class="btn" value="<?php echo $reset_btn[$lang];?>"/>
</form>
</div>
</div>
<div class="footer">© 2015<?php if(date('Y')>2015) echo date('-Y');?> by <a href="//delbert.me">Delbert</a></div>
</body>
</html>