OSDN Git Service

ブックマークを実装
[cosmic/source.git] / comic.json.php
1 <?php
2
3 include_once('./config/site.inc.php');
4
5 $request__ix = $my_cgi->check_request('ix',cgi::CV_MD5,'');
6 $request__q = $my_cgi->check_request('q',cgi::CV_TEXT,'');
7
8
9 $path = file_get_contents(PATH_CACHE.'/index/'.$request__ix.'_zip.txt');
10 $hash__cx = file_get_contents(PATH_CACHE.'/index/'.$request__ix.'_cx.txt');
11
12 $fid_cx_list = PATH_CACHE.'/comic/'.$hash__cx.'_list.txt';
13
14 $entry_list = unserialize(file_get_contents($fid_cx_list));
15
16
17 $json = array();
18
19 $json['ix'] = $request__ix;
20 $json['path'] = $path;
21
22 if (strpos($request__q,'list')!==false) {
23
24         $json['list'] = $entry_list;
25
26 }
27
28 if (strpos($request__q,'page')!==false) {
29
30         $json['page']['max'] = count($entry_list);
31
32 }
33
34 echo json_encode($json);
35
36 ?>