-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfontpreview.php
More file actions
48 lines (43 loc) · 975 Bytes
/
fontpreview.php
File metadata and controls
48 lines (43 loc) · 975 Bytes
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
<?php
/*
* 查询字体列表:
* http: get协议
* page=0&reqNum=10
* reqNum为我这边一次请求的数量,page为请求页,reqTpye为请求类型,目前暂做两类,
* 一类为来电铃声reqType=0,一类为通知铃声reqType=1;
* 返回结果
* JSON示例
* {
* "total_number": 300
* "ret_number": 20
* "fonts":
* [
* {
* "id": 11488058246,
* “name” : “little”,
* “url”: ”../1.wp”,
* "size": 520,
* },
* ...
*],
*}
*/
session_start();
require_once 'configs/config.php';
require_once 'public/public.php';
try{
$id = isset($_GET['id'])?$_GET['id']:'';
if(empty($id)){
echo(getFaultResult(-1));
exit;
}
require_once 'tasks/Font/FontDb.class.php';
$font_db = new FontDb();
$json_result = $font_db->searchFontPreview($id);
echo $json_result;
}catch(Exception $e){
Log::write("ring::Exception Error:".$e->getMessage(), "log");
echo(getFaultResult(-1));
exit;
}
?>