** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ $pageHeader = new CPageHeader(_('Warning') . ' [' . _s('refreshed every %1$s sec.', 30) . ']'); $pageHeader->addCssInit(); $pageHeader->display(); ?> <body> <?php // check if a CWarning object is passed if (!($warning = $this->get('warning'))) { $message = $this->get('message'); if (is_array($message) && isset($message['header'])) { $message = array(bold($message['header']), BR(), $message['text']); } // if not - render a standard warning with a message $warning = new CWarning('Zabbix ' . ZABBIX_VERSION, $message); $warning->setButtons(array(new CButton('login', _('Retry'), 'document.location.reload();', 'formlist'))); } $warning->show(); ?> <script type="text/javascript"> setTimeout('document.location.reload();', 30000); </script> </body> </html>
function access_deny() { require_once dirname(__FILE__) . '/page_header.php'; if (CWebUser::$data['alias'] != ZBX_GUEST_USER) { show_error_message(_('No permissions to referred object or it does not exist!')); } else { $url = new CUrl(!empty($_REQUEST['request']) ? $_REQUEST['request'] : ''); $url->setArgument('sid', null); $url = urlencode($url->toString()); $warning = new CWarning(_('You are not logged in.'), array(_('You cannot view this URL as a'), SPACE, bold(ZBX_GUEST_USER), '. ', _('You must login to view this page.'), BR(), _('If you think this message is wrong, please consult your administrators about getting the necessary permissions.'))); $warning->setButtons(array(new CButton('login', _('Login'), 'javascript: document.location = "index.php?request=' . $url . '";', 'formlist'), new CButton('back', _('Cancel'), 'javascript: window.history.back();', 'formlist'))); $warning->show(); } require_once dirname(__FILE__) . '/page_footer.php'; }