?? indexcontroller.php
字號:
<?php
/*
秀影EasyFramework框架
qq:24498936
msn:jdzcn_net@hotmail.com
website:http://www.vodcms.com
*/
class IndexController extends Easy_Controller_Action {
public function Init(){
$this->_View->skin = $this->config['template'];
$this->_View->Template = new Template();
$this->_View->moviearea = $this->mconf['area'];
$this->_View->config = $this->config;
$this->_View->location = _('首頁');
$this->_View->current = _('首頁');
}
public function IndexAction(){ //站點首頁
$this->_View->title = '';
$hash = 'index';
if ($this->config['cache']){
if (Easy_Cache::isCache($hash)){
Easy_Cache::getCache($hash);
}else{
$contents = $this->_View->render($this->_View->skin.'/index');
Easy_Cache::set($hash, $contents);
}
//fwrite(fopen('sql.log', 'w'), $DB->querys);
exit($contents);
}else{
$DB = $GLOBALS['DB'];
$this->_View->querys = &$DB->querys;
exit($this->_View->render($this->_View->skin.'/index'));
}
}
public function FlashAction(){
header('Content-type: application/x-javascript');
$hash = md5($_SERVER['REQUEST_URI']).'flash';
if (Easy_Cache::isCache($hash)){
Easy_Cache::getCache($hash);
}else{
$flash = new FlashModel();
$size = strtolower($this->_Request->getParam('size'));
$size = explode('x', $size);
foreach ($flash->getAll() as $row){
$pic[] = $this->config['basedir'].$row['picture'];
$text[] = $row['title'];
$link[] = $row['link'];
}
$contents = '
var swf_width, swf_height,stop_time,bgcolor;
bgcolor = "#FFFFFF";
stop_time = 3500;
swf_width = '.intval($size[0]).';
swf_height = '.(int)$size[1].';
var files = "'.implode('|', $pic).'";
var texts = "'.implode('|', $text).'";
var links = "'.implode('|', $link).'";
var swf = new FlashObject("'.$this->config['basedir'].'images/flash.swf", "bigflash1", swf_width, swf_height, 7, "#FFFFFF");
swf.addParam("menu", "false");
swf.addParam("FlashVars", "bcastr_file="+encodeURIComponent(files)+"&bcastr_link="+encodeURIComponent(links)+"&bcastr_title="+encodeURIComponent(texts)+"&bcastr_config=0xEDEDED|2|0x0066ff|0|0xffffff|0x0066ff|0x000033|4|2|1|_blank");
swf.write("flashbanner")';
Easy_Cache::set($hash, $contents);
echo trim($contents);
unset($contents);
}
exit;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -