chengkun
2025-05-23 a6f7b382623096b6a00924f418447cf5204e825e
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
<?php
 
class sysnews_controller extends train{
    function index_action(){
 
        $SysmsgM    =    $this->MODEL('sysmsg');
        
        $where['fa_uid']    =    $this->uid;
        $where['usertype']    =    $this->usertype;
 
        $urlarr['c']    =    "sysnews";
        $urlarr['page']    =    "{{page}}";
 
        $pageurl    =    Url('member',$urlarr);
        $pageM        =    $this  -> MODEL('page');
        $pages        =    $pageM -> pageList('sysmsg',$where,$pageurl,$_GET['page']);
        
        $where['limit']        =    $pages['limit'];
        $where['orderby']    =    array('id,desc');
 
        $rows    =    $SysmsgM->getList($where);
        $this->yunset("rows",$rows);
 
        $this->train_satic();
 
        $this->train_tpl('sysnews');
    }
    function del_action(){
        $SysmsgM    =    $this->MODEL('sysmsg');
        
        if($_GET['del']||$_GET['id']){
        
            if($_GET['del']){
 
                $del        =    $_GET['del'];
                $layer_type    =    1;
            }else{
                $del        =    intval($_GET['id']);
                $layer_type    =    0;
            }
 
            $delRes    =    $SysmsgM->delInfo($del,array('fa_uid'=>$this->uid));
        
            $this->layer_msg( $delRes['msg'], $delRes['errcode'],$layer_type,"index.php?c=sysnews");
        }
    }
    function set_action(){
 
        $SysmsgM    =    $this->MODEL('sysmsg');
        $id            =    intval($_POST['id']);
        
        $where['id']            =    $id;
        $where['fa_uid']        =    $this->uid;
        $where['remind_status']    =    0;
        if($id){
            $SysmsgM->upSysmsg($where,array('remind_status'=>'1'));
        }
    }
}
?>