mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Merge time zone setup page with admin user setup page
This commit is contained in:
parent
d7f154f3e0
commit
2cdcfd13cf
8 changed files with 35 additions and 82 deletions
|
|
@ -8,10 +8,8 @@
|
|||
<action name="dispInstallCheckEnv" type="view" />
|
||||
<action name="dispInstallSelectDB" type="view" />
|
||||
<action name="dispInstallDBForm" type="view" />
|
||||
<action name="dispInstallConfigForm" type="view" />
|
||||
<action name="dispInstallManagerForm" type="view" />
|
||||
<action name="procDBSetting" type="controller" />
|
||||
<action name="procConfigSetting" type="controller" ruleset="config" />
|
||||
<action name="procInstall" type="controller" ruleset="install" />
|
||||
<action name="procInstallLicenseAggrement" type="controller" />
|
||||
<action name="procInstallFTP" type="controller" />
|
||||
|
|
|
|||
|
|
@ -77,26 +77,6 @@ class installController extends install
|
|||
// Create a db temp config file
|
||||
if(!$this->makeDBConfigFile()) return new Object(-1, 'msg_install_failed');
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||
{
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispInstallConfigForm');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief division install step... rewrite, time_zone Config temp file create
|
||||
*/
|
||||
function procConfigSetting()
|
||||
{
|
||||
// Get variables
|
||||
$config_info = Context::gets('use_rewrite','time_zone');
|
||||
if($config_info->use_rewrite!='Y') $config_info->use_rewrite = 'N';
|
||||
|
||||
// Create a db temp config file
|
||||
if(!$this->makeEtcConfigFile($config_info)) return new Object(-1, 'msg_install_failed');
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||
{
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispInstallManagerForm');
|
||||
|
|
@ -111,8 +91,19 @@ class installController extends install
|
|||
function procInstall()
|
||||
{
|
||||
// Check if it is already installed
|
||||
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
|
||||
if(Context::isInstalled())
|
||||
{
|
||||
return new Object(-1, 'msg_already_installed');
|
||||
}
|
||||
|
||||
// Save rewrite and time zone settings
|
||||
$config_info = Context::gets('use_rewrite','time_zone');
|
||||
if($config_info->use_rewrite!='Y') $config_info->use_rewrite = 'N';
|
||||
if(!$this->makeEtcConfigFile($config_info))
|
||||
{
|
||||
return new Object(-1, 'msg_install_failed');
|
||||
}
|
||||
|
||||
// Assign a temporary administrator when installing
|
||||
$logged_info = new stdClass();
|
||||
$logged_info->is_admin = 'Y';
|
||||
|
|
|
|||
|
|
@ -159,19 +159,25 @@ class installView extends install
|
|||
/**
|
||||
* @brief Display a screen to enter DB and administrator's information
|
||||
*/
|
||||
function dispInstallConfigForm()
|
||||
function dispInstallManagerForm()
|
||||
{
|
||||
// Display check_env if not installable
|
||||
if(!$this->install_enable) return $this->dispInstallCheckEnv();
|
||||
if(!$this->install_enable)
|
||||
{
|
||||
return $this->dispInstallCheckEnv();
|
||||
}
|
||||
|
||||
include _XE_PATH_.'files/config/tmpDB.config.php';
|
||||
|
||||
Context::set('use_rewrite', $_SESSION['use_rewrite']);
|
||||
Context::set('time_zone', $GLOBALS['time_zone']);
|
||||
Context::set('db_type', $db_info->db_type);
|
||||
$this->setTemplateFile('config_form');
|
||||
$this->setTemplateFile('admin_form');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether this server supports mod_rewrite
|
||||
*/
|
||||
function useRewriteModule()
|
||||
{
|
||||
if(function_exists('apache_get_modules') && in_array('mod_rewrite',apache_get_modules()))
|
||||
|
|
@ -186,20 +192,6 @@ class installView extends install
|
|||
|
||||
return (strpos($output->body, '<?xml') !== 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display a screen to enter DB and administrator's information
|
||||
*/
|
||||
function dispInstallManagerForm()
|
||||
{
|
||||
// Display check_env if not installable
|
||||
if(!$this->install_enable)
|
||||
{
|
||||
return $this->dispInstallCheckEnv();
|
||||
}
|
||||
|
||||
$this->setTemplateFile('admin_form');
|
||||
}
|
||||
}
|
||||
/* End of file install.view.php */
|
||||
/* Location: ./modules/install/install.view.php */
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="time_zone" required="true" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
@ -4,9 +4,10 @@
|
|||
</customrules>
|
||||
<fields>
|
||||
<field name="email_address" required="true" length="1:200" rule="email" />
|
||||
<field name="password" required="true" length="1:20" />
|
||||
<field name="password2" required="true" length="1:20" equalto="password" />
|
||||
<field name="password" required="true" length="1:60" />
|
||||
<field name="password2" required="true" length="1:60" equalto="password" />
|
||||
<field name="nick_name" required="true" length="2:20" />
|
||||
<field name="user_id" required="true" length="2:20" rule="userid" />
|
||||
<field name="time_zone" required="true" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<input type="hidden" name="act" value="procInstall" />
|
||||
<input type="hidden" name="use_rewrite" value="{$use_rewrite}" />
|
||||
<div class="x_control-group">
|
||||
<label for="aMail" class="x_control-label">{$lang->email_address}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -38,10 +39,19 @@
|
|||
</div>
|
||||
</div>
|
||||
<p class="install_help">{$lang->install_notandum}</p>
|
||||
<div class="x_control-group">
|
||||
<label for="time_zone" class="x_control-label">{$lang->time_zone}</label>
|
||||
<div class="x_controls">
|
||||
<select name="time_zone" style="width:100%">
|
||||
<option loop="$time_zone => $key,$val" id="{$key}" value="{$key}" selected="selected"|cond="$key==date('O')">{$val}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="install_help">{$lang->about_time_zone}</p>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<div class="align-left">
|
||||
<a href="{getUrl('', 'act','dispInstallConfigForm')}" class="button grey">« {$lang->cmd_back}</a>
|
||||
<a href="{getUrl('', 'act','dispInstallSelectDB')}" class="button grey">« {$lang->cmd_back}</a>
|
||||
</div>
|
||||
<div class="align-right">
|
||||
<button type="submit" id="task-done" value="">{$lang->cmd_complete} »</button>
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
<include target="header.html" />
|
||||
<form id="body" method="post" action="./">
|
||||
<include target="progress_menu.html" />
|
||||
<div id="content">
|
||||
<h2>{$lang->install_progress_menu['configInfo']}</h2>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<input type="hidden" name="act" value="procConfigSetting" />
|
||||
<input type="hidden" name="use_rewrite" value="{$use_rewrite}" />
|
||||
<div class="x_control-group">
|
||||
<label for="time_zone" class="x_control-label">{$lang->time_zone}</label>
|
||||
<div class="x_controls">
|
||||
<select name="time_zone" style="width:100%">
|
||||
<option loop="$time_zone => $key,$val" id="{$key}" value="{$key}" selected="selected"|cond="$key==date('O')">{$val}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<p class="install_help">{$lang->about_time_zone}</p>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<div class="align-left">
|
||||
<a href="{getUrl('', 'act','dispInstallSelectDB')}" class="button grey">« {$lang->cmd_back}</a>
|
||||
</div>
|
||||
<div class="align-right">
|
||||
<button type="submit" id="task-settings" value="">{$lang->cmd_next} »</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<include target="footer.html" />
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
<li class="active"|cond="$act=='dispInstallCheckEnv'">{$lang->install_progress_menu['condition']}</li>
|
||||
<li cond="ini_get('safe_mode')" class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '3'">{$lang->install_progress_menu['ftp']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallSelectDB' && $progressMenu == '4'">{$lang->install_progress_menu['dbInfo']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallConfigForm'">{$lang->install_progress_menu['configInfo']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallManagerForm'">{$lang->install_progress_menu['adminInfo']}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue