-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathic2_getcount.php
More file actions
56 lines (43 loc) · 898 Bytes
/
ic2_getcount.php
File metadata and controls
56 lines (43 loc) · 898 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
49
50
51
52
53
54
55
56
<?php
/**
* ImageCache2 - メモから件数を取得する
*/
// {{{ p2基本設定読み込み&認証
require_once './conf/conf.inc.php';
$_login->authorize();
if (!$_conf['expack.ic2.enabled']) {
p2die('ImageCache2は無効です。', 'conf/conf_admin_ex.inc.php の設定を変えてください。');
}
// }}}
// {{{ HTTPヘッダ
P2Util::header_nocache();
header('Content-Type: text/plain; charset=UTF-8');
// }}}
// {{{ 初期化
// パラメータを検証
if (!isset($_GET['searchkey'])) {
echo 'null';
exit;
}
// ライブラリ読み込み
require_once P2EX_LIB_DIR . '/ic2_getcount.inc.php';
// }}}
// {{{ execute
try {
echo getIC2ImageCount((string)$_GET['searchkey']);
}
catch (Exception $e) {
echo '?';
}
exit;
// }}}
/*
* Local Variables:
* mode: php
* coding: cp932
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/
// vim: set syn=php fenc=cp932 ai et ts=4 sw=4 sts=4 fdm=marker: