Exemplo n.º 1
0
 public static function showmessage($message, $url_forward = '', $extra = '', $others = '0')
 {
     extract($GLOBALS, EXTR_SKIP);
     global $extrahead, $chobits_action, $debuginfo, $fid, $tid, $charset, $show_message, $_NCACHE;
     define('CACHE_FORBIDDEN', TRUE);
     $disable_robot = 1;
     $show_message = $message;
     $msgforward = unserialize($_CHOBITS['settings']['msgforward']);
     $msgforward['refreshtime'] = intval($msgforward['refreshtime']);
     $url_forward = empty($url_forward) ? '' : (empty($_DCOOKIE['sid']) && $transsidstatus ? transsid($url_forward) : $url_forward);
     if ($url_forward && empty($_GET['inajax']) && $msgforward['quick'] && $msgforward['messages'] && @in_array($message, $msgforward['messages'])) {
         GlobalCore::updatesession();
         GlobalCore::nwHeader("location: " . str_replace('&', '&', $url_forward));
     }
     if (in_array($extra, array('HALTED', 'NOPERM'))) {
         $fid = $tid = 0;
         $chobits_action = 254;
     } else {
         $chobits_action = 255;
     }
     include GlobalCore::language('messages');
     if (isset($language[$message])) {
         eval("\$show_message = \"" . $language[$message] . "\";");
     }
     $extrahead .= $url_forward ? '<meta http-equiv="refresh" content="' . $msgforward['refreshtime'] . ' url=' . $url_forward . '">' : '';
     if ($extra == 'NOPERM') {
         include GlobalCore::template('nopermission');
     } elseif ($extra == 'DONE') {
         include GlobalCore::template('showmessage_done');
     } else {
         if ($others == 0) {
             $this_page = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
             include GlobalCore::template('showmessage');
         } else {
             include GlobalCore::template('showmessage_other');
         }
     }
     GlobalCore::chobits_exit();
 }