Initial project files: BESCMS full source

This commit is contained in:
bes
2026-08-13 23:37:46 +08:00
parent fa6cddb540
commit 2e26f85723
2166 changed files with 396625 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
<?php
return [
'type' => 'app',
'name' => '自定义资料',
'author' => '迅睿云软件',
'icon' => 'fa fa-th-large',
'uri' => 'block/home/index',
];
+16
View File
@@ -0,0 +1,16 @@
<?php
/**
* 缓存参数配置
*
* 模型名称 => 项目目录
*
* 站点表:安装时由 Install.php 创建;
* 新站点或缺表时由 Models/Block::cache($siteid) 自动补建。
**/
return [
'block' => 'block',
];
+24
View File
@@ -0,0 +1,24 @@
<?php
/**
* Block 站点表安装(原 Install_site.sql
* App::install 会先跑 Install.php;此处按站点创建 {siteid}_block
*/
$m = \Phpcmf\Service::M();
$t = \Phpcmf\Service::M('table');
$sites = !empty($m->site) ? $m->site : [SITE_ID => SITE_ID];
foreach ($sites as $siteid) {
$table = $m->dbprefix($siteid.'_block');
if ($m->is_table_exists($table)) {
continue;
}
$t->create_table($table, [
'id' => 'smallint(5) unsigned NOT NULL AUTO_INCREMENT',
'name' => 'varchar(100) NOT NULL COMMENT \'名称\'',
'code' => 'varchar(100) NOT NULL COMMENT \'别名\'',
'hide' => 'tinyint(1) unsigned NOT NULL COMMENT \'隐藏\'',
'content' => 'text NOT NULL COMMENT \'内容\'',
], [
'PRIMARY KEY (`id`)',
'KEY `code` (`code`)',
], '资料块表');
}
View File
+31
View File
@@ -0,0 +1,31 @@
<?php
/**
* 菜单配置
*/
return [
'admin' => [
'app' => [
'left' => [
'app-plugin' => [
'link' => [
[
'name' => '自定义资料',
'icon' => 'fa fa-th-large',
'uri' => 'block/home/index',
],
]
],
],
],
],
];
+4
View File
@@ -0,0 +1,4 @@
<?php
// 加载主程序的路由
require COREPATH.'Config/Routes.php';
+10
View File
@@ -0,0 +1,10 @@
<?php
/**
* Block 站点表卸载(原 Uninstall_site.sql
*/
$m = \Phpcmf\Service::M();
$t = \Phpcmf\Service::M('table');
$sites = !empty($m->site) ? $m->site : [SITE_ID => SITE_ID];
foreach ($sites as $siteid) {
$t->drop_table($m->dbprefix($siteid.'_block'), true);
}
+16
View File
@@ -0,0 +1,16 @@
<?php
/**
* 更新数据结构
**/
$m = \Phpcmf\Service::M();
$t = \Phpcmf\Service::M('table');
$prefix = $m->prefix;
foreach ($this->site as $siteid) {
$table = $prefix.$siteid.'_block';
if ($m->is_table_exists($table) && !$m->is_field_exists($table, 'code')) {
$t->add_field($table, 'code', 'VARCHAR(100)', 'NOT NULL', '');
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
return [
'id' => '360',
'vip' => '',
'cms' => '4.7.3',
'version' => '3.8',
'license' => '375C71349B295FBE2DCDCA9206F20A1703',
'updatetime' => '2026-06-01 18:26:49',
'downtime' => '2026-08-08 00:54:28',
];