-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathdocs.app.php
executable file
·61 lines (56 loc) · 1.75 KB
/
docs.app.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
<?php
/*
* This file is part of the phpems/phpems.
*
* (c) oiuv <[email protected]>
*
* 项目维护:oiuv(QQ:7300637) | 定制服务:火眼(QQ:278768688)
*
* This source file is subject to the MIT license that is bundled.
*/
class action extends app
{
public function display()
{
$action = $this->ev->url(3);
if (!method_exists($this, $action)) {
$action = 'index';
}
$this->$action();
exit;
}
private function history()
{
$docid = $this->ev->get('docid');
$page = $this->ev->get('page');
$doc = $this->doc->getDocById($docid, false);
$args = [];
$args[] = ['AND', 'dhstatus = 1'];
$args[] = ['AND', 'dhdocid = :dhdocid', 'dhdocid', $docid];
$histories = $this->doc->getDocHistoryListByArgs($args, $page);
$this->tpl->assign('doc', $doc);
$this->tpl->assign('histories', $histories);
$this->tpl->display('history');
}
private function viewhistory()
{
$dhid = $this->ev->get('dhid');
$history = $this->doc->getDocHistroyById($dhid);
$doc = $this->doc->getDocById($history['dhdocid']);
$doc['content'] = $history;
$this->tpl->assign('doc', $doc);
$this->tpl->display('history_view');
}
private function index()
{
$docid = $this->ev->get('docid');
$doc = $this->doc->getDocById($docid);
$catbread = $this->category->getCategoryPos($doc['doccatid']);
$cat = $this->category->getCategoryById($doc['doccatid']);
$template = 'doc_default';
$this->tpl->assign('cat', $cat);
$this->tpl->assign('catbread', $catbread);
$this->tpl->assign('doc', $doc);
$this->tpl->display($template);
}
}