Version 2.2.2
This commit is contained in:
1 parent
22f1b963ee
commit
a3bb603c96
858 files changed
+479463
-188140
No files matched your search
@@ -11,6 +11,24 @@ class action_overview
|
||||
function action_overview( & $install )
|
||||
{
|
||||
$this->install =& $install;
|
||||
|
||||
$this->install->ipsclass->login_type = 'username';
|
||||
|
||||
if( $this->install->ipsclass->DB->field_exists( "conf_id", "conf_settings" ) )
|
||||
{
|
||||
$this->install->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'conf_settings', 'where' => "conf_key IN('ipbli_usertype','converge_login_method')", 'order' => 'conf_key ASC' ) );
|
||||
$this->install->ipsclass->DB->exec_query();
|
||||
|
||||
while( $r = $this->install->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$r['conf_value'] = $r['conf_value'] ? $r['conf_value'] : $r['conf_default'];
|
||||
|
||||
if( $r['conf_value'] )
|
||||
{
|
||||
$this->install->ipsclass->login_type = $r['conf_value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function run()
|
||||
@@ -22,109 +40,118 @@ class action_overview
|
||||
|
||||
if ( empty($this->install->ipsclass->input['username']) )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "You must enter a username before proceeding" ) );
|
||||
$this->install->template->append( $this->install->template->login_page( "Íåîáõîäèìî óêàçàòü èìÿ ïîëüçîâàòåëÿ" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
|
||||
$this->install->ipsclass->input['username'] = str_replace( '|', '|', $this->install->ipsclass->input['username'] );
|
||||
|
||||
if ( empty($this->install->ipsclass->input['password']) )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "You must enter a password before proceeding" ) );
|
||||
$this->install->template->append( $this->install->template->login_page( "Íåîáõîäèìî óêàçàòü ïàðîëü" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Attempt to get the details from the
|
||||
// DB
|
||||
//----------------------------------
|
||||
|
||||
$this->install->ipsclass->DB->query("SELECT m.*, g.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) WHERE LOWER(name)='".strtolower($this->install->ipsclass->input['username'])."'");
|
||||
$mem = $this->install->ipsclass->DB->fetch_row();
|
||||
//----------------------------------
|
||||
// Attempt to get the details from the
|
||||
// DB
|
||||
//----------------------------------
|
||||
|
||||
if( $this->install->ipsclass->login_type == 'username' )
|
||||
{
|
||||
$this->install->ipsclass->DB->query("SELECT m.*, g.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) WHERE LOWER(name)='".strtolower($this->install->ipsclass->input['username'])."'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->DB->query("SELECT m.*, g.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) WHERE LOWER(email)='".strtolower($this->install->ipsclass->input['username'])."'");
|
||||
}
|
||||
|
||||
$mem = $this->install->ipsclass->DB->fetch_row();
|
||||
|
||||
//----------------------------------
|
||||
// Get perms
|
||||
//----------------------------------
|
||||
if ( empty($mem['id']) )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Could not find a record matching that username, please check the spelling" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Load converge member
|
||||
//----------------------------------
|
||||
|
||||
if( !$this->install->ipsclass->DB->field_exists( 'converge_id', 'members_converge' ) OR
|
||||
( isset($this->install->saved_data['vid']) AND $this->install->saved_data['vid'] < 10003 ) )
|
||||
{
|
||||
$pass = md5( $this->install->ipsclass->input['password'] );
|
||||
|
||||
if ( $pass != $mem['password'] AND $pass != $mem['legacy_password'] )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "The password you entered is not correct" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($mem['g_access_cp'] != 1)
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "You do not have access to the administrative CP" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->member = $mem;
|
||||
$this->install->saved_data['loginkey'] = $mem['password'] ? md5($mem['password']) : md5($mem['legacy_password']);
|
||||
$this->install->saved_data['securekey'] = $this->install->ipsclass->return_md5_check();
|
||||
$this->install->saved_data['mid'] = $mem['id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->converge->converge_load_member($mem['email']);
|
||||
|
||||
if ( ! $this->install->ipsclass->converge->member['converge_id'] )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Could not find a record matching that username, please check the spelling" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
//----------------------------------
|
||||
// Get perms
|
||||
//----------------------------------
|
||||
if ( empty($mem['id']) )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Ïîëüçîâàòåëü ñ óêàçàííûìè èìåíåì íå ñóùåñòâóåò â ñèñòåìå" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Load converge member
|
||||
//----------------------------------
|
||||
|
||||
if( !$this->install->ipsclass->DB->field_exists( 'converge_id', 'members_converge' ) OR
|
||||
( isset($this->install->saved_data['vid']) AND $this->install->saved_data['vid'] < 10003 ) )
|
||||
{
|
||||
$pass = md5( $this->install->ipsclass->input['password'] );
|
||||
|
||||
if ( $pass != $mem['password'] AND $pass != $mem['legacy_password'] )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Ââåäåííûé ïàðîëü íåâåðåí" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($mem['g_access_cp'] != 1)
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Âû íå îáëàäàåòå ïðàâàìè àäìèíèñòðàòîðà" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->member = $mem;
|
||||
$this->install->saved_data['loginkey'] = $mem['password'] ? md5($mem['password']) : md5($mem['legacy_password']);
|
||||
$this->install->saved_data['securekey'] = $this->install->ipsclass->return_md5_check();
|
||||
$this->install->saved_data['mid'] = $mem['id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->converge->converge_load_member($mem['email']);
|
||||
|
||||
if ( ! $this->install->ipsclass->converge->member['converge_id'] )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Ïîëüçîâàòåëü ñ óêàçàííûìè email íå ñóùåñòâóåò â ñèñòåìå" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Check converge pass
|
||||
//----------------------------------
|
||||
//----------------------------------
|
||||
// Check converge pass
|
||||
//----------------------------------
|
||||
|
||||
$pass = md5( $this->install->ipsclass->input['password'] );
|
||||
|
||||
if ( $this->install->ipsclass->converge->converge_authenticate_member( $pass ) != TRUE )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "The password you entered is not correct" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($mem['g_access_cp'] != 1)
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "You do not have access to the administrative CP" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->member = $mem;
|
||||
$this->install->saved_data['loginkey'] = $mem['member_login_key'];
|
||||
$this->install->saved_data['securekey'] = $this->install->ipsclass->return_md5_check();
|
||||
$this->install->saved_data['mid'] = $mem['id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pass = md5( $this->install->ipsclass->input['password'] );
|
||||
|
||||
if ( $this->install->ipsclass->converge->converge_authenticate_member( $pass ) != TRUE )
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Ââåäåííûé ïàðîëü íåâåðåí" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($mem['g_access_cp'] != 1)
|
||||
{
|
||||
$this->install->template->append( $this->install->template->login_page( "Âû íå îáëàäàåòå ïðàâàìè àäìèíèñòðàòîðà" ) );
|
||||
$this->install->template->next_action = '?p=overview';
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->install->ipsclass->member = $mem;
|
||||
$this->install->saved_data['loginkey'] = $mem['member_login_key'];
|
||||
$this->install->saved_data['securekey'] = $this->install->ipsclass->return_md5_check();
|
||||
$this->install->saved_data['mid'] = $mem['id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->install->get_version_latest();
|
||||
@@ -132,19 +159,19 @@ class action_overview
|
||||
$error = array();
|
||||
if ( ! $this->install->last_poss_id )
|
||||
{
|
||||
$error[] = "An error has occured, we are unable to determine the current version or if there are any required upgrade files left to run";
|
||||
$error[] = "Íå óäàëîñü îïðåäåëèòü ïîñëåäíþþ äîñòóïíóþ âåðñèþ ïðîäóêòà.";
|
||||
}
|
||||
if ( count($this->install->versions) == 0 )
|
||||
{
|
||||
$error[] = "Could not locate the required upgrade script: 'upg_{$this->install->last_poss_id}/version_history.php'";
|
||||
$error[] = "Íå óäàëîñü íàéòè ñêðèïò äëÿ îáíîâëåíèÿ: 'upg_{$this->install->last_poss_id}/version_history.php'";
|
||||
}
|
||||
if ( ! $this->install->current_version )
|
||||
{
|
||||
$error[] = "An error has occured, we are unable to determine the current version or if there are any required upgrade files left to run";
|
||||
$error[] = "Íå óäàëîñü îïðåäåëèòü âåðñèþ óñòàíîâëåííîãî ïðîäóêòà";
|
||||
}
|
||||
if ( $this->install->last_poss_id <= $this->install->current_version )
|
||||
if ( $this->install->last_poss_id AND $this->install->last_poss_id <= $this->install->current_version )
|
||||
{
|
||||
$error[] = "Your installation is up to date; no upgrade required";
|
||||
$error[] = "Ó âàñ óñòàíîâëåíà ïîñëåäíÿÿ äîñòóïíàÿ âåðñèÿ ïðîäóêòà. Îáíîâëåíèå íå òðåáóåòñÿ.";
|
||||
}
|
||||
|
||||
$checkfiles = array( ROOT_PATH ."resources/ipb_templates.xml",
|
||||
@@ -181,7 +208,7 @@ class action_overview
|
||||
{
|
||||
if ( ! file_exists($cf) )
|
||||
{
|
||||
$error[] = "Cannot locate the file '$cf'.";
|
||||
$error[] = "Ìàñòåð íå ñìîã íàéòè íåîáõîäèìûé äëÿ ðàáîòû ôàéë '$cf'.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +216,7 @@ class action_overview
|
||||
{
|
||||
if ( ! is_writeable($cf) )
|
||||
{
|
||||
$error[] = "Cannot write to the file or folder '$cf'. Please CHMOD to 0777.";
|
||||
$error[] = "Ðåñóðñ (ôàéë èëè äèðåêòîðèÿ) '$cf' íå äîñòóïåí äëÿ çàïèñè. Ïîæàëóéñòà èçìåíèòå CHMOD íà 0777.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +228,7 @@ class action_overview
|
||||
return;
|
||||
}
|
||||
|
||||
$current_version = $this->install->current_version == '00000' ? 'not installed' : $this->install->versions[ $this->install->current_version ];
|
||||
$current_version = $this->install->current_version == '00000' ? 'íå óñòàíîâëåí' : $this->install->versions[ $this->install->current_version ];
|
||||
|
||||
if ( $this->install->current_version == '00000' )
|
||||
{
|
||||
@@ -209,14 +236,14 @@ class action_overview
|
||||
}
|
||||
else
|
||||
{
|
||||
$summary .= "Upgrade from ".$this->install->versions[ $this->install->current_version ]." to ".$this->install->versions[ $this->install->last_poss_id ];
|
||||
$summary .= "îáíîâëåíèå ".$this->install->versions[ $this->install->current_version ]." äî âåðñèè ".$this->install->versions[ $this->install->last_poss_id ];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Time check...
|
||||
//-----------------------------------------
|
||||
|
||||
$summary .= "<br /><br /><strong>Checking 'resources' directory files</strong>";
|
||||
$summary .= "<br /><br /><strong>Ïðîâåðêà âàëèäíîñòè ðåñóðñ-ôàéëîâ</strong>";
|
||||
$_flag = 0;
|
||||
|
||||
foreach ( $timecheck as $cf )
|
||||
@@ -226,19 +253,35 @@ class action_overview
|
||||
if ( $time_to_check AND $_time AND ( ( $time_to_check - (86400 * 7) ) > $_time ) )
|
||||
{
|
||||
$_flag = 1;
|
||||
$summary .= "<div style='color:red'>·" . str_replace( ROOT_PATH, '', $cf ) . ' may be out of date</div>';
|
||||
$summary .= "<div style='color:red'>·" . str_replace( ROOT_PATH, '', $cf ) . ' ìîæåò áûòü óñòàðåâøèì</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( $_flag )
|
||||
{
|
||||
$summary .= "<br /><div>Please check the above files to make sure they have been uploaded from the ".$this->install->versions[ $this->install->last_poss_id ]." download";
|
||||
$summary .= "<br /><div>Ïîæàëóéñòà óáåäèòåñü, ÷òî ôàéëû èç ñïèñêà çàêà÷àíû èç äèñòðèáóòèâà ".$this->install->versions[ $this->install->last_poss_id ]." âåðñèè";
|
||||
}
|
||||
else
|
||||
{
|
||||
$summary .= "<div style='color:green'>All files checked OK</div>";
|
||||
$summary .= "<div style='color:green'>Âñå ðåñóðñ-ôàéëû âàëèäíû</div>";
|
||||
}
|
||||
|
||||
if ( $cp = $this->install->get_db_codepage() )
|
||||
{
|
||||
$summary .= "
|
||||
<br />
|
||||
<strong>Êîäèðîâêà òàáëèö â MySQL</strong>
|
||||
<table width='100%' cellspacing='0' cellpadding='0' align='left' border='0'>
|
||||
<tr>
|
||||
<td class='title'><div style='color:gray; font-weight:normal;'>Íå èçìåíÿéòå, åñëè íå óâåðåíû.</div></td>
|
||||
<td class='content'><input type='text' name='mysql_codepage' class='sql_form' value='" . $cp . "'></td>
|
||||
</tr>
|
||||
</table>";
|
||||
|
||||
} else {
|
||||
$summary .= "<input type='hidden' name='mysql_codepage' value='none'>";
|
||||
}
|
||||
|
||||
/* Page Output */
|
||||
$this->install->template->append( $this->install->template->overview_page( $current_version, $summary ) );
|
||||
$this->install->template->next_action = '?p=eula';
|
||||
|
||||
Reference in new issue
Block a user