Beispiel #1
0
 /**
  * 主界面
  */
 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));
 }
Beispiel #2
0
      <td ><p><?php 
    echo CHtml::encode($row->real_name);
    ?>
</p>
        <p><?php 
    echo CHtml::encode($row->save_path);
    ?>
</p>
        <p><?php 
    echo CHtml::encode($row->save_name);
    ?>
</p></td>
      <!--<td ></td>-->
      
      <td ><span ><?php 
    echo XUtils::byteFormat($row->file_size);
    ?>
</span></td>
      <td ><?php 
    echo date('Y-m-d H:i', $row->create_time);
    ?>
</td>
      <td ><a href="<?php 
    echo $this->createUrl('batch', array('command' => 'attachDelete', 'id' => $row->id));
    ?>
" class="confirmSubmit"><img src="<?php 
    echo $this->_baseUrl;
    ?>
/static/admin/images/delete.png" align="absmiddle" /></a></td>
    </tr>
    <?php 
Beispiel #3
0
    ?>
</label></td>
      <td><?php 
    echo $row['Engine'];
    ?>
</td>
      <td><?php 
    echo $row['Collation'];
    ?>
</td>
      <td><?php 
    echo $row['Rows'];
    ?>
</td>
      <td><?php 
    echo XUtils::byteFormat($row['Data_length']);
    ?>
</td>
      <td><?php 
    echo $row['Data_free'];
    ?>
</td>
      <td><?php 
    echo $row['Comment'];
    ?>
</td>
    </tr>
    <?php 
}
?>
    <tr class="submit">