-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwdClass.php
292 lines (237 loc) · 9.14 KB
/
wdClass.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<?php
error_reporting(0);
session_start();
require("./classes/yb-globals.inc.php");
require_once './config.php';
//初始化
$api = YBOpenApi::getInstance()->init($config['AppID'], $config['AppSecret'], $config['CallBack']);
$iapp = $api->getIApp();
try {
//轻应用获取access_token,未授权则跳转至授权页面
$info = $iapp->perform();
} catch (YBException $ex) {
echo $ex->getMessage();
}
$token = $info['visit_oauth']['access_token'];//轻应用获取的token
$_SESSION['token'] = $token;
$api->bind($token);
//获取基本用户信息
$userInfo = $api->request('user/me');
//去除用户名
$info = $userInfo['info'];
//存储到Session
$_SESSION['userName'] = $info['yb_username']
?>
<html>
<head>
<title>文院一键查成绩</title>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<script src="./js/jquery.min.js"></script>
<script src="./md5.js"></script>
<script src="./check.js"></script>
<link type="text/css" rel="stylesheet" href="./css/materialize.min.css" media="screen,projection"/>
<link rel="stylesheet" href="./css/font-awesome.css">
<style type="text/css">
body{
padding-bottom:30px;
}
.sign_box {
position: fixed;
left: 5%;
width: 90%;
right: 5%;
padding: 2.5%;
box-sizing: border-box;
top: 10%;
}
.form-group, .form-control, input {
border-radius: 0 !important;
border-top: none;
border-left: none;
box-shadow: none;
border-right: none;
}
.form-control:focus {
border-color: #1e88e5;
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.logo {
width: 20%;
margin-left: 40%;
margin-right: 40%;
border-radius: 50%;
}
.h4 {
width: 100%;
text-align: center;
}
.info {
display: none;
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
}
.info-content {
position: fixed;
width: 80%;
left: 10%;
right: 25%;
top: 20%;
border-radius: 10px;
padding: 5px;
background: #ffffff;
}
#info-close {
text-align: center;
display: block;
width: 100%;
}
.footer {
opacity: .5;
position: absolute;
width: 90%;
bottom: 5%;
position: fixed;
left:5%;
color: #000;
}
</style>
<script type="text/javascript">
$(function () {
$('.modal').modal();
$('#info').click(function () {
$('#modal1').modal('open');
});
$('#revokeCode').click(function () {
location.href = "./wdClass/revoke.php";
console.log('click')
});
$('.requestCode').click(function () {
});
$('#label_password').click(function(){
$('#txt_pewerwedsdfsdff').focus();
$('.footer').hide();
});
$('#label_account').click(function(){
$('#txt_asmcdefsddsd').focus();
$('.footer').hide();
});
$('#txt_sdertfgsadscxcadsads').bind('focus',function(){
$('.footer').hide();
});
$('#txt_asmcdefsddsd').bind('blur',function(){
$('.footer').show()
})
})
</script>
</head>
<body>
<div class="info">
<div class="info-content">
<p>1.该应用不保留您的账户信息。</p>
<p>2.应用数据来自文达教务系统。</p>
<p>3.如果查询失败,可能接口失效了,或者网络阻塞。</p>
<p>4.反馈QQ群:778399961</p>
<p>5.青果教务的官方APP喜鹊已经支持文院,如需更好的体验,自行下载。</p>
<p>5.by:iwh</p>
<span class="fa fa-close fa-2x" id="info-close"></span>
</div>
</div>
<div class="container ">
<div class="sign_box card ">
<img class="logo" src="./logo.jpg"/>
<div class="h4 text-enter">文院成绩助手<span class="fa fa-question-circle-o" id="info"></span></div>
<form name="Logon" method="post" id="Logon" action="./login.php" autocomplete="off">
<div class=" input-field">
<i class="fa fa-user-circle prefix"></i>
<input name="txt_asmcdefsddsd" id="txt_asmcdefsddsd" class=" validate" type="text">
<label for="name" id="label_account">学号</label>
</div>
<div class="input-field">
<i class="fa fa-eye-slash prefix"></i>
<label for="name" id="label_password">密码</label>
<input class="validate" id="txt_pewerwedsdfsdff" name="txt_pewerwedsdfsdff" onblur="chkpwd(this)"
onkeyup="chkpwd(this)" type="password" >
</div>
<input id="dsdsdsdsdxcxdfgfg" name="dsdsdsdsdxcxdfgfg" type="hidden">
<input id="fgfggfdgtyuuyyuuckjg" name="fgfggfdgtyuuyyuuckjg" type="hidden">
<div class="form-group">
<label for="name">输入验证码</label>
<input class="form-control" id="txt_sdertfgsadscxcadsads" name="txt_sdertfgsadscxcadsads"
onblur="chkyzm(this)" onkeyup="chkyzm(this)">
</div>
<div class="form-group">
<img id="imgCode" src="./getValidate.php" onclick="changeValidateCode(this)" alt="单击可更换图片!"
title="点击更换">
</div>
<div class="center-align">
<button class="btn-floating btn-large pulse waves-effect waves-light center-block loginButton #1e88e5 blue darken-1"
type="submit"><span
class="fa fa-send-o "></span></button>
</div>
</form>
</div>
</div>
<div id="modal1" class="modal bottom-sheet">
<div class="modal-content">
<div class="row">
<div class="col s12 m12">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">Update</span>
<p>v1.2 2019.05.19<br>
1.忒坑爹了,学校教务网站又改版。<br>
2.适配新版教务系统。。。。
<p>v1.2 2019.04.25<br>
1.调整UI。<br>
<p>v1.1 2019.04.17<br>
1.修复错误页面。<br>
<p>v1.1 2019.04.13<br>
1.更改部分UI为Material设计<br>
2.使用易班接口登录。</p>
</div>
</div>
</div>
<div class="col s12 m12">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">About</span>
<p>本应用适用于文达学院青果教务系统,其它学校请移步GitHub自行适配。<br>
权限说明:应用通过易班接口获取你的基本信息,仅仅用于查询成绩使用,服务器未保留您的个人信息!<br>
如果有建议或者bug返回,点击下方QQ群。</p>
</div>
<div class="card-action">
<a href="//shang.qq.com/wpa/qunwpa?idkey=01e46bf72e74f5448932de00867d071221e4d6263ed4075a8b6e907afd3ef4a3">QQ群:778399961</a>
</div>
</div>
</div>
<div class="col s12 m12">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">GitHub</span>
<p>本应用源代码以开源:欢迎来访,下方链接即可快速查看!<br>
应用使用的开源库:<br>
1.Materialize<br>
2.jQuery
</p>
</div>
<div class="card-action">
<a href="https://github.com/iwh718/QingGuoWD">GitHub:iwh718</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="center-align"><a href="#" class="black-text">BY:IWH |文达 |19.04.25</a></div>
</div>
</body>
<script src="./check.js"></script>
<script type="text/javascript" src="./js/materialize.min.js"></script>
</html>