Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+159 -89
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-02-03 16:54:26 +0000 (Fri, 03 Feb 2006) $
| > $Revision: 137 $
| > $Author: bfarber $
| > $Date: 2006-10-05 17:04:08 +0100 (Thu, 05 Oct 2006) $
| > $Revision: 609 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Admin HTML stuff library
@@ -34,6 +24,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class admin_skin
{
@@ -51,7 +46,7 @@ class admin_skin
function init_admin_skin()
{
$this->base_url = $this->ipsclass->base_url;
$this->img_url = $this->ipsclass->skin_url;
$this->img_url = $this->ipsclass->skin_acp_url;
}
/*-------------------------------------------------------------------------*/
@@ -60,7 +55,7 @@ class admin_skin
function print_top($title="",$desc="")
{
return $this->ipsclass->skin_global_acp->global_header( $title, $desc );
return $this->ipsclass->skin_acp_global->global_header( $title, $desc );
}
/*-------------------------------------------------------------------------*/
@@ -69,7 +64,7 @@ class admin_skin
function wrap_nav($links)
{
return $this->ipsclass->skin_global_acp->global_wrap_nav( $links );
return $this->ipsclass->skin_acp_global->global_wrap_nav( $links );
}
/*-------------------------------------------------------------------------*/
@@ -78,7 +73,7 @@ class admin_skin
function print_foot()
{
return $this->ipsclass->skin_global_acp->global_footer( date("Y") );
return $this->ipsclass->skin_acp_global->global_footer( date("Y") );
}
/*-------------------------------------------------------------------------*/
@@ -87,7 +82,7 @@ class admin_skin
function menu_top()
{
return $this->ipsclass->skin_global_acp->global_menu_header();
return $this->ipsclass->skin_acp_global->global_menu_header();
}
/*-------------------------------------------------------------------------*/
@@ -96,7 +91,7 @@ class admin_skin
function menu_foot()
{
return $this->ipsclass->skin_global_acp->global_menu_footer();
return $this->ipsclass->skin_acp_global->global_menu_footer();
}
/*-------------------------------------------------------------------------*/
@@ -113,7 +108,7 @@ class admin_skin
if ( $this->ipsclass->input['act'] != 'idx' )
{
$extra_query = str_replace( '&amp;', '&', $this->ipsclass->parse_clean_value($_SERVER['QUERY_STRING']) );
$extra_query = str_replace( '&amp;', '&', $this->ipsclass->parse_clean_value($this->ipsclass->my_getenv('QUERY_STRING')) );
$extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query );
$extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query );
$extra_query = preg_replace( "!^\?!" , "" , $extra_query );
@@ -122,52 +117,9 @@ class admin_skin
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
}
return $this->ipsclass->skin_global_acp->global_frame_set( $extra_query );
return $this->ipsclass->skin_acp_global->global_frame_set( $extra_query );
}
/*-------------------------------------------------------------------------*/
// Print the global menu cat wrap
/*-------------------------------------------------------------------------*/
function menu_cat_wrap($show, $name="", $links="", $id = "", $desc, $color='#FFF', $extra='')
{
return $this->ipsclass->skin_global_acp->global_menu_cat_wrap($show, $name, $links, $id, $desc, $color, $extra);
}
/*-------------------------------------------------------------------------*/
// Print the global menu cat link
/*-------------------------------------------------------------------------*/
function menu_cat_link($pid, $cid, $url="", $name="", $urltype=0, $isredirect=0, $no_access=0)
{
if ( $urltype == 1 )
{
$theurl = $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?';
}
else
{
$theurl = $this->ipsclass->base_url;
}
if ( $isredirect )
{
$icon = "<img src='{$this->ipsclass->skin_url}/images/menu_shortcut.gif' border='0' alt='' valign='absmiddle' />";
$extra_css = ';font-style:italic';
}
else
{
$icon = "<img src='{$this->ipsclass->skin_url}/images/item.gif' border='0' alt='' valign='absmiddle' />";
$extra_css = "";
}
if ( $no_access )
{
$extra_css .= ";color:#777";
}
return $this->ipsclass->skin_global_acp->global_menu_cat_link( $cid, $pid, $icon, $extra_css, $name, $url, $theurl );
}
/*-------------------------------------------------------------------------*/
// JS Make button
/*-------------------------------------------------------------------------*/
@@ -181,9 +133,9 @@ class admin_skin
// JS Help Link
/*-------------------------------------------------------------------------*/
function js_help_link($help="", $text="Áûñòðàÿ ïîìîùü")
function js_help_link($help="", $text="Quick Help")
{
return "( <a href='#' onClick=\"window.open('{$this->ipsclass->base_url}&act=quickhelp&id=$help','Ïîìîùü','width=250,height=400,resizable=yes,scrollbars=yes'); return false;\">$text</a> )";
return "( <a href='#' onClick=\"window.open('{$this->ipsclass->base_url}&act=quickhelp&id=$help','Help','width=250,height=400,resizable=yes,scrollbars=yes'); return false;\">$text</a> )";
}
/*-------------------------------------------------------------------------*/
@@ -207,7 +159,7 @@ class admin_skin
function make_page_jump($tp="", $pp="", $ub="" )
{
return "<a href='#' title=\"Ïåðåéòè ê ñòðàíèöå...\" onclick=\"multi_page_jump('$ub',$tp,$pp);\">Pages:</a>";
return "<a href='#' title=\"Jump to a page...\" onclick=\"multi_page_jump('$ub',$tp,$pp);\">Pages:</a>";
}
/*-------------------------------------------------------------------------*/
@@ -225,12 +177,18 @@ class admin_skin
if (is_array($hiddens))
{
foreach ($hiddens as $k => $v)
foreach ($hiddens as $v)
{
$form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>";
$form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}' />";
}
}
//-----------------------------------------
// Add in auth key
//-----------------------------------------
$form .= "\n<input type='hidden' name='_admin_auth_key' value='".$this->ipsclass->_admin_auth_key."' />";
return $form;
}
@@ -242,7 +200,7 @@ class admin_skin
{
if (is_array($hiddens))
{
foreach ($hiddens as $k => $v)
foreach ($hiddens as $v)
{
$form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>";
}
@@ -266,7 +224,7 @@ class admin_skin
$colspan = " colspan='".$this->td_colspan."' ";
}
$html .= "<tr><td align='center' class='pformstrip'".$colspan."><input type='submit' value='$text'".$js." id='button' accesskey='s'>{$extra}</td></tr>\n";
$html .= "<tr><td align='center' class='tablesubheader'".$colspan."><input type='submit' value='$text'".$js." class='realbutton' accesskey='s'>{$extra}</td></tr>\n";
}
$html .= "</form>";
@@ -283,7 +241,7 @@ class admin_skin
if ($text != "")
{
$html .= "<div class='tableborder'><div align='center' class='pformstrip'><input type='submit' value='$text'".$js." id='button' accesskey='s'></div></div>\n";
$html .= "<div class='tableborder'><div align='center' class='tablesubheader'><input type='submit' value='$text'".$js." class='realbutton' accesskey='s'></div></div>\n";
}
$html .= "</form>";
@@ -358,7 +316,7 @@ class admin_skin
$html = "<select name='$name'".$js." $css class='dropdown'>\n";
foreach ($list as $k => $v)
foreach ($list as $v)
{
$selected = "";
@@ -388,7 +346,7 @@ class admin_skin
//$html = "<select name='$name".'[]'."'".$js." id='dropdown' multiple='multiple' size='$size'>\n";
$html = "<select name='$name"."'".$js." class='dropdown' multiple='multiple' size='$size'>\n";
foreach ($list as $k => $v)
foreach ($list as $v)
{
$selected = "";
@@ -418,29 +376,29 @@ class admin_skin
$y_js = "";
$n_js = "";
if ( $js['yes'] != "" )
if ( isset($js['yes']) AND $js['yes'] != "" )
{
$y_js = $js['yes'];
}
if ( $js['no'] != "" )
if ( isset($js['no']) ANd $js['no'] != "" )
{
$n_js = $js['no'];
}
$yes = "Äà &nbsp; <input type='radio' name='$name' value='1' $y_js id='green'>";
$no = "<input type='radio' name='$name' value='0' $n_js id='red'> &nbsp; Íåò";
$yes = "Yes &nbsp; <input type='radio' name='$name' value='1' $y_js id='green'>";
$no = "<input type='radio' name='$name' value='0' $n_js id='red'> &nbsp; No";
if ($default_val == 1)
{
$yes = "Äà &nbsp; <input type='radio' name='$name' value='1'$y_js checked id='green'>";
$yes = "Yes &nbsp; <input type='radio' name='$name' value='1'$y_js checked id='green'>";
}
else
{
$no = "<input type='radio' name='$name' value='0' checked $n_js id='red'> &nbsp; Íåò";
$no = "<input type='radio' name='$name' value='0' checked $n_js id='red'> &nbsp; No";
}
@@ -472,6 +430,8 @@ class admin_skin
}
}
//-----------------------------------------
//--------------------------------------------------------------------
// SCREEN ELEMENTS
@@ -493,15 +453,17 @@ class admin_skin
function start_table( $title="", $desc="") {
$html = "";
if ($title != "")
{
$this->has_title = 1;
$html .= "<div class='tableborder'>
<div class='maintitle'>$title</div>\n";
<div class='tableheaderalt'>$title</div>\n";
if ( $desc != "" )
{
$html .= "<div class='pformstrip'>$desc</div>\n";
$html .= "<div class='tablesubheader'>$desc</div>\n";
}
}
@@ -516,6 +478,9 @@ class admin_skin
// Auto remove two &nbsp; only headers..
$this->td_header[1][0] = ( isset($this->td_header[1][0]) AND $this->td_header[1][0] ) ? $this->td_header[1][0] : '';
$this->td_header[1][1] = ( isset($this->td_header[1][1]) AND $this->td_header[1][1] ) ? $this->td_header[1][1] : '';
if ( $this->td_header[0][0] == '&nbsp;' && $this->td_header[1][0] == '&nbsp;' && ( ! isset( $this->td_header[2][0] ) ) )
{
$this->td_header[0][0] = '{none}';
@@ -535,7 +500,7 @@ class admin_skin
if ($td[0] != '{none}')
{
$html .= "<td class='titlemedium'".$width."align='center'>{$td[0]}</td>\n";
$html .= "<td class='tablesubheader'".$width."align='center'>{$td[0]}</td>\n";
}
$this->td_colspan++;
@@ -550,7 +515,7 @@ class admin_skin
//-----------------------------------------
function add_standalone_row($text = "", $align='center', $class='pformstrip')
function add_standalone_row($text = "", $align='center', $class='tablesubheader')
{
return "<div class='tableborder'><div align='{$align}' class='{$class}'>{$text}</div></div>\n";
}
@@ -570,7 +535,7 @@ class admin_skin
for ($i = 0; $i < $count ; $i++ )
{
$td_col = $i % 2 ? 'tdrow2' : 'tdrow1';
$td_col = $i % 2 ? 'tablerow2' : 'tablerow1';
if ($css != "")
{
@@ -587,7 +552,7 @@ class admin_skin
}
else
{
if ($this->td_header[$i][1] != "")
if (isset($this->td_header[$i][1]) AND $this->td_header[$i][1] != "")
{
$width = " width='{$this->td_header[$i][1]}' ";
}
@@ -609,7 +574,7 @@ class admin_skin
//-----------------------------------------
function add_td_basic($text="",$align="left",$id="tdrow1", $colspanint=0) {
function add_td_basic($text="",$align="left",$id="tablerow1", $colspanint=0) {
$html = "";
$colspan = "";
@@ -682,6 +647,111 @@ class admin_skin
<div class='tablepad' align='center'>".$this->ipsclass->admin->skin_jump_menu()."</div></div></div>";
}
/*-------------------------------------------------------------------------*/
// Build up page span links
/*-------------------------------------------------------------------------*/
/**
* Build up page span links
*
* @param array Page data
* @return string Parsed page links HTML
* @since 2.0
*/
function build_pagelinks($data)
{
$work = array( 'page_span' => NULL, 'st_dots' => NULL, 'pages' => 0 );
$section = (!isset($data['leave_out']) OR $data['leave_out'] == "") ? 2 : $data['leave_out']; // Number of pages to show per section( either side of current), IE: 1 ... 4 5 [6] 7 8 ... 10
$use_st = (!isset($data['USE_ST']) OR $data['USE_ST'] == "") ? 'st' : $data['USE_ST'];
//-----------------------------------------
// Get the number of pages
//-----------------------------------------
if ( $data['TOTAL_POSS'] > 0 )
{
$work['pages'] = ceil( $data['TOTAL_POSS'] / $data['PER_PAGE'] );
}
$work['pages'] = $work['pages'] ? $work['pages'] : 1;
//-----------------------------------------
// Set up
//-----------------------------------------
$work['total_page'] = $work['pages'];
$work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1;
//-----------------------------------------
// Next / Previous page linkie poos
//-----------------------------------------
$previous_link = "";
$next_link = "";
if ( $work['current_page'] > 1 )
{
$start = $data['CUR_ST_VAL'] - $data['PER_PAGE'];
$previous_link = $this->ipsclass->skin_acp_global->pagination_previous_link("{$data['BASE_URL']}&amp;$use_st=$start");
}
if ( $work['current_page'] < $work['pages'] )
{
$start = $data['CUR_ST_VAL'] + $data['PER_PAGE'];
$next_link = $this->ipsclass->skin_acp_global->pagination_next_link("{$data['BASE_URL']}&amp;$use_st=$start");
}
//-----------------------------------------
// Loppy loo
//-----------------------------------------
if ($work['pages'] > 1)
{
$work['first_page'] = $this->ipsclass->skin_acp_global->pagination_make_jump($work['pages']);
for( $i = 0; $i <= $work['pages'] - 1; ++$i )
{
$RealNo = $i * $data['PER_PAGE'];
$PageNo = $i+1;
if ($RealNo == $data['CUR_ST_VAL'])
{
$work['page_span'] .= $this->ipsclass->skin_acp_global->pagination_current_page($PageNo);
}
else
{
if ($PageNo < ($work['current_page'] - $section))
{
$work['st_dots'] = $this->ipsclass->skin_acp_global->pagination_start_dots($data['BASE_URL']);
continue;
}
// If the next page is out of our section range, add some dotty dots!
if ($PageNo > ($work['current_page'] + $section))
{
$work['end_dots'] = $this->ipsclass->skin_acp_global->pagination_end_dots("{$data['BASE_URL']}&amp;$use_st=".($work['pages']-1) * $data['PER_PAGE']);
break;
}
$work['page_span'] .= $this->ipsclass->skin_acp_global->pagination_page_link("{$data['BASE_URL']}&amp;$use_st={$RealNo}",$PageNo);
}
}
$work['return'] = $this->ipsclass->skin_acp_global->pagination_compile($work['first_page'],$previous_link,$work['st_dots'],$work['page_span'],$work['end_dots'],$next_link,$data['TOTAL_POSS'],$data['PER_PAGE'], $data['BASE_URL']);
}
else
{
$work['return'] = $data['L_SINGLE'];
}
return $work['return'];
}
}