* added customFlags to infoBox Misc: * moved no-cache header to separate utility function * pages may now require the user to be authed as he can be authed AND have no userGroups simultaneously * minor changes to announcements
13 lines
No EOL
426 B
PHP
13 lines
No EOL
426 B
PHP
<?php
|
|
foreach ($this->announcements as $id => $data):
|
|
$data = json_encode($data, JSON_NUMERIC_CHECK);
|
|
// json_encode does not recognize variables
|
|
$data = preg_replace('/"\$((.+?)([^\\\\]))"/i', '$1', $data);
|
|
?>
|
|
<div id="announcement-<?php echo $id; ?>"></div>
|
|
<script type="text/javascript">
|
|
new Announcement(<?php echo $data; ?>);
|
|
</script>
|
|
<?php
|
|
endforeach;
|
|
?>
|