\n"; if ((isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['type'])) && (!empty($_SESSION[$_PAGE_INFO['id']]['errormsg']))) { // Activate alternate stylesheet echo "setActiveStyleSheet('ibox_normal');\n"; if ($_SESSION[$_PAGE_INFO['id']]['errormsg']['type'] == "alert") { $body = ""; $body .= "
"; // Add CSRF (cross-site request forgery) token $body .= ""; $body .= "

"; $body .= specialchars(str_replace('\\r\\n', '

',_($_SESSION[$_PAGE_INFO['id']]['errormsg']['text']))); $body .= "

"; $body .= ""; $body .= "
"; $ibox_title = (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['title'])) ? $_SESSION[$_PAGE_INFO['id']]['errormsg']['title'] : "Warning"; echo "iBox.show(\"" . $body . "\", \"" . _($ibox_title) . "\");\n"; } else if (($_SESSION[$_PAGE_INFO['id']]['errormsg']['type'] == "confirm") || ($_SESSION[$_PAGE_INFO['id']]['errormsg']['type'] == "confirm_xml")) { $body = ""; $body .= "
"; // Add CSRF (cross-site request forgery) token $body .= ""; $body .= "

"; $body .= specialchars(str_replace('\r\n', '

',(_($_SESSION[$_PAGE_INFO['id']]['errormsg']['text'])))); $body .= "

"; // xml recall? $xml_recall = ($_SESSION[$_PAGE_INFO['id']]['errormsg']['type'] == "confirm") ? 0 : 1; // Yes button if (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['recall'])) { $error_action = (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['force_hide'])) ? "iBox.hide();" : ""; if (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['action'])) { $error_action .= $_SESSION[$_PAGE_INFO['id']]['errormsg']['action']; } $body .= ""; } else if (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['redirect'])) { $body .= ""; } else { $body .= ""; } // No button if (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['recall_no'])) { $error_action = (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['force_hide'])) ? "iBox.hide();" : ""; if (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['action_no'])) { $error_action .= $_SESSION[$_PAGE_INFO['id']]['errormsg']['action_no']; } $body .= ""; } else if (isset($_SESSION[$_PAGE_INFO['id']]['errormsg']['redirect_no'])) { $body .= ""; } else { $body .= ""; } $body .= "
"; echo "iBox.show(\"" . $body . "\", \"" . _("Confirm") . "\");\n"; } else if ($_SESSION[$_PAGE_INFO['id']]['errormsg']['type'] == "choose_language") { $body = ""; $body .= "
"; // Add CSRF (cross-site request forgery) token $body .= ""; $body .= "
"; // Create buttons for every languae $i18n_languages = db_fetch_system_lang(); $keys = array_keys($i18n_languages); for ($i = 0; $i < sizeof($i18n_languages); $i++) { $body .= "
"; } $body .= "
"; $body .= "
"; echo "iBox.show(\"" . $body . "\", \"" . _("Choose language") . "\"); \n"; } // Hide cancel button (when visible) echo "getElement(\"ibox_cancel_button\").style.visibility=\"hidden\";\n"; // Clear all info $_SESSION[$_PAGE_INFO['id']]['errormsg'] = array(); } echo "\n"; ?>