/** * Output the message buffer * */ function GetMessages($wrap = true) { global $wbMessageBuffer, $gp_not_writable, $langmessage; if (\gp\tool::loggedIn() && count($gp_not_writable) > 0) { $files = '<ul><li>' . implode('</li><li>', $gp_not_writable) . '</li></ul>'; $message = sprintf($langmessage['not_writable'], \gp\tool::GetUrl('Admin/Status')) . $files; message($message); $gp_not_writable = array(); } $result = $wrap_end = ''; if ($wrap) { $result = "\n<!-- message_start " . gp_random . " -->"; $wrap_end = "<!-- message_end -->\n"; } if (!empty($wbMessageBuffer)) { if (gpdebug === false) { $wbMessageBuffer = array_unique($wbMessageBuffer); } $result .= '<div class="messages gp-fixed-adjust"><div>'; $result .= '<a style="" href="#" class="req_script close_message" data-cmd="close_message"></a>'; $result .= '<ul>'; $result .= implode('', $wbMessageBuffer); $result .= '</ul></div></div>'; } return $result .= \gp\tool::ErrorBuffer() . $wrap_end; }
background:#fff2a3; color:#4d4931; } </style> </head> <body> <div class="wrapper"> <?php new gp_install(); echo \gp\tool::ErrorBuffer(false); echo '</div>'; echo '</body></html>'; //Install Class class gp_install { public $can_write_data = true; public $ftp_root = false; public $root_mode; private $passed = true; public function __construct() { global $languages, $install_language, $langmessage; //language preferences $install_language = 'en'; if (isset($_GET['lang']) && isset($languages[$_GET['lang']])) {
/** * Return the message displayed when a fatal error has been caught * */ public static function FatalMessage($error_details) { $message = '<p>Oops, an error occurred while generating this page.<p>'; if (!\gp\tool::LoggedIn()) { //reload non-logged in users automatically if there were catchable errors if (!empty(self::$catchable)) { $message .= 'Reloading... <script type="text/javascript">window.setTimeout(function(){window.location.href = window.location.href},1000);</script>'; } else { $message .= '<p>If you are the site administrator, you can troubleshoot the problem by changing php\'s display_errors setting to 1 in the gpconfig.php file.</p>' . '<p>If the problem is being caused by an addon, you may also be able to bypass the error by enabling ' . CMS_NAME . '\'s safe mode in the gpconfig.php file.</p>' . '<p>More information is available in the <a href="' . CMS_DOMAIN . '/Docs/Main/Troubleshooting">Documentation</a>.</p>' . '<p><a href="">Reload this page to continue</a>.</p>'; } return $message; } $message .= '<h3>Error Details</h3>' . pre($error_details) . '<p><a href="">Reload this page</a></p>' . '<p style="font-size:90%">Note: Error details are only displayed for logged in administrators</p>' . \gp\tool::ErrorBuffer(true, false); return $message; }