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

+153 -54
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: 2005-10-28 15:18:16 +0100 (Fri, 28 Oct 2005) $
| > $Revision: 67 $
| > $Author: bfarber $
| > $Date: 2006-10-06 10:09:22 +0100 (Fri, 06 Oct 2006) $
| > $Revision: 611 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Components Functions
@@ -34,7 +24,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
@@ -53,6 +43,7 @@ class ad_login_auth
function auto_run()
{
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Log In Manager" );
switch($this->ipsclass->input['code'])
{
@@ -97,7 +88,11 @@ class ad_login_auth
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->components_move();
break;
case 'master_xml_export':
$this->master_xml_export();
break;
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_list();
@@ -105,7 +100,90 @@ class ad_login_auth
}
}
/*-------------------------------------------------------------------------*/
// Export Master XML
/*-------------------------------------------------------------------------*/
function master_xml_export()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$entry = array();
//-----------------------------------------
// Get XML class
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
$xml->doc_type = $this->ipsclass->vars['gb_char_set'];
$xml->xml_set_root( 'export', array( 'exported' => time() ) );
//-----------------------------------------
// Set group
//-----------------------------------------
$xml->xml_add_group( 'group' );
//-----------------------------------------
// Get templates...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'login_methods' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$content = array();
if ( $r['login_folder_name'] == 'internal' )
{
$r['login_enabled'] = 1;
}
else if ( $r['login_folder_name'] == 'ipconverge' )
{
$r['login_maintain_url'] = '';
$r['login_register_url'] = '';
$r['login_login_url'] = '';
$r['login_logout_url'] = '';
$r['login_enabled'] = 0;
}
else
{
$r['login_enabled'] = 0;
}
//-----------------------------------------
// Sort the fields...
//-----------------------------------------
foreach( $r as $k => $v )
{
$content[] = $xml->xml_build_simple_tag( $k, $v );
}
$entry[] = $xml->xml_build_entry( 'row', $content );
}
$xml->xml_add_entry_to_group( 'group', $entry );
$xml->xml_format_document();
$doc = $xml->xml_document;
//-----------------------------------------
// Print to browser
//-----------------------------------------
$this->ipsclass->admin->show_download( $doc, 'loginauth.xml', '', 0 );
}
/*-------------------------------------------------------------------------*/
// Components Rebuild Cache
@@ -148,14 +226,14 @@ class ad_login_auth
if ( ! $this->ipsclass->input['file_location'] )
{
$this->ipsclass->main_msg = "Çàãðóæàåìûé ôàéë íå íàéäåí!";
$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
$this->components_list();
return;
}
if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) )
{
$this->ipsclass->main_msg = "Íåëüçÿ íàéòè ôàéë äëÿ îòêðûòèÿ: " . ROOT_PATH . $this->ipsclass->input['file_location'];
$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location'];
$this->components_list();
return;
}
@@ -193,6 +271,11 @@ class ad_login_auth
$content = $this->ipsclass->admin->import_xml( $tmp_name );
}
if( !$content )
{
$this->ipsclass->admin->error( "Import file was not in the correct format or was corrupt" );
}
//-----------------------------------------
// Get current components.
//-----------------------------------------
@@ -212,7 +295,7 @@ class ad_login_auth
// Get xml mah-do-dah
//-----------------------------------------
require( KERNEL_PATH.'class_xml.php' );
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
@@ -242,7 +325,7 @@ class ad_login_auth
$xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp;
}
foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $id => $entry )
foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $entry )
{
$newrow = array();
@@ -281,7 +364,7 @@ class ad_login_auth
$this->components_rebuildcache();
$this->ipsclass->main_msg = "$updated êîìïîíåíòîâ îáíîâëåíî $inserted êîìïîíåíòîâ âñòàâëåíî";
$this->ipsclass->main_msg = "$updated components updated $inserted components inserted";
$this->components_list();
}
@@ -307,7 +390,7 @@ class ad_login_auth
{
if ( ! $com_id )
{
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
$this->ipsclass->main_msg = "No ID was passed, please try again";
$this->components_list();
return;
}
@@ -357,7 +440,7 @@ class ad_login_auth
$entry = array();
foreach( $rows as $idx => $r )
foreach( $rows as $r )
{
$content = array();
@@ -404,7 +487,7 @@ class ad_login_auth
if ( ! $login['login_id'] )
{
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî.";
$this->ipsclass->main_msg = "No ID was passed, please try again.";
$this->login_list();
return;
}
@@ -435,10 +518,9 @@ class ad_login_auth
$this->ipsclass->html .= $this->html->login_diagnostics( $login );
$this->ipsclass->html_help_title = "Óïðàâëåíèå àâòîðèçàöèåé";
$this->ipsclass->html_help_msg = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü èäåíòèôèêàöèîííûìè ìåòîäàìè äëÿ âõîäà.";
$this->ipsclass->html_help_title = "Log In Manager";
$this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods.";
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Óïðàâëåíèå àâòîðèçàöèåé" );
$this->ipsclass->admin->output();
}
@@ -465,7 +547,7 @@ class ad_login_auth
$login_replace_form = intval($this->ipsclass->input['login_replace_form']);
$login_installed = intval($this->ipsclass->input['login_installed']);
$login_safemode = intval($this->ipsclass->input['login_safemode']);
$login_allow_create = intval($this->ipsclass->input['login_allow_create']);
$login_user_id = trim($this->ipsclass->input['login_user_id']);
//--------------------------------------------
// Checks...
@@ -475,7 +557,7 @@ class ad_login_auth
{
if ( ! $login_id )
{
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
$this->ipsclass->main_msg = "No ID was passed, please try again";
$this->login_list();
return;
}
@@ -493,7 +575,7 @@ class ad_login_auth
if ( ! $login_title OR ! $login_folder_name OR ! $login_folder_name )
{
$this->ipsclass->main_msg = "Âû äîëæíû çàïîëíèòü âñå ïîëÿ";
$this->ipsclass->main_msg = "You must complete the entire form.";
$this->login_form( $type );
return;
}
@@ -507,12 +589,15 @@ class ad_login_auth
'login_folder_name' => $login_folder_name,
'login_maintain_url' => $login_maintain_url,
'login_register_url' => $login_register_url,
'login_login_url' => $login_login_url,
'login_logout_url' => $login_logout_url,
'login_alt_login_html' => $login_alt_login_html,
'login_type' => $login_type,
'login_enabled' => $login_enabled,
'login_settings' => $login_settings,
'login_replace_form' => $login_replace_form,
'login_allow_create' => $login_allow_create
'login_allow_create' => 1,
'login_user_id' => $login_user_id,
);
//--------------------------------------------
@@ -534,15 +619,32 @@ class ad_login_auth
$array['login_date'] = time();
$this->ipsclass->DB->do_insert( 'login_methods', $array );
$this->ipsclass->main_msg = 'Íîâûé ìåòîä âõîäà áûë äîáàâëåí';
$this->ipsclass->main_msg = 'New Log In Method Added';
}
else
{
$this->ipsclass->DB->do_update( 'login_methods', $array, 'login_id='.$login_id );
$this->ipsclass->main_msg = 'Íîâûé ìåòîä âõîäà áûë èçìåíåí';
$this->ipsclass->main_msg = 'Log In Method Edited';
}
//-----------------------------------------
// Rebuild cache
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
$adsettings = new ad_settings();
$adsettings->ipsclass =& $this->ipsclass;
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_folder_name ), "conf_key='ipbli_key'" );
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_user_id ), "conf_key='ipbli_usertype'" );
$adsettings->setting_rebuildcache();
//-----------------------------------------
// Return, at once.
//-----------------------------------------
$this->login_list();
}
@@ -556,8 +658,9 @@ class ad_login_auth
// Init Vars
//-----------------------------------------
$login_id = intval($this->ipsclass->input['login_id']);
$login_dd = array( 0 => array( 'passthrough', 'Pass-Through' ), 1 => array( 'onfail', 'On-Fail' ) );
$login_id = intval($this->ipsclass->input['login_id']);
$login_dd = array( 0 => array( 'passthrough', 'Pass-Through' ), 1 => array( 'onfail', 'On-Fail' ) );
$login_unt = array( 0 => array( 'username', 'User Name' ), 1 => array( 'email', 'Email Address' ) );
//-----------------------------------------
// Check (please?)
@@ -566,8 +669,8 @@ class ad_login_auth
if ( $type == 'add' )
{
$formcode = 'login_add_do';
$title = "Ñîçäàíèÿ íîâîãî ìåòîäà âõîäà";
$button = "Ñîçäàòü";
$title = "Register New Log In Method";
$button = "Register New Log In Method";
}
else
{
@@ -575,14 +678,14 @@ class ad_login_auth
if ( ! $login['login_id'] )
{
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî.";
$this->ipsclass->main_msg = "No ID was passed, please try again.";
$this->login_list();
return;
}
$formcode = 'login_edit_do';
$title = "Ðåäàêòèðîâàíèå: ".$login['login_title'];
$button = "Ñîõðàíèòü èçìåíåíèÿ";
$title = "Edit Log In Method ".$login['login_title'];
$button = "Save Changes";
}
//-------------------------------
@@ -596,12 +699,14 @@ class ad_login_auth
$form['login_folder_name'] = $this->ipsclass->adskin->form_input( 'login_folder_name' , $_POST['login_folder_name'] ? $_POST['login_folder_name'] : $login['login_folder_name'] );
$form['login_maintain_url'] = $this->ipsclass->adskin->form_input( 'login_maintain_url' , $_POST['login_maintain_url'] ? $_POST['login_maintain_url'] : $login['login_maintain_url'] );
$form['login_register_url'] = $this->ipsclass->adskin->form_input( 'login_register_url' , $_POST['login_register_url'] ? $_POST['login_register_url'] : $login['login_register_url'] );
$form['login_login_url'] = $this->ipsclass->adskin->form_input( 'login_login_url' , $_POST['login_login_url'] ? $_POST['login_login_url'] : $login['login_login_url'] );
$form['login_logout_url'] = $this->ipsclass->adskin->form_input( 'login_logout_url' , $_POST['login_logout_url'] ? $_POST['login_logout_url'] : $login['login_logout_url'] );
$form['login_alt_login_html'] = $this->ipsclass->adskin->form_textarea( 'login_alt_login_html', $this->ipsclass->txt_htmlspecialchars( $_POST['login_alt_login_html'] ? $_POST['login_alt_login_html'] : $login['login_alt_login_html'] ) );
$form['login_enabled'] = $this->ipsclass->adskin->form_yes_no( 'login_enabled' , $_POST['login_enabled'] ? $_POST['login_enabled'] : $login['login_enabled'] );
$form['login_settings'] = $this->ipsclass->adskin->form_yes_no( 'login_settings' , $_POST['login_settings'] ? $_POST['login_settings'] : $login['login_settings'] );
$form['login_replace_form'] = $this->ipsclass->adskin->form_yes_no( 'login_replace_form' , $_POST['login_replace_form'] ? $_POST['login_replace_form'] : $login['login_replace_form'] );
$form['login_type'] = $this->ipsclass->adskin->form_dropdown( 'login_type' , $login_dd, $_POST['login_type'] ? $_POST['login_type'] : $login['login_type'] );
$form['login_allow_create'] = $this->ipsclass->adskin->form_yes_no( 'login_allow_create' , $_POST['login_allow_create'] ? $_POST['login_allow_create'] : $login['login_allow_create'] );
$form['login_type'] = $this->ipsclass->adskin->form_dropdown( 'login_type' , $login_dd , $_POST['login_type'] ? $_POST['login_type'] : $login['login_type'] );
$form['login_user_id'] = $this->ipsclass->adskin->form_dropdown( 'login_user_id' , $login_unt, $_POST['login_user_id'] ? $_POST['login_user_id'] : $login['login_user_id'] );
if ( IN_DEV )
{
@@ -611,10 +716,10 @@ class ad_login_auth
$this->ipsclass->html .= $this->html->login_form( $form, $title, $formcode, $button, $login );
$this->ipsclass->html_help_title = "Óïðàâëåíèå àâòîðèçàöèåé";
$this->ipsclass->html_help_msg = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü èäåíòèôèêàöèîííûìè ìåòîäàìè äëÿ àâòîðèçàöèè.";
$this->ipsclass->html_help_title = "Log In Manager";
$this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods.";
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Óïðàâëåíèå àâòîðèçàöèåé" );
$this->ipsclass->admin->nav[] = array( "", "Add/Edit Login Module" );
$this->ipsclass->admin->output();
}
@@ -624,8 +729,6 @@ class ad_login_auth
function login_list()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Óïðàâëåíèå âõîäîì èäåíòèôèêàöèè' );
//-------------------------------
// INIT
//-------------------------------
@@ -659,14 +762,10 @@ class ad_login_auth
$this->ipsclass->html .= $this->html->login_overview( $content );
$this->ipsclass->admin->page_title = "Óïðàâëåíèå âõîäîì èäåíòèôèêàöèè";
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü ìåòîäàìè âõîäà.";
$this->ipsclass->admin->page_title = "Log In Authentication Manager";
$this->ipsclass->admin->page_detail = "This section will allow you to manage your log in methods.";
$this->ipsclass->admin->output();
}
}