当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminHelper::drawTimeZones方法代码示例

本文整理汇总了PHP中AdminHelper::drawTimeZones方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::drawTimeZones方法的具体用法?PHP AdminHelper::drawTimeZones怎么用?PHP AdminHelper::drawTimeZones使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AdminHelper的用法示例。


在下文中一共展示了AdminHelper::drawTimeZones方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$misc_message = false;
if (isset($_POST['domisc'])) {
    CASHSystem::setSystemSetting('timezone', $_POST['timezone']);
    CASHSystem::setSystemSetting('systememail', $_POST['systememail']);
    $cash_admin->page_data['page_message'] = 'Success. All changed.';
}
$migrate_message = false;
if (isset($_POST['domigrate'])) {
    $new_settings = array('hostname' => $_POST['hostname'], 'username' => $_POST['adminuser'], 'password' => $_POST['adminpassword'], 'database' => $_POST['databasename']);
    $migrate_request = new CASHRequest(array('cash_request_type' => 'system', 'cash_action' => 'migratedb', 'todriver' => $_POST['driver'], 'tosettings' => $new_settings));
    if ($migrate_request->response['payload']) {
        $cash_admin->page_data['page_message'] = 'Success. So that happened.';
    } else {
        $cash_admin->page_data['error_message'] = 'Error. There was a problem migrating your data.';
    }
}
$platform_settings = CASHSystem::getSystemSettings();
$cash_admin->page_data['system_email'] = $platform_settings['systememail'];
$cash_admin->page_data['timezone_options'] = AdminHelper::drawTimeZones($platform_settings['timezone']);
$db_types = array('mysql' => 'MySQL', 'sqlite' => 'SQLite');
$db_type = 'unknown';
if (array_key_exists($platform_settings['driver'], $db_types)) {
    $cash_admin->page_data['db_type'] = $db_types[$platform_settings['driver']];
}
if ($cash_admin->page_data['db_type'] == 'MySQL') {
    $cash_admin->page_data['migrate_from_mysql'] = true;
} elseif ($cash_admin->page_data['db_type'] == 'SQLite') {
    $cash_admin->page_data['migrate_from_sqlite'] = true;
}
$cash_admin->page_data['platform_path'] = realpath(CASH_PLATFORM_PATH);
$cash_admin->setPageContentTemplate('settings');
开发者ID:blacktire,项目名称:DIY,代码行数:31,代码来源:settings.php

示例2:

			<?php 
}
?>
</div>
<div class="col_oneoftwo lastcol">
	<h3>Miscellaneous</h3>
	<?php 
if ($misc_message) {
    echo '<p><span class="highlightcopy">' . $misc_message . '</span></p>';
}
?>
	<form method="post" action="">
		<input type="hidden" name="domisc" value="makeitso" />
		<label for="systememail">Default system email address</label><br />
		<input type="text" id="systememail" name="systememail" value="<?php 
echo $platform_settings['systememail'];
?>
" />
		<span class="altcopystyle fadedtext">(name@domain.com or "<span class="nobr">Name &lt;name@domain.com&gt;</span>")</span>
		<div class="row_seperator">.</div>
		<label for="timezone">System time zone</label><br />
		<select id="timezone" name="timezone">
			<?php 
echo AdminHelper::drawTimeZones($platform_settings['timezone']);
?>
		</select>
		<div class="row_seperator">.</div><br />
		<input class="button" type="submit" value="Change settings" />
	</form>	
</div>
<div class="row_seperator">.</div>
开发者ID:nodots,项目名称:DIY,代码行数:31,代码来源:settings.php


注:本文中的AdminHelper::drawTimeZones方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。