本文整理汇总了PHP中get_options函数的典型用法代码示例。如果您正苦于以下问题:PHP get_options函数的具体用法?PHP get_options怎么用?PHP get_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_options函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: main
function main($server_cfg)
{
$options = get_options($server_cfg);
foreach ($options['games'] as $game) {
zpm_preamble($game);
$game_cfg = load_game_config($game);
if (!$game_cfg) {
error_log("Daily job: Failed to load config for {$game}\n", 3, sprintf($server_cfg['log_file'], $game));
continue;
}
// log_file and logger object are used by all child functions.
$game_cfg['log_file'] = sprintf($server_cfg['log_file'], $game);
$game_cfg['logger'] = new Logger($server_cfg, $game_cfg);
$job = $options['job'];
//instance detail report per game
if ($job == "both" or $job == "report") {
InstanceReport::generate_detail_report($server_cfg, $game_cfg, $options['timeslot'], $options['period']);
}
zpm_postamble($game);
}
//instance summary report for all games
$job = $options['job'];
if ($job == "both" or $job == "report") {
InstanceReport::generate_summary_report($server_cfg, $options['timeslot'], $options['period']);
}
}
开发者ID:shourya07,项目名称:zperfmon,代码行数:26,代码来源:daily_instance_report_job.php
示例2: main
function main($server_cfg)
{
$options = get_options($server_cfg);
foreach ($options['games'] as $game) {
zpm_preamble($game);
$game_cfg = load_game_config($game);
if (!$game_cfg) {
error_log("Daily job: Failed to load config for {$game}\n", 3, sprintf($server_cfg['log_file'], $game));
continue;
}
// log_file and logger object are used by all child functions.
$game_cfg['log_file'] = sprintf($server_cfg['log_file'], $game);
$game_cfg['logger'] = new Logger($server_cfg, $game_cfg);
$job = $options['job'];
if ($job == "both" or $job == "daily") {
process_daily($server_cfg, $game_cfg, $options['timeslot'], $options['period']);
}
//performance report
/*
if ($job == "both" or $job == "report") {
generate_report($server_cfg, $game_cfg,
$options['timeslot'], $options['period']);
}*/
zpm_postamble($game);
}
}
开发者ID:shourya07,项目名称:zperfmon,代码行数:26,代码来源:daily_job.php
示例3: main
function main($server_cfg)
{
$options = get_options();
if (isset($options['g']) && $options['g'] !== '') {
$game_names = explode(",", $options['g']);
} else {
$game_names = $server_cfg['game_list'];
}
foreach ($game_names as $game) {
zpm_preamble($game);
$game_cfg = load_game_config($game);
$retval = null;
// refs will start failing in 5.3.x if not declared
$cleanup = "/usr/local/zperfmon/bin/clean.sh -g " . $game_cfg['name'] . " > /dev/null ";
$output = system($cleanup, $retval);
if ($retval != 0) {
error_log("Couldn`t cleanup game {$game}", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
continue;
}
$arrays_to_id = get_array_id_map($server_cfg, $game_cfg);
foreach ($arrays_to_id as $array => $id) {
$game_cfg = load_game_config($game, $id);
$cleanup = "/usr/local/zperfmon/bin/clean.sh -g " . $game_cfg['name'] . " > /dev/null ";
$output = system($cleanup, $retval);
if ($retval != 0) {
error_log("Couldn`t cleanup game {$game}", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
continue;
}
}
zpm_postamble($game);
}
}
开发者ID:shourya07,项目名称:zperfmon,代码行数:32,代码来源:clean.php
示例4: admin_server
function admin_server()
{
global $db;
$tpl = new smarty();
$db->query('SELECT `ID`, `verwendung`, `intervall`, `betrag`, `nextbuch` FROM ' . DB_PRE . 'ecp_clankasse_auto');
$auto = array();
while ($row = $db->fetch_assoc()) {
$row['nextbuch'] = date(LONG_DATE, $row['nextbuch']);
$row['betrag'] = number_format($row['betrag'], 2, ',', '.');
$auto[] = $row;
}
$tpl->assign('auto', $auto);
ob_start();
$tpl->display(DESIGN . '/tpl/admin/clankasse_auto_overview.html');
$content = ob_get_contents();
ob_end_clean();
$tpl->assign('overview', $content);
$db->query('SELECT a.*, b.username FROM ' . DB_PRE . 'ecp_clankasse_transaktion as a LEFT JOIN ' . DB_PRE . 'ecp_user as b ON b.ID = vonuser ORDER BY datum DESC');
$buchung = array();
while ($row = $db->fetch_assoc()) {
$row['datum'] = date(LONG_DATE, $row['datum']);
if ($row['vonuser']) {
$row['verwendung'] .= ' ' . FROM . ' ' . $row['username'];
}
$row['geld'] = number_format($row['geld'], 2, ',', '.');
$buchung[] = $row;
}
$tpl->assign('buchung', $buchung);
ob_start();
$tpl->display(DESIGN . '/tpl/admin/clankasse_trans_overview.html');
$content = ob_get_contents();
ob_end_clean();
$tpl->assign('buch_overview', $content);
$db->query('SELECT username, userID, verwendung, monatgeld FROM ' . DB_PRE . 'ecp_clankasse_member LEFT JOIN ' . DB_PRE . 'ecp_user ON userID = ID ORDER BY username ASC');
$user = array();
while ($row = $db->fetch_assoc()) {
$row['geld'] = number_format($row['monatgeld'], 2, ',', '.');
$user[] = $row;
}
$tpl->assign('user', $user);
ob_start();
$tpl->display(DESIGN . '/tpl/admin/clankasse_user_overview.html');
$content = ob_get_contents();
ob_end_clean();
$tpl->assign('user_trans', $content);
$konto = $db->fetch_assoc('SELECT * FROM ' . DB_PRE . 'ecp_clankasse');
$konto['kontostand'] = number_format($konto['kontostand'], 2, ',', '');
foreach ($konto as $key => $value) {
$tpl->assign($key, $value);
}
$tpl->assign('options', get_options(date('m'), date('Y')));
ob_start();
$tpl->display(DESIGN . '/tpl/admin/clankasse.html');
$content = ob_get_contents();
ob_end_clean();
main_content(FINANCES, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:57,代码来源:clankasse.php
示例5: get_options
function get_options($array, $parent = 0, $indent = "")
{
$return = array();
foreach ($array as $key => $val) {
if ($val["parent_category_id"] == $parent) {
$return["x" . $val["category_id"]] = $indent . $val["category_name"];
$return = array_merge($return, get_options($array, $val["category_id"], $indent . " "));
}
}
return $return;
}
开发者ID:jkmorayur,项目名称:gtech,代码行数:11,代码来源:common_helper.php
示例6: common_ticket
function common_ticket($vars, $pre)
{
$options = get_options();
$ticketid = $vars['ticketid'];
$userid = $vars['userid'];
$user = get_client_info($userid);
$ticket = get_ticket_info($ticketid);
if (!$user || !$ticket) {
return;
}
$msg = $pre . $ticket['tid'] . ' from ' . $user['lastname'] . ' ' . $user['firstname'] . '(' . $user['email'] . ')';
$url = $options['whmcs_host'] . '/supporttickets.php?action=view&id=' . $ticketid;
$attach = [array('title' => $ticket['subject'], 'text' => $url)];
send_mesage($options['channel_tickets'], $msg, $attach);
}
开发者ID:vitaliy-orlov,项目名称:whmcs-slack-notif,代码行数:15,代码来源:tickets_hook.php
示例7: __construct
/**
* Set up our object.
*
* @param string $path Project root path, should contain composer.json.
* @param string $plugin_file Path to the plugin file calling Horme class.
*/
public function __construct($path, $plugin_file)
{
$defaults = ['installed' => false, 'path' => '', 'plugins' => []];
$options = get_option(self::OPTION_KEY, $defaults);
// Old version... start from scratch.
if ('1' === $options['installed']) {
delete_option(self::OPTION_KEY);
$options = get_options(self::OPTION_KEY, $defaults);
}
$this->project_path = $path;
$this->plugin_file = plugin_basename($plugin_file);
$this->installed = $options['installed'];
$this->path = $options['path'];
$this->plugins = $options['plugins'];
$this->prepare_paths_index();
}
开发者ID:ssnepenthe,项目名称:horme,代码行数:22,代码来源:Options.php
示例8: better_excerpt
function better_excerpt()
{
$options = get_options();
extract($options);
$permalink = get_permalink($post->ID);
$text = get_the_content();
$text = preg_replace(" (\\[.*?\\])", '', $text);
$text = strip_tags($text);
$text = substr($text, 0, $length);
$text = substr($text, 0, strripos($text, " "));
$text = trim(preg_replace('/\\s+/', ' ', $text));
$text = stripslashes($before_text) . $text . $ellipsis;
if ($link_to_post == 1) {
$text = $text . ' <a href="' . $permalink . '">' . $link_text . '</a>';
}
$text .= stripslashes($after_text);
return $text;
}
开发者ID:bi0xid,项目名称:youare-plugins,代码行数:18,代码来源:betterexcerpt.php
示例9: validazione_impostazioni_tema
function validazione_impostazioni_tema($input)
{
//echo "<pre>"; print_r( $_FILES ); echo "</pre>";
foreach ($_FILES as $image) {
// Controllo che sia stato effettivamente inviato un file
if ($image['size']) {
if (preg_match('/(jpg|jpeg|png|gif)$/i', $image['type'])) {
$sovrascrivi = array('test_form' => false);
$file = wp_handle_upload($image, $sovrascrivi);
$input['logo'] = $file['url'];
} else {
wp_die('Nessuna immagine e&grave; stata caricata');
}
} else {
// Questo codice viene lanciato se non viene caricata nessuna immagine
$opzioni = get_options('opt_impostazioni_tema');
$input['logo'] = $opzioni['logo'];
}
}
return $input;
}
开发者ID:simonkozmik,项目名称:Template-da-Zero,代码行数:21,代码来源:impostazioni_tema.php
示例10: main
function main($server_cfg)
{
$options = get_options();
if (isset($options['g']) && $options['g'] !== '') {
$game_names = explode(",", $options['g']);
} else {
$game_names = $server_cfg['game_list'];
}
foreach ($game_names as $game_name) {
zpm_preamble($game_name);
try {
$game_cfg = load_game_config($game_name);
//$game_cfg = $game_cfg[$game_name];
$now = time();
$query_period = $now - 5 * 60;
// 5 minutes ago
if (isset($game_cfg['splunk_url'])) {
$splunk_url = $game_cfg['splunk_url'];
$splunk_user = $game_cfg['splunk_user'];
$splunk_pass = $game_cfg['splunk_password'];
$splunk_queries = $game_cfg['splunk_queries'];
$splunk_collector = new SplunkCollector($splunk_url, $splunk_user, $splunk_pass);
$splunk_store = new SplunkAdapter($game_cfg);
foreach ($splunk_queries as $query_name => $query) {
$results = $splunk_collector->run_query($query, $query_period);
if (is_array($results)) {
$count = $results[0]["count"];
$splunk_store->store_splunk_count($now, $query_name, $count);
} else {
echo "Could not fetch {$query_name} for {$game_name}\n";
}
}
}
} catch (Exception $e) {
}
zpm_postamble($game_name);
}
}
开发者ID:shourya07,项目名称:zperfmon,代码行数:38,代码来源:get_splunk_metrics.php
示例11: get_options
/**
* Get all Recursive Relationship into select field options
*
* @param $f1 = root/parent id
* @param $table_name = name of the table
* @param $dir = direction of breadcrumbs
*/
function get_options($f1, $table_name, $dir = 'left')
{
$frm = '';
$breadcr = '««';
if ($dir == 'right') {
$breadcr = '»»';
}
$sql = "select id, parent_id, title from {$table_name} where parent_id='{$f1}' order by sort_order";
//echo $sql;
$res = mysql_exec($sql);
if ($res !== false) {
foreach ($res as $k => $v) {
if ($v['parent_id'] != 0) {
$frm .= '<option value="' . $v['id'] . '">' . get_uppers($v['id'], $table_name, 'right') . '</option>';
}
$t1 = get_options($v['id'], $table_name, $dir);
if (!empty($t1) && $t1 != '0') {
$frm .= $t1;
}
}
//end foreach....
}
return $frm;
}
开发者ID:centaurustech,项目名称:collaborate-usa,代码行数:31,代码来源:func_tree.php
示例12: main
function main($server_cfg)
{
$options = get_options();
if (isset($options['g']) && $options['g'] !== '') {
$game_names = explode(",", $options['g']);
} else {
$game_names = $server_cfg['game_list'];
}
$time_slots = null;
if (!empty($options['t'])) {
$time_slots = $options['t'];
}
$timestamp = $_SERVER['REQUEST_TIME'];
$current_time_slot = (int) ($timestamp / (30 * 60));
foreach ($game_names as $game_name) {
zpm_preamble($game_name);
// MODIFIED!!!! Create and mount next two timeslots !!!
$game_cfg = load_game_config($game_name);
if (!$game_cfg) {
error_log("configuration for " . $game_name . " is not loaded\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
continue;
}
$target_dir = sprintf($server_cfg['root_upload_directory'], $game_cfg["name"]);
$target_dir = $target_dir . "/%s/" . $server_cfg["profile_upload_directory"];
$dir_name_array = create_directory($target_dir, $current_time_slot, $server_cfg, $game_cfg);
if ($dir_name_array === null) {
error_log("Directory creation failed for the game " . $game_cfg['name'], 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
continue;
}
if ($dir_name_array === 0) {
error_log("No Ram disk Exist!!!" . $game_cfg['name'], 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
}
//creating new games and getting the list of web arrays to process data for
$rs = new RightScale($server_cfg, load_game_config($game_name));
$rs->make_array_games();
$array_ids = $rs->get_arrays_to_serve();
//
// Wrap processing for each game inside a file lock
//
$game_lock_file = sprintf($server_cfg["zperfmon_lock_file"], $game_name);
$game_lock_handle = grab_lock($game_lock_file, $server_cfg, $game_cfg);
if (!$game_lock_handle) {
error_log("Could not get exclusive lock for \"{$game_name}\"\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
delete_ramdisk_data($game_name, $time_slots, $timestamp, $server_cfg, $game_cfg);
continue;
}
//processing parent game
try {
//
// process uploaded data
//
run_cron_for_game($server_cfg, $game_cfg, $time_slots);
} catch (Exception $e) {
error_log("Upload processing for {$game_name} failed\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
error_log("Exception says: " . $e->getMessage() . "\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
}
// loop to process data for each web array
foreach ($array_ids as $array) {
try {
$game_cfg = load_game_config($game_name, $array);
if (!$game_cfg) {
error_log("configuration for " . $game_name . " is not loaded\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
continue;
}
//
// process uploaded data
//
run_cron_for_game($server_cfg, $game_cfg, $time_slots);
} catch (Exception $e) {
error_log("Upload processing for {$game_name} failed\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
error_log("Exception says: " . $e->getMessage() . "\n", 3, sprintf($server_cfg['log_file'], $game_cfg['name']));
}
}
// compress for parent game
// This implementation forces us to always pass a timeslot
// while calling this script. otherwise compression will fail.
$game_cfg = load_game_config($game_name);
compress_unziped_profiles($server_cfg, $game_cfg, $time_slots);
// Now compress the array games
foreach ($array_ids as $array) {
$game_cfg = load_game_config($game_name, $array);
compress_unziped_profiles($server_cfg, $game_cfg, $time_slots);
}
// cleanup the lock
drop_lock($game_lock_handle, $game_lock_file);
zpm_postamble($game_name);
//MODIFIED!!!!
if ($dir_name_array != 0) {
delete_ramdisk_data($game_name, $time_slots, $timestamp, $server_cfg, $game_cfg);
}
}
}
开发者ID:shourya07,项目名称:zperfmon,代码行数:92,代码来源:get_game_metrics.php
示例13: prettySatoshis
}
print "All time total payout: " . prettySatoshis($everpaid);
if ($donated > 0) {
print "<BR><FONT SIZE=\"-1\">Total donated Eligius: " . prettySatoshis($donated) . " - <I>Thanks!</I></FONT>";
}
print "<BR><BR><HR>";
if ($savedbal) {
print "<BR><B>Estimated Position in Payout Queue</B><BR>";
if ($payoutqueue = apc_fetch('wizstats_payoutqueuetxt')) {
} else {
$payoutqueue = file_get_contents("/var/lib/eligius/{$serverid}/payout_queue.txt");
apc_store('wizstats_payoutqueuetxt', $payoutqueue, 600);
}
print "<span style=\"font-size: 0.8em\">";
if (strpos($payoutqueue, $givenuser) == false && substr($payoutqueue, 0, strlen($givenuser)) != $givenuser) {
$options = get_options($link, $user_id);
if (isset($options["Minimum_Payout_BTC"])) {
$minpay = $options["Minimum_Payout_BTC"] * 100000000;
} else {
$minpay = 4194304;
}
if ($minpay < 1048576) {
$minpay = 1048576;
}
if ($minpay > 2147483648) {
$minpay = 2147483648;
}
$diff = $minpay - $savedbal;
if ($diff < 0) {
$diff = 0;
}
开发者ID:prusso,项目名称:wizstats,代码行数:31,代码来源:userstats.php
示例14: get_options
<?php
$promoted = get_options('cop_options');
print_r($promoted);
echo 'kenny';
?>
<div class="promoted">
<div class="item">
<div class="wrapper">
<img src="<?php
echo get_template_directory_uri();
?>
/images/events_125.jpg">
<h3><a href="#">Events Calendar</a></h3>
</div>
</div>
<div class="item">
<div class="wrapper">
<img src="<?php
echo get_template_directory_uri();
?>
/images/meetings_125.jpg">
<h3><a href="#">City Meetings</a></h3>
</div>
</div>
<div class="item">
<div class="wrapper">
<img src="<?php
echo get_template_directory_uri();
?>
/images/trails_125.jpg">
开发者ID:CityOfPrescott,项目名称:tabula-rasa_city-of-prescott,代码行数:31,代码来源:promoted.php
示例15: main
function main($server_cfg)
{
$options = get_options();
if (isset($options['g']) && $options['g'] !== '') {
$game_names = explode(",", $options['g']);
} else {
$game_names = $server_cfg['game_list'];
}
$time_slot = null;
if (!empty($options['t'])) {
$time_slot = $options['t'];
}
foreach ($game_names as $game_name) {
// Top5 metrics file for this time slot
$top5_file = sprintf($server_cfg['top5_file'], $game_name, (string) $time_slot);
error_log("top5 file is {$top5_file}\n", 3, sprintf($server_cfg['log_file'], $game_name));
if (file_exists($top5_file)) {
$top5 = igbinary_unserialize(file_get_contents($top5_file));
error_log(sprintf("top5 file exists: %d byte\n", filesize($top5_file), 3, sprintf($server_cfg['log_file'], $game_name)));
} else {
$top5 = array();
error_log("No top5 file\n", 3, sprintf($server_cfg['log_file'], $game_name));
}
$output = move_slow_page($server_cfg, $game_name, $time_slot, $top5);
error_log(sprintf("in main: top5 list has %d lines\n", count($top5)), 3, sprintf($server_cfg['log_file'], $game_name));
// Dump updated top5 to file
file_put_contents($top5_file, igbinary_serialize($top5));
print json_encode($output);
}
}
开发者ID:shourya07,项目名称:zperfmon,代码行数:30,代码来源:move_slowpages.php
示例16: process
function process($data)
{
global $CFG;
$sections = $this->obj->getSectionsInfoAsTeacher();
$options = get_options($sections);
$this->notices = array();
foreach ($sections as $id => $section) {
$opts = array('non_primary_control' => $this->get_value_or_default($data->{'opt|non_primary_control|' . $id}, 'block_student_gradeviewer_non_primary_control'), 'primary' => $this->get_value_or_default($data->{'opt|primary_instructor|' . $id}, 'cas_reporting_primary'), 'non_primary' => $this->get_value_or_default($data->{'opt|non_primary_instructor|' . $id}, 'cas_reporting_non_primary'), 'student' => $this->get_value_or_default($data->{'opt|student|' . $id}, 'cas_reporting_student'));
$option = $options[$id];
$saved_option = null;
if (!$option) {
$option = new stdClass();
$option->sectionsid = $id;
} else {
$saved_option = clone $option;
}
$option->primary_instructor = $opts['primary'];
$option->non_primary_instructor = $opts['non_primary'];
$option->student = $opts['student'];
$option->non_primary_control = $opts['non_primary_control'];
$no_control = $this->is_non_primary($option) && !$this->has_control($option);
$same = $this->compare($saved_option, $option);
if ($no_control or $same) {
continue;
}
$a->section = $this->handle_section($section);
$saved_options = array_map(array($this, 'map_options'), array_keys(array_filter($opts, array($this, 'filter_options'))));
$a->options = empty($saved_options) ? "No reporting options" : implode(' and ', $saved_options);
$code = 'saved';
if (!$this->save_option($option)) {
$code = 'error';
}
$this->notices[] = get_string('option_' . $code, 'block_student_gradeviewer', $a);
}
/*
foreach($options as $option) {
$a->section = $this->handle_section($sections[$option->sectionsid]);
$this->notices[] = get_string('option_removed', 'block_student_gradeviewer', $a);
}
$delete = implode(',', array_map(array($this, 'transform_option'), $options));
delete_records_select('block_teacher_referral_opt', 'id IN ('.$delete .')');
*/
}
开发者ID:rrusso,项目名称:EARS,代码行数:44,代码来源:options_visualizer.php
示例17: get_form
function get_form($name)
{
switch (strtolower($name)) {
case "deportista":
?>
<!--<p>
<span>Peso </span><input type="text" name="txtWeight" onkeypress="ValidKey(event,'number','decimal')" />
<span>Altura </span><input type="text" name="txtHeight" onkeypress="ValidKey(event,'number','decimal')" />
</p>
<p>
<span>Edad </span><input type="text" name="txtAge" onkeypress="ValidKey(event,'number','unsigned')" />
<span>Sexo </span><input type="radio" name="chkSex" value="1" checked="checked" /> Masculino <input type="radio" name="chkSex" value="2" /> Femenino
</p>-->
<p>
<span>Posición/Disciplina </span>
<select name="cboPosition">
<?php
get_options("list_position");
?>
</select>
<span>Categoría </span>
<select name="cboCategorySport">
<?php
//get_options("list_provinces", "users_club");
?>
</select>
<span>Provincia</span>
<select name="cboProvince">
<?php
get_options("list_provinces", "users_club");
?>
</select>
</p>
<p>
<span>Pierna/Mano Hábil </span>
<select name="cboLegHand">
<option value="0">Ambos</option>
<option value="1">Derecha</option>
<option value="2">Izquierda</option>
</select>
<span>Nivel </span>
<select name="cboLevel">
<option value="0">Todos los Niveles</option>
<option value="1">Profesional</option>
<option value="2">Amateur</option>
<option value="3">Ambos</option>
</select>
<span>Ciudad</span>
<select name="cboCity">
<?php
get_options("list_city", "users_club");
?>
</select>
</p>
<p>
<!--PASAPORTE-->
<span>Pasaporte</span>
<select name="cboPassport">
<option value="0">Todos los Pasaportes</option>
<option value="1">Sin pasaporte</option>
<option value="2">Comunitario</option>
<option value="3">Extra comunitario</option>
</select>
</p>
<p>
<!--<input type="checkbox" name="chkConRepr" /><span> Con representante</span><br />
<input type="checkbox" name="chkHisDep" /><span> Con historial deportivo</span><br />-->
<input type="checkbox" name="chkMovie" /><span> Con videos</span><br />
<input type="checkbox" name="chkPhoto" /><span> Con fotos</span>
</p>
<?php
break;
case "club":
?>
<!--PROVINCIAS-->
<select name="cboProvince">
<?php
get_options("list_provinces", "users_club");
?>
</select>
<!--CIUDADES-->
<select name="cboCity">
<?php
get_options("list_city", "users_club");
?>
</select>
<!--CATEGORIA-->
<select name="cboCompetitionCategory">
//.........这里部分代码省略.........
开发者ID:jsuarez,项目名称:Lexer,代码行数:101,代码来源:forms_advancedsearch.php
示例18: mytheme_admin
//.........这里部分代码省略.........
>
<?php
echo $option;
?>
</option>
<?php
}
?>
</select>
<small><?php
echo $value['desc'];
?>
</small>
<div class="clearfix"></div>
</div>
<?php
break;
case "checkbox":
?>
<div class="rm_input rm_checkbox">
<label for="<?php
echo $value['id'];
?>
">
<?php
echo $value['name'];
?>
</label>
<?php
if (get_options($value['id'])) {
$checked = "checked=\"checked\"";
} else {
$checked = "";
}
?>
<input type="checkbox" name="<?php
echo $value['id'];
?>
" id="<?php
echo $value['id'];
?>
" value="true" <?php
echo $checked;
?>
/>
<small><?php
echo $value['desc'];
?>
</small>
<div class="clearfix"></div>
</div>
<?php
break;
case "section":
$i++;
?>
<div class="rm_section">
<div class="rm_title">
开发者ID:jofreyswb,项目名称:themaWebSite3D,代码行数:67,代码来源:setings-two.php
示例19: set_include_path
$game_config_path = "/etc/zperfmon/";
$per_game_config_path = "/etc/zperfmon/conf.d/";
$core_include = "/var/www/html/zperfmon/include/";
set_include_path(get_include_path() . ":{$game_config_path}:{$per_game_config_path}:{$core_include}");
include_once 'server.cfg';
include_once 'game_config.php';
include_once 'XhProfDAO.php';
function get_options()
{
$options = array();
$params = getopt("g:t:p:j:");
if (isset($params['g'])) {
return $params['g'];
}
}
$game = get_options();
if (!file_exists($per_game_config_path . $game . ".cfg")) {
exit(0);
}
$game_cfg = load_game_config($game);
$user = $game_cfg['db_user'];
$pass = $game_cfg['db_pass'];
$host = $game_cfg['db_host'];
$db = 'rightscale';
$deploy_id = $game_cfg['deployIDs'][0];
$XhProfDAO = new XhProfDAO($host, $user, $pass, $db);
$XhProfDAO->connect();
$array_id = $XhProfDAO->prepare_and_query('select distinct array_id from instances where deploy_id =' . $deploy_id . ';');
$ids = array();
foreach ($array_id as $id) {
array_push($ids, $id['array_id']);
开发者ID:shourya07,项目名称:zperfmon,代码行数:31,代码来源:get_array_ids.php
示例20: printr
//Bootstrap SPF
require 'includes/master.inc.php';
//This loads up $user - $isadmin - $js
require 'includes/user.inc.php';
printr(gimme(Options::groups(), 'group'));
?>
<form method="post">
<select name='option' title='Options'>
<?php
echo get_options('options', 'key', 'key', @$_POST['option']);
?>
</select>
<select name='group' title='Groups of options'>
<?php
echo get_options('options_groups', 'group', 'group', @$_POST['group']);
?>
</select>
<select name='type' title='Type of variable'>
<?php
echo array2options(Options::types(), @$_POST['type']);
?>
</select>
<input type='hidden' name='action' value='update' />
<input type='submit' class='input-large' value='Update' />
</form>
<?php
if (isset($_POST)) {
if (isset($_POST['action']) && $_POST['action'] == 'update') {
开发者ID:ninjahza,项目名称:baseline,代码行数:31,代码来源:test.php
注:本文中的get_options函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论