本文整理汇总了PHP中Alert::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Alert::get方法的具体用法?PHP Alert::get怎么用?PHP Alert::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alert
的用法示例。
在下文中一共展示了Alert::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
Theme::plugins('loginHead');
?>
</head>
<body class="uk-height-1-1">
<!-- Plugins -->
<?php
Theme::plugins('loginBodyBegin');
?>
<div class="uk-vertical-align uk-text-center uk-height-1-1">
<div class="uk-vertical-align-middle login-box">
<h1>BLUDIT</h1>
<?php
if (Alert::defined()) {
echo '<div class="uk-alert uk-alert-danger">' . Alert::get() . '</div>';
}
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'] . '.php')) {
include PATH_ADMIN_VIEWS . $layout['view'] . '.php';
}
?>
</div>
</div>
<!-- Plugins -->
<?php
Theme::plugins('loginBodyEnd');
?>
</body>
</html>
示例2:
$Language->p('Website');
?>
</a></li>
</ul>
</nav>
</div>
<div class="units-row">
<!-- CONTENT -->
<div class="unit-centered unit-40" style="max-width: 400px">
<div id="content">
<?php
if (Alert::defined()) {
echo '<div class="tools-alert tools-alert-green">' . Alert::get() . '</div>';
}
// Load view
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'] . '.php')) {
include PATH_ADMIN_VIEWS . $layout['view'] . '.php';
}
?>
</div>
</div>
</div>
<!-- Plugins Login Body Begin -->
<?php
Theme::plugins('loginBodyEnd');
示例3: delete
/**
* Delete alerts.
*
* <code>
* // Delete all alerts
* Alert::delete();
*
* // Delete error alerts
* Alert::delete(Alert::ERROR);
*
* // Delete error and alert alerts
* Alert::delete(array(Alert::ERROR, Alert::ALERT));
* </code>
*
* @param mixed $type alert type (e.g. Alert::SUCCESS, array(Alert::ERROR, Alert::ALERT))
*/
public static function delete($type = null)
{
if ($type === null) {
Session::instance()->delete(Alert::$_session_key);
} else {
// Deletion by type happens in get()
Alert::get($type, null, true);
}
}
示例4:
?>
<!-- ALERT -->
<script>
$(document).ready(function() {
<?php
if (Alert::defined()) {
echo '$("#alert").message();';
}
?>
});
</script>
<div id="alert" class="tools-message tools-message-blue">
<?php
echo Alert::get();
?>
</div>
<!-- HEAD -->
<div id="head">
<nav class="navbar nav-fullwidth">
<h1>Bludit</h1>
<ul>
<li><?php
$Language->p('Welcome back');
?>
, <?php
echo '<a href="' . HTML_PATH_ADMIN_ROOT . 'edit-user/' . $Login->username() . '">' . $Login->username() . '</a>';
?>
</li>