Initial commit,修正

This commit is contained in:
2025-07-13 19:37:38 +08:00
parent 38ce288e27
commit 65bbd06981
12384 changed files with 3985464 additions and 8 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
use yii\helpers\Url;
$this->title = isset($title) ? $title : '提示';
$content = isset($content) ? $content : '';
$class = isset($class) ? $class : 'info';
$class = in_array($class,['danger','warning','success','info']) ? $class : 'info';
$buttons = isset($buttons) ? $buttons : [['title'=>'好的,我知道了','class'=>'primary','url'=>false]];
?>
<div class="site-index" style="text-align: center;width:80%;margin-left:10%;">
<div style="margin-top: 100px;">
<h1><?=Html::encode($this->title) ?></h1><br>
</div>
<div class="alert alert-<?php echo $class;?> fade in" role="alert">
<?php echo $content; ?>
</div>
<?php foreach($buttons as $btn){?>
<a <?php if($btn['url']){?> href="<?php echo $btn['url'];?>" <?php }?> class="btn btn-<?php if($btn['class']){echo $btn['class'];}else{echo 'primary';}?>"><?php if($btn['title']){echo $btn['title'];}else{echo '点击按钮';}?></a>
<?php }?>
</div>