forked from intfocus/iLearn_iSearch_API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_adm.php
executable file
·168 lines (159 loc) · 6.74 KB
/
main_adm.php
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
//----- Define -----
define(FILE_NAME, "/usr/local/www/apache22/DB.conf"); //account file name
define(DELAY_SEC, 3); //delay reply
define(FILE_ERROR, -3);
//----- Read account and password from DB.conf -----
if(file_exists(FILE_NAME))
{
include(FILE_NAME);
}
else
{
sleep(DELAY_SEC);
echo FILE_ERROR;
return;
}
define(URL_PREFIX, $webui_link);
session_start();
if (!session_is_registered("GUID"))
{
session_register("GUID");
}
if (!session_is_registered("GUID_ADM"))
{
session_register("GUID_ADM");
}
//////////////////////
// Set session=empty, redirect to main.php
//////////////////////
$_SESSION["GUID"] = "";
$_SESSION["GUID_ADM"] = "";
session_write_close();
$cmd = $_GET["cmd"];
/* 20120522 Billy begin */
if (strcmp($cmd , "err") != 0)
$cmd = "";
/* 20120522 Billy end */
?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Openfind P-Marker</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all">
<!--[if IE 6]>
<link href="css/style_ie6.css" rel="stylesheet" type="text/css" media="all">
<![endif]-->
<script type="text/JavaScript" src="js/demoOnly.js"></script>
<script type="text/JavaScript" src="js/jquery-1.4.4.js"></script>
<script type="text/javascript" src="openflashchart/js/swfobject.js"></script>
<script type="text/javascript">
var MSG_NO_FLASH = "目前未安裝flash,產生報表可能會有問題";
var flashblock_flag = false;
function set_flashblock_flag(){
flashblock_flag = true;
}
function setLoginType(type){
document.getElementsByName("loginType")[0].value = type;
}
window.onload = function() //print flash
{
var cmd = "<?php echo $cmd ?>";
var playerVersion = swfobject.getFlashPlayerVersion(); //check version
if (playerVersion.major == 0)
alert(MSG_NO_FLASH);
else if(flashblock_flag == true){
alert("請停用 Flashblock,否則產生報表可能會有問題");
}
//alert(cmd);
if (cmd == "err")
document.getElementById("msg").style.display = "block";
};
</script>
</head>
<body>
<table class="container" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table class="main" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="leftPart">
<a href="<?php echo URL_PREFIX; ?>/index.html"><div class="logo"></div></a>
<div class="leftPart_TL"></div>
<div class="leftPart_TR"></div>
<div class="leftPart_BL"></div>
<div class="leftPart_BR"></div>
</div>
</td>
<td>
<table class="loginWrap" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="TL"></td>
<td class="T"></td>
<td class="TR">
<div class="relative">
</div>
</td>
</tr>
<tr>
<td class="L"></td>
<td class="M" valign="middle">
<table id="normal" class="loginContentWrap" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="listContent2">
<div class="title"><strong style="font-size:13px;">系統管理者登入頁面</strong></div>
</div>
<form name=myForm method=POST action=login_adm.php>
<div class="listContent">
<div class="title">系統管理者帳號 - Login Name :</div>
<input type="text" name=login_name>
</div>
<div class="listContent">
<div class="title">密碼 - Password :</div>
<input type="password" name=password>
</div>
<?php
//只用一個 login button, 直接猜測是 system admin or user -->
// <input type=hidden name=loginType value=1>
//<a class="btn_submit_new relative" href="#">
// <input type="submit" value="管理者登入" OnClick="setLoginType(1);">
//</a>
//<a class="btn_submit_new relative" href="#">
// <input type="submit" value="使用者登入" OnClick="setLoginType(2);"><br>
?>
<a class="btn_submit_new relative" href="#">
<input type="submit" value="系統管理者登入">
<div id="msg" class="msg_adm" style="display:none;">錯誤 -- 輸入帳號或密碼錯誤,請重新輸入</div>
</a>
</form>
</td>
</tr>
</table>
</td>
<td class="R"></td>
</tr>
<tr>
<td class="BL"></td>
<td class="B"><div class="copyrightWrap"><div class="copyright">Copyright © Openfind Information Technology INC. All rights reserved</div></div></td>
<td class="BR"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" height="0" width="0">
<param name="movie" value="PMark.swf">
<param name="allowScriptAccess" value="always">
<embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" allowScriptAccess="always"></embed>
</object>
<IMG SRC="chrome://flashblock/skin/flash-on-24.png" onload="set_flashblock_flag();" style="visibility:hidden">
</body>
</html>