Version 3.3.4

This commit is contained in:
Neo committed 2025-12-19 00:35:52 -08:00
1 parent 78706903a2
commit fb6b5baabc
2206 files changed
+409828 -382984

No files matched your search

@@ -3,17 +3,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Admin Output Library
* Last Updated: $LastChangedDate: 2011-10-04 08:19:01 -0400 (Tue, 04 Oct 2011) $
* Last Updated: $LastChangedDate: 2012-07-03 10:29:35 -0400 (Tue, 03 Jul 2012) $
* </pre>
*
* @author $Author: mark $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://hatynka.in
* @version $Rev: 9578 $
* @link http://www.invisionpower.com
* @version $Rev: 11026 $
*
*/
@@ -107,7 +107,8 @@ class adminOutput extends output
/* Update paths and such */
$this->settings['base_url'] = $this->settings['_original_base_url'];
$this->settings['public_url'] = $this->settings['_original_base_url'] . '/index.php?';
$this->settings['public_dir'] = $this->settings['_original_base_url'] . '/' . PUBLIC_DIRECTORY . '/';
$this->settings['base_acp_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY;
$this->settings['skin_acp_url'] = $this->settings['base_url'] . '/' . CP_DIRECTORY . "/skin_cp";
$this->settings['skin_app_url'] = $this->settings['skin_acp_url'] ;
@@ -248,15 +249,15 @@ class adminOutput extends output
//-----------------------------------------
// Figure out title...
//-----------------------------------------
$this->html_title = "IP.Board: ";
$this->html_title = "IP.Board:";
if ( ipsRegistry::$current_application )
{
$this->html_title .= " &gt; " . ipsRegistry::$applications[ ipsRegistry::$current_application ]['app_title'];
$this->html_title .= " " . IPSLIb::getAppTitle( ipsRegistry::$current_application );
if ( ipsRegistry::$current_module )
{
$this->html_title .= " &gt; " . ipsRegistry::$modules_by_section[ ipsRegistry::$current_application ][ ipsRegistry::$current_module ]['sys_module_title'];
$this->html_title .= " &gt; " . ( isset($this->lang->words[ 'module__' . ipsRegistry::$current_application . '_' . ipsRegistry::$current_module ]) ? $this->lang->words[ 'module__' . ipsRegistry::$current_application . '_' . ipsRegistry::$current_module ] : ipsRegistry::$modules_by_section[ ipsRegistry::$current_application ][ ipsRegistry::$current_module ]['sys_module_title'] );
}
}
@@ -386,7 +387,7 @@ class adminOutput extends output
* @param string Text to display
* @return @e void
*/
public function multipleRedirectFinish($text='Готово!')
public function multipleRedirectFinish($text='Completed!')
{
print $this->global_template->global_redirect_done( $text );
exit();
@@ -467,9 +468,10 @@ class adminOutput extends output
/**
* Output the HTML to the browser
*
* @param bool Return finished output instead of printing
* @return @e void
*/
public function sendOutput()
public function sendOutput( $return=false )
{
$this->_sendOutputSetUp( 'normal' );
@@ -577,11 +579,11 @@ class adminOutput extends output
if ( ipsRegistry::$current_application )
{
$this->html_title .= " &gt; " . ipsRegistry::$applications[ ipsRegistry::$current_application ]['app_title'];
$this->html_title .= " " . IPSLIb::getAppTitle( ipsRegistry::$current_application );
if ( ipsRegistry::$current_module )
{
$this->html_title .= " &gt; " . ipsRegistry::$modules_by_section[ ipsRegistry::$current_application ][ ipsRegistry::$current_module ]['sys_module_title'];
$this->html_title .= " &gt; " . ( isset($this->lang->words[ 'module__' . ipsRegistry::$current_application . '_' . ipsRegistry::$current_module ]) ? $this->lang->words[ 'module__' . ipsRegistry::$current_application . '_' . ipsRegistry::$current_module ] : ipsRegistry::$modules_by_section[ ipsRegistry::$current_application ][ ipsRegistry::$current_module ]['sys_module_title'] );
}
}
@@ -633,12 +635,13 @@ class adminOutput extends output
$_seen_nav[ $data[1] ] = 1;
}
$_nav = ( isset( $_last_nav['nav'] ) ) ? $_last_nav['nav'] . ' &gt; ' . $data[1] : $data[1];
$_nav = isset($_last_nav['nav']) ? $_last_nav['nav'] . ' &gt; ' . $data[1] : $data[1];
# Append last nav...
$_last_nav = array( 'url' => $page_location,
$_last_nav = array( 'url' => $data[0],
'title' => $data[1],
'nav' => $_nav );
if ( $data[0] )
{
$navigation[] = "<a href='" . $data[0] . "'>" . $data[1] . "</a>";
@@ -663,13 +666,13 @@ class adminOutput extends output
$_seen_nav[ $data[1] ] = 1;
}
$_nav = ( $_last_nav['nav'] ) ? $_last_nav['nav'] . ' &gt; ' . $data[1] : $data[1];
$_nav = isset($_last_nav['nav']) ? $_last_nav['nav'] . ' &gt; ' . $data[1] : $data[1];
# Append last nav...
$_last_nav = array( 'url' => $page_location,
$_last_nav = array( 'url' => $data[0],
'title' => $data[1],
'nav' => $_nav );
if ( $data[0] )
{
$navigation[] = "<a href='" . $data[0] . "'>" . $data[1] . "</a>";
@@ -723,7 +726,7 @@ class adminOutput extends output
$__files = get_included_files();
$files = '';
foreach( $__files as $__f )
{
$files .= "<strong>{$__f}</strong><br />";
@@ -815,6 +818,13 @@ class adminOutput extends output
// OUTPUT
//-----------------------------------------
if( $return )
{
$this->_IS_PRINTED = 1;
return $html;
}
print $html;
$this->_IS_PRINTED = 1;
@@ -949,10 +959,10 @@ class adminOutput extends output
{
continue;
}
$_tab_title = $data['sys_module_title'];
$_tab_title = $this->lang->words[ 'module__' . $_checkApp . '_' . $data['sys_module_key'] ] ? $this->lang->words[ 'module__' . $_checkApp . '_' . $data['sys_module_key'] ] : $data['sys_module_title'];
$_tab_key = $data['sys_module_key'];
$tabs[ $_checkApp ]['items'][ $_tab_key ] = array( 'tab_title' => $_tab_title,
'tab_key' => $_tab_key );
$tabs[ $_checkApp ]['data'] = $data;
@@ -1139,9 +1149,11 @@ class adminOutput extends output
{
$skip = TRUE;
$__current_module = $_current_module;
$_current_module = preg_replace( '/^\d+?_(.*)$/', "\\1", $_current_module );
/* Fix language abstraction for module title */
$module_data['title'] = isset($this->lang->words[ 'module__' . $app_dir . '_' . $_current_module ]) ? $this->lang->words[ 'module__' . $app_dir . '_' . $_current_module ] : $module_data['title'];
/* Fake app content? If so.. remove.. */
foreach( $fakeApps as $_app => $_fdata )
{
@@ -1241,7 +1253,7 @@ class adminOutput extends output
if ( ! stristr( $this->settings['query_string_safe'], 'section=' ) )
{
$this->settings['query_string_safe'] = $this->settings[ 'query_string_safe' ] . '&amp;section=' . ipsRegistry::$request['section'];
$this->settings['query_string_safe'] = $this->settings['query_string_safe'] . '&amp;section=' . ipsRegistry::$request['section'];
}
$this->settings['query_string_safe'] = '&amp;do=' . $_do;
@@ -1284,19 +1296,21 @@ class adminOutput extends output
if ( $item['title'] AND $item['section'] )
{
$this->menu[ $app_dir ][ $__current_module ]['items'][] = array( 'title' => $item['title'],
'module' => $_current_module,
'section' => $item['section'],
'url' => $item['url'],
'redirect' => $item['redirect'] );
$this->menu[ $app_dir ][ $__current_module ]['title'] = ( count($this->menu[ $app_dir ][ $__current_module ]['items']) > 1 ) ? $module_data['title'] : $item['title'];
$this->menu[ $app_dir ][ $__current_module ]['items'][] = array( 'title' => $item['title'],
'module' => $_current_module,
'section' => $item['section'],
'url' => $item['url'],
'redirect' => $item['redirect']
);
$this->menu[ $app_dir ][ $__current_module ]['title'] = ( count($this->menu[ $app_dir ][ $__current_module ]['items']) > 1 ) ? $module_data['title'] : ( isset($this->lang->words[ 'module__' . $app_dir . '_' . $_current_module ]) ? $this->lang->words[ 'module__' . $app_dir . '_' . $_current_module ] : $item['title'] );
}
}
}
}
}
#echo "<pre>";print_r($this->menu);exit;
if ( isset( $this->menu ) && count( $this->menu ) )
{
return $this->global_template->menu_sub_navigation( $this->menu );
@@ -1352,7 +1366,7 @@ class adminOutput extends output
$this->lang->loadLanguageFile( array( 'admin_menulang' ), $app_dir );
foreach( $data as $_current_module => $module_data )
{
{
$_thisApp = $app_dir;
$__current_module = $_current_module;
$_current_module = preg_replace( '/^\d+?_(.*)$/', "\\1", $_current_module );
@@ -1401,13 +1415,13 @@ class adminOutput extends output
if ( $item['title'] AND $item['section'] )
{
$_subMenu[ $_thisApp ][ $_current_module ]['items'][] = array( 'title' => $item['title'],
'module' => $_current_module,
'section' => $item['section'],
'url' => $item['url'],
'redirect' => $item['redirect'],
'app_dir' => $app_dir,
'pos' => preg_replace( '/^(\d+)?_.*$/', "\\1", $__current_module )
$_subMenu[ $_thisApp ][ $_current_module ]['items'][] = array( 'title' => $item['title'],
'module' => $_current_module,
'section' => $item['section'],
'url' => $item['url'],
'redirect' => $item['redirect'],
'app_dir' => $app_dir,
'pos' => preg_replace( '/^(\d+)?_.*$/', "\\1", $__current_module )
);
$_subMenu[ $_thisApp ][ $_current_module ]['title'] = ( count($_subMenu[ $_thisApp ][ $_current_module ]['items']) > 1 ) ? $module_data['title'] : $item['title'];
@@ -1423,7 +1437,7 @@ class adminOutput extends output
{
foreach( ipsRegistry::$modules[ $app_dir ] as $data )
{
if ( ! $data['sys_module_admin'] )
if ( !$data['sys_module_admin'] )
{
continue;
}
@@ -1444,7 +1458,13 @@ class adminOutput extends output
}
}
}
//-----------------------------------------
// Title
//-----------------------------------------
$data['sys_module_title'] = isset($this->lang->words[ 'module__' . $app_dir . '_' . $data['sys_module_key'] ]) ? $this->lang->words[ 'module__' . $app_dir . '_' . $data['sys_module_key'] ] : $data['sys_module_title'];
$_titleMenu[ $_thisApp ][ $data['sys_module_key'] ] = array( 'url' => $this->settings['_base_url'] . 'app=' . $app_dir . '&amp;module=' . $data['sys_module_key'],
'title' => $data['sys_module_title'],
'module' => $data['sys_module_key'] );
@@ -1489,9 +1509,10 @@ class adminOutput extends output
* @param mixed Selected ID(s)
* @param boolean Multiselect (TRUE is yes)
* @param string HTML id attribute value
* @param integer Multiselect size
* @return string HTML dropdown menu
*/
public function generateGroupDropdown( $formFieldName, $selected, $multiselect=FALSE, $formFieldID='' )
public function generateGroupDropdown( $formFieldName, $selected, $multiselect=FALSE, $formFieldID='', $multiselectSize=5 )
{
//-----------------------------------------
// INIT
@@ -1512,11 +1533,11 @@ class adminOutput extends output
if ( $multiselect === TRUE )
{
return $this->formMultiDropdown( $formFieldName, $groups, $selected, 5, $formFieldID );
return $this->formMultiDropdown( $formFieldName, $groups, $selected, $multiselectSize, $formFieldID );
}
else
{
return $this->formDropdown( $formFieldName, $groups, $selected, "", $formFieldID );
return $this->formDropdown( $formFieldName, $groups, $selected, $formFieldID );
}
}
@@ -1697,7 +1718,27 @@ class adminOutput extends output
$id = $id ? $id : $name;
$html = "<select name='{$name}'{$js} id='{$id}' class='dropdown{$css}'>\n";
if ( is_string( $list ) )
{
if ( $list == '--groups--' )
{
$options = array();
$groups = $this->caches['group_cache'];
foreach( $groups as $id => $data )
{
$options[] = array( $id, $data['g_title'] );
}
$list = $options;
}
else
{
$list = array();
}
}
//-----------------------------------------
// Support for optgroups
//-----------------------------------------
@@ -1719,8 +1760,14 @@ class adminOutput extends output
{
$selected = ' selected="selected"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . ">" . $v[1] . "</option>\n";
$disabled = '';
if ( isset( $v['disabled'] ) and $v['disabled'] === TRUE )
{
$disabled = ' disabled="disabled"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . $disabled . ">" . $v[1] . "</option>\n";
$_printed++;
}
@@ -1742,8 +1789,14 @@ class adminOutput extends output
{
$selected = ' selected="selected"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . ">" . $v[1] . "</option>\n";
$disabled = '';
if ( isset( $v['disabled'] ) and $v['disabled'] === TRUE )
{
$disabled = ' disabled="disabled"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . $disabled . ">" . $v[1] . "</option>\n";
$_printed++;
}
@@ -1768,8 +1821,14 @@ class adminOutput extends output
{
$selected = ' selected="selected"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . ">" . $v[1] . "</option>\n";
$disabled = '';
if ( isset( $v['disabled'] ) and $v['disabled'] === TRUE )
{
$disabled = ' disabled="disabled"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . $disabled . ">" . $v[1] . "</option>\n";
}
$html .= "</optgroup>\n";
@@ -1785,13 +1844,18 @@ class adminOutput extends output
foreach ( $list as $v )
{
$selected = "";
if ( ($default_val !== "") and ($v[0] == $default_val) )
{
$selected = ' selected="selected"';
}
$disabled = '';
if ( isset( $v['disabled'] ) and $v['disabled'] === TRUE )
{
$disabled = ' disabled="disabled"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . ">" . $v[1] . "</option>\n";
$html .= "<option value='" . $v[0] . "'" . $selected . $disabled . ">" . $v[1] . "</option>\n";
}
}
@@ -1830,9 +1894,29 @@ class adminOutput extends output
$html = "<select name='{$name}'{$js} id='{$id}' class='dropdown{$css}' multiple='multiple' size='{$size}'>\n";
if ( is_string( $list ) )
{
if ( $list == '--groups--' )
{
$options = array();
$groups = $this->caches['group_cache'];
foreach( $groups as $id => $data )
{
$options[] = array( $id, $data['g_title'] );
}
$list = $options;
}
else
{
$list = array();
}
}
if ( !is_array($default) )
{
$default = array();
$default = is_string( $list ) ? array( $list ) : array();
}
foreach ($list as $v)
@@ -1843,8 +1927,14 @@ class adminOutput extends output
{
$selected = ' selected="selected"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . ">" . $v[1] . "</option>\n";
$disabled = '';
if ( isset( $v['disabled'] ) and $v['disabled'] === TRUE )
{
$disabled = ' disabled="disabled"';
}
$html .= "<option value='" . $v[0] . "'" . $selected . $disabled . ">" . $v[1] . "</option>\n";
}
$html .= "</select>\n\n";
@@ -2025,7 +2115,9 @@ class adminOutput extends output
array( 'app' => 'core',
'module' => 'posts' ),
array( 'app' => 'core',
'module' => 'languages' )
'module' => 'languages' ),
array( 'app' => 'core',
'module' => 'mobileapp' )
),
'support' => array(
array( 'app' => 'core',