|
2 | 2 | $new_user_msg_num = DB::selectCount("select count(*) from user_msg where receiver = '".Auth::id()."' and read_time is null"); |
3 | 3 | $new_system_msg_num = DB::selectCount("select count(*) from user_system_msg where receiver = '".Auth::id()."' and read_time is null"); |
4 | 4 | $new_msg_tot = $new_user_msg_num + $new_system_msg_num; |
5 | | - |
| 5 | + |
6 | 6 | if ($new_user_msg_num == 0) { |
7 | 7 | $new_user_msg_num_html = ''; |
8 | 8 | } else { |
|
18 | 18 | } else { |
19 | 19 | $new_msg_tot_html = '<sup><span class="badge badge-pill badge-secondary">'.$new_msg_tot.'</span></sup>'; |
20 | 20 | } |
21 | | - |
| 21 | + |
22 | 22 | if (!isset($PageMainTitle)) { |
23 | 23 | $PageMainTitle = UOJConfig::$data['profile']['oj-name']; |
24 | 24 | } |
|
38 | 38 | <meta name="robots" content="noindex, nofollow" /> |
39 | 39 | <?php endif ?> |
40 | 40 | <title><?= isset($PageTitle) ? $PageTitle : UOJConfig::$data['profile']['oj-name-short'] ?> - <?= $PageMainTitle ?></title> |
41 | | - |
| 41 | + |
42 | 42 | <script type="text/javascript">uojHome = '<?= HTML::url('/') ?>'</script> |
43 | 43 |
|
44 | 44 | <!-- Bootstrap core CSS --> |
|
48 | 48 |
|
49 | 49 | <!-- Custom styles for this template --> |
50 | 50 | <?= HTML::css_link('/css/uoj-theme.css?v=2.3333') ?> |
51 | | - |
| 51 | + |
52 | 52 | <!-- jQuery (necessary for Bootstrap\'s JavaScript plugins) --> |
53 | 53 | <?= HTML::js_src('/js/jquery.min.js') ?> |
54 | | - |
| 54 | + |
55 | 55 | <!-- jQuery autosize --> |
56 | 56 | <?= HTML::js_src('/js/jquery.autosize.min.js') ?> |
57 | 57 | <script type="text/javascript"> |
58 | 58 | $(document).ready(function() { |
59 | 59 | $('textarea').autosize(); |
60 | 60 | }); |
61 | 61 | </script> |
62 | | - |
| 62 | + |
63 | 63 | <!-- jQuery cookie --> |
64 | 64 | <?= HTML::js_src('/js/jquery.cookie.min.js') ?> |
65 | | - |
| 65 | + |
66 | 66 | <!-- jQuery modal --> |
67 | 67 | <?= HTML::js_src('/js/jquery.modal.js') ?> |
68 | | - |
| 68 | + |
69 | 69 | <?php if (isset($REQUIRE_LIB['tagcanvas'])): ?> |
70 | 70 | <!-- jQuery tag canvas --> |
71 | 71 | <?= HTML::js_src('/js/jquery.tagcanvas.min.js') ?> |
72 | 72 | <?php endif ?> |
73 | | - |
| 73 | + |
74 | 74 | <!-- Include all compiled plugins (below), or include individual files as needed --> |
75 | 75 | <?= HTML::js_src('/js/popper.min.js?v=2019.5.31') ?> |
76 | 76 | <?= HTML::js_src('/js/bootstrap.min.js?v=2019.5.31') ?> |
77 | | - |
| 77 | + |
78 | 78 | <!-- Color converter --> |
79 | 79 | <?= HTML::js_src('/js/color-converter.min.js') ?> |
80 | | - |
| 80 | + |
81 | 81 | <!-- uoj --> |
82 | 82 | <?= HTML::js_src('/js/uoj.js?v=2017.01.01') ?> |
83 | | - |
| 83 | + |
84 | 84 | <!-- readmore --> |
85 | 85 | <?= HTML::js_src('/js/readmore/readmore.min.js') ?> |
86 | | - |
| 86 | + |
87 | 87 | <!-- LAB --> |
88 | 88 | <?= HTML::js_src('/js/LAB.min.js') ?> |
89 | 89 |
|
90 | 90 | <!-- favicon --> |
91 | 91 | <link rel="shortcut icon" href="<?= HTML::url('/images/favicon.ico') ?>" /> |
92 | | - |
| 92 | + |
93 | 93 | <?php if (isset($REQUIRE_LIB['blog-editor'])): ?> |
94 | 94 | <!-- UOJ blog editor --> |
95 | 95 | <?php $REQUIRE_LIB['jquery.hotkeys'] = '' ?> |
|
110 | 110 | <?= HTML::js_src('/js/codemirror/mode/clike/clike.js') ?> |
111 | 111 | <?= HTML::js_src('/js/codemirror/mode/pascal/pascal.js') ?> |
112 | 112 | <?php endif ?> |
113 | | - |
| 113 | + |
114 | 114 | <?php if (isset($REQUIRE_LIB['slide-editor'])): ?> |
115 | 115 | <!-- UOJ slide editor --> |
116 | 116 | <?= HTML::css_link('/js/codemirror/lib/codemirror.css') ?> |
|
120 | 120 | <?= HTML::js_src('/js/codemirror/addon/mode/overlay.js') ?> |
121 | 121 | <?= HTML::js_src('/js/codemirror/addon/selection/active-line.js') ?> |
122 | 122 | <?php endif ?> |
123 | | - |
| 123 | + |
124 | 124 | <?php if (isset($REQUIRE_LIB['md5'])): ?> |
125 | 125 | <!-- MD5 --> |
126 | 126 | <?= HTML::js_src('/js/md5.min.js') ?> |
127 | 127 | <?php endif ?> |
128 | | - |
| 128 | + |
129 | 129 | <?php if (isset($REQUIRE_LIB['dialog'])): ?> |
130 | 130 | <!-- Bootstrap dialog --> |
131 | 131 | <?= HTML::css_link('/css/bootstrap-dialog.min.css') ?> |
132 | 132 | <?= HTML::js_src('/js/bootstrap-dialog.min.js') ?> |
133 | 133 | <?php endif ?> |
134 | | - |
| 134 | + |
135 | 135 | <?php if (isset($REQUIRE_LIB['switch'])): ?> |
136 | 136 | <!-- Bootstrap switch --> |
137 | 137 | <?= HTML::css_link('/css/bootstrap-switch.min.css') ?> |
138 | 138 | <?= HTML::js_src('/js/bootstrap-switch.min.js') ?> |
139 | 139 | <?php endif ?> |
140 | | - |
| 140 | + |
141 | 141 | <?php if (isset($REQUIRE_LIB['mathjax'])): ?> |
142 | 142 | <!-- MathJax --> |
143 | 143 | <script type="text/x-mathjax-config"> |
|
152 | 152 | } |
153 | 153 | }); |
154 | 154 | </script> |
155 | | - <script src="//cdn.bootcss.com/mathjax/2.7.7/MathJax.js?config=TeX-AMS_HTML"></script> |
| 155 | + <script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.7/MathJax.js?config=TeX-AMS_HTML"></script> |
156 | 156 | <?php endif ?> |
157 | | - |
| 157 | + |
158 | 158 | <?php if (isset($REQUIRE_LIB['jquery.form'])): ?> |
159 | 159 | <!-- jquery form --> |
160 | 160 | <?= HTML::js_src('/js/jquery.form.min.js') ?> |
161 | 161 | <?php endif ?> |
162 | | - |
| 162 | + |
163 | 163 | <?php if (isset($REQUIRE_LIB['jquery.hotkeys'])): ?> |
164 | 164 | <!-- jquery hotkeys --> |
165 | 165 | <?= HTML::js_src('/js/jquery.hotkeys.js') ?> |
|
174 | 174 | $REQUIRE_LIB['colorhelpers'] = ""; |
175 | 175 | ?> |
176 | 176 | <?php endif ?> |
177 | | - |
| 177 | + |
178 | 178 | <?php if (isset($REQUIRE_LIB['colorhelpers'])): ?> |
179 | 179 | <!-- colorhelpers --> |
180 | 180 | <?= HTML::js_src('/js/jquery.colorhelpers.min.js') ?> |
181 | 181 | <?php endif ?> |
182 | | - |
| 182 | + |
183 | 183 | <?php if (isset($REQUIRE_LIB['morris'])): ?> |
184 | 184 | <!-- morris --> |
185 | 185 | <?= HTML::js_src('/js/morris.min.js') ?> |
186 | 186 | <?= HTML::css_link('/css/morris.css') ?> |
187 | 187 | <?php $REQUIRE_LIB['raphael'] = "" ?> |
188 | 188 | <?php endif ?> |
189 | | - |
| 189 | + |
190 | 190 | <?php if (isset($REQUIRE_LIB['raphael'])): ?> |
191 | 191 | <!-- raphael --> |
192 | 192 | <?= HTML::js_src('/js/raphael.min.js') ?> |
193 | 193 | <?php endif ?> |
194 | | - |
| 194 | + |
195 | 195 | <?php if (isset($REQUIRE_LIB['hljs'])): ?> |
196 | 196 | <!-- hljs --> |
197 | 197 | <?= HTML::css_link('/css/highlight_github.css') ?> |
198 | 198 | <?= HTML::js_src('/js/highlight.min.js') ?> |
199 | 199 | <script type="text/javascript">$(document).ready(function(){hljs.highlightAll()})</script> |
200 | 200 | <?php endif ?> |
201 | | - |
| 201 | + |
202 | 202 | <?php if (isset($REQUIRE_LIB['ckeditor'])): ?> |
203 | 203 | <!-- ckeditor --> |
204 | 204 | <?= HTML::js_src('/js/ckeditor/ckeditor.js') ?> |
|
214 | 214 | <?= HTML::js_src('/js/base64.min.js') ?> |
215 | 215 | <?php endif ?> |
216 | 216 |
|
217 | | - <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> |
218 | | - <!--[if lt IE 9]> |
219 | | - <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
220 | | - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
221 | | - <![endif]--> |
222 | | - |
223 | 217 | <script type="text/javascript"> |
224 | 218 | before_window_unload_message = null; |
225 | 219 | $(window).on('beforeunload', function() { |
|
228 | 222 | } |
229 | 223 | }); |
230 | 224 | </script> |
231 | | - |
| 225 | + |
232 | 226 | <?php if (UOJConfig::$data['switch']['web-analytics']): ?> |
233 | 227 | <script>var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = "//hm.baidu.com/hm.js?bbd5ae87bf89e087603a1988103688ff";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();</script> |
234 | 228 | <?php endif ?> |
|
261 | 255 | <h1 class="d-none d-sm-block"><a href="<?= HTML::url('/') ?>"><img src="<?= HTML::url('/images/logo_small.png') ?>" alt="Logo" class="img-rounded" style="width:39px; height:39px;" /></a> <?= $PageMainTitle ?></h1> |
262 | 256 | <h1 class="d-block d-sm-none"><?= $PageMainTitleOnSmall ?></h1> |
263 | 257 | </div> |
264 | | - |
| 258 | + |
265 | 259 | <?php uojIncludeView($PageNav) ?> |
266 | 260 | <?php endif ?> |
267 | | - |
| 261 | + |
268 | 262 | <div class="uoj-content"> |
0 commit comments