优化ctms-api语法、修复已知BUG;

主要修复ctms-api、dacms对PHP新版本的支持问题
This commit is contained in:
2025-07-13 19:37:42 +08:00
parent 65bbd06981
commit 037f274ec5
413 changed files with 107271 additions and 72326 deletions
+88
View File
@@ -0,0 +1,88 @@
<?php
/* @var $this \yii\web\View */
/* @var $content string */
//use yii\helpers\Html;
use yii\bootstrap5\Html;
use yii\bootstrap5\Nav;
use yii\bootstrap5\NavBar;
//use yii\widgets\Breadcrumbs;
use yii\bootstrap5\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div class="wrap">
<?php
NavBar::begin([
'brandLabel' => Yii::t('frontend', 'Site Name'),
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar-inverse navbar-fixed-top',
],
]);
$menuItems = [
['label' => Yii::t('frontend', 'Home'), 'url' => ['/site/index']],
//['label' => Yii::t('frontend','About'), 'url' => ['/site/about']],
['label' => Yii::t('frontend', 'Contact'), 'url' => ['/site/contact']],
];
if (Yii::$app->user->isGuest) {
$menuItems[] = ['label' => Yii::t('frontend', 'Sign Up'), 'url' => ['/site/signup']];
$menuItems[] = ['label' => Yii::t('frontend', 'Login'), 'url' => ['/site/login']];
} else {
$menuItems[] = ['label' => Yii::t('frontend', 'Ali SMS'), 'url' => ['/alimsg/index']];
$menuItems[] = ['label' => Yii::t('frontend', 'Api'), 'url' => ['/api/index', 'appid' => Yii::$app->user->identity->username]];
$menuItems[] = '<li>'
. Html::beginForm(['/site/logout'], 'post')
. Html::submitButton(
Yii::t('frontend', 'Logout') . ' (' . Yii::$app->user->identity->username . ')',
['class' => 'btn btn-link logout']
)
. Html::endForm()
. '</li>';
}
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'items' => $menuItems,
]);
NavBar::end();
?>
<div class="container">
<?= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>
<?= Alert::widget() ?>
<?= $content ?>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-left">&copy; <?= Yii::t('frontend', 'English Company Name') ?>&nbsp;<?= date('Y') ?>
Version: <?= HI_VERSION; ?></p>
<p class="pull-right"><?= Yii::t('frontend', 'Full Company Name') ?></p>
</div>
</footer>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
+29
View File
@@ -0,0 +1,29 @@
<?php
?>
<div class="container" style="padding-top: 5%;">
<div class="alert alert-<?php if (isset($message['class'])) {
echo $message['class'];
} else {
echo "info";
} ?> alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<h3 style="text-align: center;text-align: -webkit-center;"><?php if (isset($message['title'])) {
echo $message['title'];
} else {
echo "系统提示";
} ?></h3>
<div><?php echo $message['content']; ?></div>
</div>
<div style="text-align: center;text-align: -webkit-center;">
<?php foreach ($message['button'] as $btn) { ?>
<a class="<?php echo $btn['class']; ?>" style="margin-right:15px;"
href="<?php echo $btn['link']; ?>"><?php echo $btn['title']; ?></a>
<?php } ?>
<a class="btn btn-default" style="margin-right:15px;" href="javascript:void(0)"
onclick="history.back();">返回</a>
</div>
</div>
<div class="container" style="margin-top:2%;text-align: center;color:#ccc;font-weight:200;">
如果使用过程中发现有任何问题,请及时反馈给技术人员。
</div>