} else { echo '<p class="notification red">Something went wrong while updating the announcements.</p>'; } } if ($hideForm !== true) { ?> <form action="" method="post" class="styled"> <table width="100%"> <tr> <th width="20px">#</th> <th width="150px">Announcement type</th> <th>Announcement text</th> <th width="150px">Time added</th> </tr> <?php $dataArr = $announcement->getAnnouncements(true); if ($dataArr == false) { echo '<tr><td colspan="4"><p class="notification red minimal">There are no active announcements that can be edited.</p>'; } else { $i = 0; foreach ($dataArr as $data) { echo '<tr>'; echo '<td>' . ++$i . '<input type="hidden" name="announcement_id[]" value="' . $data['id'] . '" /></td>'; echo '<td><select name="announcement_type[]" style="width: 125px;">'; echo '<option'; if ($data['announcement_type'] == "Green") { echo ' selected="selected"'; } echo '>Green</option>'; echo '<option'; if ($data['announcement_type'] == "Yellow") {
include_once "inc/WebsiteProperty.class.php"; /* Build content ******************************************************************/ $pMgr = new PageManager("pages", "page"); $websiteProperty = new WebsiteProperty(); $ban = new Ban(); $layout = new Layout($websiteProperty->getProperty('website_title') . ' :: ' . $pMgr->getTitle(), $pMgr->navigation()); echo $layout->buildTop(); if ($ban->checkBan()) { echo '<p class="notification red">Your IP has been banned on ' . $ban->checkBan("dtime") . '<br />Reason: ' . $ban->checkBan("reason") . '</p>'; } else { if ($_GET['page'] == 'admin') { $pMgr->getPageContent(); } else { $announcement = new Announcement(); $dataArr = $announcement->getAnnouncements(); if ($dataArr !== false) { foreach ($dataArr as $data) { echo '<p class="notification ' . strtolower($data['announcement_type']) . '">[' . $data['date_added'] . '] ' . stripslashes($data['announcement_text']) . '</p>'; } } echo ads(); $pMgr->getPageContent(); echo supportMe(); echo ads(); } } echo $layout->buildBottom(); /* Statistics + end fix php redirects ******************************************************************/ $statistics = new Statistics();