lyg
2025-03-04 72bbec1590f85974d369ce7aeaa05be8905672a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="utf-8">
    <title>勾股OA安装</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="{__GOUGU__}/layui/css/layui.css" media="all">
    <style>
        body {
            width: 100%;
            height: 100%;
            background: url("{__IMG__}/bg.jpg");
            background-size: cover;
            background: url("{__IMG__}/bg_pattern.png"), #7b4397;
            background: url("{__IMG__}/bg_pattern.png"), -webkit-linear-gradient(to left, #34a853, #4285f4);
            background: url("{__IMG__}/bg_pattern.png"), linear-gradient(to left, #34a853, #4285f4);
        }
    </style>
</head>
 
<body>
    <div style="width:200px;margin: 20px auto;"><img src="{__IMG__}/syslogo.png" alt="勾股OA安装" width="300"></div>
    <div style="width:888px;margin:0 auto 30px;">
        <div class="layui-layout layui-layout-admin">
            <div class="layui-header layui-bg-red" style="border-radius:6px 6px 0 0;position:relative;">
                <div class="layui-logo" style="color: #fff; width:100px;">安装引导</div>
                <ul class="layui-nav layui-layout-right">
                    <li class="layui-nav-item">v{:CMS_VERSION}</li>
                </ul>
            </div>
            <div style="padding:20px; background-color:#fff;line-height: 27px; border-radius:0 0 6px 6px">
                <h3>安装环境检测</h3>
                <table class="layui-table" lay-skin="nob" lay-size="sm">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col width="200">
                        <col width="100">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>环境</th>
                            <th>最低配置</th>
                            <th>当前配置</th>
                            <th>是否符合</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>操作系统</td>
                            <td>不限</td>
                            <td>
                                <?php echo php_uname('s'); ?>
                            </td>
                            <td class="yes"><i class="layui-icon layui-icon-ok"></i></td>
                        </tr>
                        <tr>
                            <td>php版本</td>
                            <td>≥ 8.0</td>
                            <td>
                                <?php echo PHP_VERSION ?>
                            </td>
                            <?php $php_version=explode('.', PHP_VERSION); ?>
                            <td class="<?php if(($php_version['0']>=8))echo 'yes'; ?>">
                                <?php if (($php_version['0']>=8)): ?>
                                <i class="layui-icon layui-icon-ok"></i>
                                <?php else: ?>
                                <i class="layui-icon layui-icon-close"></i>
                                <?php endif ?>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <h3>模块检测</h3>
                <table class="layui-table" lay-skin="nob" lay-size="sm">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col width="200">
                        <col width="100">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>环境</th>
                            <th>最低配置</th>
                            <th>当前配置</th>
                            <th>是否符合</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>session</td>
                            <td>支持</td>
                            <td>{eq name="$data.session" value="1"}支持{else /}不支持{/eq}</td>
                            <td><i class="layui-icon {eq name=" $data.session" value="1" }layui-icon-ok yes{else
                                    /}layui-icon-close{/eq}">
                                </i> </td>
                        </tr>
                        <tr>
                            <td>PDO</td>
                            <td>开启</td>
                            <td>{eq name="$data.pdo" value="1"}已开启{else /}未开启{/eq}</td>
                            <td><i class="layui-icon {eq name=" $data.pdo" value="1" }layui-icon-ok yes{else
                                    /}layui-icon-close{/eq}"> </i>
                            </td>
                        </tr>
                        <tr>
                            <td>PDO_Mysql</td>
                            <td>开启</td>
                            <td>{eq name="$data.pdo_mysql" value="1"}已开启{else /}未开启{/eq}</td>
                            <td><i class="layui-icon {eq name=" $data.pdo_mysql" value="1" }layui-icon-ok yes{else
                                    /}layui-icon-close{/eq}"> </i> </td>
                        </tr>
                        <tr>
                            <td>上传限制</td>
                            <td>≥ 2M</td>
                            <td>{eq name="$data.upload_size" value="0"}不支持{else /}{$data.upload_size}{/eq}</td>
                            <td><i class="layui-icon {eq name=" $data.upload_size" value="0" }layui-icon-close{else
                                    /}layui-icon-ok yes{/eq}">
                                </i> </td>
                        </tr>
                    </tbody>
                </table>
                <h3>目录权限</h3>
                <table class="layui-table" lay-skin="nob" lay-size="sm">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col width="200">
                        <col width="100">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>环境</th>
                            <th>最低配置</th>
                            <th>当前配置</th>
                            <th>是否符合</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>config</td>
                            <td>可写</td>
                            <td>
                                <?php if (is_writable(CMS_ROOT . 'config')): ?>
                                可写
                                <?php else: ?>
                                不可写
                                <?php endif ?>
                            </td>
                            <td class="<?php if(is_writable(CMS_ROOT . 'config'))echo 'yes'; ?>">
                                <?php if (is_writable(CMS_ROOT . 'config')): ?>
                                <i class="layui-icon layui-icon-ok"></i>
                                <?php else: ?>
                                <i class="layui-icon layui-icon-close"></i>
                                <?php endif ?>
                            </td>
                        </tr>
                        <tr>
                            <td>/storage</td>
                            <td>可写</td>
                            <td>
                                <?php if (is_writable('./storage')): ?>
                                可写
                                <?php else: ?>
                                不可写
                                <?php endif ?>
                            </td>
                            <td class="<?php if(is_writable('./storage'))echo 'yes'; ?>">
                                <?php if (is_writable('./storage')): ?>
                                <i class="layui-icon layui-icon-ok"></i>
                                <?php else: ?>
                                <i class="layui-icon layui-icon-close"></i>
                                <?php endif ?>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div style="margin:10px auto;width: 190px;">
                    <a href="/index.php?s=install/index/index" class="layui-btn layui-bg-cyan">上一步</a>
                    <a href="javascript:;" class="layui-btn layui-bg-blue" id="step2">下一步</a>
                </div>
            </div>
        </div>
    </div>
 
    <script src="{__GOUGU__}/layui/layui.js" charset="utf-8"></script>
    <script>
        layui.use(['jquery', 'layer'], function () {
            var $ = layui.jquery,
                layer = layui.layer;
            $('#step2').click(function () {
                if ($('.yes').length != 8) {
                    layer.tips('您的配置或权限不符合要求', this);
                } else {
                    location.href = "/index.php?s=install/index/step3";
                }
            })
 
        });
    </script>
</body>
 
</html>