'noindex', 'desc' => '...'] */ function fb_layout_head($title, array $opt = []) { $site = (string)fb_cfg('site_name'); $robots = isset($opt['robots']) ? (string)$opt['robots'] : 'index,follow'; $full = $title === '' ? $site : ($title . ' · ' . $site); /* ---- 按软件换主题色 ---- * 通过 $opt['software'] 传入软件行;全站主题只靠 --brand / --brand-600 / * --brand-soft 三个变量,覆写它们即可,不用为每个软件写一套 CSS。 * 没传软件(如后台、安装页)就用主题默认色,保持中性。 */ $swColors = null; if (!empty($opt['software'])) { list($cMain, $cDark, $cSoft) = fb_software_colors($opt['software']); if ($cMain !== '') { $swColors = [$cMain, $cDark, $cSoft]; } } $themeColor = $swColors ? $swColors[0] : '#0057B8'; ?> <?php echo e($full); ?>
去前台看看 去前台看看 问题列表 管理后台 我要反馈 1): ?>
' . e($msg) . ''; } /** * 渲染附件上传控件(图片 / 视频;上传经服务器中转落地,local/OSS 前端同一路径) * 需置于
内部:会输出一个 name="attachments" 的隐藏字段, * 由 assets/app.js 在文件上传成功后回填 JSON 描述。 * * @param array $existing 校验失败时已上传的附件描述(避免用户重复上传) */ function fb_uploaders(array $existing = []) { $kinds = []; if (fb_upload_kind_on('image')) { $kinds[] = 'image'; } if (fb_upload_kind_on('video')) { $kinds[] = 'video'; } if (!$kinds) { return; } $init = []; foreach ($existing as $it) { $kind = isset($it['kind']) ? (string)$it['kind'] : 'image'; $key = isset($it['key']) ? (string)$it['key'] : ''; if ($key === '') { continue; } $init[] = [ 'kind' => $kind, 'key' => $key, 'size' => isset($it['size']) ? (int)$it['size'] : 0, 'name' => isset($it['name']) ? (string)$it['name'] : '', 'mime' => isset($it['mime']) ? (string)$it['mime'] : '', 'w' => isset($it['width']) ? (int)$it['width'] : 0, 'h' => isset($it['height']) ? (int)$it['height'] : 0, 'url' => fb_attach_url($key), 'thumb' => $kind === 'image' ? fb_attach_thumb_url($key, 360) : '', ]; } ?>
0 ? ('最多 ' . $maxN . ($isImg ? ' 张' : ' 个')) : '数量不限'; $sizeTxt = $maxB > 0 ? ('单' . ($isImg ? '张' : '个') . '不超过 ' . fb_size_h($maxB)) : '大小不限'; $desc = $cntTxt . ',' . $sizeTxt . ($isImg ? ';大图会自动压缩后上传' : ''); ?>
tabindex="-1">