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
<?php
 
class banner_controller extends train{
    function index_action(){
        $trainM        =    $this->MODEL('train');
        
        if($_POST['submit'] || $_POST['update']){
            
            $data['uid']        =    $this->uid;
            $data['usertype']    =    $this->usertype;
            $data['file']        =    $_FILES['file'];
            
 
            if($_POST['submit']){
 
                $data['type']        =    'add';
                
            }elseif($_POST['update']){
                
                $data['type']        =    'update';
                
            }
 
            $return    =    $trainM        ->    setBanner($data);
 
            $this    ->    ACT_layer_msg($return['msg'],$return['cod'],$return['url']);
        }
        
        $banner    =    $trainM    ->    getBannerInfo(array('uid'=>$this->uid,'pic'=>array('<>','')),array('pic'=>'1'));
        
        $this    ->    yunset("banner",$banner);
        $this    ->    train_satic();
        $this    ->    train_tpl('banner');
    }
}
?>