public function settingsEdit() { $user = Auth::user(); // Use a helper function to get list of timezones $timezones = getTimezones(); return View::make('account.settings-edit', compact('user', 'timezones')); }
</strong></button> </p> </td> </tr> <tr> <?php if (function_exists('date_default_timezone_get')) { $offset = timezoneDiff($_zp_server_timezone, $tz = getOption('time_zone')); ?> <td width="175"><?php echo gettext("Time zone:"); ?> </td> <td width="350"> <?php $zones = getTimezones(); ?> <select id="time_zone" name="time_zone"> <option value="" style="background-color:LightGray"><?php echo gettext('*not specified'); ?> </option> <?php generateListFromArray(array($tz), $zones, false, false); ?> </select> </td> <td> <p><?php printf(gettext('Your server reports its time zone as: <code>%s</code>.'), $_zp_server_timezone); ?>
$active = $arlo_plugin->get_import_id(); // only allow this to be used on the eventtemplate page if ($post->post_type != 'arlo_event') { return ''; } // find out if we have any online events $t1 = "{$wpdb->prefix}arlo_eventtemplates"; $t2 = "{$wpdb->prefix}arlo_events"; $items = $wpdb->get_results("\n\t\tSELECT \n\t\t\t{$t2}.e_isonline, \n\t\t\t{$t2}.e_timezone_id \n\t\tFROM \n\t\t\t{$t2}\n\t\tLEFT JOIN \n\t\t\t{$t1}\n\t\tON \n\t\t\t{$t2}.et_arlo_id = {$t1}.et_arlo_id \n\t\tAND \n\t\t\t{$t2}.e_isonline = 1 \n\t\tAND \n\t\t\t{$t2}.e_parent_arlo_id = 0\n\t\tAND\n\t\t\t{$t1}.active = {$t2}.active\n\t\tWHERE \n\t\t\t{$t1}.et_post_name = '{$post->post_name}'\n\t\tAND \n\t\t\t{$t2}.active = {$active}\n\t\t", ARRAY_A); if (empty($items)) { return ''; } $olson_names = getTimezoneOlsonNames(); $content = '<form method="GET" class="arlo-timezone">'; $content .= '<select name="timezone">'; foreach (getTimezones() as $timezone) { $selected = false; if (isset($_GET['timezone']) && $_GET['timezone'] == $timezone->id || !isset($_GET['timezone']) && $timezone->id == $items[0]['e_timezone_id']) { $selected = true; //get olson timezones $olson_names = getTimezoneOlsonNames($timezone->id); $GLOBALS['selected_timezone_olson_names'] = $olson_names; } $content .= '<option value="' . $timezone->id . '" ' . ($selected ? 'selected' : '') . '>' . htmlentities($timezone->name, ENT_QUOTES, "UTF-8") . '</option>'; } $content .= '</select>'; $content .= '</form>'; //if there is no olson names in the database, that means we couldn't do a timezone conversion if (!(is_array($olson_names) && count($olson_names))) { $content = ''; }
$info = CAT_Helper_Addons::checkInfo(CAT_PATH . '/templates/' . CAT_Registry::get('DEFAULT_THEME')); if (isset($info['module_variants']) && is_array($info['module_variants']) && count($info['module_variants'])) { $tpl_data['variants'] = $info['module_variants']; } break; case 'system': $tpl_data['er_levels'] = getErrorLevels(); $tpl_data['PAGES_LIST'] = getPagesList('maintenance_page', CAT_Registry::get('MAINTENANCE_PAGE')); $tpl_data['ERR_PAGES_LIST'] = getPagesList('err_page_404', CAT_Registry::get('ERR_PAGE_404')); break; case 'users': $tpl_data['groups'] = $users->get_groups(CAT_Registry::get('FRONTEND_SIGNUP'), '', false); break; case 'datetime': $tpl_data['languages'] = getLanguages(); $tpl_data['timezones'] = getTimezones(); $tpl_data['charsets'] = getCharsets(); $tpl_data['dateformats'] = getDateformats(); $tpl_data['timeformats'] = getTimeformats(); break; case 'searchblock': $tpl_data['search'] = getSearchSettings(); $tpl_data['search_templates'] = isset($tpl_data['search']['template']) ? CAT_Helper_Addons::get_addons($tpl_data['search']['template'], 'template', 'template') : array(); $s_selected = isset($tpl_data['search']['cfg_search_use_page_id']) ? $tpl_data['search']['cfg_search_use_page_id'] : ''; $tpl_data['PAGES_LIST'] = getPagesList('search_cfg_search_use_page_id', $s_selected, true); break; case 'server': $tpl_data['WORLD_WRITEABLE_SELECTED'] = CAT_Registry::get('STRING_FILE_MODE') == '0666' && CAT_Registry::get('STRING_DIR_MODE') == '0777' ? true : false; break; case 'mail': $tpl_data['CATMAILER_LIBS'] = getMailerLibs();
} if (file_exists($this->approot . $this->userpicdir . $object . '-picture.jpg')) { $internPrefix = (string) sConfig()->getVar('CONFIG/REFTRACKER/INTERNALPREFIX'); $userpicture = $internPrefix . 'userimage/' . $object . '/48x48?rnd=' . rand(); } else { $userpicture = $this->imgpath . 'content/temp_userpic.png'; } $titlename = trim($firstname . ' ' . $lastname); if (strlen($titlename) == 0) { $titlename = $itext['TXT_UNKNOWN']; } $koala->queueScript('Koala.windows[\'wid_' . $this->request->parameters['win_no'] . '\'].setUserHeader(\'' . $userpicture . '\', \'' . $titlename . '\', \'' . $company . '\', \'' . $object . '\');'); $languageMgr = new Languages(); $languages = $languageMgr->getList(); $smarty->assign('languages', $languages); $smarty->assign('timezones', getTimezones()); $smarty->assign('visibleProps', $visibleProps); $smarty->assign('timezone', $timezone); $smarty->assign('language', $currentUser->getLanguage()); $smarty->assign('dateformat', $dateformat); $smarty->assign('timeformat', $timeformat); $smarty->assign('weekstart', $weekstart); $smarty->assign('userpicture', $userpicture . '?rnd=' . rand()); $smarty->assign('email', $email); $smarty->assign('company', $company); $smarty->assign('department', $department); $smarty->assign('firstname', $firstname); $smarty->assign('lastname', $lastname); $smarty->assign('phone', $phone); $smarty->assign('fax', $fax); $smarty->assign('mobile', $mobile);