/** * 主界面 */ public function actionHome() { $data['soft'] = 'bagecms'; $data['softVersion'] = $this->_bagecms; $data['softRelease'] = $this->_bagecmsRelease; $data['serverSoft'] = $_SERVER['SERVER_SOFTWARE']; $data['serverOs'] = PHP_OS; $data['phpVersion'] = PHP_VERSION; $data['fileupload'] = ini_get('file_uploads') ? ini_get('upload_max_filesize') : '禁止上传'; $data['serverUri'] = $_SERVER['SERVER_NAME']; $data['maxExcuteTime'] = ini_get('max_execution_time') . ' 秒'; $data['maxExcuteMemory'] = ini_get('memory_limit'); $data['magic_quote_gpc'] = MAGIC_QUOTE_GPC ? '开启' : '关闭'; $data['allow_url_fopen'] = ini_get('allow_url_fopen') ? '开启' : '关闭'; $data['excuteUseMemory'] = function_exists('memory_get_usage') ? XUtils::byteFormat(memory_get_usage()) : '未知'; $dbsize = 0; $connection = Yii::app()->db; $sql = 'SHOW TABLE STATUS LIKE \'' . $connection->tablePrefix . '%\''; $command = $connection->createCommand($sql)->queryAll(); foreach ($command as $table) { $dbsize += $table['Data_length'] + $table['Index_length']; } $mysqlVersion = $connection->createCommand("SELECT version() AS version")->queryAll(); $data['mysqlVersion'] = $mysqlVersion[0]['version']; $data['dbsize'] = $dbsize ? XUtils::byteFormat($dbsize) : '未知'; $notebook = Admin::model()->findByPk($this->_admini['userId']); $env = XUtils::b64encode(serialize($data)); $this->render('home', array('notebook' => $notebook, 'env' => $env, 'server' => $data)); }
<?php foreach ((array) $row['subFileList'] as $subrow) { ?> <tr class="tb_list"> <td style="padding:0 0 0 20px"><?php echo $subrow; ?> </td> <td ><a href="<?php echo $this->createUrl('updateTpl', array('filename' => XUtils::b64encode($row['fileName'] . '/' . $subrow))); ?> "><img src="<?php echo $this->_baseUrl; ?> /static/admin/images/update.png" align="absmiddle" /></a> <a href="<?php echo $this->createUrl('batch', array('command' => 'deleteFile', 'fileName' => XUtils::b64encode($row['fileName'] . '/' . $subrow))); ?> " class="confirmSubmit"><img src="<?php echo $this->_baseUrl; ?> /static/admin/images/delete.png" align="absmiddle" /></a></td> </tr> <?php } ?> <?php } ?> </form> </table> <?php
private function _form($links) { if (!empty($links['mix']) && !XUtils::isUtf8($links['mix'])) { $links['mix'] = XUtils::autoCharset($links['mix']); } if (!empty($links['title']) && !XUtils::isUtf8($links['title'])) { $links['title'] = XUtils::autoCharset($links['title']); } $links['mix'] = empty($links['mix']) ? null : XUtils::b64encode($links['mix']); //先判断是外链图片还是本地图片 $imgtype = reqPost('imgtype', null); // ppr($_POST,1); if (!empty($imgtype)) { if ($imgtype == 'local') { $links['image_link'] = $this->_doLocalImage('image_link'); } if (empty($links['image_link'])) { $links['image_link'] = null; } } $links['begin_time'] = empty($links['begin_time']) ? 0 : strtotime($links['begin_time']); $links['end_time'] = empty($links['end_time']) ? 0 : strtotime($links['end_time']); // ppr($links_arr,1); $links['create_time'] = $this->_thetime; $links['user_id'] = $this->_backendUserId; return $links; }
?> /assets/images/folder.gif" align="absmiddle" /> <?php echo $row['fileName']; ?> </td> </tr> <?php foreach ((array) $row['subFileList'] as $subrow) { ?> <tr class="tb_list"> <td style="padding:0 0 0 34px"><?php echo $subrow; ?> </td> <td><a href="<?php echo $this->createUrl('updateTpl', array('filename' => XUtils::b64encode($row['fileName'] . '/' . $subrow))); ?> "><img src="<?php echo Yii::app()->baseUrl; ?> /assets/images/update.png" align="absmiddle" style="" /> 编辑</a> <a href="/static/admin/images/delete.png" align="absmiddle" /></a></td> </tr> <?php } ?> <?php } ?> <?php } ?>