⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smilcontroller.php

📁 a short sketch about linux syntex lines.
💻 PHP
字号:
<?php
/*
6.0秀影企业版视频广告插播功能
*/
class SmilController extends Easy_Controller_Action{
	public function init(){
		$this->_Smil = new SmilModel();
		$this->_View->type = array('picture'=> '图片广告', 'swf'=> 'FLASH广告', 'video'=>'视频广告', 'flv'=>'FLV广告','code'=>'JS或者HTML');
		$this->_View->position = array('片头广告', '中间插播', '片尾广告', '缓冲广告', '自定义时间');
	}
	public function indexAction(){
		$this->_View->rows = $this->_Smil->getAll($where);
		$this->_View->printpage = $this->_Smil->printPage;
	}
	public function addAction(){
		if ($this->_Request->isPost()){
			if ($this->_Smil->add($this->_Request->getPost())===false){
				$this->_View->message = $this->_Smil->error;
			}else{
				$this->_View->message = _('添加成功!');
			}
			exit($this->_View->render('message'));
		}
	}
	public function modifyAction(){
		$id = $this->_Request->getParam('id');
		$this->_View->modify = $this->_Smil->getRow(array('id'=> $id));
		if ($this->_Request->isPost()){
			if ($this->_Smil->modify($this->_Request->getPost())===false){
				$this->_View->message = $this->_Smil->error;
			}else{
				$this->_View->message = _('修改成功!');
			}
			exit($this->_View->render('message'));
		}
	}
	public function lockedAction(){
		$id = $this->_Request->getParam('id');
		$this->_Smil->locked($id);
		$this->_View->message = _('设置成功!');
		exit($this->_View->render('message'));
	}
	public function deleteAction(){
		$id = $this->_Request->getParam('id');
		$this->_Smil->delete($id);
		$this->_View->message = _('删除成功!');
		exit($this->_View->render('message'));
	}
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -