* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * * On Debian GNU/Linux systems, the complete text of the GNU General * Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt * */ require_once 'av_init.php'; // Check permissions Session::useractive(); $cell_id = GET('id'); ossim_valid($cell_id, OSS_ALPHA, OSS_DIGIT . OSS_SCORE, 'illegal: Message Id'); if (ossim_error()) { die(ossim_error()); } list($msg_id, $component_id) = explode("_", $cell_id); $msg_id = intval($msg_id); if (!valid_hex32($component_id, true)) { die(_("Invalid canonical uuid")); } // Call API try { $status = new System_status(); $status->set_viewed($msg_id, $component_id); list($detail) = $status->get_message_detail($msg_id); } catch (Exception $e) { // Do nothing }
echo $message; ?> </div> <?php } else { $i = 0; foreach ($message_list as $msg) { $class = $i++ % 2 != 0 ? "odd" : "even"; $sid = 's_' . $msg['message_id']; if ($msg["viewed"] == false) { $class .= ' bold'; } echo "<div data-id='" . $msg['message_id'] . "' class='suggestion_message {$class}'>\n <div style='padding-right:9px'>" . $msg['description'] . "</div>\n <div class='carrot green'></div>\n </div>\n <div id='{$sid}' class='hidden'>"; // Get details try { list($detail) = $status->get_message_detail($msg['message_id']); } catch (Exception $e) { $detail = array("content" => $e->getMessage(), "actions" => array()); } echo "<div class='suggestion_detail'>" . $status->format_message($detail, $msg) . "</div>\n"; if (count($detail["actions"])) { echo '<ul class="suggestion_action">'; } foreach ($detail["actions"] as $action) { echo "<li>" . $status->format_action_link($action, $id) . "</li>\n"; } if (count($detail["actions"])) { echo '</ul>'; } echo "</div>"; }