95 lines
2.8 KiB
PHP
95 lines
2.8 KiB
PHP
<?php
|
|
/*
|
|
+--------------------------------------------------------------------------
|
|
| Invision Power Board 2.2.2
|
|
| Invision Power Board INSTALLER
|
|
| ========================================
|
|
| by Matthew Mecham
|
|
| (c) 2001 - 2005 Invision Power Services, Inc.
|
|
| http://www.invisionpower.com
|
|
| =============================================
|
|
| Web: http://www.invisionboard.com
|
|
| http://www.ibresource.ru/products/invisionpowerboard/
|
|
| Time: Monday 05th of March 2007 10:10:55 PM
|
|
| Release: e3790216629e5a2aaf37070b32237f06
|
|
| 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)
|
|
+----------------------------------------------------------------------------
|
|
| Action controller for admin page
|
|
+----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/**
|
|
* Invision Power Board
|
|
* Action controller for admin page
|
|
*/
|
|
|
|
class action_admin
|
|
{
|
|
var $install;
|
|
|
|
function action_admin( & $install )
|
|
{
|
|
$this->install =& $install;
|
|
}
|
|
|
|
function run()
|
|
{
|
|
/* Check input? */
|
|
if( $this->install->ipsclass->input['sub'] == 'check' )
|
|
{
|
|
if( ! $this->install->ipsclass->input['username'] )
|
|
{
|
|
$errors[] = 'Íåîáõîäèìî óêàçàòü èìÿ ïîëüçîâàòåëÿ ';
|
|
}
|
|
|
|
if( ! $this->install->ipsclass->input['password'] )
|
|
{
|
|
$errors[] = 'Íåîáõîäèìî óêàçàòü ïàðîëü';
|
|
}
|
|
else
|
|
{
|
|
if( $this->install->ipsclass->input['password'] != $this->install->ipsclass->input['confirm_password'] )
|
|
{
|
|
$errors[] = 'Ââåäåííûå ïàðîëè íå ñîâïàäàþò';
|
|
}
|
|
}
|
|
|
|
if( ! $this->install->ipsclass->input['email'] )
|
|
{
|
|
$errors[] = 'Íåîáõîäèìî óêàçàòü e-mail àäðåñ';
|
|
}
|
|
|
|
if( is_array( $errors ) )
|
|
{
|
|
$this->install->template->warning( $errors );
|
|
}
|
|
else
|
|
{
|
|
/* Save Form Data */
|
|
$this->install->saved_data['admin_user'] = $this->install->ipsclass->input['username'];
|
|
$this->install->saved_data['admin_pass'] = $this->install->ipsclass->input['password'];
|
|
$this->install->saved_data['admin_email'] = $this->install->ipsclass->input['email'];
|
|
|
|
/* Next Action */
|
|
$this->install->template->page_current = 'install';
|
|
require_once( INS_ROOT_PATH . 'core/actions/install.php' );
|
|
$action = new action_install( &$this->install );
|
|
$action->run();
|
|
return;
|
|
}
|
|
}
|
|
|
|
/* Output */
|
|
$this->install->template->append( $this->install->template->admin_page() );
|
|
$this->install->template->next_action = '?p=admin&sub=check';
|
|
}
|
|
}
|
|
|
|
?>
|