本文整理汇总了PHP中timezone_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP timezone_menu函数的具体用法?PHP timezone_menu怎么用?PHP timezone_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了timezone_menu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: datas
public function datas()
{
$this->load->helper('date');
echo now();
echo "<br />";
echo mdate("Year %Y, month %m day %d, hours %h, minutes %m, seconds %s", now());
echo "<br />";
echo timezone_menu();
}
示例2: form_input
echo form_input('company', html_entity_decode($user->company), 'class="form-control"');
?>
<?php
echo my_form_error('company', '<span class="help-block">', '</span>');
?>
</div>
</div>
<div class="form-group<?php
echo my_form_error('timezone') != FALSE ? ' has-error' : '';
?>
">
<label for="timezone" class="col-md-3 control-label">Timezone:</label>
<div class="col-md-8">
<?php
echo timezone_menu($user->timezone, 'form-control');
?>
<?php
echo my_form_error('timezone', '<span class="help-block">', '</span>');
?>
</div>
</div>
<div class="form-group<?php
echo my_form_error('password') != FALSE ? ' has-error' : '';
?>
">
<label for="password" class="col-md-3 control-label">Password:</label>
<div class="col-md-8">
<?php
echo form_password('password', null, 'class="form-control"');
示例3: timezone_menu
</li>
<?php
}
?>
<li>
<label for="password" class="full">Password</label>
</li>
<li>
<input type="password" autocomplete="off" class="text required full" id="password" name="password" value="" />
</li>
<li>
<label for="password2" class="full">Repeat Password</label>
</li>
<li>
<input type="password" autocomplete="off" class="text required full" id="password2" name="password2" value="" />
</li>
<li>
<div class="help" style="margin-left:0px">Passwords must be at least 6 characters in length.</div>
</li>
<li>
<label for="timezone">Timezone</label>
<?php
echo timezone_menu($gmt_offset);
?>
</li>
</ol>
</fieldset>
<div class="submit"><input type="submit" class="button" name="continue" id="continue" value="Create Account" /></div>
</form>
<?php
echo $this->load->view(branded_view('install/footer'));
示例4: elseif
<?php
} elseif ($qrow->type == 'codeigniter_timezone') {
?>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="<?php
echo $qrow->key;
?>
"><?php
echo $qrow->title;
?>
</label>
<div class="col-sm-7">
<?php
echo timezone_menu(${$qrow->key}, 'form-control input-sm', 'gmt_offset');
?>
<?php
echo form_error($qrow->key, '<label class="error">', '</label>');
?>
</div>
</div>
<?php
}
?>
<?php
}
?>
</div>
</diV>
示例5: form_open_multipart
echo form_open_multipart($form_action, ' name="frm-timezone" class="form-horizontal" data-options=\'{"params" : "ajax", "loader" : "modal"}\'');
?>
<div class="row mb20">
<div class="col-sm-12">
We have detected that your timezone is set differently to that of your computer. You're computer is set to <strong><?php
echo $front_gmt_offset;
?>
</strong> or equivalent. Below you can change your WorkDeskPro settings to match. This may be because your country has entered or left daylight saving.
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="gmt_offset">Timezone:</label>
<div class="col-sm-8">
<?php
echo timezone_menu($gmt_offset, 'form-control input-sm', 'gmt_offset');
?>
</div>
</div>
<?php
if ($current_user->group_id == 2) {
?>
<div class="form-group">
<label class="col-sm-3 control-label" for="gmt_offset"></label>
<div class="col-sm-8">
<div class="checkbox block"><label><input name="all_resources" type="checkbox" value="1" /> Do you want to update the timezone for all resources</label></div>
</div>
</div>
示例6: modify
//.........这里部分代码省略.........
$avatar_file_data = $this->upload->data();
//파일명을 user_id로 올리고 체크하므로 일단 사용할 일이 없음.
}
}
//닉네임 중복 확인
$check_nickname = $this->users_model->check('nickname', $req_nickname, ' AND idx <> ' . USER_INFO_idx);
if ($check_nickname == TRUE) {
$modify_fail_msg[] = lang('nickname_duplicate');
}
//이메일 중복 확인
$check_email = $this->users_model->check('email', $req_email, ' AND idx <> ' . USER_INFO_idx);
if ($check_email == TRUE) {
$modify_fail_msg[] = lang('email_duplicate');
}
if (count($modify_fail_msg) > 0 or $assign['avatar_file_fail'] !== NULL) {
//닉네임, 이메일 중 1개 이상 오류
$assign['result_msg'] = join('<br />', $modify_fail_msg);
} else {
if ($this->input->post('password')) {
$hash = new PasswordHash(8, FALSE);
$super_secured_password = $hash->HashPassword($req_password);
}
//정상 수정
$values = array();
$values['password'] = $this->input->post('password') ? $super_secured_password : '';
$values['name'] = $req_name;
$values['nickname'] = $req_nickname;
$values['email'] = $req_email;
$values['message_receive_type'] = $req_message_receive_type;
$values['avatar_used'] = $req_avatar_used;
$values['timezones'] = $req_timezones;
$values['memo'] = $req_memo;
$result = $this->users_model->modify($values);
if ($result == TRUE) {
$post_success = TRUE;
//최종 성공 여부
$assign['message'] = lang('update_success');
$assign['redirect'] = '/user/modify';
$this->alert($assign);
} else {
$assign['result_msg'] = lang('modify_fail_msg');
}
}
}
if ($post_success == FALSE) {
for ($i = 0; $i <= 2; $i++) {
$assign['message_receive_type'][$i] = array('checked' => '', 'text' => $this->assign['lang']['message_receive_type_' . $i]);
if (trim(set_value('message_receive_type')) !== '') {
$assign['message_receive_type'][$i]['checked'] = set_radio('message_receive_type', $i);
} else {
if (USER_INFO_message_receive_type == $i) {
$assign['message_receive_type'][$i]['checked'] = 'checked="checked"';
} else {
$assign['message_receive_type'][$i]['checked'] = '';
}
}
}
$assign['avatar'] = array('file' => '', 'width' => SETTING_avatar_limit_image_size_width, 'height' => SETTING_avatar_limit_image_size_height, 'capacity' => byte_format(SETTING_avatar_limit_capacity), 'used' => array());
if (file_exists('./avatars/' . USER_INFO_user_id . '.gif') === TRUE) {
$assign['avatar']['file'] = BASE_URL . 'avatars/' . USER_INFO_user_id . '.gif';
}
for ($i = 0; $i <= 1; $i++) {
$assign['avatar']['used'][$i] = array('checked' => '', 'text' => $this->assign['lang']['avatar_used_' . $i]);
if (trim(set_value('avatar_used')) !== '') {
$assign['avatar']['used'][$i]['checked'] = set_radio('avatar_used', $i);
} else {
if (USER_INFO_avatar_used == $i) {
$assign['avatar']['used'][$i]['checked'] = 'checked="checked"';
} else {
$assign['avatar']['used'][$i]['checked'] = '';
}
}
}
$assign['timezone_selectbox'] = '';
if (set_value('timezones')) {
$selected_timezone = set_value('timezones');
} else {
$selected_timezone = USER_INFO_timezone;
}
$assign['timezone_selectbox'] = timezone_menu($selected_timezone);
$assign['memo'] = '';
if (set_value('memo')) {
$assign['memo'] = set_value('memo');
} else {
$assign['memo'] = USER_INFO_memo;
}
$assign['insert_date'] = time2date(USER_INFO_timestamp_insert);
$assign['user_id'] = defined('USER_INFO_user_id') === TRUE ? USER_INFO_user_id : '';
$assign['name'] = set_value('name') !== '' ? set_value('name') : USER_INFO_name;
$assign['nickname'] = set_value('nickname') !== '' ? set_value('nickname') : USER_INFO_nickname;
$assign['email'] = set_value('email') !== '' ? set_value('email') : USER_INFO_email;
$assign['form_null_check'] = "user_id^{$this->assign['lang']['user_id']}|password^{$this->assign['lang']['password']}|password_confirm^{$this->assign['lang']['password_confirm']}|name^{$this->assign['lang']['name']}|nickname^{$this->assign['lang']['nickname']}|email^{$this->assign['lang']['email']}|captcha^CAPTCHA";
$assign['validation_result'] = validation_errors();
$assign['validation_message'] = $assign['validation_result'] !== '' ? str_replace("\n", '', $assign['validation_result']) : '';
$this->scope('contents', 'contents/user/modify', $assign);
$this->display('layout');
}
}
//로그인,권한 체크 end if
}
示例7: form_input
// render the correct input method
if ($setting['input_type'] == 'input') {
echo form_input($field_data);
} elseif ($setting['input_type'] == 'textarea') {
echo form_textarea($field_data);
} elseif ($setting['input_type'] == 'radio') {
echo "<br />";
foreach ($field_options as $value => $label) {
echo form_radio(array('name' => $field_data['name'], 'id' => $field_data['id'] . "-" . $value, 'value' => $value, 'checked' => $value == $field_data['value'] ? 'checked' : FALSE));
echo $label;
}
} elseif ($setting['input_type'] == 'dropdown') {
echo form_dropdown($setting['name'], $field_options, $field_data['value'], 'id="' . $field_data['id'] . '" class="' . $field_data['class'] . '"');
} elseif ($setting['input_type'] == 'timezones') {
echo "<br />";
echo timezone_menu($field_data['value']);
}
?>
<?php
if ($setting['help_text']) {
?>
<span class="help-block"><?php
echo $setting['help_text'];
?>
</span>
<?php
}
?>
</div>
</div>
示例8: br
echo br();
?>
<div class="description">Must be at least 8 characters long</div>
<div class="label required">Re-type Password:</div>
<?php
$data = array('name' => 'password_confirmation', 'size' => '30', 'class' => 'input');
echo form_password($data, '');
?>
<?php
echo br();
?>
<div class="label required">Default Timezone:</div>
<?php
echo timezone_menu(set_value('user_timezone', $this->session->userdata('timezone')), 'select input', 'user_timezone');
?>
<?php
echo br();
?>
<div class="label required">Daylight Savings:</div>
<?php
$options = array('2' => 'Automatically Detect', '1' => 'Yes', '0' => 'No');
echo form_dropdown('user_daylight_savings', $options, set_value('daylight_savings'), 'class="select input"');
?>
<?php
echo br();
?>
<?php
示例9: form_input
?>
</li>
<li>
<h3>New password</h3>
<?php
echo form_input("newpass");
?>
</li>
<li>
<h3>Group</h3>
<?php
echo form_dropdown("group", array(1 => "Admin", 2 => "Member"), $user->group);
?>
</li>
<li>
<h3>Timezone</h3>
<?php
echo timezone_menu($user->timezone);
?>
</li>
<li>
<?php
echo form_submit("", "Edit");
?>
<?php
echo anchor("delete/user/" . $user->id, "Delete", array("class" => "delete"));
?>
</li>
</ul>
<?php
echo form_close();
示例10: array
$data = array('name' => 'setting[' . $setting->setting_id . ']', 'size' => '30', 'class' => 'input');
echo form_input($data, set_value('setting[' . $setting->setting_id . ']', $setting->setting_value));
?>
<?php
} elseif ($setting->setting_type == "password") {
?>
<?php
$data = array('name' => 'setting[' . $setting->setting_id . ']', 'size' => '30', 'class' => 'input');
echo form_password($data, set_value('setting[' . $setting->setting_id . ']', $setting->setting_value));
?>
<?php
} elseif ($setting->setting_type == "timezone") {
?>
<?php
echo timezone_menu(set_value('setting[' . $setting->setting_id . ']', $setting->setting_value), 'input select', 'setting[' . $setting->setting_id . ']');
?>
<?php
} elseif ($setting->setting_type == "select") {
?>
<?php
echo form_dropdown('setting[' . $setting->setting_id . ']', $setting->options, set_value('setting[' . $setting->setting_id . ']', $setting->setting_value), 'class="input select"');
?>
<?php
} elseif ($setting->setting_type == "textarea") {
?>
<?php
示例11: set_value
<label for="emailerName">From Name:</label>
<?php
echo @form_input('emailerName', set_value('emailerName', $data['emailerName']), 'id="emailerName" class="formelement"');
?>
<span class="tip">Who do you want to say emails are from (optional)?</span><br class="clear" /><br />
<?php
}
?>
<h2>Site Preferences</h2>
<label for="headlines">Time Zone:</label>
<?php
echo timezone_menu($data['timezone'], 'formelement', 'timezone');
?>
<br class="clear" />
<label for="dateOrder">Date Format:</label>
<?php
$values = '';
$values = array('DM' => 'Day/Month', 'MD' => 'Month/Day');
?>
<?php
echo @form_dropdown('dateOrder', $values, set_value('dateOrder', $data['dateOrder']), 'id="dateOrder" class="formelement"');
?>
<span class="tip">Select how you prefer dates to show.</span>
<br class="clear" />
<label for="paging">Results per Page:</label>
示例12: current_url
<form action="<?= current_url() ?>" method="post" class="generic">
<label>
Phone Extension<br/>
<input type="text" name="pbx_ext" value="<?=set_value('pbx_ext',$profile->meta->pbx_ext)?>" />
</label>
<label>
Click-to-call Extension/Number<br/>
<input type="text" name="pbx_callback" value="<?=set_value('pbx_callback',$profile->meta->pbx_callback)?>" />
</label>
<label>
Voicemail Box<br/>
<input type="text" name="pbx_ext_mbox" value="<?=set_value('pbx_ext_mbox',$profile->meta->pbx_ext_mbox)?>" />
</label>
<label>
Local Timezone<br/>
<?=timezone_menu($profile->meta->time_zone)?>
</label>
<label>
Time Format<br/>
<?=form_dropdown('time_format',array('12'=>'12-Hour Time ('.date('g:i A').')','24'=>'24-Hour Time ('.date('H:i').')'),set_value('time_format',$profile->meta->time_format))?>
</label>
<button type="submit">Save Preferences</button>
</form>
</div>
示例13: translate
echo $profile->work;
} else {
echo '""';
}
?>
" />
</td>
</tr>
<tr>
<td class="label" valign="top"><?php
echo translate("Time Zone");
?>
</td>
<td> <?php
echo timezone_menu(get_user_timezone($this->dx_auth->get_user_id()));
?>
</td>
</tr>-->
<!-- <tr>
<td class="label" valign="top"><?php
echo translate("Languages");
?>
</td>
<td>
<div class="none text-muted row-space-1">None</div>
<?php
if ($user_language != '') {
foreach ($user_language as $lang) {
?>
<input type="hidden" value="<?php
示例14: date_helper
public function date_helper()
{
$this->load->helper('date');
echo now('Australia/Victoria');
echo "<br>";
echo now('+8');
echo "<br>";
$datestring = 'Year: %Y Month: %m Day: %d - %h:%i %a';
$time = time();
echo mdate($datestring, $time);
//at UTC
echo "<br>";
$format = 'DATE_RFC822';
$time = time();
echo standard_date($format, $time);
//Deprecated
echo "<br>";
echo date(DATE_RFC822, time());
echo "<br>";
echo local_to_gmt(time());
echo "<br>";
$timestamp = 1140153693;
$timezone = 'UM8';
$daylight_saving = TRUE;
echo gmt_to_local($timestamp, $timezone, $daylight_saving);
echo "<br>";
echo "<br>";
$unix = mysql_to_unix('20061124092345');
echo $unix;
echo "<br>";
echo "<br>";
$now = time();
echo unix_to_human($now);
// U.S. time, no seconds
echo "<br>";
echo unix_to_human($now, TRUE, 'us');
// U.S. time with seconds
echo "<br>";
echo unix_to_human($now, TRUE, 'eu');
// Euro time with seconds
echo "<br>";
echo "<br>";
$now = time();
$human = unix_to_human($now);
$unix = human_to_unix($human);
echo $human;
echo "<br>";
echo $unix;
echo "<br>";
echo "<br>";
echo "<br>";
$bad_date = '199605';
// Should Produce: 1996-05-01
$better_date = nice_date($bad_date, 'Y-m-d');
echo $bad_date;
echo "<br>";
echo $better_date;
echo "<br>";
echo "<br>";
$bad_date = '9-11-2001';
// Should Produce: 2001-09-11
$better_date = nice_date($bad_date, 'Y-m-d');
echo $bad_date;
echo "<br>";
echo $better_date;
echo "<br>";
echo "<br>";
$post_date = '1079621429';
$now = time();
$units = 2;
echo timespan($post_date, $now, $units);
echo "<br>";
echo "<br>";
echo days_in_month(06, 2005);
echo "<br>";
echo "<br>";
$range = date_range('2012-01-01', '2012-01-15');
echo "First 15 days of 2012:";
foreach ($range as $date) {
echo $date . "\n";
}
echo "<br>";
echo "<br>";
echo timezones('UM5');
echo "<br>";
echo "<br>";
echo timezone_menu('UM8');
echo "<br>";
echo "<br>";
}
示例15: array
</div>
<?php
if ($setting['type'] == "text") {
?>
<?php
$data = array('name' => 'setting[' . $setting['slug'] . ']', 'size' => '30', 'class' => 'input');
echo form_input($data, set_value('setting[' . $setting['slug'] . ']', $setting['value']));
?>
<?php
} elseif ($setting['type'] == "timezone") {
?>
<?php
echo timezone_menu(set_value('setting[' . $setting['slug'] . ']', $setting['value']), 'input select', 'setting[' . $setting['slug'] . ']');
?>
<?php
} elseif ($setting['type'] == "select") {
?>
<?php
echo form_dropdown('setting[' . $setting['slug'] . ']', $setting['options'], set_value('setting[' . $setting['slug'] . ']', $setting['value']), 'class="input select"');
?>
<?php
} elseif ($setting['type'] == "textarea") {
?>
<?php