Skip to content

Commit 43ccdb9

Browse files
committed
0.0.1
第一次提交
0 parents  commit 43ccdb9

File tree

716 files changed

+165403
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

716 files changed

+165403
-0
lines changed

.htaccess

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<IfModule mod_rewrite.c>
2+
Options +FollowSymlinks
3+
RewriteEngine On
4+
5+
RewriteCond %{REQUEST_FILENAME} !-d
6+
RewriteCond %{REQUEST_FILENAME} !-f
7+
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8+
</IfModule>

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyleSettings.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/edu.iml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+1,307
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Application/Admin/Common/function.php

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: lenovo
5+
* Date: 2018/4/5
6+
* Time: 22:23
7+
*/
8+
9+
10+
function getUserById($userId)
11+
{
12+
if (!$userId) {return false;}
13+
14+
$userModel = M('user');
15+
16+
$user = $userModel->where("`id`={$userId}")->find();
17+
18+
if (is_null($user['avatar']) || $user['avatar'] == '') {
19+
$user['avatar'] = C('DEFAULT_AVATAR');
20+
}
21+
22+
23+
return $user;
24+
}
25+
26+
27+
function getPathByTree($root, $url){
28+
29+
if ($root == null) { return null; }
30+
31+
$len = count($root);
32+
33+
for ($i = 0; $i < $len; $i++) {
34+
35+
if ('' == $root[$i]['url'] || '#' == $root[$i]['url'] || strtolower(U($root[$i]['url'], '', false)) != strtolower($url)) {
36+
$path = getPathByTree($root[$i]['children'], $url);
37+
38+
if ($path) { return $path; }
39+
40+
} else {
41+
return $root[$i]['path'];
42+
}
43+
44+
}
45+
return null;
46+
}

Application/Admin/Common/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Application/Admin/Conf/config.php

+202
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
<?php
2+
return array(
3+
/* 数据库设置 */
4+
'DB_TYPE' => 'mysql', // 数据库类型
5+
'DB_HOST' => 'localhost', // 服务器地址
6+
'DB_NAME' => 'edu', // 数据库名
7+
'DB_USER' => 'root', // 用户名
8+
'DB_PWD' => 'root', // 密码
9+
'DB_PORT' => '3306', // 端口
10+
'DB_PREFIX' => '', // 数据库表前缀
11+
'DB_PARAMS' => array(), // 数据库连接参数
12+
'DB_DEBUG' => TRUE, // 数据库调试模式 开启后可以记录SQL日志
13+
'DB_FIELDS_CACHE' => true, // 启用字段缓存
14+
'DB_CHARSET' => 'utf8', // 数据库编码默认采用utf8
15+
'DB_DEPLOY_TYPE' => 0, // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
16+
'DB_RW_SEPARATE' => false, // 数据库读写是否分离 主从式有效
17+
'DB_MASTER_NUM' => 1, // 读写分离后 主服务器数量
18+
'DB_SLAVE_NO' => '', // 指定从服务器序号
19+
20+
/* 数据库备份路径配置 */
21+
'DATA_BACKUP_PATH' => './Data',
22+
'DATA_BACKUP_PART_SIZE' => 20971520,
23+
'DATA_BACKUP_COMPRESS' => 1,
24+
'DATA_BACKUP_COMPRESS_LEVEL' => 9,
25+
26+
'SHOW_PAGE_TRACE' => true, // 显示错误信息
27+
'MENU' => array(
28+
array(
29+
'id' => '1',
30+
'title' => '系统配置',
31+
'url' => '#',
32+
'icon' => 'gear',
33+
'path' => '1',
34+
'children' => array(
35+
array(
36+
'id' => '2',
37+
'title' => '网站设置',
38+
'url' => 'Admin/Setting/website',
39+
'icon' => 'circle-o',
40+
'path' => '1,2',
41+
'children' => null
42+
),
43+
array(
44+
'id' => '3',
45+
'title' => '用户设置',
46+
'url' => 'Admin/Setting/user',
47+
'icon' => 'circle-o',
48+
'path' => '1,3',
49+
'children' => null
50+
),
51+
array(
52+
'id' => '4',
53+
'title' => '课程设置',
54+
'url' => 'Admin/Setting/course',
55+
'icon' => 'circle-o',
56+
'path' => '1,4',
57+
'children' => null
58+
),
59+
array(
60+
'id' => '5',
61+
'title' => '系统日志',
62+
'url' => 'Admin/Setting/log',
63+
'icon' => 'circle-o',
64+
'path' => '1,5',
65+
'children' => null
66+
)
67+
)
68+
),
69+
array(
70+
'id' => '6',
71+
'title' => '用户管理',
72+
'icon' => 'user',
73+
'url' => '#',
74+
'path' => '6',
75+
'children' => array(
76+
array(
77+
'id' => '7',
78+
'title' => '用户管理',
79+
'url' => 'Admin/User/index',
80+
'icon' => 'circle-o',
81+
'path' => '6,7',
82+
'children' => null
83+
),
84+
// array(
85+
// 'id' => '8',
86+
// 'title' => '教师管理',
87+
// 'url' => '',
88+
// 'icon' => 'circle-o',
89+
// 'path' => '6,8',
90+
// 'children' => null
91+
// ),
92+
array(
93+
'id' => '9',
94+
'title' => '私信管理',
95+
'url' => '',
96+
'icon' => 'circle-o',
97+
'path' => '6,9',
98+
'children' => null
99+
)
100+
)
101+
),
102+
array(
103+
'id' => '10',
104+
'title' => '课程管理',
105+
'icon' => 'graduation-cap',
106+
'url' => '#',
107+
'path' => '10',
108+
'children' => array(
109+
array(
110+
'id' => '11',
111+
'title' => '查看课程',
112+
'url' => '',
113+
'icon' => 'circle-o',
114+
'path' => '10,11',
115+
'children' => null
116+
),
117+
array(
118+
'id' => '12',
119+
'title' => '课程公告',
120+
'url' => '',
121+
'icon' => 'circle-o',
122+
'path' => '10,12',
123+
'children' => null
124+
),
125+
array(
126+
'id' => '13',
127+
'title' => '课程问答',
128+
'url' => '',
129+
'icon' => 'circle-o',
130+
'path' => '10,13',
131+
'children' => null
132+
),
133+
array(
134+
'id' => '14',
135+
'title' => '课程资料',
136+
'url' => '',
137+
'icon' => 'circle-o',
138+
'path' => '10,14',
139+
'children' => null
140+
)
141+
)
142+
),
143+
array(
144+
'id' => '19',
145+
'title' => '文件管理',
146+
'icon' => 'file',
147+
'url' => '#',
148+
'path' => '19',
149+
'children' => array(
150+
array(
151+
'id' => '20',
152+
'title' => '查看文件',
153+
'url' => 'Admin/File/index',
154+
'icon' => 'circle-o',
155+
'path' => '19,20',
156+
'children' => null
157+
),
158+
array(
159+
'id' => '21',
160+
'title' => '查看文件组',
161+
'url' => 'Admin/FileGroup/index',
162+
'icon' => 'circle-o',
163+
'path' => '19,21',
164+
'children' => null
165+
)
166+
)
167+
),
168+
array(
169+
'id' => '15',
170+
'title' => '数据管理',
171+
'icon' => 'database',
172+
'url' => '#',
173+
'path' => '15',
174+
'children' => array(
175+
array(
176+
'id' => '16',
177+
'title' => '数据维护',
178+
'url' => 'Admin/DataBase/repair',
179+
'icon' => 'circle-o',
180+
'path' => '15,16',
181+
'children' => null
182+
),
183+
array(
184+
'id' => '17',
185+
'title' => '数据备份',
186+
'url' => 'Admin/DataBase/export',
187+
'icon' => 'circle-o',
188+
'path' => '15,17',
189+
'children' => null
190+
),
191+
array(
192+
'id' => '18',
193+
'title' => '数据恢复',
194+
'url' => 'Admin/DataBase/import',
195+
'icon' => 'circle-o',
196+
'path' => '15,18',
197+
'children' => null
198+
)
199+
)
200+
)
201+
)
202+
);

Application/Admin/Conf/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)