<?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');
|
}
|
}
|
?>
|