/system/cp/cp.display.php
PHP | 3140 lines | 2947 code | 82 blank | 111 comment | 40 complexity | a6e7f9362613cb21d07f7151170df47c MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php
- /*
- =====================================================
- ExpressionEngine - by EllisLab
- -----------------------------------------------------
- http://expressionengine.com/
- -----------------------------------------------------
- Copyright (c) 2003 - 2010 EllisLab, Inc.
- =====================================================
- THIS IS COPYRIGHTED SOFTWARE
- PLEASE READ THE LICENSE AGREEMENT
- http://expressionengine.com/docs/license.html
- =====================================================
- File: cp.display.php
- -----------------------------------------------------
- Purpose: This class provides all the HTML dispaly
- elements used in the control panel.
- =====================================================
- */
- if ( ! defined('EXT'))
- {
- exit('Invalid file request');
- }
- class Display {
-
-
- var $publish_nav = 'hover'; // The PUBLISH tab drop down menu behavior. Either 'click' or 'hover'
- var $sites_nav = 'hover'; // The PUBLISH tab drop down menu behavior. Either 'click' or 'hover'
- var $title = ''; // Page title
- var $body = ''; // Main content area
- var $crumb = ''; // Breadcrumb.
- var $rcrumb = ''; // Right side breadcrumb
- var $crumbline = FALSE; // Assigns whether to show the line below the breadcrumb
- var $show_crumb = TRUE; // Assigns whether to show the breadcrumb
- var $crumb_ov = FALSE; // Crumb Override. Will prevent the "M" variable from getting auto-linked
- var $refresh = FALSE; // If set to a URL, the header will contain a <meta> refresh
- var $ref_rate = 0; // Rate of refresh
- var $url_append = ''; // This variable lets us globally append something onto URLs
- var $body_props = ''; // Code that can be addded the the <body> tag
- var $initial_body = ''; // We can manually add things just after the <body> tag.
- var $extra_css = ''; // Additional CSS that we can fetch from a different file. It gets added to the main CSS request.
- var $manual_css = ''; // Additional CSS that we can generate manually. It gets added to the main CSS request.
- var $extra_header = ''; // Additional headers we can add manually
- var $rcrumb_css = 'breadcrumbRight'; // The default CSS used in the right breadcrumb
- var $padding_tabs = 'clear'; // on/off/clear - The navigation tabs have an extra cell on the left and right side to provide padding. This determis how it should be displayed. It interacts with this variable, which is placed in the CSS file: {padding_tabs ="clear"}
- var $empty_menu = FALSE; // Is the Publish weblog menu empty?
-
- var $view_path = ''; // path to view files, set to the current addon's path
- var $cached_vars = array(); // array of cached view variables
-
- /** -------------------------------------
- /** Constructor
- /** -------------------------------------*/
-
- function Display()
- {
- global $PREFS;
-
- if ( ! defined('AMP')) define('AMP', '&');
- if ( ! defined('BR')) define('BR', '<br />');
- if ( ! defined('NL')) define('NL', "\n");
- if ( ! defined('NBS')) define('NBS', " ");
-
- $this->sites_nav = (in_array($PREFS->ini('sites_tab_behavior'), array('click', 'hover', 'none'))) ? $PREFS->ini('sites_tab_behavior') : $this->sites_nav;
- $this->publish_nav = (in_array($PREFS->ini('publish_tab_behavior'), array('click', 'hover', 'none'))) ? $PREFS->ini('publish_tab_behavior') : $this->publish_nav;
- // allows views to be loaded with identical syntax to 2.x within view files, e.g. $this->load->view('foo');
- $this->load =& $this;
- }
- /* END */
- /** -------------------------------------
- /** Allows the use of View files to construct output
- /** -------------------------------------*/
- function view($view, $vars = array(), $return = FALSE, $path = '')
- {
- global $DSP, $FNS, $LANG, $LOC, $PREFS, $REGX, $SESS;
- // Set the path to the requested file
- if ($path == '')
- {
- $ext = pathinfo($view, PATHINFO_EXTENSION);
- $file = ($ext == '') ? $view.EXT : $view;
- $path = $this->view_path.$file;
- }
- else
- {
- $x = explode('/', $path);
- $file = end($x);
- }
- if ( ! file_exists($path))
- {
- trigger_error('Unable to load the requested file: '.$file);
- return FALSE;
- }
-
- /*
- * Extract and cache variables
- *
- * You can either set variables using the dedicated $this->load_vars()
- * function or via the second parameter of this function. We'll merge
- * the two types and cache them so that views that are embedded within
- * other views can have access to these variables.
- */
- if (is_array($vars))
- {
- $this->cached_vars = array_merge($this->cached_vars, $vars);
- }
- extract($this->cached_vars);
- /*
- * Buffer the output
- *
- * We buffer the output for two reasons:
- * 1. Speed. You get a significant speed boost.
- * 2. So that the final rendered template can be
- * post-processed by the output class. Why do we
- * need post processing? For one thing, in order to
- * show the elapsed page load time. Unless we
- * can intercept the content right before it's sent to
- * the browser and then stop the timer it won't be accurate.
- */
- ob_start();
-
- // If the PHP installation does not support short tags we'll
- // do a little string replacement, changing the short tags
- // to standard PHP echo statements.
-
- if ((bool) @ini_get('short_open_tag') === FALSE)
- {
- echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($path))));
- }
- else
- {
- include($path); // include() vs include_once() allows for multiple views with the same name
- }
- // Return the file data if requested
- if ($return === TRUE)
- {
- $buffer = ob_get_contents();
- ob_end_clean();
- return $buffer;
- }
- /*
- * Flush the buffer... or buff the flusher?
- *
- * In order to permit views to be nested within
- * other views, we need to flush the content back out whenever
- * we are beyond the first level of output buffering so that
- * it can be seen and included properly by the first included
- * template and any subsequent ones. Oy!
- *
- */
- if (ob_get_level() > 1)
- {
- ob_end_flush();
- }
- else
- {
- $buffer = ob_get_contents();
- ob_end_clean();
- return $buffer;
- }
- }
- /* END */
-
-
- /** -------------------------------------
- /** Set return data
- /** -------------------------------------*/
-
- function set_return_data($title = '', $body = '', $crumb = '', $rcrumb = '')
- {
- $this->title = $title;
- $this->body = $body;
- $this->crumb = $crumb;
- $this->rcrumb = $rcrumb;
- }
- /* END */
-
-
- /** -------------------------------------
- /** Group Access Verification
- /** -------------------------------------*/
- function allowed_group($which = '')
- {
- global $SESS;
-
- if ($which == '')
- {
- return FALSE;
- }
- // Super Admins always have access
-
- if ($SESS->userdata['group_id'] == 1)
- {
- return TRUE;
- }
-
- if ( !isset($SESS->userdata[$which]) OR $SESS->userdata[$which] !== 'y')
- return FALSE;
- else
- return TRUE;
- }
- /* END */
-
- /** -------------------------------------
- /** Control panel
- /** -------------------------------------*/
- function show_full_control_panel()
- {
- global $OUT, $EXT, $FNS;
-
- // -------------------------------------------
- // 'show_full_control_panel_start' hook.
- // - Full Control over CP
- // - Modify any $DSP class variable (JS, headers, etc.)
- // - Override any $DSP method and use their own
- //
- $edata = $EXT->call_extension('show_full_control_panel_start');
- if ($EXT->end_script === TRUE) return;
- //
- // -------------------------------------------
-
- $out = $this->html_header()
- .$this->page_header()
- .$this->page_navigation()
- .$this->breadcrumb()
- .$this->content()
- .$this->content_close()
- .$this->copyright()
- .$this->html_footer();
-
- $out = $FNS->insert_action_ids($out);
-
- // -------------------------------------------
- // 'show_full_control_panel_end' hook.
- // - Rewrite CP's HTML
- // - Find/Replace Stuff, etc.
- //
- if ($EXT->active_hook('show_full_control_panel_end') === TRUE)
- {
- $out = $EXT->universal_call_extension('show_full_control_panel_end', $out);
- if ($EXT->end_script === TRUE) return;
- }
- //
- // -------------------------------------------
-
- $OUT->build_queue($out);
- }
- /* END */
- /** -------------------------------------
- /** Show restricted version of CP
- /** -------------------------------------*/
- function show_restricted_control_panel()
- {
- global $IN, $OUT, $SESS, $FNS;
-
- $r = $this->html_header();
-
- // We treat the bookmarklet as a special case
- // and show the navigation links in the top right
- // side of the page
-
- if ($IN->GBL('BK') AND $SESS->userdata['admin_sess'] == 1)
- {
- $r .= $this->page_header(0);
- }
- else
- {
- $r .= $this->simple_header('helpLinksLeft');
- }
-
- $r .= $this->content(TRUE);
- $r .= $this->content_close();
- $r .= $this->html_footer();
-
- $r = $FNS->insert_action_ids($r);
-
- $OUT->build_queue($r);
- }
- /* END */
- /** -------------------------------------
- /** Show "login" version of CP
- /** -------------------------------------*/
- function show_login_control_panel()
- {
- global $IN, $OUT, $SESS;
-
- $this->secure_hash();
-
- $r = $this->html_header()
- .$this->simple_header()
- .$this->body
- .$this->copyright()
- .$this->html_footer();
-
- $OUT->build_queue($r);
- }
- /* END */
-
-
- /** -------------------------------------
- /** HTML Header
- /** -------------------------------------*/
- function html_header($title = '')
- {
- global $PREFS;
-
- if ($title == '')
- $title = $this->title;
-
- $header =
- "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n".
- "<html>\n".
- "<head>\n".
- "<title>$title | ".APP_NAME."</title>\n\n".
- "<meta http-equiv='content-type' content='text/html; charset=".$PREFS->ini('charset')."' >\n".
- "<meta http-equiv='expires' content='-1' >\n".
- "<meta http-equiv='expires' content='Mon, 01 Jan 1970 23:59:59 GMT' >\n".
- "<meta http-equiv='pragma' content='no-cache' >\n";
-
- if ($this->refresh !== FALSE)
- {
- $header .= "<meta http-equiv=\"refresh\" content=\"".$this->ref_rate."; url=".$this->refresh."\" >\n";
- }
-
- // Change CSS on the click so it works like the hover until they unclick?
-
- $tab_behaviors = array(
- 'publish_tab_selector' => ($PREFS->ini('publish_tab_behavior') == 'hover') ? 'hover' : 'active',
- 'publish_tab_display' => ($PREFS->ini('publish_tab_behavior') == 'none') ? '' : 'display:block; visibility: visible;',
- 'publish_tab_ul_display' => ($PREFS->ini('publish_tab_behavior') == 'none') ? '' : 'display:none;',
- 'sites_tab_selector' => ($PREFS->ini('sites_tab_behavior') == 'hover') ? 'hover' : 'active',
- 'sites_tab_display' => ($PREFS->ini('sites_tab_behavior') == 'none') ? '' : 'display:block; visibility: visible;',
- 'sites_tab_ul_display' => ($PREFS->ini('sites_tab_behavior') == 'none') ? '' : 'display:none;'
- );
-
- $stylesheet = $this->fetch_stylesheet();
-
- foreach ($tab_behaviors as $key => $val)
- {
- $stylesheet = str_replace(LD.$key.RD, $val, $stylesheet);
- }
-
- $header .=
-
- "<style type='text/css'>\n".
- $stylesheet."\n\n".
- $this->manual_css.
- "</style>\n\n".
- $this->_menu_js().
- $this->_global_javascript().
- $this->extra_header.
- "</head>\n\n".
- "<body{$this->body_props}>\n".
- $this->initial_body."\n";
-
- return $header;
- }
- /* END */
-
-
-
- /** -------------------------------------
- /** Fetch CSS Stylesheet
- /** -------------------------------------*/
- function fetch_stylesheet()
- {
- global $PREFS, $OUT, $SESS, $LANG;
-
- $cp_theme = (! isset($SESS->userdata['cp_theme']) || $SESS->userdata['cp_theme'] == '') ? $PREFS->ini('cp_theme') : $SESS->userdata['cp_theme'];
-
- $path = ( ! is_dir('./cp_themes/')) ? PATH_CP_THEME : './cp_themes/';
-
- if ( ! $theme = $this->file_open($path.$cp_theme.'/'.$cp_theme.'.css'))
- {
- if ( ! $theme = $this->file_open($path.'default/default.css'))
- {
- return '';
- }
- }
-
- if ($this->extra_css != '')
- {
- if ($extra = $this->file_open($this->extra_css))
- {
- $theme .= NL.NL.$extra;
- }
- }
-
- // Set the value of the "padding tabs" based on
- // a variable (that might be) contained in the CSS file
-
- if (preg_match("/\{padding_tabs\s*=\s*['|\"](.+?)['|\"]\}/", $theme, $match))
- {
- $this->padding_tabs = $match['1'];
- $theme = str_replace($match['0'], '', $theme);
- }
-
- // Remove comments and spaces from CSS file
- $theme = preg_replace("/\/\*.*?\*\//s", '', $theme);
- $theme = preg_replace("/\}\s+/s", "}\n", $theme);
-
- // Replace the {path:image_url} variable.
-
- $img_path = $PREFS->ini('theme_folder_url', 1).'cp_themes/'.$cp_theme.'/images/';
- $theme = str_replace('{path:image_url}', $img_path, $theme);
- return $theme;
- }
- /* END */
-
-
- /** -------------------------------------
- /** File Opener
- /** -------------------------------------*/
- function file_open($file)
- {
- if ( ! $fp = @fopen($file, 'rb'))
- {
- return FALSE;
- }
-
- flock($fp, LOCK_SH);
-
- $f = '';
-
- if (filesize($file) > 0)
- {
- $f = fread($fp, filesize($file));
- }
- flock($fp, LOCK_UN);
- fclose($fp);
-
- return $f;
- }
- /* END */
-
-
- /** -------------------------------------
- /** Page Header
- /** -------------------------------------*/
- function page_header($header = TRUE)
- {
- global $IN, $LANG, $SESS, $FNS, $PREFS;
-
- $qm = ($PREFS->ini('force_query_string') == 'y') ? '' : '?';
-
- $r = "<div id='topBar'>\n"
- .$this->table('', '', '0', '100%')
- .$this->tr()
- .$this->td('helpLinks')
- .$this->div('helpLinksLeft')
- .$this->anchor($FNS->fetch_site_index().$qm.'URL=http://expressionengine.com/', APP_NAME.$this->nbs(2).'v '.APP_VER)
- .$this->div_c()
- .$this->td_c()
- .$this->td('helpLinks');
-
- $r .= $this->anchor(BASE.AMP.'C=myaccount'.AMP.'M=quicklinks'.AMP.'id='.$SESS->userdata('member_id'),
- "<img src='".PATH_CP_IMG."edit_quicklinks.png' border='0' width='16' height='16' style='vertical-align: bottom;' alt='".$LANG->line('edit_quicklinks')."' />")
- .$this->nbs(3);
-
- $r .= $this->fetch_quicklinks();
- $doc_path = rtrim($PREFS->ini('doc_url'), '/').'/';
-
- $r .= $this->anchor(BASE, $LANG->line('main_menu')).$this->nbs(3).'|'.$this->nbs(3)
- ."<a href='".$doc_path."' target='_blank'>".$LANG->line('user_guide').'</a>'.$this->nbs(3).'|'.$this->nbs(3)
- .$this->anchor(BASE.AMP.'C=logout', $LANG->line('logout')).$this->nbs(3).'|'.$this->nbs(3);
-
- $r .= $this->anchor(BASE.AMP.'C=myaccount'.AMP.'M=tab_manager'.$this->generate_quick_tab(), $LANG->line('new_tab'))
- .$this->td_c()
- .$this->tr_c()
- .$this->table_c()
- .$this->div_c();
-
- if ($header != 0)
- $r .= "<div id='header'></div>\n";
- return $r;
- }
- /* END */
-
-
- /** -------------------------------------
- /** Quicklinks
- /** -------------------------------------*/
- function fetch_quicklinks()
- {
- global $SESS, $FNS, $PREFS;
-
- if ( ! isset($SESS->userdata['quick_links']) || $SESS->userdata['quick_links'] == '')
- {
- return '';
- }
-
- $r = '';
-
- foreach (explode("\n", $SESS->userdata['quick_links']) as $row)
- {
- $x = explode('|', $row);
-
- $title = (isset($x['0'])) ? $x['0'] : '';
- $link = (isset($x['1'])) ? $x['1'] : '';
-
- $qm = ($PREFS->ini('force_query_string') == 'y') ? '' : '?';
-
- $r .= $this->anchor($FNS->fetch_site_index().$qm.'URL='.$link, $this->html_attribute_prep($title), '', 1).$this->nbs(3).'|'.$this->nbs(3);
-
- }
-
- return $r;
- }
- /* END */
- /** -------------------------------------
- /** Quck Tabs
- /** -------------------------------------*/
- function fetch_quicktabs()
- {
- global $SESS, $FNS, $PREFS;
-
- $tabs = array();
-
- if ( ! isset($SESS->userdata['quick_tabs']) || $SESS->userdata['quick_tabs'] == '')
- {
- return $tabs;
- }
-
- foreach (explode("\n", $SESS->userdata['quick_tabs']) as $row)
- {
- $x = explode('|', $row);
-
- $title = (isset($x['0'])) ? $x['0'] : '';
- $link = (isset($x['1'])) ? $x['1'] : '';
-
- $tabs[] = array($title, $link);
- }
-
- return $tabs;
- }
- /* END */
- /** -------------------------------------
- /** Create the "quick add" link
- /** -------------------------------------*/
-
- function generate_quick_tab()
- {
- global $IN, $SESS;
-
- $link = '';
- $linkt = '';
- if ($IN->GBL('M') != 'tab_manager' AND $IN->GBL('M') != '')
- {
- foreach ($_GET as $key => $val)
- {
- if ($key == 'S')
- continue;
-
- $link .= $key.'--'.$val.'/';
- }
-
- $link = substr($link, 0, -1);
- }
-
- // Does the link already exist as a tab?
- // If so, we'll make the link blank so that the
- // tab manager won't let the user create another tab.
-
- $show_link = TRUE;
-
- if (isset($SESS->userdata['quick_tabs']) AND $SESS->userdata['quick_tabs'] != '')
- {
- $newlink = '|'.str_replace('/', '&', str_replace('--', '=', $link)).'|';
-
- if (strpos($SESS->userdata['quick_tabs'], $newlink))
- {
- $show_link = FALSE;
- }
- }
-
- // We do not normally allow semicolons in GET variables, so we protect it
- // in this rare instance.
- $tablink = ($link != '' AND $show_link == TRUE) ? AMP.'link='.$link.AMP.'linkt='.base64_encode($this->title) : '';
-
- return $tablink;
- }
- /* END */
-
-
- /** -------------------------------------
- /** Simple version of the Header
- /** -------------------------------------*/
- function simple_header($class ='loginLogo')
- {
- global $LANG, $PREFS;
-
- return
-
- "<div id='topBar'>\n"
- .$this->table('', '', '0', '100%')
- .$this->table_qrow('helpLinks', $this->qdiv($class, $this->nbs(2).APP_NAME.$this->nbs(2).'v '.APP_VER))
- .$this->table_c()
- .$this->div_c()
- ."<div id='simpleHeader'></div>\n";
- }
- /* END */
- /** -------------------------------------
- /** Equalize Text
- /** -------------------------------------*/
- // This function lets us "equalize" the text length by adding non-breaking spaces
- // before/after each line so that they all match. This enables the
- // navigation buttons to have the same length. The function must be passed an
- // associative array
-
- function equalize_text($text = array())
- {
- $longest = 0;
-
- foreach ($text as $val)
- {
- $val = strlen($val);
-
- if ($val > $longest)
- $longest = $val;
- }
-
- foreach ($text as $key => $val)
- {
- $i = $longest - strlen($val);
-
- $i = ceil($i/2);
-
- $val = $this->nbs($i).$val.$this->nbs($i);
-
- $text[$key] = $val;
- }
-
- return $text;
- }
- /* END */
-
- /** -------------------------------------
- /** Main control panel navigation
- /** -------------------------------------*/
- function page_navigation()
- {
- global $IN, $DB, $SESS, $LANG, $EXT, $PREFS;
-
- /* -------------------------------------------
- /* 'cp_display_page_navigation' hook.
- /* - Take control of the Control Panel's top navigation
- /* - Added 1.5.0
- */
- $r = $EXT->universal_call_extension('cp_display_page_navigation', $this);
- if ($EXT->end_script === TRUE) return $r;
- /*
- // -------------------------------------------*/
-
-
- $C = ($IN->GBL('class_override', 'GET') == '') ? $IN->GBL('C') : $IN->GBL('class_override', 'GET') ;
-
- // First we'll gather the navigation menu text in the selected language.
-
- $text = array( 'sites' => $LANG->line('sites'),
- 'publish' => $LANG->line('publish'),
- 'edit' => $LANG->line('edit'),
- 'design' => $LANG->line('design'),
- 'communicate' => $LANG->line('communicate'),
- 'modules' => $LANG->line('modules'),
- 'my_account' => $LANG->line('my_account'),
- 'admin' => $LANG->line('admin')
- );
-
- if ($PREFS->ini('multiple_sites_enabled') !== 'y')
- {
- unset($text['sites']);
- }
-
- // Fetch the custom tabs if there are any
-
- $quicktabs = $this->fetch_quicktabs();
-
- // Set access flags
-
- $cells = array(
- 's_lock' => 'can_access_sites',
- 'p_lock' => 'can_access_publish',
- 'e_lock' => 'can_access_edit',
- 'd_lock' => 'can_access_design',
- 'c_lock' => 'can_access_comm',
- 'm_lock' => 'can_access_modules',
- 'a_lock' => 'can_access_admin'
- );
-
- // Dynamically set the table width based on the number
- // of tabs that will be shown.
-
- $tab_total = sizeof($text) + count($quicktabs); // Total possible tabs
- $width_base = floor(80/$tab_total); // Width of each tab
- $width_pad = 98;
- foreach ($cells as $key => $val)
- {
- if ($key == 's_lock' && $PREFS->ini('multiple_sites_enabled') == 'y' && sizeof($SESS->userdata('assigned_sites')) > 0)
- {
- $$key = 0;
- }
- elseif ( ! $this->allowed_group($val))
- {
- $$key = 1;
- $width_pad -= $width_base;
- $tab_total--;
- }
- else
- {
- $$key = 0;
- }
- }
-
- if ($tab_total < 6)
- {
- $width = ($tab_total <= 0) ? 0 : ceil($width_pad/$tab_total);
- $width_pad = floor(100-$width_pad);
- }
- else
- {
- $width = ceil(96/$tab_total);
- $width_pad = 0;
- }
-
- /*
-
- Does a custom tab need to be highlighted?
- Since users can have custom tabs we need to highlight them when the page is
- accessed. However, when we do, we need to prevent any of the default tabs
- from being highlighted. Say, for example, that someone creates a tab pointing
- to the Photo Gallery. When that tab is accessed it needs to be highlighted (obviously)
- but we don't want the MODULES tab to also be highlighted or it'll look funny.
- Since the Photo Gallery is within the MODULES tab it'll hightlight itself automatically.
- So... we'll use a variable called: $highlight_override
- When set to TRUE, this variable turns off all default tabs.
- The following code blasts thorough the GET variables to see if we have
- a custom tab to show. If we do, we'll highlight it, and turn off
- all the other tabs.
- */
-
- $highlight_override = FALSE;
-
- $tabs = '';
- $tabct = 1;
- if (count($quicktabs) > 0)
- {
- foreach ($quicktabs as $val)
- {
- $gkey = '';
- $gval = '';
- if (strpos($val['1'], '&'))
- {
- $x = explode('&', $val['1']);
-
- $i = 1;
- foreach ($x as $v)
- {
- $z = explode('=', $v);
- if (isset($_GET[$z['0']]))
- {
- if ($_GET[$z['0']] != $z['1'])
- {
- $gkey = '';
- $gval = '';
- break;
- }
- elseif (count($x)+1 == count($_GET))
- {
- $gkey = $z['0'];
- $gval = $z['1'];
- }
- }
- }
- }
- elseif (strpos($val['1'], '='))
- {
- $z = explode('=', $v);
-
- if (isset($_GET[$z['0']]))
- {
- $gkey = $z['0'];
- $gval = $z['1'];
- }
- }
-
- $tab_nav_on = FALSE;
-
- if (isset($_GET[$gkey]) AND $_GET[$gkey] == $gval)
- {
- $highlight_override = TRUE;
- $tab_nav_on = TRUE;
- }
-
- $linktext = ( ! isset($text[$val['0']])) ? $val['0'] : $text[$val['0']];
- $linktext = $this->clean_tab_text($linktext);
-
- $tabid = 'tab'.$tabct;
- $tabct ++;
-
- if ($tab_nav_on == TRUE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.$val['1'].'\');"';
- $tabs .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $linktext);
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.$val['1'].'\');" onmouseover="navTabOn(\''.$tabid.'\');" onmouseout="navTabOff(\''.$tabid.'\');" ';
- $tabs .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', $tabid).$linktext.$this->div_c();
- }
-
- $tabs .= $this->anchor(BASE.AMP.$val['1'], $div);
- $tabs .= $this->td_c();
- }
- }
-
-
- $r = '';
-
- /** -------------------------------------
- /** Create Navigation Tabs
- /** -------------------------------------*/
-
- // Define which nav item to show based on the group
- // permission settings and render the finalized navigaion
-
-
- $r .= $this->table('', '0', '0', '100%')
- .$this->tr();
-
- if ($this->padding_tabs != 'off')
- {
- $r .= $this->td('navCell');
-
- if ($this->padding_tabs == 'clear')
- {
- $r .= $this->nbs();
- }
- else
- {
- $r .= $this->div('cpNavOff')
- .$this->nbs()
- .$this->div_c();
- }
-
- $r .= $this->td_c().NL.NL;
- }
-
- /** -------------------------------------
- /** Sites Tab
- /** -------------------------------------*/
-
- if ($s_lock == 0 && sizeof($SESS->userdata('assigned_sites')) > 0 && $PREFS->ini('multiple_sites_enabled') == 'y')
- {
- if ($this->sites_nav == 'click' && sizeof($SESS->userdata['assigned_sites']) > 0)
- {
- $js = ' onclick="dropdownmenu(\'sitesdropmenu\');return false;"';
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=admin'.AMP.'M=site_admin'.AMP.'P=sites_list'.'\');"';
- }
-
- if ($C == 'sites' AND $highlight_override == FALSE)
- {
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['sites']));
- }
- else
- {
- $div = $this->div('cpNavOff', '', 'sites').$this->clean_tab_text($text['sites']).$this->div_c();
- }
-
- $page = '';
-
- foreach ($_GET as $key => $val)
- {
- // Remove the Session and Update segments
- if ($key == 'S' OR $key == 'U' OR strlen($key) > 1 OR stristr($val, 'update_'))
- {
- continue;
- }
-
- $page .= $key.'='.$val.'|';
- }
-
- if ($page != '')
- {
- $page = AMP."page=".str_replace('=', '_', base64_encode($page));
- }
-
- if (sizeof($SESS->userdata['assigned_sites']) > 0)
- {
- $div .= '<ul id="sitesdropmenu">';
-
- foreach($SESS->userdata['assigned_sites'] as $site_id => $site_label)
- {
- $div .= "<li class='sitesdropmenuinner'><a href='".BASE.AMP."C=sites".AMP."site_id=".$site_id.$page."' title='".$this->html_attribute_prep($site_label)."' onclick='location.href=this.href;'>".$this->html_attribute_prep($site_label)."</a></li>";
- }
-
- if ($this->allowed_group('can_admin_sites'))
- {
- $div .= "<li class='publishdropmenuinner'><a href='".BASE.AMP."C=admin".AMP."M=site_admin".AMP."P=sites_list' title='".$LANG->line('edit_sites')."' onclick='location.href=this.href;'><em>» ".$LANG->line('edit_sites')."</em></a></li>";
- }
-
- $div .= "</ul>";
- }
-
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $r .= $this->anchor(BASE.AMP.'C=sites', $div);
- $r .= $this->td_c().NL.NL;
-
- $r .= $this->td('navCell');
-
- if ($this->padding_tabs == 'clear')
- {
- $r .= $this->nbs();
- }
- else
- {
- $r .= $this->div('cpNavOff')
- .$this->nbs()
- .$this->div_c();
- }
-
- $r .= $this->td_c().NL.NL;
- }
-
- /** -------------------------------------
- /** Publish Tab
- /** -------------------------------------*/
-
- // Define which nav item to show based on the group
- // permission settings and render the finalized navigaion
-
- if ($p_lock == 0)
- {
- if ($this->publish_nav == 'click' && sizeof($SESS->userdata['assigned_weblogs']) > 0)
- {
- $js = ' onclick="dropdownmenu(\'publishdropmenu\');return false;"';
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=publish'.'\');"';
- }
-
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
-
- if ($C == 'publish' AND $highlight_override == FALSE)
- {
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['publish']));
- }
- else
- {
- $div = $this->div('cpNavOff', '', 'publish').$this->clean_tab_text($text['publish']).$this->div_c();
- }
-
- if (sizeof($SESS->userdata['assigned_weblogs']) > 0)
- {
- $div .= '<ul id="publishdropmenu">';
-
- foreach($SESS->userdata['assigned_weblogs'] as $weblog_id => $weblog_label)
- {
- $div .= "<li class='publishdropmenuinner'><a href='".BASE.AMP."C=publish".AMP."M=entry_form".AMP."weblog_id=".$weblog_id."' title='".$this->html_attribute_prep($weblog_label)."' onclick='location.href=this.href;'>".$this->html_attribute_prep($weblog_label)."</a></li>";
- }
-
- if ($this->allowed_group('can_admin_weblogs'))
- {
- $div .= "<li class='publishdropmenuinner'><a href='".BASE.AMP."C=admin".AMP."M=blog_admin".AMP."P=blog_list' title='".$LANG->line('edit_weblogs')."' onclick='location.href=this.href;'><em>» ".$LANG->line('edit_weblogs')."</em></a></li>";
- }
-
- $div .= "</ul>";
- }
-
-
- $r .= $this->anchor(BASE.AMP.'C=publish', $div);
- $r .= $this->td_c().NL.NL;
- }
-
- /** -------------------------------------
- /** Edit Tab
- /** -------------------------------------*/
-
- if ($e_lock == 0)
- {
- if ($C == 'edit' AND $highlight_override == FALSE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=edit'.'\');"';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['edit']));
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=edit'.'\');" onmouseover="navTabOn(\'edit\');" onmouseout="navTabOff(\'edit\');" ';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', 'edit').$this->clean_tab_text($text['edit']).$this->div_c();
- }
-
- $r .= $this->anchor(BASE.AMP.'C=edit', $div);
- $r .= $this->td_c().NL.NL;
- }
-
-
- /** -------------------------------------
- /** Custom Tabs
- /** -------------------------------------*/
-
- $r .= $tabs;
-
- if ($d_lock == 0)
- {
- if ($C == 'templates' AND $highlight_override == FALSE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=templates'.'\');"';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['design']));
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=templates'.'\');" onmouseover="navTabOn(\'design\');" onmouseout="navTabOff(\'design\');" ';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', 'design').$this->clean_tab_text($text['design']).$this->div_c();
- }
-
- $r .= $this->anchor(BASE.AMP.'C=templates', $div);
- $r .= $this->td_c();
- }
-
- if ($c_lock == 0)
- {
- if ($C == 'communicate' AND $highlight_override == FALSE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=communicate'.'\');"';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['communicate']));
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=communicate'.'\');" onmouseover="navTabOn(\'communicate\');" onmouseout="navTabOff(\'communicate\');" ';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', 'communicate').$this->clean_tab_text($text['communicate']).$this->div_c();
- }
-
- $r .= $this->anchor(BASE.AMP.'C=communicate', $div);
- $r .= $this->td_c();
- }
-
- if ($m_lock == 0)
- {
- if ($C == 'modules' AND $highlight_override == FALSE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=modules'.'\');"';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['modules']));
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=modules'.'\');" onmouseover="navTabOn(\'modules\');" onmouseout="navTabOff(\'modules\');" ';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', 'modules').$this->clean_tab_text($text['modules']).$this->div_c();
- }
-
- $r .= $this->anchor(BASE.AMP.'C=modules', $div);
- $r .= $this->td_c();
- }
-
-
- // We only want the "MY ACCOUNT" tab highlighted if
- // the profile being viewed belongs to the logged in user
-
- $tab = $this->div('cpNavOff');
- if ($C == 'myaccount')
- {
- $id = ( ! $IN->GBL('id', 'GP')) ? $SESS->userdata('member_id') : $IN->GBL('id', 'GP');
-
- if ($id != $SESS->userdata('member_id'))
- {
- $tab = $this->div('cpNavOff');
- }
- else
- {
- if ($highlight_override == FALSE)
- $tab = $this->div('cpNavOn');
- }
- }
-
- if ($C == 'myaccount' AND $highlight_override == FALSE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=myaccount'.'\');"';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['my_account']));
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=myaccount'.'\');" onmouseover="navTabOn(\'my_account\');" onmouseout="navTabOff(\'my_account\');" ';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', 'my_account').$this->clean_tab_text($text['my_account']).$this->div_c();
- }
-
- $r .= $this->anchor(BASE.AMP.'C=myaccount', $div);
- $r .= $this->td_c();
-
-
- if ($a_lock == 0)
- {
- if ($C == 'admin' AND $highlight_override == FALSE)
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=admin'.'\');"';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->qdiv('cpNavOn', $this->clean_tab_text($text['admin']));
- }
- else
- {
- $js = ' onclick="navjump(\''.BASE.AMP.'C=admin'.'\');" onmouseover="navTabOn(\'admin\');" onmouseout="navTabOff(\'admin\');" ';
- $r .= "<td class='navCell' width='".$width."%' ".$js.">";
- $div = $this->div('cpNavOff', '', 'admin').$this->clean_tab_text($text['admin']).$this->div_c();
- }
-
- $r .= $this->anchor(BASE.AMP.'C=admin', $div);
- $r .= $this->td_c();
- }
-
- if ($this->padding_tabs != 'off')
- {
- $r .= $this->td('navCell', (($width_pad <= 2) ? '': $width_pad.'%'));
-
- if ($this->padding_tabs == 'clear')
- {
- $r .= $this->nbs();
- }
- else
- {
- $r .= $this->div('cpNavOff')
- .$this->nbs()
- .$this->div_c();
- }
-
- $r .= $this->td_c();
- }
-
- $r .= $this->tr_c().
- $this->table_c().
- $this->nl(2);
-
- return $r;
- }
- /* END */
- /** -------------------------------------
- /** This keeps the quick tab text OK
- /** -------------------------------------*/
- function clean_tab_text($str = '')
- {
- if ($str == '')
- return '';
-
- $str = str_replace(' ', NBS, $str);
- $str = str_replace('"', '"', $str);
- $str = str_replace("'", "'", $str);
-
- return $str;
- }
- /* END */
-
- /** -------------------------------------
- /** Content
- /** -------------------------------------*/
- function content($padding = FALSE)
- {
- $this->secure_hash();
-
- if ($padding === TRUE)
- {
- $this->body = $this->qdiv('itemWrapperTop', $this->body);
- }
-
- if ($this->crumbline == FALSE)
- {
- return NL."<div id='contentNB'>".$this->nl(2).$this->body.$this->nl(2);
- }
- else
- {
- return NL."<div id='content'>".$this->nl(2).$this->body.$this->nl(2);
- }
- }
- /* END */
-
-
- /** -------------------------------------
- /** Secure Hash
- /** -------------------------------------*/
- function secure_hash($str = '')
- {
- global $IN, $FNS, $DB, $PREFS;
-
- $check = ($str != '') ? $str : $this->body;
-
- if ($PREFS->ini('secure_forms') == 'y' && preg_match_all("/<form.*?>/", $check, $matches)) // <?php fixex BBEdit display bug
- {
- $sql = "INSERT INTO exp_security_hashes (date, ip_address, hash) VALUES ";
-
- for($i=0, $s=sizeof($matches['0']); $i < $s; ++$i)
- {
- $hash = $FNS->random('encrypt');
- $sql .= "(UNIX_TIMESTAMP(), '".$IN->IP."', '".$hash."'),";
-
- $check = str_replace($matches['0'][$i], $matches['0'][$i].NL.$this->input_hidden('XID', $hash), $check);
- }
-
- $check = str_replace('{XID_SECURE_HASH}', $hash, $check);
-
- $DB->query(substr($sql,0,-1));
- }
-
- if ($str != '')
- {
- return $check;
- }
- else
- {
- $this->body = $check;
- }
- }
- /* END */
- /** -------------------------------------
- /** Crumb Builder
- /** -------------------------------------*/
-
- // This function lets us build crumbs. It can receive either a string or an array.
- // If you pass it an array the key must be the name of the crumb and the value
- // must be the URL where the crumb points. If the value is blank only the text will appear.
- // EXAMPLE:
- /*
- $crumbs = array(
- 'Forum' => BASE.AMP.'C=modules'.AMP.'M=forum',
- 'Forum Manager => BASE.AMP.'C=modules'.AMP.'M=forum'.AMP.'P=forum_manager',
- 'Categories' => ''
- );
-
-
- $DSP->crumb = $DSP->build_crumb($crumbs);
-
- The above would produce:
-
- <a href="bla...">Forum</a> > <a href="bla..">Forum Manager</a> > Cateogories
- */
- function build_crumb($crumbs = '')
- {
- if ($crumbs == '')
- {
- return '';
- }
-
- if ( ! is_array($crumbs))
- {
- return $this->crumb_item($crumbs);
- }
-
- if (count($crumbs) == 0)
- return '';
-
- $str = '';
-
- foreach ($crumbs as $key => $val)
- {
- if ($val == '')
- {
- $str .= $this->crumb_item($key);
- }
- else
- {
- $str .= $this->crumb_item($this->anchor($val, $key));
- }
- }
- return $str;
- }
- /* END */
-
-
- /** -------------------------------------
- /** Breadcrumb
- /** -------------------------------------*/
- function breadcrumb()
- {
- global $IN, $PREFS, $SESS, $LANG;
-
- if ($this->show_crumb == FALSE)
- {
- return;
- }
-
- if ($PREFS->ini('multiple_sites_enabled') == 'y')
- {
- if ($C = $IN->GBL('C'))
- {
- $link = $this->anchor(BASE, $this->html_attribute_prep($PREFS->ini('site_name')));
- }
- else
- {
- $link = $this->anchor(BASE, $this->html_attribute_prep($PREFS->ini('site_name'))).$this->nbs(2)."›".$this->nbs(2).$LANG->line('main_menu');
- }
- }
- else
- {
- $C = $IN->GBL('C');
-
- $link = $this->anchor(BASE, $LANG->line('main_menu'));
- }
-
- if ($IN->GBL('class_override', 'GET') != '')
- {
- $C = $IN->GBL('class_override', 'GET') ;
- }
-
- // If the "M" variable exists in the GET query string, turn
- // the variable into the next segment of the breadcrumb
-
- if ($IN->GBL('M') AND $this->crumb_ov == FALSE)
- {
- // The $special variable let's us add additional data to the query string
- // There are a few occasions where this is necessary
-
- $special = '';
-
- if ($IN->GBL('weblog_id', 'POST'))
- {
- $special = AMP.'weblog_id='.$IN->GBL('weblog_id');
- }
-
- // Build the link
-
- $name = ($C == 'templates') ? $LANG->line('design') : $LANG->line($C);
-
- if (empty($name))
- {
- $name = ucfirst($C);
- }
-
- if ($C == 'myaccount')
- {
- if ($id = $IN->GBL('id', 'GP'))
- {
- if ($id != $SESS->userdata('member_id'))
- {
- $name = $LANG->line('user_account');
-
- $special = AMP.'id='.$id;
- }
- else
- {
- $name = $LANG->line('my_account');
- }
- }
- }
-
- $link .= $this->nbs(2)."›".$this->nbs(2).$this->anchor(BASE.AMP.'C='.$C.$special, $name);
- }
-
- // $this->crumb indicates the page being currently viewed.
- // It does not need to be a link.
-
- if ($this->crumb != '')
- {
- $link .= $this->nbs(2)."›".$this->nbs(2).$this->crumb;
- }
- // This is the right side of the breadcrumb area.
- $data = ($this->rcrumb == '') ? " " : $this->rcrumb;
-
- if ($data == 'OFF')
- {
- $link = ' ';
- $data = ' ';
- }
-
- // Define the breadcrump CSS. On all but the PUBLISH page we use the
- // version of the breadcrumb that has a bottom border
-
- if ($this->crumbline == TRUE)
- {
- $ret = "<div id='breadcrumb'>";
- }
- else
- {
- $ret = "<div id='breadcrumbNoLine'>";
- }
-
- $ret .= $this->table('', '0', '0', '100%');
- $ret .= $this->tr();
- $ret .= $this->table_qcell('crumbPad', $this->span('crumblinks').$link.$this->span_c());
- $ret .= $this->table_qcell($this->rcrumb_css, $data, '270px', 'bottom', 'right');
- $ret .= $this->tr_c();
- $ret .= $this->table_c();
- $ret .= $this->div_c();
-
- return $ret;
- }
- /* END */
-
- /** ---------------------------------------
- /** Right Side Crumb
- /** ---------------------------------------*/
-
- function right_crumb($title, $url = '', $extra = '', $pop = FALSE)
- {
- if ($title == '')
- {
- return;
- }
-
- $nj = '';
- if ($url != '')
- {
- if ($pop === FALSE)
- {
- $nj = ' onclick="navjump(\''.$url.'\');this.blur();" ';
- }
- else
- {
- $nj = " onclick=\"window.open('{$url}', '_blank');return false;\" ";
- }
- }
- $js = $nj.$extra.' onmouseover="navCrumbOn();" onmouseout="navCrumbOff();" ';
-
- if ($url != '')
- {
- $this->rcrumb = $this->anchor($url, '<span class="crumblinksR" id="rcrumb" '.$js.'>'.$title.'</span>');
- }
- else
- {
- $this->rcrumb = $this->anchor('javascript:nullo();', '<span class="crumblinksR" id="rcrumb" '.$js.'>'.$title.'</span>');
- }
- }
- /* END */
-
-
- /** ---------------------------------------
- /** Adds "breadcrum" formatting to an item
- /** ---------------------------------------*/
-
- function crumb_item($item)
- {
- return $this->nbs(2)."›".$this->nbs(2).$item;
- }
-
- /** -------------------------------------
- /** Required field indicator
- /** -------------------------------------*/
- function required($blurb = '')
- {
- global $LANG;
-
- if ($blurb == 1)
- {
- $blurb = "<span class='default'>".$this->nbs(2).$LANG->line('required_fields').'</span>';
- }
- elseif($blurb != '')
- {
- $blurb = "<span class='default'>".$this->nbs(2).$blurb.'</span>';
- }
-
- return "<span class='alert'>*</span>".$blurb.NL;
- }
- /* END */
- /** -------------------------------------
- /** Content closing </div> tag
- /** -------------------------------------*/
- function content_close()
- {
- return "</div>".NL;
- }
- /* END */
- /** -------------------------------------
- /** Copyright
- /** -------------------------------------*/
- function copyright()
- {
- global $LANG, $PREFS, $FNS, $DB;
-
- $qm = ($PREFS->ini('force_query_string') == 'y') ? '' : '?';
- $logo = '<img src="'.PATH_CP_IMG.'ee_logo_sm.gif" border="0" width="20" height="12" alt="ExpressionEngine" />';
- $core = '';
- $buyit = '';
- if ( ! file_exists(PATH_MOD.'member/mod.member'.EXT))
- {
- $qm = ($PREFS->ini('force_query_string') == 'y') ? '' : '?';
-
- $core = ' Core';
- $buyit = 'Love EE Core? Consider '.$this->anchor($FNS->fetch_site_index().$qm.'URL=http://expressionengine.com/', 'buying').' a personal license!<br />';
- }
-
- $extra = '';
-
- if (function_exists('memory_get_usage') && ($usage = memory_get_usage()) != '')
- {
- //$extra = ' '.number_format($usage/1024).' KB of Memory';
- }
- return
- "<div class='copyright'>". $logo.$this->nl(2).$this->br().$this->nl().
- $this->anchor($FNS->fetch_site_index().$qm.'URL=http://expressionengine.com/', APP_NAME.$core." ".APP_VER)." - © ".$LANG->line('copyright')." 2003 - 2010 - EllisLab, Inc.".BR.NL.
- $buyit.
- str_replace("%x", "{cp:elapsed_time}", $LANG->line('page_rendered')).$this->nbs(3).
- str_replace("%x", $DB->q_count, $LANG->line('queries_executed')).$extra.$this->br().
- $LANG->line('build').$this->nbs(2).APP_BUILD.$this->nl(2).
- "</div>".NL;
- }
- /* END */
-
- /** -------------------------------------
- /** HTML Footer
- /** -------------------------------------*/
- function html_footer()
- {
- return NL.'</body>'.NL.'</html>';
- }
- /* END */
- /** -------------------------------------
- /** Error Message
- /** -------------------------------------*/
- function error_message($message = "", $n = 1)
- {
- global $LANG;
-
- $this->title = $LANG->line('error');
-
- if (is_array($message))
- {
- $message = implode(BR, $message);
- }
-
- $this->crumbline = FALSE;
-
- $this->body = $this->qdiv('alertHeadingCenter', $LANG->line('error'))
- .$this->div('box')
- .$this->div('defaultCenter')
- .$this->qdiv('defaultBold', $message);
-
- if ($n != 0)
- $this->body .= BR.$this->nl(2)."<a href='javascript:history.go(-".$n.")' style='text-transform:uppercase;'>« <b>".$LANG->line('back')."</b></a>";
-
- $this->body .= BR.BR.$this->div_c().$this->div_c();
- }
- /* END */
- /** -------------------------------------
- /** Unauthorized access message
- /** -------------------------------------*/
- function no_access_message($message = '')
- {
- global $LANG;
-
- $this->title = $LANG->line('unauthorized');
-
- $msg = ($message == '') ? $LANG->line('unauthorized_access') : $message;
-
- $this->body = $this->qdiv('highlight', BR.$msg);
- }
- /* END */
- /** -------------------------------------
- /** Global Javascript
- /** -------------------------------------*/
- function _global_javascript()
- {
- ob_start();
- ?>
- <script type="text/javascript">
- <!--
-
- var browser = "Unknown";
- var version = "Unknown"…
Large files files are truncated, but you can click here to view the full file