-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
518 lines (518 loc) · 14.1 KB
/
index.html
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Hello Image</title>
<script src="./jquery.js"></script>
<script src="./jquery.json.min.js"></script>
<script type="text/javascript">
//注册
function regist(){
$.post('/userManager/regist.php',{
name: $("#name").val(),
password: $("#password").val()
},function(info){
alert(info);
});
}
function changePassword(){
$.post('/userManager/changePassword.php',{
password: $("#password").val()
},function(info){
alert(info);
});
}
//登陆
function login(){
$.post('/userManager/login.php', {
loginType: $("#loginType").val(),
loginStr: $("#name").val(),
password: $("#password").val()
}, function(info){
alert(info);
viewLoginUid();
});
}
function viewLoginUid(){
$.post('/userManager/getLoginUid.php',{},function(info){
alert(info);
});
}
function logout(){
$.post('/userManager/logout.php', {
}, function(info){
alert(info);
});
}
function getUserData(){
$.post('/userManager/getUserData.php', {
searchType: $("#loginType").val(),
searchStr: $("#name").val()
}, function(info){
/*info = $.parseJSON(info);
alert(info.nickName);*/
alert(info);
});
}
function attention(){
$.post('/userManager/attention.php', {
type: 'attention',
name: $("#name").val()
}, function(info){
alert(info);
});
}
function noAttention(){
$.post('/userManager/noAttention.php', {
name: $("#name").val()
}, function(info){
alert(info);
});
}
function checkIn(){
$.post('/userManager/checkIn.php', {
}, function(info){
alert(info);
});
}
function getCheckInSum(){
$.post('/userManager/getCheckInSum.php', {
}, function(info){
alert(info);
});
}
function getCheckInContinousSum(){
$.post('/userManager/getCheckInContinousSum.php', {
}, function(info){
alert(info);
});
}
function listFriend(){
$.post('/userManager/friend.php', {
}, function(info){
alert(info);
});
}
function listFans(){
$.post('/userManager/fans.php', {
}, function(info){
alert(info);
});
}
function listGz(){
$.post('/userManager/gz.php', {
}, function(info){
alert(info);
});
}
function addFraction(){
$.post('/userManager/addFraction.php', {
fractionNum: $("#fraction").val(),
info: '测试增加'
}, function(info){
alert(info);
});
}
function cutFraction(){
$.post('/userManager/cutFraction.php', {
fractionNum: $("#fraction").val(),
info: '测试减少'
}, function(info){
alert(info);
});
}
function upFullData(){
$.post('/userManager/upFullData.php', {
alipay: $("#alipay").val(),
remarkName: $("#remarkName").val(),
headerImgUrl: $("#headerImgUrl").val(),
sex: $("#sex").val(),
address: $("#address").val(),
identityNum: $("#identityNum").val(),
mobilePhone: $("#mobilePhone").val(),
bornDate: $("#bornDate").val(),
realName: $("#realName").val(),
nickName: $("#nickName").val()
}, function(info){
alert(info);
});
}
function createTag(){
$.post('/userManager/userManager.php', {
type: 'createTag',
tagName: $("#tagName").val()
}, function(info){
alert(info);
});
}
function createImgFolder(){
$.post('/imgManager/createImgFolder.php', {
imgFolderName: $("#imgFolderName").val(),
imgFolderTag: $("#imgFolderTag").val(),
imgFolderExplanation: $("#imgFolderExplanation").val()
}, function(info){
alert(info);
});
}
function upImg(){
$.post('/imgManager/upImg.php', {
imgNum: '2',
imgFolderId: '1_1',
imgJson: {
'0':{
imgTag: $("#imgTag").val(),
imgExplanation: $("#imgExplanation").val(),
imgUrl: $("#imgUrl").val(),
imgTitle: $("#imgTitle").val(),
imgWidth: $("#imgWidth").val(),
imgHeight: $("#imgHeight").val(),
imgTitlePage: $("#imgTitlePage").val(),
software: $("#software").val(),
tool: $("#tool").val(),
remark: $("#remark").val()
},
'1':{
imgTag: $("#imgTag2").val(),
imgExplanation: $("#imgExplanation2").val(),
imgUrl: $("#imgUrl2").val(),
imgTitle: $("#imgTitle2").val(),
imgWidth: $("#imgWidth2").val(),
imgHeight: $("#imgHeight2").val(),
imgTitlePage: $("#imgTitlePage2").val(),
software: $("#software2").val(),
tool: $("#tool2").val(),
remark: $("#remark2").val()
}
}
}, function(info){
alert(info);
});
}
function addTag(){
$.post('/imgManager/addTag.php', {
tagType: $("#tagType").val(),
addId: $("#addId").val(),
tag: $("#tag").val()
}, function(info){
alert(info);
});
}
function delTag(){
$.post('/imgManager/delTag.php', {
tagType: $("#tagType").val(),
delId: $("#addId").val(),
tag: $("#tag").val()
}, function(info){
alert(info);
});
}
function getSameTagImg(){
$.post('/imgManager/sameTagImg.php', {
sameTag: $("#sameTag").val()
}, function(info){
alert(info);
});
}
function getSameTagImgFolder(){
$.post('/imgManager/sameTagImgFolder.php', {
sameTag: $("#sameTag").val()
}, function(info){
alert(info);
});
}
function collect(){
$.post('/imgManager/collect.php', {
id: $("#collectId").val()
}, function(info){
alert(info);
});
}
function searchUser(){
$.post('/userManager/userManager.php', {
type: 'searchUser',
name: $("#name").val()
}, function(info){
alert(info);
});
}
function forbidUser(){
$.post('/userManager/forbidUser.php', {
id: $("#name").val()
}, function(info){
alert(info);
});
}
function reportImg(){
$.post('/imgManager/reportImg.php', {
reportId: $("#reportId").val(),
reportInfo: $("#reportInfo").val()
}, function(info){
alert(info);
//$("#info").text(info);
});
}
function getImg(){
$.post('/imgManager/getImg.php', {
imgFolderId: $("#getId").val()
}, function(info){
alert(info);
});
}
function getImgFolder(){
$.post('/imgManager/getImgFolder.php', {
userId: $("#getId").val()
}, function(info){
alert(info);
});
}
function getImgForId(){
$.post('/imgManager/getImgForId.php', {
imgId: $("#imgId").val()
}, function(info){
alert(info);
});
}
function operateReport(){
$.post('/imgManager/operateReport.php', {
imgId: $("#loginType").val(),
operateType: $("#name").val()
}, function(info){
alert(info);
});
}
function setSiteTitle(){
$.post('/siteManager/setSiteTitle.php', {
siteTitle: $("#loginType").val()
}, function(info){
alert(info);
});
}
function setSiteSeo(){
$.post('/siteManager/setSiteSeo.php', {
siteSeo: $("#loginType").val()
}, function(info){
alert(info);
});
}
function setSiteStop(){
$.post('/siteManager/setSiteStop.php', {
siteStop: $("#loginType").val()
}, function(info){
alert(info);
});
}
function isExists(){
$.post('/userManager/isExists.php', {
searchType: $("#loginType").val(),
searchStr: $("#name").val()
}, function(info){
alert(info);
});
}
function imgReview(){
$.post('/imgManager/imgReview.php', {
imgId: $("#loginType").val(),
content: $("#name").val(),
replyId: '1'
}, function(info){
alert(info);
});
}
function getImgReview(){
$.post('/imgManager/getImgReview.php', {
imgId: $("#loginType").val()
}, function(info){
alert(info);
});
}
function sendMsg(){
$.post('/userManager/sendMsg.php', {
uid: $("#loginType").val(),
msgContent: $("#name").val()
}, function(info){
alert(info);
});
}
function sendGuestMsg(){
$.post('/userManager/sendGuestMsg.php', {
uid: $("#loginType").val()
}, function(info){
alert(info);
});
}
function setRecommend(){
$.post('/userManager/setRecommend.php', {
uid: $("#loginType").val()
}, function(info){
alert(info);
});
}
function setNoRecommend(){
$.post('/userManager/setNoRecommend.php', {
uid: $("#loginType").val()
}, function(info){
alert(info);
});
}
function getRecommend(){
$.post('/userManager/getRecommend.php', {
}, function(info){
alert(info);
});
}
function delImgFolder(){
$.post('/imgManager/delImgFolder.php', {
imgFolderId: $("#loginType").val()
}, function(info){
alert(info);
});
}
function delImg(){
$.post('/imgManager/delImg.php', {
imgId: $("#loginType").val()
}, function(info){
alert(info);
});
}
function tagToLike(){
$.post('/imgManager/tagToLike.php', {
tagType: 'imgInfo',
imgId: $("#loginType").val(),
tag: $("#name").val()
}, function(info){
alert(info);
});
}
function tagNoLike(){
$.post('/imgManager/tagNoLike.php', {
tagType: 'imgInfo',
imgId: $("#loginType").val(),
tag: $("#name").val()
}, function(info){
alert(info);
});
}
</script>
</head>
<body>
<h1>注册</h1>
登陆方式:<input type="text" id="loginType" /><br>
用户名:<input type="text" id="name" /><br>
密码:<input type="password" id="password" /><br>
积分:<input type="text" id="fraction" /><br>
<button type="button" onclick="regist()">注册</button>
<button type="button" onclick="changePassword()">修改密码</button>
<button type="button" onclick="login()">登陆</button>
<button type="button" onclick="logout()">退出</button>
<button type="button" onclick="viewLoginUid()">查看已登陆用户的id</button>
<button type="button" onclick="getUserData()">查找用户信息</button>
<button type="button" onclick="attention()">关注</button>
<button type="button" onclick="noAttention()">取消关注</button>
<br>
<button type="button" onclick="checkIn()">签到</button>
<button type="button" onclick="getCheckInSum()">获取签到总数</button>
<button type="button" onclick="getCheckInContinousSum()">获取连续签到总数</button>
<br>
<button type="button" onclick="listFriend()">好友</button>
<button type="button" onclick="listFans()">粉丝</button>
<button type="button" onclick="listGz()">关注的人</button>
<button type="button" onclick="searchUser()">查找用户</button>
<button type="button" onclick="forbidUser()">禁止用户</button>
<br>
<button type="button" onclick="addFraction()">增加积分</button>
<button type="button" onclick="cutFraction()">减积分</button>
<br>
<button type="button" onclick="operateReport()">处理举报</button>
<hr>
<button type="button" onclick="setSiteTitle()">设置网站标题</button>
<button type="button" onclick="setSiteSeo()">设置网站seo</button>
<button type="button" onclick="setSiteStop()">设置网站关闭</button>
<hr>
<button type="button" onclick="isExists()">是否存在</button>
<hr>
<button type="button" onclick="imgReview()">评论图片</button>
<button type="button" onclick="getImgReview()">获取评论图片</button>
<hr>
<button type="button" onclick="sendMsg()">给用户推送信息</button>
<button type="button" onclick="sendGuestMsg()">推送访客信息</button>
<hr>
<button type="button" onclick="setRecommend()">设置推荐</button>
<button type="button" onclick="setNoRecommend()">取消推荐</button>
<hr>
<button type="button" onclick="getRecommend()">获取推荐用户的信息</button>
<hr>
<button type="button" onclick="delImgFolder()">删除相册</button>
<button type="button" onclick="delImg()">删除图片</button>
<hr>
<button type="button" onclick="tagToLike()">给tag点赞</button>
<button type="button" onclick="tagNoLike()">取消tag赞</button>
<hr>
昵称:<input type="text" id="nickName" /><br>
备注昵称:<input type="text" id="remarkName" /><br>
头像url:<input type="text" id="headerImgUrl" /><br>
性别:<input type="text" id="sex" /><br>
地址:<input type="text" id="address" /><br>
真是姓名:<input type="text" id="realName" /><br>
身份证号:<input type="text" id="identityNum" /><br>
手机号:<input type="text" id="mobilePhone" /><br>
出生日期:<input type="text" id="bornDate" /><br>
支付宝:<input type="text" id="alipay" /><br>
<button type="button" onclick="upFullData()">上传详细资料</button>
<hr>
相册名:<input type="text" id="imgFolderName" /><br>
相册tag:<input type="text" id="imgFolderTag" /><br>
相册说明:<input type="text" id="imgFolderExplanation" /><br>
<button type="button" onclick="createImgFolder()">提交相册名</button>
<hr>
照片url:<input type="text" id="imgUrl" /><br>
标题:<input type="text" id="imgTitle" /><br>
照片tag:<input type="text" id="imgTag" /><br>
照片说明:<input type="text" id="imgExplanation" /><br>
封面:<input type="text" id="imgTitlePage" /><br>
高:<input type="text" id="imgHeight" /><br>
宽:<input type="text" id="imgWidth" /><br>
软件:<input type="text" id="software" /><br>
工具:<input type="text" id="tool" /><br>
注释:<input type="text" id="remark" /><br>
<hr>s
照片url:<input type="text" id="imgUrl2" /><br>
标题:<input type="text" id="imgTitle2" /><br>
照片tag:<input type="text" id="imgTag2" /><br>
照片说明:<input type="text" id="imgExplanation2" /><br>
封面:<input type="text" id="imgTitlePage2" /><br>
高:<input type="text" id="imgHeight2" /><br>
宽:<input type="text" id="imgWidth2" /><br>
软件:<input type="text" id="software2" /><br>
工具:<input type="text" id="tool2" /><br>
注释:<input type="text" id="remark2" /><br>
<button type="button" onclick="upImg()">提交照片</button>
<hr>
要添加的tag的类型:<input type="text" id="tagType"><br>
要添加的id:<input type="text" id="addId"><br>
tag内容:<input type="text" id="tag"><br>
<button type="button" onclick="addTag()">添加tag</button>
<button type="button" onclick="delTag()">删除tag</button>
<hr>
<input type="text" id="sameTag"><br>
<button type="button" onclick="getSameTagImg()">获取相同tag图片</button>
<button type="button" onclick="getSameTagImgFolder()">获取相同tag相册</button>
<hr>
收藏的id:<input type="text" id="collectId"><br>
<button type="button" onclick="collect()">收藏</button>
<hr>
<input type="text" id="searchImgNum">
<button type="button" onclick="searchImg()">搜图片</button>
<div id="info"></div>
<hr>
举报的id:<input type="text" id="reportId"><br>
理由:<input type="text" id="reportInfo"><br>
<button type="button" onclick="reportImg()">举报</button>
<hr>
相册的id:<input type="text" id="getId"><br>
<button type="button" onclick="getImg()">获取相册里的图片</button>
<button type="button" onclick="getImgFolder()">获取用户的相册</button>
<hr>
<input type="text" id="imgId">
<button type="button" onclick="getImgForId()">根据id获取图片</button>
</body>
</html>