/** * 强制动态模式调用图片 */ function _thumb($img, $width = null, $height = null) { return url('api/thumb', array('img' => str_replace('=', '', base64_encode(fn_authcode(array('finecms' => $img), 'ENCODE'))), 'width' => $width, 'height' => $height)); }
/** * 静态页面数据处理(JS调用) */ public function dataAction() { $file = $this->get('file') ? $this->get('file') : 'html'; $data = base64_decode($this->get('data')); $data = fn_authcode($data, 'DECODE'); ob_start(); if (count($data) == 1 && isset($data['finecms_html_to_data'])) { $this->view->assign('data', $data['finecms_html_to_data']); } else { $this->view->assign($data); } $this->view->display($file); $html = ob_get_contents(); ob_clean(); $html = addslashes(str_replace(array("\r", "\n", "\t", chr(13)), array('', '', '', ''), $html)); echo 'document.write("' . $html . '");'; }