summaryrefslogtreecommitdiffstats
path: root/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'app/view')
-rw-r--r--app/view/stdpage.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/app/view/stdpage.php b/app/view/stdpage.php
index 7797ef5..2dd29a4 100644
--- a/app/view/stdpage.php
+++ b/app/view/stdpage.php
@@ -73,12 +73,65 @@ require_once "class/user.class.php";
<?php } ?>
<?php function top() : void { ?>
+ <?php require "model/noticemodal.php"; ?>
+
+ <?php if (isError(ERROR) || isError(WARNING) || isError(NOTICE)) { ?>
+ <div id="noticeModal" class="modal fade" tabindex="-1" role="dialog">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-body alert <?=$noticeModalAlertClass?>" style="margin: 0;">
+ <h1 class="text-center"><span class="glyphicon <?=$noticeModalGlyphicon?>"></span></h1>
+ <h5 class="text-center">Something Happened</h5>
+
+ <?php if (isError(ERROR)) { ?>
+ <p>
+ <?php foreach (getErrors(ERROR) as $err) { ?>
+ <span class="label label-danger">Error</span> <?=$err?><br />
+ <?php } ?>
+ </p>
+ <?php } ?>
+
+ <?php if (isError(WARNING)) { ?>
+ <p>
+ <?php foreach (getErrors(WARNING) as $err) { ?>
+ <span class="label label-warning">Warning</span> <?=$err?><br />
+ <?php } ?>
+ </p>
+ <?php } ?>
+
+ <?php if (isError(NOTICE)) { ?>
+ <p>
+ <?php foreach (getErrors(NOTICE) as $err) { ?>
+ <span class="label label-info">Notice</span> <?=$err?><br />
+ <?php } ?>
+ </p>
+ <?php } ?>
+
+ <div class="text-center">
+ <button type="button" class="btn btn-default" data-dismiss="modal">
+ <span class="glyphicon glyphicon-ok"></span> Got it
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+
<?php } ?>
<?php function foot() : void { ?>
<script type="text/javascript" src="<?=ar()?>/static/js/jquery.min.js"></script>
<script type="text/javascript" src="<?=ar()?>/static/js/bootstrap.min.js"></script>
+ <?php if (isError(ERROR) || isError(WARNING) || isError(NOTICE)) { ?>
+ <script type="text/javascript">
+ $(window).on('load', function () {
+ $("#noticeModal").modal("show");
+ });
+ </script>
+ <?php } ?>
+
<?php } ?>
<?php function nav() : void { ?>