123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- namespace Content\Lib;
- use Dever;
- class Article
- {
-
- public function get($data)
- {
- if (!is_array($data)) {
- $data = Dever::db('content/article')->getOne($data);
- }
-
- if (!$data) {
- Dever::alert('错误的文章信息');
- }
-
-
- $data['content_array'] = array();
-
-
- return $data;
- }
-
- public function getRelation($info)
- {
- $where['noid'] = $info['id'];
- $where['cate_id'] = $info['cate_id'];
- return Dever::db('content/article')->getRelation($where);
- }
-
- public function addView($id)
- {
- Dever::db('content/article')->addView($id);
- }
- }
|