本文整理汇总了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');
示例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 <name@domain.com></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>