summaryrefslogtreecommitdiffstats
path: root/app/view/stdpage.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-07-20 04:37:05 -0400
committerMalf Furious <m@lfurio.us>2018-07-20 04:37:05 -0400
commit7349f221c65b4f52c58efff444399b7d0cf368f6 (patch)
tree74e59c39bce015d4da8c1c2a05ada7c18866d702 /app/view/stdpage.php
parent2085a654e1d4df2cdf636d9a59445d2e42f72143 (diff)
downloadscrott-7349f221c65b4f52c58efff444399b7d0cf368f6.tar.gz
scrott-7349f221c65b4f52c58efff444399b7d0cf368f6.zip
Add the notice modal
Diffstat (limited to '')
-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 { ?>