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
<?php
 
class addshow_controller extends train{
    function index_action(){
 
        $this    ->    train_tpl('addshow');
    }
    function save_action(){
 
        $UploadM    =    $this    ->    MODEL("upload");
 
        if (!empty($_FILES)){
            
            
            $data=array(
                'uid'    =>    $this->uid,
                'title' =>  $this->stringfilter($_FILES['file']['name']),
                'status'=>    $this ->pxInfo['r_status']==0?1:$this->config['px_show_status'],
                'ctime'    =>    time(),
                'file'    =>    $_FILES['file']
            );
            $trainM    =    $this    ->    MODEL('train');
 
            $id        =    $trainM    ->    addPxshowInfo($data,
                array(
                    'member'    =>    'train',
                    'uid'        =>    $this->uid,
                    'usertype'    =>    $this->usertype
                )
            );
            $arr    =    array(
                'jsonrpc'    =>    '2.0',
                'id'        =>    $id
            );
            echo json_encode($arr);die;
        }
    }
}
?>