class_display.php
字号:
<?php/*+--------------------------------------------------------------------------| Invision Power Board v2.1.5| =============================================| by Matthew Mecham| (c) 2001 - 2005 Invision Power Services, Inc.| | =============================================| Web: | Time: Wed, 01 Mar 2006 19:11:28 GMT| Release: | Licence Info: +---------------------------------------------------------------------------| > $Date: 2006-02-03 14:28:22 +0000 (Fri, 03 Feb 2006) $| > $Revision: 134 $| > $Author: bfarber $+---------------------------------------------------------------------------|| > DISPLAY CLASS| > Module written by Matt Mecham| > Date started: 26th January 2004|| > Module Version Number: 1.0.0| > DBA Checked: Wed 19 May 2004+--------------------------------------------------------------------------*/class display { # Global var $ipsclass; var $to_print = ""; var $output = ""; var $macros = ""; //----------------------------------------- // CONSTRUCTOR //----------------------------------------- function display() { } //----------------------------------------- // Appends the parsed HTML to our class var //----------------------------------------- function add_output($to_add) { $this->to_print .= $to_add; //return 'true' on success return true; } /*-------------------------------------------------------------------------*/ // // Parses all the information and prints it. // /*-------------------------------------------------------------------------*/ function do_output($output_array) { global $Debug; //----------------------------------------- // Global //----------------------------------------- $components_links = ""; //----------------------------------------- // Are we IPSing? //----------------------------------------- $this->_check_ips_report(); //----------------------------------------- // UNPACK MACROS //----------------------------------------- $this->_unpack_macros(); //----------------------------------------- // END TIMER //----------------------------------------- $this->ex_time = sprintf( "%.4f",$Debug->endTimer() ); //----------------------------------------- // SQL DEBUG? //----------------------------------------- $this->_check_debug(); $stats = $this->_show_debug(); //----------------------------------------- // NAVIGATION //----------------------------------------- $nav = $this->ipsclass->compiled_templates['skin_global']->start_nav(); $nav .= "<a href='{$this->ipsclass->base_url}act=idx'>{$this->ipsclass->vars['board_name']}</a>"; if ( empty($output_array['OVERRIDE']) ) { if (is_array( $output_array['NAV'] ) ) { foreach ($output_array['NAV'] as $n) { if ($n) { $nav .= "<{F_NAV_SEP}>" . $n; } } } } $nav .= $this->ipsclass->compiled_templates['skin_global']->end_nav(); //----------------------------------------- // CSS //----------------------------------------- $css = $this->_get_css(); //----------------------------------------- // REMOVAL OF THIS WITHOUT PURCHASING COPYRIGHT REMOVAL WILL VIOLATE THE LICENCE YOU AGREED // TO WHEN DOWNLOADING THIS PRODUCT. THIS COULD MEAN REMOVAL OF YOUR BOARD AND EVEN // CRIMINAL CHARGES //----------------------------------------- if ($this->ipsclass->vars['ipb_copy_number']) { $copyright = ""; } else if ( TRIAL_VERSION ) { $copyright = "<!-- Copyright Information --> <div align='center' style='background-color:#FFF;color:#000;font-size:11px;width:auto;'> Powered by: Invision Power Board (Free Trial) {$this->ipsclass->version} © ".date("Y")." Invision Power Services, Inc.</strong> </div> <!-- / Copyright -->"; } else { $copyright = "<!-- Copyright Information --> <div align='center' class='copyright'> Invision Power Board {$this->ipsclass->version} © ".date("Y")." IPS, Inc. "."<br /><a href=\"http://sabreworks.cn\">Sabre IPB {$this->ipsclass->SabreVersion}</a>"; if ( $this->ipsclass->vars['ipb_reg_show'] and $this->ipsclass->vars['ipb_reg_name'] ) { $copyright .= "<div>Licensed to: ". $this->ipsclass->vars['ipb_reg_name']."</div>"; } $copyright .= "</div>\n\t\t<!-- / Copyright -->"; } //----------------------------------------- // Must be called before board_header //----------------------------------------- $this->ipsclass->member['new_msg'] = intval($this->ipsclass->member['new_msg']); if ( ($this->ipsclass->member['g_max_messages'] > 0) and ($this->ipsclass->member['msg_total'] >= $this->ipsclass->member['g_max_messages']) ) { $msg_data['TEXT'] = $this->ipsclass->lang['msg_full']; } else { $msg_data['TEXT'] = sprintf( $this->ipsclass->lang['msg_new'], $this->ipsclass->member['new_msg']); } //----------------------------------------- // Components link //----------------------------------------- if ( is_array( $this->ipsclass->cache['components'] ) and count( $this->ipsclass->cache['components'] ) ) { foreach( $this->ipsclass->cache['components'] as $id => $data ) { if ( $data['com_url_title'] AND $data['com_url_uri'] ) { $data['com_url_uri'] = str_replace( '{ipb.base_url}' , $this->ipsclass->base_url , $data['com_url_uri'] ); $data['com_url_title'] = preg_replace( '#{ipb.lang\[[\'"](.+?)[\'"]\]}#ie', "\$this->ipsclass->lang[\\1]", $data['com_url_title'] ); $components_links .= $this->ipsclass->compiled_templates['skin_global']->global_board_header_component_link( $data['com_url_uri'],$data['com_url_title'], $data ); } } } //----------------------------------------- // Do it //----------------------------------------- $this_header = $this->ipsclass->compiled_templates['skin_global']->global_board_header( $components_links ); $this_footer = $this->ipsclass->compiled_templates['skin_global']->global_board_footer( $this->ipsclass->get_date( time(), 'SHORT', 1 ) ); //----------------------------------------- // Show rules link? //----------------------------------------- if ($this->ipsclass->vars['gl_show'] and $this->ipsclass->vars['gl_title']) { if ($this->ipsclass->vars['gl_link'] == "") { $this->ipsclass->vars['gl_link'] = $this->ipsclass->base_url."act=boardrules"; } $this_header = str_replace( "<!--IBF.RULES-->", $this->ipsclass->compiled_templates['skin_global']->rules_link($this->ipsclass->vars['gl_link'], $this->ipsclass->vars['gl_title']), $this_header ); } //----------------------------------------- // Build the members bar //----------------------------------------- $output_array['MEMBER_BAR'] = $this->ipsclass->compiled_templates['skin_global']->member_bar($msg_data); //----------------------------------------- // Board offline? //----------------------------------------- if ($this->ipsclass->vars['board_offline'] == 1) { $output_array['TITLE'] = $this->ipsclass->lang['warn_offline']." ".$output_array['TITLE']; } //----------------------------------------- // Showing skin jump? //----------------------------------------- if ( $this->ipsclass->vars['allow_skins'] and $this->ipsclass->member['id'] > 0 ) { $skin_jump = $this->ipsclass->compiled_templates['skin_global']->global_skin_chooser( $this->_build_skin_list() ); } else { $skin_jump = ""; } //----------------------------------------- // Showing skin jump? //----------------------------------------- if ( $this->ipsclass->member['id'] > 0 ) { $lang_jump = $this->ipsclass->compiled_templates['skin_global']->global_lang_chooser( $this->_build_language_list() ); } else { $lang_jump = ""; } //----------------------------------------- // Show quick stats? //----------------------------------------- $gzip_status = $this->ipsclass->vars['disable_gzip'] == 1 ? $this->ipsclass->lang['gzip_off'] : $this->ipsclass->lang['gzip_on']; if ( ! $this->ipsclass->server_load ) { $this->ipsclass->server_load = '--'; } //----------------------------------------- // Basics //----------------------------------------- if ( $this->ipsclass->member['id'] and $this->ipsclass->vars['debug_level'] ) { $quickstats = $this->ipsclass->compiled_templates['skin_global']->global_quick_stats($this->ex_time, $gzip_status, $this->ipsclass->server_load, $this->ipsclass->DB->get_query_cnt() ); } else { $quickstats = ""; } //----------------------------------------- // Add in task image? //----------------------------------------- if ( time() >= $this->ipsclass->cache['systemvars']['task_next_run'] ) { $this->to_print .= "<!--TASK--><img src='{$this->ipsclass->base_url}act=task' border='0' height='1' width='1' alt='' /><!--ETASK-->"; } //----------------------------------------- // Parse EXEC commands in wrapper only // If we moved this below the block of str_replace // we'd get exec commands parsed in HTML templates // too... Do we want that? Not for now... //----------------------------------------- if ( stristr( $this->ipsclass->skin['_wrapper'], '<!--exec.' ) ) { $this->_parse_exec_tags(); } $this->ipsclass->skin['_wrapper'] = str_replace( "<% CSS %>" , $css , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% JAVASCRIPT %>" , "" , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% TITLE %>" , $output_array['TITLE'] , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% BOARD %>" , $this->to_print , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% STATS %>" , $stats , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% GENERATOR %>" , $this->_get_rss_export() , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% COPYRIGHT %>" , $copyright , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% BOARD HEADER %>" , $this_header , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% BOARD FOOTER %>" , $this_footer , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% NAVIGATION %>" , $nav , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% SKINCHOOSER %>" , $skin_jump , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% LANGCHOOSER %>" , $lang_jump , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% QUICKSTATS %>" , $quickstats , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% LOFIVERSION %>" , $this->_get_lofi_link() , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% SYNDICATION %>" , $this->_get_synd_link() , $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% CHARSET %>" , $this->ipsclass->vars['gb_char_set'], $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% ICPNO %>", $this->ipsclass->vars['icpno'], $this->ipsclass->skin['_wrapper']); $this->ipsclass->skin['_wrapper'] = str_replace( "<% COUNTCODE %>", $this->ipsclass->vars['countcode'], $this->ipsclass->skin['_wrapper']); if ( empty($output_array['OVERRIDE']) ) { $this->ipsclass->skin['_wrapper'] = str_replace( "<% MEMBER BAR %>", $output_array['MEMBER_BAR'], $this->ipsclass->skin['_wrapper']); } else { $this->ipsclass->skin['_wrapper'] = str_replace( "<% MEMBER BAR %>", $this->ipsclass->compiled_templates['skin_global']->member_bar_disabled(), $this->ipsclass->skin['_wrapper']); } //----------------------------------------- // Do we have a PM show? //----------------------------------------- if ( $this->ipsclass->member['show_popup'] AND ! $this->ipsclass->member['members_disable_pm'] ) { $this->ipsclass->DB->simple_construct( array( 'update' => 'members', 'set' => 'show_popup=0', 'where' => 'id='.$this->ipsclass->member['id'] ) ); $this->ipsclass->DB->simple_shutdown_exec(); if ( $this->ipsclass->input['act'] != 'Msg' ) { $this->ipsclass->skin['_wrapper'] = str_replace( '<!--IBF.NEWPMBOX-->', $this->ipsclass->get_new_pm_notification(), $this->ipsclass->skin['_wrapper'] ); } } //----------------------------------------- // Get the macros and replace them //----------------------------------------- if ( is_array( $this->ipsclass->skin['_macros'] ) ) { foreach( $this->ipsclass->skin['_macros'] as $i => $row ) { if ( $row['macro_value'] != "" ) { $this->ipsclass->skin['_wrapper'] = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $this->ipsclass->skin['_wrapper'] ); } } } $this->ipsclass->skin['_wrapper'] = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $this->ipsclass->skin['_wrapper'] ); $this->ipsclass->skin['_wrapper'] = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $this->ipsclass->skin['_wrapper'] ); //----------------------------------------- // Images on another server? uncomment and alter below //----------------------------------------- if ( $this->ipsclass->vars['ipb_img_url'] ) { $this->ipsclass->skin['_wrapper'] = preg_replace( "#img\s+?src=[\"']style_(images|avatars|emoticons)(.+?)[\"'](.+?)?".">#is", "img src=\"".$this->ipsclass->vars['ipb_img_url']."style_\\1\\2\"\\3>", $this->ipsclass->skin['_wrapper'] ); } $this->_finish(); print $this->ipsclass->skin['_wrapper'];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -