* Invision Power Services * IP.Board v3.3.4 * Admin CP global skin templates * Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * * * @author $Author: bfarber $ * @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @license http://www.invisionpower.com/company/standards.php#license * @package IP.Board * @link http://www.invisionpower.com * @version $Rev: 10914 $ * @since 3.0.0 * */ class cp_skin_global extends output { /** * Prevent our main destructor being called by this class * * @access public * @return @e void */ public function __destruct() { } /** * Redirector page * * @param string $url URL to send to * @param string $text Text to display * @return @e string */ public function temporaryRedirect( $url, $text, $time=2 ) { $time = floatval( $time ) * 1000; $IPBHTML = ""; //--starthtml--// $url = str_replace( '&', '&', $url ); $IPBHTML .= <<{$text} EOF; //--endhtml--// return $IPBHTML; } //=========================================================================== // //=========================================================================== function editor($formField='post', $content='', $options=array(), $autoSaveData=array() ) { $IPBHTML = ""; //--starthtml--// $options['type'] = ( $options['type'] ) ? $options['type'] : "''"; $options['minimize'] = intval( $options['minimize'] ); $options['smilies'] = IPSText::jsonEncodeForTemplate( is_array($options['smilies']) ? $options['smilies'] : array() ); $options['noSmilies'] = intval( $options['noSmilies'] ); $bbcode = IPSLib::fetchBbcodeAsJson(); $defaultSkin = $this->registry->output->_fetchSkinByDefault(); if ( ! $this->_editorJsLoaded ) { $this->_editorJsLoaded = true; if ( defined("CK_LOAD_SOURCE") AND CK_LOAD_SOURCE ) { $IPBHTML .= << EOF; } else { $IPBHTML .= << EOF; } $IPBHTML .= <<lang->lang_id}/ipb.lang.js' charset='{$this->settings['gb_char_set']}'> EOF; } $options['noSmilies'] = intval($options['noSmilies']); $IPBHTML .= << EOF; //--endhtml--// return $IPBHTML; } /** * Editor template for ACP * * @access public * @param string From field name * @param string Initial content for the editor * @param string Path to the images * @param integer Whether RTE is enabled (1) or not (0) * @param string Editor id * @param string Emoticon data * @return string HTML */ public function ips_editor($form_field="",$initial_content="",$images_path="",$rte_mode=0,$editor_id='ed-0',$smilies='') { $IPBHTML = ""; //--starthtml--// $this->settings['extraJsModules'] .= ",editor"; $bbcodes = IPSLib::fetchBbcodeAsJson(); $show_sidebar = IPSCookie::get('emoticon_sidebar'); $show_sidebar_class = $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'with_sidebar' : ''; $show_sidebar_style = $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? '' : "style='display:none'"; $show_sidebar_link = $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'true' : 'false'; $IPBHTML .= <<
EOF; if( $this->settings['_remove_emoticons'] == 0 ) { $IPBHTML .= <<

{$this->lang->words[{$this->lang->words['emoticons_template_title']}

EOF; } $IPBHTML .= <<
EOF; //--endhtml--// return $IPBHTML; } /** * Page wrapper for popup windows * * @access public * @param string Document character set * @param array CSS Files * @return string HTML */ public function global_main_popup_wrapper($IPS_DOC_CHAR_SET=IPS_DOC_CHAR_SET, $cssFiles=array() ) { $IPBHTML = ""; //--starthtml--// $_path = IPS_PUBLIC_SCRIPT; $boardurl = ($this->registry->output->isHTTPS) ? $this->settings['board_url_https'] : $this->settings['board_url']; $IPBHTML .= << <%TITLE%> EOF; /** CSS ----------------------------------------- */ /*if ( $this->settings['use_minify'] ) { $_basics = CP_DIRECTORY . '/skin_cp/acp.css,' . CP_DIRECTORY . '/skin_cp/acp_editor.css'; $_others = ''; if ( is_array( $cssFiles['import'] ) AND count( $cssFiles['import'] ) ) { foreach( $cssFiles['import'] as $data ) { $_others .= ',' . preg_replace( "#^(.*)/(" . CP_DIRECTORY . "/.*)$#", "$2", $data['content'] ); } } $IPBHTML .= "\n\tsettings['public_dir']}min/index.php?f={$_basics}{$_others}\">\n"; } else {*/ $IPBHTML .= << @import url( "{$this->settings['skin_acp_url']}/acp.css" ); @import url( "{$this->settings['skin_acp_url']}/acp_editor.css" ); HTML; if( is_array($cssFiles['import']) AND count($cssFiles['import']) ) { foreach( $cssFiles['import'] as $data ) { $IPBHTML .= << EOF; } } //} $IPBHTML .= << HTML; if( IN_DEV ) { $IPBHTML .= << .ipsActionBar > ul > li.inDev { display: inline; } HTML; } if( is_array($cssFiles['inline']) AND count($cssFiles['inline']) ) { $IPBHTML .= << EOF; foreach( $cssFiles['inline'] as $data ) { $IPBHTML .= $data['content']; } $IPBHTML .= << EOF; } /** JS ----------------------------------------- */ /*if ( $this->settings['use_minify'] ) { $_others = ',' . CP_DIRECTORY . '/js/acp.js,' . CP_DIRECTORY . '/js/acp.' . implode('.js,' . CP_DIRECTORY . '/js/acp.', array( 'menu', 'tabs' ) ) . '.js'; $IPBHTML .= <<registry->output->antiCacheHash}'> HTML; $IPBHTML .= "\n\t\n"; } else { $IPBHTML .= "'>\n"; } } else {*/ $IPBHTML .= << HTML; //} $mem_info = json_encode( array( 'g_mem_info' => $this->memberData['g_mem_info'] ) ); $IPBHTML .= << //request['st']}"; ipb.vars['base_url'] = "{$this->settings['_base_url']}"; ipb.vars['front_url'] = "{$this->settings['board_url']}/index.php?"; ipb.vars['app_url'] = "{$this->settings['base_url']}"; ipb.vars['image_url'] = "{$this->settings['skin_app_url']}/images/"; ipb.vars['md5_hash'] = "{$this->member->form_hash}"; ipb.vars['is_touch'] = false; ipb.vars['member_group'] = {$mem_info}; /* ---- cookies ----- */ ipb.vars['cookie_id'] = '{$this->settings['cookie_id']}'; ipb.vars['cookie_domain'] = '{$this->settings['cookie_domain']}'; ipb.vars['cookie_path'] = '{$this->settings['cookie_path']}'; ipb.templates['close_popup'] = "x"; ipb.templates['page_jump'] = new Template("

{$this->lang->words['gl_pagejump']}

"); ipb.templates['ajax_loading'] = "
{$this->lang->words['gl_loading']}
"; //]]> id='ipboard_body' class='popupwindow'>
<%CONTENT%>
EOF; //--endhtml--// return $IPBHTML; } /** * Primary page wrapper - used for all full pages * * @access public * @param string Document character set * @param array CSS Files * @param string Global submenu HTML (@see global_menu_sub_navigation) * @param array Order of tabs * @return string HTML */ public function global_main_wrapper($IPS_DOC_CHAR_SET=IPS_DOC_CHAR_SET, $cssFiles=array(), $gbl_sub_menu='', $tabOrder=array() ) { $IPBHTML = ""; //--starthtml--// //$_encoded = base64_encode( $this->settings['query_string_safe'] ); $_url = str_replace( '&' , '&', $this->settings['query_string_safe'] ); $_url = preg_replace( '#&{1,}#', ';', $_url ); $_url = preg_replace( '#={1,}#', ':', $_url ); $_url = ltrim( $_url, ';' ); $_path = IPS_PUBLIC_SCRIPT; $year = date('Y'); /* Open Tab */ $__tabs = ( is_array( $this->member->acp_tab_data ) and count( $this->member->acp_tab_data ) ) ? "'" . implode( "','", array_keys( $this->member->acp_tab_data ) ) . "'" : ''; $_apptitle = ipsRegistry::$applications[ ipsRegistry::$current_application ]['app_title']; $defaultFakeApp = ''; $defaultFakeModule = ''; $curApp = array(); switch( ipsRegistry::$current_application ) { case 'forums': $curApp['forums'] = 'active'; break; case 'core': $curApp['core'] = 'active'; break; case 'members': $curApp['members'] = 'active'; break; default: $curApp['other'] = 'active'; break; } $fakeApps = $this->registry->output->fetchFakeApps(); foreach( $fakeApps as $fa => $data ) { foreach( $data as $appData ) { if ( ! $defaultFakeApp ) { $defaultFakeApp = $appData['app']; $defaultFakeModule = $appData['module']; } if ( $appData['app'] == ipsRegistry::$current_application && $appData['module'] == ipsRegistry::$current_module ) { $curApp = array(); $curApp[ $fa ] = 'active'; break 2; } } } if( !$this->settings['ipb_reg_number'] ) { $this->lang->words['license_missing_info'] = sprintf( $this->lang->words['license_missing_info'], $this->settings['base_url'] . 'app=core&module=tools&section=licensekey' ); $extra_class = 'force_license'; $license_html = <<

{$this->lang->words['license_missing_header']}

{$this->lang->words['license_missing_info']}

HTML; } else { $licenseData = $this->cache->getCache( 'licenseData' ); if( ( !$licenseData OR !$licenseData['key']['_expires'] OR $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW and $licenseData['key']['_expires'] != -1 ) AND !IPSCookie::get( 'ignore-license-notice' ) ) { $extra_class = 'expired_license'; $license_html = <<

{$this->lang->words['license_expired_header']}

{$this->lang->words['license_expired_info']}

HTML; } } $boardurl = ($this->registry->output->isHTTPS) ? $this->settings['board_url_https'] : $this->settings['board_url']; $IPBHTML .= << <%TITLE%> HTML; /** CSS ----------------------------------------- */ /*if ( $this->settings['use_minify'] ) { $_basics = CP_DIRECTORY . '/skin_cp/acp.css,' . CP_DIRECTORY . '/skin_cp/acp_editor.css'; $_others = ''; if ( is_array( $cssFiles['import'] ) AND count( $cssFiles['import'] ) ) { foreach( $cssFiles['import'] as $data ) { $_others .= ',' . preg_replace( "#^(.*)/(" . CP_DIRECTORY . "/.*)$#", "$2", $data['content'] ); } } $IPBHTML .= "\n\tsettings['public_dir']}min/index.php?ipbv={$this->registry->output->antiCacheHash}&f={$_basics}{$_others}\">\n"; } else {*/ $IPBHTML .= << @import url( "{$this->settings['skin_acp_url']}/acp.css?ipbv={$this->registry->output->antiCacheHash}" ); @import url( "{$this->settings['skin_acp_url']}/acp_editor.css?ipbv={$this->registry->output->antiCacheHash}" ); HTML; if( is_array($cssFiles['import']) AND count($cssFiles['import']) ) { foreach( $cssFiles['import'] as $data ) { $IPBHTML .= << EOF; } } //} $IPBHTML .= << HTML; if( IN_DEV ) { $IPBHTML .= << .ipsActionBar > ul > li.inDev { display: inline; } HTML; } if( is_array($cssFiles['inline']) AND count($cssFiles['inline']) ) { $IPBHTML .= << EOF; foreach( $cssFiles['inline'] as $data ) { $IPBHTML .= $data['content']; } $IPBHTML .= << EOF; } /** JS ----------------------------------------- */ /*if ( $this->settings['use_minify'] ) { $_others = ',' . CP_DIRECTORY . '/js/acp.js,' . CP_DIRECTORY . '/js/acp.' . implode('.js,' . CP_DIRECTORY . '/js/acp.', array( 'menu', 'tabs' ) ) . '.js'; if ( $this->settings['remote_load_js'] ) { $IPBHTML .= << HTML; } else { $IPBHTML .= <<registry->output->antiCacheHash}'> HTML; } $IPBHTML .= "\n\t\n"; } else { $IPBHTML .= "'>\n"; } } else {*/ $IPBHTML .= << HTML; //} /* SIDEBAR */ if( $this->settings['hide_sidebar'] || IPSCookie::get("acp_sidebar") == 'closed' ) { if( $this->settings['hide_sidebar'] ) { //$sidebar['toggle_class'] = "style='display: none'"; } $sidebar['content_class'] = "close_menu"; $sidebar['menu_style'] = "style='display: none'"; } else { $sidebar['content_class'] = "open_menu"; $sidebar['menu_style'] = ""; } $mem_info = json_encode( array( 'g_mem_info' => $this->memberData['g_mem_info'] ) ); $IPBHTML .= << {$license_html}
HTML; $IPBHTML .= $this->global_app_menu_html( $gbl_sub_menu, $tabOrder ); $IPBHTML .= <<
←
<%SIDEBAR_EXTRA%> <%MENU%>
<%NAV%> <%CONTENT%>
EOF; //--endhtml--// return $IPBHTML; } /** * Show a warning box * * @access public * @param string Title * @param string Content * @return string HTML */ public function warning_box($title="", $content="") { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$title}

{$content}
EOF; //--endhtml--// return $IPBHTML; } /** * Shows the debug query output at the bottom of the page * * @access public * @param string Queries to show * @return string HTML */ public function global_query_output($queries="") { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$this->lang->words['gbl_queries']}

{$queries}
EOF; //--endhtml--// return $IPBHTML; } /** * Shows the debug included files output at the bottom of the page * * @param int Number of files * @param string Files to show * @return string HTML */ public function global_if_output($count=0,$files="") { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$count} {$this->lang->words['gbl_inc_files']}

{$files}
EOF; //--endhtml--// return $IPBHTML; } /** * Shows the debug memory output at the bottom of the page * * @access public * @param string Memory to show * @param string Total memory used * @param string Peak memory used * @return string HTML */ public function global_memory_output($memory="", $total=0, $peak=0 ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$this->lang->words['gbl_memory']}

{$memory}
{$this->lang->words['ttlmemoryused']} {$total} ({$this->lang->words['peakmemoryused']} {$peak})
EOF; //--endhtml--// return $IPBHTML; } /** * Show the login form * * @access public * @param string Query string to remember * @param string Message to show * @param bool Replace the form (deprecated) * @param array Additional data to add to the form * @return string HTML */ public function log_in_form( $query_string="", $message="", $replace_form=false, $additional_data=array() ) { $IPBHTML = ""; //--starthtml--// $IPS_DOC_CHAR_SET = IPS_DOC_CHAR_SET; $publicDirectory = PUBLIC_DIRECTORY; $IPBHTML .= << <%TITLE%> HTML; /** CSS ----------------------------------------- */ /*if ( $this->settings['use_minify'] ) { $_basics = CP_DIRECTORY . '/skin_cp/acp.css,' . CP_DIRECTORY . '/skin_cp/acp_editor.css'; $IPBHTML .= "\n\tsettings['public_dir']}min/index.php?ipbv={$this->registry->output->antiCacheHash}&f={$_basics}\">\n"; } else {*/ $IPBHTML .= << @import url( "{$this->settings['skin_acp_url']}/acp.css?ipbv={$this->registry->output->antiCacheHash}" ); @import url( "{$this->settings['skin_acp_url']}/acp_editor.css?ipbv={$this->registry->output->antiCacheHash}" ); HTML; //} $IPBHTML .= << HTML; if( IN_DEV ) { $IPBHTML .= << .ipsActionBar > ul > li.inDev { display: inline; } HTML; } /** JS ----------------------------------------- */ /*if ( $this->settings['use_minify'] ) { $_others = ',' . CP_DIRECTORY . '/js/acp.js,' . CP_DIRECTORY . '/js/acp.' . implode('.js,' . CP_DIRECTORY . '/js/acp.', array( 'menu', 'tabs' ) ) . '.js'; $IPBHTML .= <<registry->output->antiCacheHash}'> HTML; } else {*/ $IPBHTML .= << HTML; //} $IPBHTML .= << //request['st']}"; ipb.vars['base_url'] = "{$this->settings['_base_url']}"; ipb.vars['front_url'] = "{$this->settings['board_url']}/index.php?"; ipb.vars['app_url'] = "{$this->settings['base_url']}"; ipb.vars['image_url'] = "{$this->settings['skin_app_url']}/images/"; ipb.vars['md5_hash'] = "{$this->member->form_hash}"; /* ---- cookies ----- */ ipb.vars['cookie_id'] = '{$this->settings['cookie_id']}'; ipb.vars['cookie_domain'] = '{$this->settings['cookie_domain']}'; ipb.vars['cookie_path'] = '{$this->settings['cookie_path']}'; ipb.templates['close_popup'] = "x"; ipb.templates['page_jump'] = new Template("

{$this->lang->words['gl_pagejump']}

"); ipb.templates['ajax_loading'] = "
{$this->lang->words['gl_loading']}
"; //]]> HTML; $extraClass = ( $message ) ? 'with_message' : ''; if( $replace_form ) { $IPBHTML .= $additional_data[0]; } else { $url = "{$this->settings['_base_url']}app=core&module=login&do=login-complete"; if ( $this->settings['logins_over_https'] ) { $url = str_replace( 'http://', 'https://', $url ); } $IPBHTML .= <<
HTML; if ( $message ) { $IPBHTML .= <<{$message}
HTML; } $IPBHTML .= << HTML; if( count($additional_data) > 0 ) { foreach( $additional_data as $form_html ) { $IPBHTML .= $form_html; } } $IPBHTML .= <<
HTML; $IPBHTML .= << HTML; } //--endhtml--// return $IPBHTML; } /** * Redirect hit for auto-redirecting pages (e.g. "recache all caches") * * @access public * @param string URL to send to * @param string Text to show * @param integer Number of seconds to wait * @return string HTML */ public function global_redirect_hit($url, $text="", $time=1) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << jsDebug = 0; USE_RTE = 0;

{$this->lang->words['gbl_page_redirecting']}

{$this->lang->words['page_will_refresh']} {$this->lang->words['refresh_dont_wait']}

{$text}
EOF; //--endhtml--// return $IPBHTML; } /** * Initialize global redirection javascript for AJAX redirecting * * @access public * @param string URL to redirect to * @param string Text to show * @param string Additional text to add * @return string HTML */ public function global_ajax_redirect_init($url='', $text='', $addtotext='') { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<
{$this->lang->words['gbl_initializing']}
EOF; //--endhtml--// return $IPBHTML; } /** * Global redirection completed page * * @access public * @param string Text to show * @return string HTML */ public function global_redirect_done($text='This function has now finished executing') { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << @import url( "{$this->settings['skin_acp_url']}/acp.css?ipbv={$this->registry->output->antiCacheHash}" );
{$text}
EOF; //--endhtml--// return $IPBHTML; } /** * General redirect page with message * * @access public * @param string URL to send to * @param integer Number of seconds to wait before redirecting * @param string Text to display * @return string HTML */ public function global_redirect_halt($url) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

{$this->lang->words['redirect_halt_title']}

{$this->registry->output->global_error}


EOF; $this->registry->output->global_error = ''; //--endhtml--// return $IPBHTML; } /** * Generate sub navigation menu for sidebar * * @access public * @param array Menu data * @return string HTML */ public function menu_sub_navigation( $menu ) { $main_html = array(); $IPBHTML = ""; //--starthtml--// if( is_array($menu[ ipsRegistry::$current_application ]) AND count($menu[ ipsRegistry::$current_application ]) ) { foreach( $menu[ ipsRegistry::$current_application ] as $id => $data ) { $links = ""; $_id = preg_replace( '/^\d+?_(.*)$/', "\\1", $id ); if ( $_id != ipsRegistry::$current_module ) { continue; } foreach( $data['items'] as $_id => $_data ) { $_url = ( $_data['url'] ) ? "&{$_data['url']}" : ""; $links .= << {$_data['title']} EOF; } if ( $links ) { $main_html[] = << EOF; } } } if ( is_array( $main_html ) AND count( $main_html ) ) { $IPBHTML .= << EOF; $IPBHTML .= implode( "
", $main_html ); $IPBHTML .= << EOF; } //--endhtml--// return $IPBHTML; } /** * Menu category wrapper for sidebar "categories" * * @access public * @param array Links to show * @param string Module (cleaned) * @param array Menu items to show * @return string HTML */ public function menu_cat_wrap( $links=array(), $clean_module="", $menu=array() ) { $IPBHTML = ""; $seen = 0; $titles = 0; //--starthtml--// foreach( $links as $app => $module ) { $IPBHTML .= "
    \n"; $_CHILD = ''; $_MENU = ''; foreach( $module as $data ) { $class = ''; if ( $app == ipsRegistry::$current_application AND $clean_module == $data['module'] ) { $class = 'active'; } if( isset( $menu[ $app ] ) && is_array( $menu[ $app ] ) ) { foreach( $menu[ $app ] as $id => $__data ) { //print_r($__data);exit; preg_match( '/^(\d+?)_(.*)$/', $id, $result ); if ( $result[2] != $data['module'] ) { continue; } /* Heres where we check whether this is a single item */ if( intval($result[1]) === 0 ) { $_single_item = true; $_count = 0; foreach( $menu[ $app ] as $__k => $__v ) { if ( preg_match( '/(\d+?)_' . $result[2] . "/", $__k ) ) { $_count++; } } if( $_count > 1 ) { $_single_item = false; } if( $_single_item ) { $_url = ( $__data['items'][0]['url'] ) ? "&{$__data['items'][0]['url']}" : ""; $_MENU .= <<
  • {$__data['title']}
  • EOF; continue(2); } } /* /end */ if ( count( $__data['items'] ) > 1 ) { $_CHILD .= << {$__data['items'][0]['title']}
      EOF; $_seen = 0; $seen_in_this_group = 0; foreach( $__data['items'] as $_id => $_data ) { $_seen++; if( $seen_in_this_group == 0 ) { $seen_in_this_group++; continue; } $_class = ''; $_url = ( $_data['url'] ) ? "&{$_data['url']}" : ""; if ( $_seen == count( $__data['items'] ) ) { $_class = 'last'; } $_CHILD .= <<{$_data['title']} EOF; } $_CHILD .= << EOF; ####### / MORE THAN 1 CHILD ITEM ####### } else { $_url = ( $__data['items'][0]['url'] ) ? "&{$__data['items'][0]['url']}" : ""; $_CHILD .= << {$__data['items'][0]['title']} EOF; } } if( $_CHILD ) { $_MENU .= <<
    • {$data['title']}
        {$_CHILD}
    • EOF; } $_CHILD = ''; } } $IPBHTML .= << EOF; } //--endhtml--// return $IPBHTML; } /** * Navigation HTML wrapper * * @access public * @param string Menu content * @return string HTML */ public function wrap_nav($content="") { $IPBHTML = ""; //--starthtml--// $IPBHTML .= << {$content} EOF; //--endhtml--// return $IPBHTML; } /** * Global informational message to display * * @access public * @return string HTML */ public function global_message() { $IPBHTML = ""; //--starthtml--// if( !$this->registry->getClass('output')->persistent_message ) { $IPBHTML .= << document.observe("dom:loaded", function(){ ipb.global.showInlineNotification( "{$this->registry->getClass('output')->global_message}", { showClose: false } ); }); EOF; } else { $IPBHTML .= << EOF; $IPBHTML .= $this->registry->getClass('output')->global_message; $IPBHTML .= <<
      EOF; } //--endhtml--// return $IPBHTML; } /** * Global error message to display * * @access public * @return string HTML */ public function global_error_message() { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

      {$this->lang->words['ipb_message']}

      {$this->registry->output->global_error}
      EOF; //--endhtml--// return $IPBHTML; } /** * Pagination wrapper * * @access public * @param array Work data * @param array Pagination data * @return string HTML */ public function paginationTemplate( $work, $data ) { $IPBHTML = ""; //--starthtml--// if( $work['pages'] > 1 ) { $IPBHTML .= << EOF; if( !$data['noDropdown'] ) { $IPBHTML .= << + EOF; } if( 1 < ($work['current_page'] - $data['dotsSkip']) ) { $IPBHTML .= <<{$this->lang->words['_laquo']} {$this->lang->words['tpl_isfirst']} EOF; } if( $work['current_page'] > 1 ) { $stkey = intval( $data['currentStartValue'] - $data['itemsPerPage'] ); $IPBHTML .= << EOF; } if( count($work['_pageNumbers']) AND is_array($work['_pageNumbers']) ) { foreach( $work['_pageNumbers'] as $_real => $_page ) { if( $_real == $data['currentStartValue'] ) { $IPBHTML .= <<{$_page} EOF; } else { $IPBHTML .= <<{$_page} EOF; } } } if( $work['current_page'] < $work['pages'] ) { $stkey = intval( $data['currentStartValue'] + $data['itemsPerPage'] ); $IPBHTML .= << EOF; } if( !empty( $work['_showEndDots'] ) ) { $stkey = intval( ( $work['pages'] - 1 ) * $data['itemsPerPage'] ); $IPBHTML .= <<{$this->lang->words['tpl_islast']} {$this->lang->words['_raquo']} EOF; } $_tplpages = sprintf( $this->lang->words['tpl_pages_acp'], $work['current_page'], $work['pages'] ); $IPBHTML .= <<({$_tplpages})
    EOF; } else { $IPBHTML .= <<{$this->lang->words['page_1_of_1']} EOF; } //--endhtml--// return $IPBHTML; } /** * System error page * * @access public * @param string Error message to show * @param integer Error code * @param string Error title * @param string Document character set * @return string HTML */ public function system_error( $msg, $code=0, $title='', $IPS_DOC_CHAR_SET=IPS_DOC_CHAR_SET ) { $title = !empty( $title ) ? $title : $this->lang->words['gbl_system_error']; if( $code ) { $finalMessage = "[#{$code}] " . ( is_array( $msg ) ? implode( "
    ", $msg ) : $msg ); } else { $finalMessage = is_array( $msg ) ? implode( "
    ", $msg ) : $msg; } $HTML .= <<

    {$title}

    {$finalMessage}


    EOF; return $HTML; } /** * HTML for quick help popup boxes * * @access public * @param string Title * @param string Help contents * @return string HTML */ public function quickHelp( $title, $body ) { $IPBHTML = ""; //--starthtml--// $IPBHTML .= <<

    {$title}

    {$body}
    EOF; //--endhtml--// return $IPBHTML; } }