123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\index\controller;
- use app\common\controller\Frontend;
- use think\Config;
- use think\Route;
- use think\Url;
- class Index extends Frontend
- {
- protected $noNeedLogin = '*';
- protected $noNeedRight = '*';
- protected $layout = '';
- public function index()
- {
-
-
- return $this->view->fetch();
- }
-
- public function agreement($name = '')
- {
- if (empty($name)) {
- echo "";
- exit();
- }
- $data = db('text')->field('desc,text')->where('title', $name)->where('public', 1)->find();
- if (empty($data)) {
- echo "";
- exit();
- }
- $html = <<<EOF
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>{$data['desc']}</title></head><body>{$data['text']}</body></html>
- EOF;
- echo $html;
- }
- }
|