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
+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`)',
], '资料块表');
}