Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -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: 2005-12-08 16:32:40 +0000 (Thu, 08 Dec 2005) $
|
||||
| > $Revision: 96 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-10-16 14:09:47 +0100 (Mon, 16 Oct 2006) $
|
||||
| > $Revision: 650 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin functions 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_functions
|
||||
{
|
||||
@@ -41,27 +36,58 @@ class admin_functions
|
||||
var $ipsclass;
|
||||
|
||||
var $img_url;
|
||||
var $page_title = "Äîáðî ïîæàëîâàòü â àäìèíöåíòð Invision Power Board";
|
||||
var $page_detail = "Âû ìîæåòå íàñòðàèâàòü âàø ôîðóì, èñïîëüçóÿ ýòîò àäìèíöåíòð.<br><br>Íàæàòèå íà îäíó èç ññûëîê â ëåâîì ìåíþ çàãðóçèò âûáðàííûå íàñòðîéêè â îêíå ñïðàâà äëÿ àäìèíèñòðèðîâàíèÿ. Êàæäàÿ îïöèÿ ñîäåðæèò êàêóþ-òî èíôîðìàöèþ.";
|
||||
var $session_type = NULL;
|
||||
var $html;
|
||||
var $errors = "";
|
||||
var $nav = array();
|
||||
var $time_offset = 0;
|
||||
var $jump_menu = "";
|
||||
var $no_jump = 0;
|
||||
var $master_skin = array();
|
||||
var $depth_guide = '--';
|
||||
var $menu_ids = array();
|
||||
var $errors = "";
|
||||
var $nav = array();
|
||||
var $time_offset = 0;
|
||||
var $jump_menu = "";
|
||||
var $no_jump = 0;
|
||||
var $master_skin = array();
|
||||
var $depth_guide = '--';
|
||||
var $menu_ids = array();
|
||||
|
||||
var $page_title = "";
|
||||
var $page_detail = "";
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// CONSTRUCTOR
|
||||
// Get security auth key
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function admin_functions()
|
||||
/**
|
||||
* Returns the admin's security AUTH key
|
||||
*
|
||||
* @return string md5 auth key
|
||||
*/
|
||||
function security_auth_get()
|
||||
{
|
||||
$this->ipsclass->base_url = $this->ipsclass->base_url;
|
||||
$this->img_url = $this->ipsclass->skin_url;
|
||||
return md5( $this->ipsclass->member['email'] . '^' . $this->ipsclass->member['joined'] . '^' . $this->ipsclass->member['ip_address'] . md5( $this->ipsclass->vars['sql_pass'] ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check security key
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Checks the security key
|
||||
*
|
||||
* @param string md5 auth key
|
||||
* @param int return and not die?
|
||||
*/
|
||||
function security_auth_check( $auth_key='', $return_and_not_die=0 )
|
||||
{
|
||||
$auth_key = ( $auth_key ) ? $auth_key : trim( $_POST['_admin_auth_key'] );
|
||||
|
||||
if ( $auth_key != $this->security_auth_get() )
|
||||
{
|
||||
if ( $return_and_not_die )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error( "Security Mismatch - please go back and reload the form before attempting to submit the form / press the button again", 0 );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -79,13 +105,15 @@ class admin_functions
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$this->ipsclass->member['_perm_cache'] = $this->ipsclass->unpack_member_cache( $this->ipsclass->member['row_perm_cache'] );
|
||||
|
||||
//-------------------------------
|
||||
// Get lang: NEEDS SORTIN'
|
||||
//-------------------------------
|
||||
|
||||
if ( ! is_array( $this->perm_lang ) OR ! count( $this->perm_lang ) )
|
||||
{
|
||||
require_once( ROOT_PATH."cache/lang_cache/ru/acp_lang_acpperms.php" );
|
||||
require_once( ROOT_PATH."cache/lang_cache/en/acp_lang_acpperms.php" );
|
||||
$this->perm_lang = $lang;
|
||||
}
|
||||
|
||||
@@ -97,11 +125,10 @@ class admin_functions
|
||||
list( $perm_main , $_data ) = explode( '|', $perm );
|
||||
list( $perm_child, $perm_bit ) = explode( ':', $_data );
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->member['_perm_cache'][ $perm_main ] )
|
||||
{
|
||||
$this->ipsclass->kill_menu = 1;
|
||||
$this->ipsclass->admin->error("Âû íå èìååò äîñòóïà ê ýòîé òàáëèöå: ".$this->perm_lang[ $perm_main ] );
|
||||
$this->ipsclass->admin->error("You do not have permission to access the tab: ".$this->perm_lang[ $perm_main ] );
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -116,11 +143,11 @@ class admin_functions
|
||||
{
|
||||
if ( $this->perm_lang[ $perm_main .':'. $perm_child ] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå èìååò äîñòóïà ê âîçìîæíîñòè: ".$this->perm_lang[ $perm_main .':'. $perm_child ]);
|
||||
$this->ipsclass->admin->error("You do not have permission to access the feature: ".$this->perm_lang[ $perm_main .':'. $perm_child ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå èìååò äîñòóïà ê ýòîé âîçìîæíîñòè");
|
||||
$this->ipsclass->admin->error("You do not have permission to access that feature");
|
||||
}
|
||||
|
||||
exit();
|
||||
@@ -136,7 +163,7 @@ class admin_functions
|
||||
{
|
||||
if ( ! $this->ipsclass->member['_perm_cache'][ $perm_main .':'. $perm_child .':'. $perm_bit ] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå èìååò äîñòóïà ê ôóíêöèè ýòîé âîçìîæíîñòè");
|
||||
$this->ipsclass->admin->error("You do not have permission to access that feature function");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@@ -148,8 +175,27 @@ class admin_functions
|
||||
// ACP_SESSION
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function acp_session_validation( $check_ip=1 )
|
||||
function acp_session_validation()
|
||||
{
|
||||
//----------------------------------
|
||||
// Got a cookie wookey?
|
||||
// Small security risk currently
|
||||
// Until we add in the auth key to forms
|
||||
//----------------------------------
|
||||
|
||||
/*
|
||||
$cookie['admin_session_id'] = $this->ipsclass->my_getcookie('ipb_admin_session_id');
|
||||
|
||||
if ( $cookie['admin_session_id'] )
|
||||
{
|
||||
$this->ipsclass->input['adsess'] = $cookie['admin_session_id'];
|
||||
$this->session_type = 'cookie';
|
||||
}*/
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->input['adsess'] )
|
||||
{
|
||||
//----------------------------------
|
||||
@@ -157,7 +203,7 @@ class admin_functions
|
||||
//----------------------------------
|
||||
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Ñåññèé àäìèíèñòðàòîðà íå íàéäåíî";
|
||||
$this->ipsclass->admin_session['_session_message'] = "No administration session found";
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@@ -166,9 +212,7 @@ class admin_functions
|
||||
// We have a URL adsess, lets verify...
|
||||
//----------------------------------
|
||||
|
||||
$this->ipsclass->DB->query("SELECT * FROM ibf_admin_sessions WHERE session_id='".$this->ipsclass->input['adsess']."'");
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
$row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'admin_sessions', 'where' => "session_id='".$this->ipsclass->input['adsess']."'" ) );
|
||||
|
||||
if ( $row['session_id'] == "" )
|
||||
{
|
||||
@@ -177,7 +221,7 @@ class admin_functions
|
||||
//----------------------------------
|
||||
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Íåâîçìîæíî çàïðîñèòü ñåññèþ";
|
||||
$this->ipsclass->admin_session['_session_message'] = "Could not retrieve session record";
|
||||
return FALSE;
|
||||
}
|
||||
else if ($row['session_member_id'] == "")
|
||||
@@ -187,7 +231,7 @@ class admin_functions
|
||||
//----------------------------------
|
||||
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Íåâîçìîæíî îïðåäåëèòü ïðàâèëüíûé ID";
|
||||
$this->ipsclass->admin_session['_session_message'] = "Could not retrieve a valid member id";
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@@ -215,7 +259,7 @@ class admin_functions
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$this->ipsclass->member = $this->ipsclass->DB->fetch_row();
|
||||
$this->ipsclass->member['_perm_cache'] = unserialize( $this->ipsclass->member['row_perm_cache'] );
|
||||
$this->ipsclass->member['_perm_cache'] = isset($this->ipsclass->member['row_perm_cache']) AND is_string($this->ipsclass->member['row_perm_cache']) ? unserialize( $this->ipsclass->member['row_perm_cache'] ) : '';
|
||||
|
||||
//----------------------------------
|
||||
// Get perms
|
||||
@@ -232,7 +276,7 @@ class admin_functions
|
||||
//----------------------------------
|
||||
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "ID ïîëüçîâàòåëÿ íåâåðíî";
|
||||
$this->ipsclass->admin_session['_session_message'] = "Member ID invalid";
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@@ -240,15 +284,15 @@ class admin_functions
|
||||
//----------------------------------
|
||||
// Member found, check passy
|
||||
//----------------------------------
|
||||
|
||||
if ($row['session_member_login_key'] != $this->ipsclass->member['member_login_key'])
|
||||
|
||||
if ( $row['session_member_login_key'] != md5( $this->ipsclass->member['joined'] . $this->ipsclass->member['ip_address'] ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// Passys don't match..
|
||||
//----------------------------------
|
||||
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Ñåññèÿ ïàðîëÿ íå ñîâïàäàåò";
|
||||
$this->ipsclass->admin_session['_session_message'] = "Session member password mismatch";
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@@ -260,7 +304,7 @@ class admin_functions
|
||||
if ($this->ipsclass->member['g_access_cp'] != 1)
|
||||
{
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Âû íå èìååò äîñòóïà â àäìèíöåíòð";
|
||||
$this->ipsclass->admin_session['_session_message'] = "You do not have access to the administrative CP";
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@@ -282,14 +326,14 @@ class admin_functions
|
||||
if ( $this->ipsclass->admin_session['session_running_time'] < ( time() - 60*60*2) )
|
||||
{
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Òåêóùàÿ ñåññèÿ àäìèíèñòðàòîðà èñòåêëà";
|
||||
$this->ipsclass->admin_session['_session_message'] = "This administration session has expired";
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Are we checking IP's?
|
||||
//------------------------------
|
||||
|
||||
else if ($check_ip == 1)
|
||||
else if ( IPB_ACP_IP_MATCH == 1)
|
||||
{
|
||||
$first_ip = preg_replace( "/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/", "\\1.\\2.\\3", $this->ipsclass->admin_session['session_ip_address'] );
|
||||
$second_ip = preg_replace( "/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/", "\\1.\\2.\\3", $this->ipsclass->ip_address );
|
||||
@@ -297,7 +341,7 @@ class admin_functions
|
||||
if ( $first_ip != $second_ip )
|
||||
{
|
||||
$this->ipsclass->admin_session['_session_validated'] = 0;
|
||||
$this->ipsclass->admin_session['_session_message'] = "Âàø òåêóùèé IP íå ñîâïàäàåò íè ñ îäíîé íàøåé çàïèñüþ";
|
||||
$this->ipsclass->admin_session['_session_message'] = "Your current IP address does not match the one in our records";
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -400,7 +444,7 @@ class admin_functions
|
||||
{
|
||||
$skin_array[] = array( $id, $data['set_name'] );
|
||||
|
||||
if ( is_array( $this->master_skin[ $id ] ) )
|
||||
if ( isset($this->master_skin[ $id ]) AND is_array( $this->master_skin[ $id ] ) )
|
||||
{
|
||||
foreach( $this->master_skin[ $id ] as $id => $data )
|
||||
{
|
||||
@@ -438,7 +482,7 @@ class admin_functions
|
||||
// IMPORT FUNCTION
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function import_xml( $infilename )
|
||||
function import_xml( $infilename, $postfield='FILE_UPLOAD' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Allowed file-types
|
||||
@@ -450,9 +494,9 @@ class admin_functions
|
||||
// Upload
|
||||
//-----------------------------------------
|
||||
|
||||
$FILE_NAME = $_FILES['FILE_UPLOAD']['name'];
|
||||
$FILE_SIZE = $_FILES['FILE_UPLOAD']['size'];
|
||||
$FILE_TYPE = $_FILES['FILE_UPLOAD']['type'];
|
||||
$FILE_NAME = $_FILES[ $postfield ]['name'];
|
||||
$FILE_SIZE = $_FILES[ $postfield ]['size'];
|
||||
$FILE_TYPE = $_FILES[ $postfield ]['type'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Naughty Opera adds the filename on the end of the
|
||||
@@ -461,21 +505,23 @@ class admin_functions
|
||||
|
||||
$FILE_TYPE = preg_replace( "/^(.+?);.*$/", "\\1", $FILE_TYPE );
|
||||
|
||||
$content = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Naughty Mozilla likes to use "none" to indicate an empty upload field.
|
||||
// I love universal languages that aren't universal.
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
|
||||
if ( $_FILES[ $postfield ]['name'] == "" or ! $_FILES[ $postfield ]['name'] or ($_FILES[ $postfield ]['name'] == "none") )
|
||||
{
|
||||
continue;
|
||||
return $content;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not a naughty file?
|
||||
//-----------------------------------------
|
||||
|
||||
$file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", strtolower( $_FILES['FILE_UPLOAD']['name'] ) );
|
||||
$file_extension = preg_replace( "#^.*\.(.+?)$#si", "\\1", strtolower( $_FILES[ $postfield ]['name'] ) );
|
||||
|
||||
if ( ! in_array( $file_extension, $allowed_files ) )
|
||||
{
|
||||
@@ -483,11 +529,13 @@ class admin_functions
|
||||
return '';
|
||||
}
|
||||
|
||||
$content = "";
|
||||
//-----------------------------------------
|
||||
// Continue...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strstr( $FILE_NAME, $infilename ) )
|
||||
{
|
||||
if ( move_uploaded_file( $_FILES[ 'FILE_UPLOAD' ]['tmp_name'], $this->ipsclass->vars['upload_dir']."/".$FILE_NAME) )
|
||||
if ( move_uploaded_file( $_FILES[ $postfield ]['tmp_name'], $this->ipsclass->vars['upload_dir']."/".$FILE_NAME) )
|
||||
{
|
||||
if ( $FILE_NAME == $infilename.'.gz' )
|
||||
{
|
||||
@@ -671,7 +719,7 @@ class admin_functions
|
||||
|
||||
if ( ! is_dir($from_path) )
|
||||
{
|
||||
$this->errors = "Íåâîçìîæíî íàéòè ïàïêó /$from_path";
|
||||
$this->errors = "Could not locate directory '$from_path'";
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -679,7 +727,7 @@ class admin_functions
|
||||
{
|
||||
if ( ! @mkdir($to_path, $mode) )
|
||||
{
|
||||
$this->errors = "Íåâîçìîæíî ñîçäàòü ïàïêó /$to_path/! Ïîæàëóéñòà, ïðîâåðüòå ïðàâà äîñòóïà (CHMOD) è ïîïðîáóéòå ñíîâà.";
|
||||
$this->errors = "Could not create directory '$to_path' please check the CHMOD permissions and re-try";
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@@ -790,7 +838,7 @@ class admin_functions
|
||||
|
||||
if (! is_array($new) )
|
||||
{
|
||||
$ibforums->admin->error("Îøèáêà! Íå óäàëîñü îáíîâèòü êîíôèãóðàöèîííûé ôàéë ôîðóìà. Äåéñòâèå îòìåíåíî!");
|
||||
$this->ipsclass->admin->error("Error whilst attempting to rebuild the board config file, attempt aborted");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -859,7 +907,7 @@ class admin_functions
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->admin->error("Êðèòè÷åñêàÿ îøèáêà! Íå óäàëîñü îòêðûòü äëÿ çàïèñè ôàéë conf_global.php - èçìåíåíèÿ íå áóäóò âíåñåíû. Íåîáõîäèìî èçìåíèòü ïðàâà äîñòóïà (CHMOD) ê ôàéëó íà 0777.");
|
||||
$this->ipsclass->admin->error("Fatal Error: Could not open conf_global for writing - no changes applied. Try changing the CHMOD to 0777");
|
||||
}
|
||||
|
||||
// Pass back the new $INFO array to anyone who cares...
|
||||
@@ -877,29 +925,34 @@ class admin_functions
|
||||
|
||||
function compile_forum_perms()
|
||||
{
|
||||
$r_array = array( 'READ' => '', 'REPLY' => '', 'START' => '', 'UPLOAD' => '' );
|
||||
$r_array = array( 'READ' => '', 'REPLY' => '', 'START' => '', 'UPLOAD' => '', 'DOWNLOAD' => '', 'SHOW' => '' );
|
||||
|
||||
if ($this->ipsclass->input['READ_ALL'] == 1)
|
||||
if (isset($this->ipsclass->input['READ_ALL']) AND $this->ipsclass->input['READ_ALL'] == 1)
|
||||
{
|
||||
$r_array['READ'] = '*';
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['REPLY_ALL'] == 1)
|
||||
if (isset($this->ipsclass->input['REPLY_ALL']) AND $this->ipsclass->input['REPLY_ALL'] == 1)
|
||||
{
|
||||
$r_array['REPLY'] = '*';
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['START_ALL'] == 1)
|
||||
if (isset($this->ipsclass->input['START_ALL']) AND $this->ipsclass->input['START_ALL'] == 1)
|
||||
{
|
||||
$r_array['START'] = '*';
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['UPLOAD_ALL'] == 1)
|
||||
if (isset($this->ipsclass->input['UPLOAD_ALL']) AND $this->ipsclass->input['UPLOAD_ALL'] == 1)
|
||||
{
|
||||
$r_array['UPLOAD'] = '*';
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['SHOW_ALL'] == 1)
|
||||
if (isset($this->ipsclass->input['DOWNLOAD_ALL']) AND $this->ipsclass->input['DOWNLOAD_ALL'] == 1)
|
||||
{
|
||||
$r_array['DOWNLOAD'] = '*';
|
||||
}
|
||||
|
||||
if (isset($this->ipsclass->input['SHOW_ALL']) AND $this->ipsclass->input['SHOW_ALL'] == 1)
|
||||
{
|
||||
$r_array['SHOW'] = '*';
|
||||
}
|
||||
@@ -911,7 +964,7 @@ class admin_functions
|
||||
{
|
||||
if ($r_array['SHOW'] != '*')
|
||||
{
|
||||
if ($this->ipsclass->input[ 'SHOW_'.$data['perm_id'] ] == 1)
|
||||
if (isset($this->ipsclass->input[ 'SHOW_'.$data['perm_id'] ]) AND $this->ipsclass->input[ 'SHOW_'.$data['perm_id'] ] == 1)
|
||||
{
|
||||
$r_array['SHOW'] .= $data['perm_id'].",";
|
||||
}
|
||||
@@ -919,7 +972,7 @@ class admin_functions
|
||||
//-----------------------------------------
|
||||
if ($r_array['READ'] != '*')
|
||||
{
|
||||
if ($this->ipsclass->input[ 'READ_'.$data['perm_id'] ] == 1)
|
||||
if (isset($this->ipsclass->input[ 'READ_'.$data['perm_id'] ]) AND $this->ipsclass->input[ 'READ_'.$data['perm_id'] ] == 1)
|
||||
{
|
||||
$r_array['READ'] .= $data['perm_id'].",";
|
||||
}
|
||||
@@ -927,7 +980,7 @@ class admin_functions
|
||||
//-----------------------------------------
|
||||
if ($r_array['REPLY'] != '*')
|
||||
{
|
||||
if ($this->ipsclass->input[ 'REPLY_'.$data['perm_id'] ] == 1)
|
||||
if (isset($this->ipsclass->input[ 'REPLY_'.$data['perm_id'] ]) AND $this->ipsclass->input[ 'REPLY_'.$data['perm_id'] ] == 1)
|
||||
{
|
||||
$r_array['REPLY'] .= $data['perm_id'].",";
|
||||
}
|
||||
@@ -935,7 +988,7 @@ class admin_functions
|
||||
//-----------------------------------------
|
||||
if ($r_array['START'] != '*')
|
||||
{
|
||||
if ($this->ipsclass->input[ 'START_'.$data['perm_id'] ] == 1)
|
||||
if (isset($this->ipsclass->input[ 'START_'.$data['perm_id'] ]) AND $this->ipsclass->input[ 'START_'.$data['perm_id'] ] == 1)
|
||||
{
|
||||
$r_array['START'] .= $data['perm_id'].",";
|
||||
}
|
||||
@@ -943,18 +996,27 @@ class admin_functions
|
||||
//-----------------------------------------
|
||||
if ($r_array['UPLOAD'] != '*')
|
||||
{
|
||||
if ($this->ipsclass->input[ 'UPLOAD_'.$data['perm_id'] ] == 1)
|
||||
if (isset($this->ipsclass->input[ 'UPLOAD_'.$data['perm_id'] ]) AND $this->ipsclass->input[ 'UPLOAD_'.$data['perm_id'] ] == 1)
|
||||
{
|
||||
$r_array['UPLOAD'] .= $data['perm_id'].",";
|
||||
}
|
||||
}
|
||||
//-----------------------------------------
|
||||
if ($r_array['DOWNLOAD'] != '*')
|
||||
{
|
||||
if (isset($this->ipsclass->input[ 'DOWNLOAD_'.$data['perm_id'] ]) AND $this->ipsclass->input[ 'DOWNLOAD_'.$data['perm_id'] ] == 1)
|
||||
{
|
||||
$r_array['DOWNLOAD'] .= $data['perm_id'].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$r_array['START'] = preg_replace( "/,$/", "", $r_array['START'] );
|
||||
$r_array['REPLY'] = preg_replace( "/,$/", "", $r_array['REPLY'] );
|
||||
$r_array['READ'] = preg_replace( "/,$/", "", $r_array['READ'] );
|
||||
$r_array['UPLOAD'] = preg_replace( "/,$/", "", $r_array['UPLOAD'] );
|
||||
$r_array['SHOW'] = preg_replace( "/,$/", "", $r_array['SHOW'] );
|
||||
$r_array['START'] = preg_replace( "/,$/", "", $r_array['START'] );
|
||||
$r_array['REPLY'] = preg_replace( "/,$/", "", $r_array['REPLY'] );
|
||||
$r_array['READ'] = preg_replace( "/,$/", "", $r_array['READ'] );
|
||||
$r_array['UPLOAD'] = preg_replace( "/,$/", "", $r_array['UPLOAD'] );
|
||||
$r_array['DOWNLOAD'] = preg_replace( "/,$/", "", $r_array['DOWNLOAD'] );
|
||||
$r_array['SHOW'] = preg_replace( "/,$/", "", $r_array['SHOW'] );
|
||||
|
||||
return $r_array;
|
||||
}
|
||||
@@ -965,18 +1027,25 @@ class admin_functions
|
||||
|
||||
function print_popup()
|
||||
{
|
||||
global $use_gzip;
|
||||
|
||||
//--------------------------------------
|
||||
// Message in a bottle?
|
||||
//--------------------------------------
|
||||
|
||||
if ( $this->ipsclass->main_msg )
|
||||
{
|
||||
$html = $this->ipsclass->skin_global_acp->global_message();
|
||||
}
|
||||
$html = $this->ipsclass->main_msg ? $this->ipsclass->skin_acp_global->global_message() : '';
|
||||
|
||||
$html .= $this->ipsclass->skin_global_acp->global_popup( $this->ipsclass->html );
|
||||
$html .= $this->ipsclass->skin_acp_global->global_popup( $this->ipsclass->html );
|
||||
|
||||
if ( IPB_ACP_USE_GZIP == 1 )
|
||||
{
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@ob_start('ob_gzhandler');
|
||||
print $buffer;
|
||||
}
|
||||
|
||||
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
@header("Cache-Control: no-cache, must-revalidate");
|
||||
@header("Pragma: no-cache");
|
||||
|
||||
print $html;
|
||||
|
||||
@@ -993,7 +1062,7 @@ class admin_functions
|
||||
|
||||
if ( $this->ipsclass->can_use_fancy_js )
|
||||
{
|
||||
$this->ipsclass->html .= "<script type='text/javascript'>ajax_refresh( '$url', '$text', $addtotext );</script>\n<div style='height:300px;overflow:auto;font-weight:bold;line-height:140%;padding:5px;border:1px solid #000' id='refreshbox'>Èíèöèàëèçàöèÿ...</div>";
|
||||
$this->ipsclass->html .= "<script type='text/javascript'>ajax_refresh( '$url', '$text', $addtotext );</script>\n<div style='height:300px;overflow:auto;font-weight:bold;line-height:140%;padding:5px;border:1px solid #000' id='refreshbox'>Initializing...</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1016,7 +1085,7 @@ class admin_functions
|
||||
}
|
||||
else
|
||||
{
|
||||
print $this->ipsclass->skin_global_acp->global_redirect_hit( $url, $text );
|
||||
print $this->ipsclass->skin_acp_global->global_redirect_hit( $url, $text );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1094,7 @@ class admin_functions
|
||||
// Multi-redirect (hit)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function output_multiple_redirect_done($text='Ãîòîâî!')
|
||||
function output_multiple_redirect_done($text='Completed!')
|
||||
{
|
||||
if ( $this->ipsclass->can_use_fancy_js )
|
||||
{
|
||||
@@ -1036,7 +1105,7 @@ class admin_functions
|
||||
}
|
||||
else
|
||||
{
|
||||
print $this->ipsclass->skin_global_acp->global_redirect_done( $text );
|
||||
print $this->ipsclass->skin_acp_global->global_redirect_done( $text );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@@ -1047,18 +1116,23 @@ class admin_functions
|
||||
|
||||
function output()
|
||||
{
|
||||
global $use_gzip;
|
||||
$html = "";
|
||||
$navigation = array();
|
||||
$message = "";
|
||||
$help = "";
|
||||
$member_bar = "";
|
||||
$query_html = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Debug?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($this->ipsclass->DB->obj['debug'])
|
||||
{
|
||||
flush();
|
||||
print "<html><head><title>SQL Îòëàä÷èê</title><body bgcolor='white'><style type='text/css'> TABLE, TD, TR, BODY { font-family: verdana,arial, sans-serif;color:black;font-size:11px }</style>";
|
||||
print "<h1 align='center'>SQL Îáùåå âðåìÿ: {$this->ipsclass->DB->sql_time} äëÿ {$this->ipsclass->DB->query_cnt} çàïðîñîâ</h1><br />".$this->ipsclass->DB->debug_html;
|
||||
print "<br /><div align='center'><strong>Îáùåå âðåìÿ ðàáîòû SQL: {$this->ipsclass->DB->sql_time}</div></body></html>";
|
||||
print "<html><head><title>SQL Debugger</title><body bgcolor='white'><style type='text/css'> TABLE, TD, TR, BODY { font-family: verdana,arial, sans-serif;color:black;font-size:11px }</style>";
|
||||
print "<h1 align='center'>SQL Total Time: {$this->ipsclass->DB->sql_time} for {$this->ipsclass->DB->query_cnt} queries</h1><br />".$this->ipsclass->DB->debug_html;
|
||||
print "<br /><div align='center'><strong>Total SQL Time: {$this->ipsclass->DB->sql_time}</div></body></html>";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -1066,15 +1140,15 @@ class admin_functions
|
||||
// Start function proper
|
||||
//-----------------------------------------
|
||||
|
||||
$html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_global_acp->global_frame_wrapper(), $this->ipsclass->skin_global_acp->global_main_wrapper() );
|
||||
$html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->global_frame_wrapper(), $this->ipsclass->skin_acp_global->global_main_wrapper() );
|
||||
|
||||
$this->ipsclass->DB->close_db();
|
||||
|
||||
$navigation = array( "<a href='{$this->ipsclass->base_url}&act=index'>Íà ãëàâíóþ</a>" );
|
||||
$navigation = array( "<a href='{$this->ipsclass->base_url}&act=index'>ACP Home</a>" );
|
||||
|
||||
if ( count($this->nav) > 0 )
|
||||
{
|
||||
foreach ( $this->nav as $idx => $links )
|
||||
foreach ( $this->nav as $links )
|
||||
{
|
||||
if ($links[0] != "")
|
||||
{
|
||||
@@ -1093,17 +1167,22 @@ class admin_functions
|
||||
|
||||
if ( count($navigation) > 0 )
|
||||
{
|
||||
$html = str_replace( "<%NAV%>", $this->ipsclass->skin_global_acp->global_wrap_nav( implode( " > ", $navigation ) ), $html );
|
||||
$html = str_replace( "<%NAV%>", $this->ipsclass->skin_acp_global->global_wrap_nav( implode( " > ", $navigation ) ), $html );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Member bar..
|
||||
//-----------------------------------------
|
||||
|
||||
$member_bar = $this->ipsclass->skin_acp_global->global_memberbar();
|
||||
|
||||
$html = str_replace( "<%MEMBERBAR%>", $member_bar, $html );
|
||||
|
||||
//--------------------------------------
|
||||
// Message in a bottle?
|
||||
//--------------------------------------
|
||||
|
||||
if ( $this->ipsclass->main_msg )
|
||||
{
|
||||
$message = $this->ipsclass->skin_global_acp->global_message();
|
||||
}
|
||||
$message = $this->ipsclass->main_msg ? $this->ipsclass->skin_acp_global->global_message() : '';
|
||||
|
||||
//--------------------------------------
|
||||
// Help?
|
||||
@@ -1112,9 +1191,9 @@ class admin_functions
|
||||
$this->ipsclass->html_help_msg = $this->ipsclass->html_help_msg ? $this->ipsclass->html_help_msg : $this->page_detail;
|
||||
$this->ipsclass->html_help_title = $this->ipsclass->html_help_title ? $this->ipsclass->html_help_title : $this->page_title;
|
||||
|
||||
if ( $this->ipsclass->html_help_title )
|
||||
if ( $this->ipsclass->html_help_title AND $this->ipsclass->html_help_msg )
|
||||
{
|
||||
$help = $this->ipsclass->skin_global_acp->global_help_block( $this->ipsclass->html_help_title, $this->ipsclass->html_help_msg );
|
||||
$help = $this->ipsclass->skin_acp_global->information_box( $this->ipsclass->html_help_title, $this->ipsclass->html_help_msg.'<br /> ' ) . "<br >";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1141,8 +1220,6 @@ class admin_functions
|
||||
// Show queries
|
||||
//-----------------------------------------
|
||||
|
||||
$query_html = "";
|
||||
|
||||
if ( IN_DEV and count( $this->ipsclass->DB->obj['cached_queries']) )
|
||||
{
|
||||
$queries = "";
|
||||
@@ -1157,12 +1234,12 @@ class admin_functions
|
||||
$queries .= htmlspecialchars($q).'<hr />';
|
||||
}
|
||||
|
||||
$query_html .= $this->ipsclass->skin_global_acp->global_query_output($queries);
|
||||
$query_html .= $this->ipsclass->skin_acp_global->global_query_output($queries);
|
||||
}
|
||||
|
||||
global $Debug;
|
||||
|
||||
$query_html .= "<div align='center'><br />Âðåìÿ ãåíåðàöèè ñòðàíèöû: ".$Debug->endTimer()."</div>";
|
||||
$query_html .= "<div align='center'><br />Time: ".$Debug->endTimer()."</div>";
|
||||
|
||||
//-----------------------------------------
|
||||
// Other tags...
|
||||
@@ -1185,14 +1262,23 @@ class admin_functions
|
||||
$html = str_replace( "<body", "<body ".$this->ipsclass->body_extra, $html );
|
||||
}
|
||||
|
||||
$html = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $html );
|
||||
$html = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Gzip?
|
||||
//-----------------------------------------
|
||||
|
||||
if ($use_gzip == 1)
|
||||
if ( IPB_ACP_USE_GZIP )
|
||||
{
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$buffer = "";
|
||||
|
||||
if( count( ob_list_handlers() ) )
|
||||
{
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
@ob_start('ob_gzhandler');
|
||||
print $buffer;
|
||||
}
|
||||
@@ -1212,15 +1298,16 @@ class admin_functions
|
||||
|
||||
function build_tabs()
|
||||
{
|
||||
$onoff['content'] = 'taboff';
|
||||
$onoff['lookandfeel'] = 'taboff';
|
||||
$onoff['tools'] = 'taboff';
|
||||
$onoff['components'] = 'taboff';
|
||||
$onoff['admin'] = 'taboff';
|
||||
$onoff['content'] = 'taboff-main';
|
||||
$onoff['lookandfeel'] = 'taboff-main';
|
||||
$onoff['tools'] = 'taboff-main';
|
||||
$onoff['components'] = 'taboff-main';
|
||||
$onoff['admin'] = 'taboff-main';
|
||||
$onoff['help'] = 'taboff-main';
|
||||
|
||||
$onoff[ $this->ipsclass->menu_type ] = 'tabon';
|
||||
$onoff[ $this->ipsclass->menu_type ] = 'tabon-main';
|
||||
|
||||
return $this->ipsclass->skin_global_acp->global_tabs( $onoff );
|
||||
return $this->ipsclass->skin_acp_global->global_tabs( $onoff );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -1245,9 +1332,9 @@ class admin_functions
|
||||
require_once( ROOT_PATH."sources/acp_loaders/acp_pages_".$this->ipsclass->menu_type.".php" );
|
||||
|
||||
|
||||
$this->pages = $PAGES;
|
||||
$this->cats = $CATS;
|
||||
$this->desc = $DESC;
|
||||
$this->pages = isset($PAGES) ? $PAGES : array();
|
||||
$this->cats = isset($CATS) ? $CATS : array();
|
||||
$this->desc = isset($DESC) ? $DESC : array();
|
||||
|
||||
|
||||
$html = $this->build_tree();
|
||||
@@ -1299,13 +1386,13 @@ class admin_functions
|
||||
}
|
||||
|
||||
$this->ipsclass->main_msg = "";
|
||||
$this->ipsclass->html_title = "IPB: Àäìèíöåíòð: Ïåðåàäðåñàöèÿ...";
|
||||
$this->ipsclass->html_title = "IPB: ACP: Redirecting...";
|
||||
|
||||
$html = $this->ipsclass->skin_global_acp->global_redirect( $url, $time, $text );
|
||||
$html = $this->ipsclass->skin_acp_global->global_redirect( $url, $time, $text );
|
||||
|
||||
$this->ipsclass->html = str_replace( '<%CONTENT%>', $html, $this->ipsclass->skin_global_acp->global_main_wrapper() );
|
||||
$this->ipsclass->html = str_replace( '<%CONTENT%>', $html, $this->ipsclass->skin_acp_global->global_main_wrapper() );
|
||||
$this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html );
|
||||
$this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_url}/images/blank.gif)'", $this->ipsclass->html );
|
||||
$this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_acp_url}/images/blank.gif)'", $this->ipsclass->html );
|
||||
|
||||
@header("Content-type: text/html");
|
||||
print $this->ipsclass->html;
|
||||
@@ -1349,17 +1436,17 @@ class admin_functions
|
||||
|
||||
function error($error="", $is_popup=0)
|
||||
{
|
||||
$this->page_title = "Ñîîáùåíèå àäìèíöåíòðà";
|
||||
$this->page_detail = " ";
|
||||
$this->page_title = "Admin CP Message";
|
||||
$this->page_detail = $error;//" ";
|
||||
|
||||
$this->ipsclass->html .= "<div class='tableborder'>
|
||||
<div class='maintitle'>Ñîîáùåíèå àäìèíöåíòðà</div>
|
||||
<div class='tdrow1' style='padding:8px'>
|
||||
/*$this->ipsclass->html .= "<div class='tableborder'>
|
||||
<div class='tableheaderalt'>Admin CP Message</div>
|
||||
<div class='tablerow1' style='padding:8px'>
|
||||
<span style='font-size:12px'>$error</span>
|
||||
</div>
|
||||
</div>";
|
||||
</div>";*/
|
||||
|
||||
if ($is_popup == 0)
|
||||
if ( $is_popup == 0 )
|
||||
{
|
||||
$this->output();
|
||||
}
|
||||
@@ -1377,19 +1464,19 @@ class admin_functions
|
||||
{
|
||||
if ( $redirect )
|
||||
{
|
||||
$this->redirect( $this->ipsclass->base_url.'&'.$link_url, "<b>$title</b><br />Ïåðåìåùåíèå ê: ".$link_text );
|
||||
$this->redirect( $this->ipsclass->base_url.'&'.$link_url, "<b>$title</b><br />Redirecting to: ".$link_text );
|
||||
}
|
||||
|
||||
$this->page_title = $title;
|
||||
$this->page_detail = "Äåéñòâèå âûïîëíåíî óñïåøíî";
|
||||
$this->page_detail = "The action was executed successfully";
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "100%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Ðåçóëüòàò");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Result");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "<a href='{$this->ipsclass->base_url}&{$link_url}'>Ïåðåéòè â: $link_text</a>", "center" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "<a href='{$this->ipsclass->base_url}&{$link_url}'>Go to: $link_text</a>", "center" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "<a href='{$this->ipsclass->base_url}&act=index'>Ïåðåéòè íà ãëàâíóþ ñòðàíèöó àäìèíöåíòðà</a>", "center" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "<a href='{$this->ipsclass->base_url}&act=index'>Go to: Administration Home</a>", "center" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
@@ -1400,18 +1487,18 @@ class admin_functions
|
||||
// INFO screen
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function info_screen($text="", $title='Ïðåäóïðåæäåíèå Safe Mode')
|
||||
function info_screen($text="", $title='Safe Mode Restriction Warning')
|
||||
{
|
||||
$this->page_title = $title;
|
||||
$this->page_detail = "Ïîæàëóéñòà, ïîìíèòå ñëåäóþùåå:";
|
||||
$this->page_detail = "Please note the following:";
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "100%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Ðåçóëüòàò");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Result");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $text );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "<a href='{$this->ipsclass->base_url}&act=index'>Ïåðåéòè íà: ãëàâíóþ ñòðàíèöó àäìèíöåíòðà</a>", "center" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( "<a href='{$this->ipsclass->base_url}&act=index'>Go to: Administration Home</a>", "center" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
@@ -1430,8 +1517,7 @@ class admin_functions
|
||||
//----------------------------------
|
||||
|
||||
$html = "";
|
||||
$links = "";
|
||||
|
||||
|
||||
//----------------------------------
|
||||
// Known menu stuff
|
||||
//----------------------------------
|
||||
@@ -1443,9 +1529,11 @@ class admin_functions
|
||||
|
||||
foreach($this->cats as $cid => $data)
|
||||
{
|
||||
$name = $data[0];
|
||||
$color = $data[1];
|
||||
$extra = $data[2];
|
||||
$links = "";
|
||||
|
||||
$name = isset($data[0]) ? $data[0] : NULL;
|
||||
$color = isset($data[1]) ? $data[1] : NULL;
|
||||
$extra = isset($data[2]) ? $data[2] : NULL;
|
||||
|
||||
$this->menu_ids[] = $cid;
|
||||
|
||||
@@ -1453,7 +1541,7 @@ class admin_functions
|
||||
|
||||
foreach($this->pages[ $cid ] as $pid => $pdata)
|
||||
{
|
||||
if ( $pdata[2] != "" )
|
||||
if ( isset($pdata[2]) AND $pdata[2] != "" )
|
||||
{
|
||||
if ( ! @is_dir( ROOT_PATH.$pdata[2] ) )
|
||||
{
|
||||
@@ -1461,6 +1549,32 @@ class admin_functions
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($pdata[4]) AND $pdata[4] )
|
||||
{
|
||||
$icon = "<img src='{$this->ipsclass->skin_acp_url}/images/menu_shortcut.gif' border='0' alt='' valign='absmiddle'>";
|
||||
$extra_css = ';font-style:italic';
|
||||
}
|
||||
else
|
||||
{
|
||||
$icon = "<img src='{$this->ipsclass->skin_acp_url}/images/item_bullet.gif' border='0' alt='' valign='absmiddle'>";
|
||||
$extra_css = "";
|
||||
}
|
||||
|
||||
if ( isset($pdata[3]) AND $pdata[3] == 1 )
|
||||
{
|
||||
$theurl = $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?';
|
||||
}
|
||||
else
|
||||
{
|
||||
$theurl = $this->ipsclass->base_url.'&';
|
||||
}
|
||||
|
||||
if( isset($pdata[5]) AND $pdata[5] == 1 )
|
||||
{
|
||||
$theurl = "";
|
||||
$extra_css = "' target='_blank";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Got actual restrictions?
|
||||
//----------------------------------
|
||||
@@ -1517,10 +1631,15 @@ class admin_functions
|
||||
}
|
||||
}
|
||||
|
||||
$links .= $this->ipsclass->adskin->menu_cat_link($pid, $cid, $pdata[1], $pdata[0], $pdata[3], $pdata[4], $no_access);
|
||||
if ( $no_access )
|
||||
{
|
||||
$extra_css .= ";color:#777";
|
||||
}
|
||||
|
||||
$links .= $this->ipsclass->skin_acp_global->global_menu_cat_link( $cid, $pid, $icon, $theurl, $pdata[1], $extra_css, $pdata[0] );
|
||||
}
|
||||
|
||||
$html .= $this->ipsclass->adskin->menu_cat_wrap( $show, $name, $links, $cid, $this->desc[$cid], $color, $extra );
|
||||
|
||||
$html .= $this->ipsclass->skin_acp_global->global_menu_cat_wrap( $name, $links, $cid, isset($this->desc[$cid]) ? $this->desc[$cid] : '' );
|
||||
|
||||
unset($links);
|
||||
|
||||
@@ -1556,7 +1675,7 @@ class admin_functions
|
||||
{
|
||||
$html .= "<optgroup label='$name[0]'>\n";
|
||||
|
||||
foreach($PAGES[ $cid ] as $pid => $pdata)
|
||||
foreach($PAGES[ $cid ] as $pdata)
|
||||
{
|
||||
$html .= "<option value='$pdata[1]'>$pdata[0]</option>\n";
|
||||
}
|
||||
@@ -1564,7 +1683,7 @@ class admin_functions
|
||||
$html .= "</optgroup>\n";
|
||||
}
|
||||
|
||||
$html .= "</select> <input type='button' class='jmenubutton' value='Âïåðåä!' onclick='dojump();' />\n</form>";
|
||||
$html .= "</select> <input type='button' class='jmenubutton' value='Go!' onclick='dojump();' />\n</form>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
@@ -1586,13 +1705,13 @@ class admin_functions
|
||||
|
||||
$html = "<form name='gobaakaachoo'>
|
||||
<select name='chooseacardanycard' class='realbutton' onchange=\"autojumpmenu(this)\">
|
||||
<option value=''>Áûñòðûé ïåðåõîä ïî ñòèëþ: {$r['set_name']}</option>
|
||||
<option value=''>Set: {$r['set_name']} options</option>
|
||||
<option value=''>-------------------</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=wrap&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Èçìåíèòü ãëàâíûé øàáëîí ôîðóìà</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=templ&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Èçìåíèòü HTML øàáëîíû ñòèëÿ</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=style&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Èçìåíèòü CSS ñòèëè (ðàñøèðåííûé ðåæèì)</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=style&code=colouredit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Èçìåíèòü CSS ñòèëè (ïðîñòîé ðåæèì)</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=image&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Èçìåíèòü ìàêðîñû</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=wrap&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Edit Board Header & Footer Wrapper</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=templ&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Edit Template HTML</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=style&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Edit CSS (Advanced Mode)</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=style&code=colouredit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Edit CSS (Easy Mode)</option>
|
||||
<option value='{$this->ipsclass->adskin->base_url}§ion=lookandfeel&act=image&code=edit&id={$r['set_skin_set_id']}&p={$r['set_skin_set_parent']}'>Edit Replacement Macros</option>
|
||||
</select>
|
||||
</form>";
|
||||
|
||||
|
||||
Reference in new issue
Block a user