/** * Function to show a message note on the page. If all the fields are blank then the default * option is to read the temporary storage for the message. * * @param string $message Message to show. * @param string $type Type of message to show. * @param string $type_text Type of text to show. * @return string HTML text to show on the page. */ function message_note($message = '', $type = 'success', $type_text = '') { message_note_setup(); // if blank then show the saved message and message type if ($message == '') { $CI =& get_instance(); $message = get_message_note_message(); if ($message) { $CI->session->set_flashdata('message_note', ''); return message_note($message, get_message_note_type()); } if ($CI->session->flashdata('message_note')) { $data = $CI->session->flashdata('message_note'); $CI->session->set_flashdata('message_note', ''); if ($data['message']) { return message_note($data['message'], $data['type']); } } return ''; } $message_note_types = array('success', 'failure', 'warning', 'information', 'message', 'lightbulb'); $type = strtolower($type); if (!in_array($type, $message_note_types)) { show_error("Invalid message not type '{$type}'"); } if ($type_text == '') { $type_text = strtoupper($type); } $type = 'n' . ucfirst($type); $result = '<div class="nNote ' . $type . '">' . '<p><strong>' . strtoupper($type_text) . ': </strong>' . $message . '</p>' . '</div>'; return $result; }
<?php echo form_open(); echo toolbar_open('Sites'); echo toolbar_item('google_sitesync', 'Google Sync'); echo toolbar_reload(); echo toolbar_toggle_publish(); echo toolbar_delete(); echo toolbar_edit(); echo toolbar_add(); echo toolbar_close(); echo message_note(); echo form_sort_order($sort_order); ?> <div class='content'> <fieldset class='filter'> <legend>Filter</legend> <table cellpadding='0' cellspacing='0' class='filter'> <tr> <th>Name</th> <th>Published</th> </tr> <tr> <td><?php echo form_input('filter[name_match]', $filter->name_match); ?> </td> <td><?php