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


PHP make_select函数代码示例

本文整理汇总了PHP中make_select函数的典型用法代码示例。如果您正苦于以下问题:PHP make_select函数的具体用法?PHP make_select怎么用?PHP make_select使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: draw_date_picker

/**
 * @param $prefix
 * @param string $default
 * @return string
 */
function draw_date_picker($prefix, $default = '')
{
    if (empty($default)) {
        $default = api_get_local_time();
    }
    $parts = explode(' ', $default);
    list($d_year, $d_month, $d_day) = explode('-', $parts[0]);
    list($d_hour, $d_minute) = explode(':', $parts[1]);

    $minute = range(10, 59);
    array_unshift($minute, '00', '01', '02', '03', '04', '05', '06', '07', '08', '09');
    $date_form = make_select($prefix.'_day', array_combine(range(1, 31), range(1, 31)), $d_day);
    $date_form .= make_select($prefix.'_month', array_combine(range(1, 12), api_get_months_long()), $d_month);
    $date_form .= make_select($prefix.'_year', array($d_year => $d_year, $d_year + 1 => $d_year + 1), $d_year).'    ';
    $date_form .= make_select($prefix.'_hour', array_combine(range(0, 23), range(0, 23)), $d_hour).' : ';
    $date_form .= make_select($prefix.'_minute', $minute, $d_minute);
    return $date_form;
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:23,代码来源:work.lib.php

示例2: function

<script type="text/javascript">
\$(document).ready(function(){
\tsdate = \$("#sdate").datepicker({altFormat:"yymmdd"});
\tsdate.datepicker('setDate', "{$sdatestr}");
\tedate = \$("#edate").datepicker({altFormat:"yymmdd"});\t
\tedate.datepicker('setDate', "{$edatestr}");

\t//Make into more PHP friendly
\t\$('#addmapstations').on('click', function(){
\t\t\$('#stations_out').attr('name', 's[]');
\t});
});
</script>
EOF;
$states = array('IACLIMATE' => 'Iowa', 'ILCLIMATE' => 'Illinois', 'KSCLIMATE' => 'Kansas', 'KYCLIMATE' => 'Kentucky', 'MICLIMATE' => 'Michigan', 'MNCLIMATE' => 'Minnesota', 'MOCLIMATE' => 'Missouri', 'NECLIMATE' => 'Nebraska', 'NDCLIMATE' => 'North Dakota', 'OHCLIMATE' => 'Ohio', 'SDCLIMATE' => 'South Dakota', 'WICLIMATE' => 'Wisconsin');
$sselect = make_select('network', $network, $states);
$snice = date("d M Y", $sdate);
$today = $edate > time() ? time() : $edate;
$enice = date("d M Y", $today);
$t->content = <<<EOF
<ol class="breadcrumb">
 <li><a href="/climodat/">Climodat Reports</a></li>
 <li class="active">IEM Climodat Station Monitor</li>
</ol>

<p>The purpose of this page is to provide a one-stop view of summarized 
IEM Climodat data for a period of your choice.  Once you have configured 
your favorite sites, <strong>please bookmark the page</strong>. There are
options presented on this page on how to compute Growing Degree Days.  Here
is a description of the three options.</p>
开发者ID:muthulatha,项目名称:iem,代码行数:30,代码来源:monitor.php

示例3: array

$projs = array("KCC" => "init=epsg:26915", "DMX" => "init=epsg:4326", "FSD" => "init=epsg:4326", "ARX" => "init=epsg:4326", "OAX" => "init=epsg:4326", "ABR" => "init=epsg:4326", "DVN" => "init=epsg:4326", "EAX" => "init=epsg:4326", "MPX" => "init=epsg:4326", "UDX" => "init=epsg:4326");
$extents = array("KCCI" => array(176500, 4450000, 710900, 4850000), "KCCIA" => array(276500, 4650000, 610900, 4850000), "KCCIB" => array(276500, 4550000, 610900, 4750000), "KCCIC" => array(276500, 4450000, 610900, 4650000), "DMX" => array(-96.72, 38.72, -90.72, 44.72), "DMXA" => array(-95.0, 41.0, -92.0, 44.0), "DMXB" => array(-95.0, 40.5, -92.0, 43), "DMXC" => array(-95.0, 40, -92.0, 42.5), "ARX" => array(-94.18000000000001, 40.82, -88.18000000000001, 46.82), "DVN" => array(-93.56999999999999, 38.6, -87.56999999999999, 44.6), "OAX" => array(-99.37, 38.32, -93.37, 44.32), "EAX" => array(-97.25, 35.8, -91.25, 41.8), "MPX" => array(-96.55, 41.83, -90.55, 47.83), "FSD" => array(-99.72, 40.58, -93.72, 46.58), "ABR" => array(-101.4, 42.45, -95.40000000000001, 48.45), "UDX" => array(-105.82, 41.12, -99.81999999999999, 47.12));
$wfos = array("DMX" => "Des Moines", "DVN" => "Davenport", "ARX" => "LaCrosse", "MPX" => "Minneapolis", "FSD" => "Sioux Falls", "OAX" => "Omaha", "EAX" => "Pleasant Hill", "ABR" => "Aberdeen", "UDX" => "Rapid City");
$pgconn = iemdb("access");
$rad = isset($_GET['rad']) ? $_GET['rad'] : 'DMX';
$tv = isset($_GET['rad']) ? strtoupper(substr($_GET['tv'], 0, 4)) : 'KCCI';
$station = isset($_GET['station']) ? $_GET['station'] : '';
$sortcol = isset($_GET['sortcol']) ? $_GET['sortcol'] : 'p15m';
$rs = pg_prepare($pgconn, "SELECT", "SELECT * from events WHERE network = \$1\n\tand valid > (now() - '15 minutes'::interval)");
$t->refresh = "<meta http-equiv=\"refresh\" content=\"60\">";
$t->title = "SchoolNet - Where's it raining?";
$t->thispage = "networks-schoolnet";
$ar = array("KCCI" => "KCCI-TV Des Moines", "KELO" => "KELO-TV Sioux Falls", "KIMT" => "KIMT-TV Mason City");
$tvselect = make_select("tv", $tv, $ar);
$ar = array("ABR" => "[ABR] Aberdeen, SD", "ARX" => "[ARX] LaCrosse, WI", "DMX" => "[DMX] Des Moines, IA", "DMXA" => "[DMX] Des Moines, IA (North)", "DMXB" => "[DMX] Des Moines, IA (Central)", "DMXC" => "[DMX] Des Moines, IA (South)", "DVN" => "[DVN] Davenport, IA", "EAX" => "[EAX] Pleasant Hill, MO", "FSD" => "[FSD] Sioux Falls, SD", "MPX" => "[MPX] Minneapolis, MN", "OAX" => "[OAX] Omaha, NE", "UDX" => "[UDX] Rapid City, SD");
$radselect = make_select("rad", $rad, $ar);
$nt = new NetworkTable($tv);
$stbl = $nt->table;
$iemdb = new IEMAccess();
$iemdata = $iemdb->getNetwork($tv);
$data = array();
while (list($key, $iemob) = each($iemdata)) {
    $data[$key] = $iemob->db;
    $data[$key]["p15m"] = 0;
}
$rs = pg_execute($pgconn, "SELECT", array($tv));
for ($i = 0; $row = @pg_fetch_array($rs, $i); $i++) {
    $data[$row["station"]]["p15m"] = $row["magnitude"];
}
function mktitle($map, $imgObj, $titlet)
{
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:raining.php

示例4: round

    $table .= "</td>";
    $table .= "<td>" . $parts["drct"] . "</td>\n\t    <td>" . round($parts["peak"], 0) . " @ " . strftime("%I:%M %p", $parts["peak_ts"]) . "</td>\n            <td>" . $parts["phour"] . "</td>\n            <td>" . $parts["pday"] . "</td>\n\t    </tr>\n";
    if ($metar == "yes") {
        $table .= "<tr";
        if ($i % 2 == 0) {
            $table .= " bgcolor='#eeeeee'";
        }
        $table .= ">";
        $table .= "<td colspan=14 align=\"CENTER\">\n             <font color=\"brown\">" . $parts["raw"] . "</font></td>\n             </tr>\n";
    }
}
$uri = "obs.php?wfo={$wfo}&metar={$metar}&sorder={$sorder}&sortcol=";
$ar = array("no" => "No", "yes" => "Yes");
$mselect = make_select("metar", $metar, $ar);
$ar = array("asc" => "Ascending", "desc" => "Descending");
$sselect = make_select("sorder", $sorder, $ar);
$t->content = <<<EOF
<p>
<form method="GET" action="obs.php" name="work">
<input type="hidden" value="{$sortcol}" name="sortcol">
<table border=1 cellspacing=0 cellpadding=1>
<tr>
 <th>Select WFO: {$wselect}</td>
  <th>View Options:</th>
  <td>Include METARS: {$mselect}
</td>
<td>Sort Order: {$sselect}</td>
<td><input type="submit" value="Go!"></form></td>
</tr></table>

<p>Sorted by column <b>{$vals[$sortcol]}</b>. 
开发者ID:raprasad,项目名称:iem,代码行数:31,代码来源:obs.php

示例5: asort

        $countries_es[$code] = $country['es'];
        $countries_en[$code] = $country['en'];
    }
}
asort($countries_es);
asort($countries_en);
function make_select($countries)
{
    $out = '<select name="country">';
    foreach ($countries as $code => $country) {
        $out .= sprintf("\t" . '<option value="%s">%s</option>' . "\n", $code, $country);
    }
    $out .= '</select>';
    return $out;
}
function make_php_array($countries)
{
    $out = 'array(';
    foreach ($countries as $code => $country) {
        $out .= sprintf("\t'%s'\t=>\t'%s',\n", $code, $country);
    }
    $out .= ');';
    return $out;
}
//-----------------------------
$out_es = make_select($countries_es);
$out_en = make_select($countries_en);
file_put_contents($select_es, $out_es);
file_put_contents($select_en, $out_en);
file_put_contents($php_es, make_php_array($countries_es));
file_put_contents($php_en, make_php_array($countries_en));
开发者ID:kingmak,项目名称:snippets,代码行数:31,代码来源:scrapper.php

示例6: turn

function turn()
{
    if ($_SESSION['select']) {
        include 'connection.php';
        $req = "SELECT player_1_obj, player_2_obj, player_3_obj, player_4_obj, asteroid FROM party WHERE `id`=" . $_SESSION['id_party'] . "";
        $pl = array();
        foreach ($bdd->query($req) as $test) {
            if ($test['player_1_obj'] !== "" && intval($_SESSION['player_id']) === 1) {
                $_SESSION['player_obj'] = $test['player_1_obj'];
            }
            if ($test['player_2_obj'] !== "" && intval($_SESSION['player_id']) === 2) {
                $_SESSION['player_obj'] = $test['player_2_obj'];
            }
            if ($test['player_3_obj'] !== "" && intval($_SESSION['player_id']) === 3) {
                $_SESSION['player_obj'] = $test['player_3_obj'];
            }
            if ($test['player_4_obj'] !== "" && intval($_SESSION['player_id']) === 4) {
                $_SESSION['player_obj'] = $test['player_4_obj'];
            }
            if ($test['asteroid'] !== "") {
                $_SESSION['asteroid'] = $test['asteroid'];
            }
        }
        make_select();
    } else {
        if ($_SESSION['order']) {
            //			$move = 1;
            make_order($_POST);
        } else {
            if ($_SESSION['mvt']) {
                //			$move = 1;
                make_mvt($_POST);
            } else {
                if ($_SESSION['make_move']) {
                    //			$move = 1;
                    make_move($_POST);
                } else {
                    //			$move = 1;
                    make_fire();
                }
            }
        }
    }
    if (kill_ship()) {
        $_SESSION['select'] = 1;
        $_SESSION['order'] = 0;
        $_SESSION['mvt'] = 0;
        $_SESSION['make_move'] = 0;
        $_SESSION['fire'] = 0;
        include 'connection.php';
        $req = $bdd->prepare("UPDATE `party` SET turn = (turn % player) + 1  where id=" . $_SESSION['id_party']);
        $req->execute();
        $req->closeCursor();
    }
}
开发者ID:sp1ke77,项目名称:wh40k,代码行数:55,代码来源:play.php

示例7: isset

$year2 = isset($_REQUEST['year2']) ? intval($_REQUEST['year2']) : date("Y", $now);
$month2 = isset($_REQUEST['month2']) ? intval($_REQUEST['month2']) : date("m", $now);
$day2 = isset($_REQUEST['day2']) ? intval($_REQUEST['day2']) : date("d", $now);
$hour2 = isset($_REQUEST['hour2']) ? intval($_REQUEST['hour2']) : date("H", $now);
$opt = isset($_REQUEST['opt']) ? $_REQUEST['opt'] : '1';
$sselect = networkSelect("ISUSM", $station);
$y1 = yearSelect2(2012, $year1, "year1");
$m1 = monthSelect($month1, "month1");
$d1 = daySelect2($day1, "day1");
$h1 = hourSelect($hour1, "hour1");
$y2 = yearSelect2(2012, $year2, "year2");
$m2 = monthSelect($month2, "month2");
$d2 = daySelect2($day2, "day2");
$h2 = hourSelect($hour2, "hour2");
$ar = array("1" => "3 Panel Plot", "2" => "Just Soil Temps", "3" => "Daily Max/Min 4 Inch Soil Temps", "4" => "Daily Solar Radiation", "5" => "Daily Potential Evapotranspiration");
$oselect = make_select("opt", $opt, $ar);
$img = sprintf("smts.py?opt=%s&amp;station=%s&amp;year1=%s&amp;year2=%s" . "&amp;month1=%s&amp;month2=%s&amp;day1=%s&amp;day2=%s&amp;" . "hour1=%s&amp;hour2=%s", $opt, $station, $year1, $year2, $month1, $month2, $day1, $day2, $hour1, $hour2);
$t->content = <<<EOF
<ol class="breadcrumb">
 <li><a href="/agclimate/">AgClimate Network</a></li>
 <li class="active">Soil Moisture Plots</li>
</ol>

<h3>Soil Moisture and Precipitation Timeseries</h3>

<p>This application plots a timeseries of soil moisture and precipitation from
a ISU Soil Moisture station of your choice.  Please select a start and end time
and click the 'Make Plot' button below.

<form name="selector" method="GET" name='getter'>
开发者ID:muthulatha,项目名称:iem,代码行数:30,代码来源:smts.php

示例8: view_user_shifts


//.........这里部分代码省略.........
        foreach ($shifts as $shift) {
            $info = array();
            if ($_SESSION['user_shifts']['start_day'] != $_SESSION['user_shifts']['end_day']) {
                $info[] = date("Y-m-d", $shift['start']);
            }
            $info[] = date("H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']);
            if (count($_SESSION['user_shifts']['rooms']) > 1) {
                $info[] = Room_name_render(['Name' => $shift['room_name'], 'RID' => $shift['RID']]);
            }
            $shift_row = array('info' => join('<br />', $info), 'entries' => '<a href="' . shift_link($shift) . '">' . $shift['name'] . '</a>' . ($shift['title'] ? '<br />' . $shift['title'] : ''));
            if (in_array('admin_shifts', $privileges)) {
                $shift_row['info'] .= ' ' . table_buttons(array(button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'), button(page_link_to('user_shifts') . '&delete_shift=' . $shift['SID'], glyph('trash'), 'btn-xs')));
            }
            $shift_row['entries'] .= '<br />';
            $is_free = false;
            $shift_has_special_needs = 0 < sql_num_query("SELECT `id` FROM `NeededAngelTypes` WHERE `shift_id` = " . $shift['SID']);
            $query = "SELECT `NeededAngelTypes`.`count`, `AngelTypes`.`id`, `AngelTypes`.`restricted`, `UserAngelTypes`.`confirm_user_id`, `AngelTypes`.`name`, `UserAngelTypes`.`user_id`\n    FROM `NeededAngelTypes`\n    JOIN `AngelTypes` ON (`NeededAngelTypes`.`angel_type_id` = `AngelTypes`.`id`)\n    LEFT JOIN `UserAngelTypes` ON (`NeededAngelTypes`.`angel_type_id` = `UserAngelTypes`.`angeltype_id`AND `UserAngelTypes`.`user_id`='" . sql_escape($user['UID']) . "')\n    WHERE ";
            if ($shift_has_special_needs) {
                $query .= "`shift_id` = '" . sql_escape($shift['SID']) . "'";
            } else {
                $query .= "`room_id` = '" . sql_escape($shift['RID']) . "'";
            }
            $query .= "               AND `count` > 0 ";
            if (!empty($_SESSION['user_shifts']['types'])) {
                $query .= "AND `angel_type_id` IN (" . implode(',', $_SESSION['user_shifts']['types']) . ") ";
            }
            $query .= "ORDER BY `AngelTypes`.`name`";
            $angeltypes = sql_select($query);
            if (count($angeltypes) > 0) {
                $my_shift = sql_num_query("SELECT * FROM `ShiftEntry` WHERE `SID`='" . sql_escape($shift['SID']) . "' AND `UID`='" . sql_escape($user['UID']) . "' LIMIT 1") > 0;
                foreach ($angeltypes as &$angeltype) {
                    $entries = sql_select("SELECT * FROM `ShiftEntry` JOIN `User` ON (`ShiftEntry`.`UID` = `User`.`UID`) WHERE `SID`='" . sql_escape($shift['SID']) . "' AND `TID`='" . sql_escape($angeltype['id']) . "' ORDER BY `Nick`");
                    $entry_list = array();
                    $entry_nicks = [];
                    $freeloader = 0;
                    foreach ($entries as $entry) {
                        if (in_array('user_shifts_admin', $privileges)) {
                            $member = User_Nick_render($entry) . ' ' . table_buttons(array(button(page_link_to('user_shifts') . '&entry_id=' . $entry['id'], glyph('trash'), 'btn-xs')));
                        } else {
                            $member = User_Nick_render($entry);
                        }
                        if ($entry['freeloaded']) {
                            $member = '<strike>' . $member . '</strike>';
                            $freeloader++;
                        }
                        $entry_list[] = $member;
                        $entry_nicks[] = $entry['Nick'];
                    }
                    $angeltype['taken'] = count($entries) - $freeloader;
                    $angeltype['angels'] = $entry_nicks;
                    // do we need more angles of this type?
                    if ($angeltype['count'] - count($entries) + $freeloader > 0) {
                        $inner_text = sprintf(ngettext("%d helper needed", "%d helpers needed", $angeltype['count'] - count($entries) + $freeloader), $angeltype['count'] - count($entries) + $freeloader);
                        // is the shift still running or alternatively is the user shift admin?
                        $user_may_join_shift = true;
                        /* you cannot join if user already joined this shift */
                        $user_may_join_shift &= !$my_shift;
                        // you cannot join if user is not of this angel type
                        $user_may_join_shift &= isset($angeltype['user_id']);
                        // you cannot join if you are not confirmed
                        if ($angeltype['restricted'] == 1 && isset($angeltype['user_id'])) {
                            $user_may_join_shift &= isset($angeltype['confirm_user_id']);
                        }
                        // you can only join if the shift is in future or running
                        $user_may_join_shift &= time() < $shift['start'];
                        // User shift admins may join anybody in every shift
                        $user_may_join_shift |= in_array('user_shifts_admin', $privileges);
                        if ($user_may_join_shift) {
                            $entry_list[] = '<a href="' . page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'] . '&amp;type_id=' . $angeltype['id'] . '">' . $inner_text . ' &raquo;</a>';
                        } else {
                            if (time() > $shift['end']) {
                                $entry_list[] = $inner_text . ' (vorbei)';
                            } elseif ($angeltype['restricted'] == 1 && isset($angeltype['user_id']) && !isset($angeltype['confirm_user_id'])) {
                                $entry_list[] = $inner_text . glyph("lock");
                            } else {
                                $entry_list[] = $inner_text . ' <a href="' . page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'] . '">' . sprintf(_('Become %s'), $angeltype['name']) . '</a>';
                            }
                        }
                        unset($inner_text);
                        $is_free = true;
                    }
                    $shift_row['entries'] .= '<b>' . $angeltype['name'] . ':</b> ';
                    $shift_row['entries'] .= join(", ", $entry_list);
                    $shift_row['entries'] .= '<br />';
                }
                if (in_array('user_shifts_admin', $privileges)) {
                    $shift_row['entries'] .= '<a href="' . page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'] . '&amp;type_id=' . $angeltype['id'] . '">' . _('Add more angels') . ' &raquo;</a>';
                }
                $shifts_table[] = $shift_row;
                $shift['angeltypes'] = $angeltypes;
                $ical_shifts[] = $shift;
            }
        }
        $shifts_table = table(array('info' => _("Time") . "/" . _("Room"), 'entries' => _("Entries")), $shifts_table);
    }
    if ($user['api_key'] == "") {
        User_reset_api_key($user, false);
    }
    return page(array('<div class="col-md-12">', msg(), template_render('../templates/user_shifts.html', array('title' => shifts_title(), 'room_select' => make_select($rooms, $_SESSION['user_shifts']['rooms'], "rooms", _("Rooms")), 'start_select' => html_select_key("start_day", "start_day", array_combine($days, $days), $_SESSION['user_shifts']['start_day']), 'start_time' => $_SESSION['user_shifts']['start_time'], 'end_select' => html_select_key("end_day", "end_day", array_combine($days, $days), $_SESSION['user_shifts']['end_day']), 'end_time' => $_SESSION['user_shifts']['end_time'], 'type_select' => make_select($types, $_SESSION['user_shifts']['types'], "types", _("Angeltypes") . '<sup>1</sup>'), 'filled_select' => make_select($filled, $_SESSION['user_shifts']['filled'], "filled", _("Occupancy")), 'task_notice' => '<sup>1</sup>' . _("The tasks shown here are influenced by the preferences you defined in your settings!") . " <a href=\"" . page_link_to('angeltypes') . '&action=about' . "\">" . _("Description of the jobs.") . "</a>", 'new_style_checkbox' => '<label><input type="checkbox" name="new_style" value="1" ' . ($_SESSION['user_shifts']['new_style'] ? ' checked' : '') . '> ' . _("Use new style if possible") . '</label>', 'shifts_table' => msg() . $shifts_table, 'ical_text' => '<h2>' . _("iCal export") . '</h2><p>' . sprintf(_("Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s\">JSON format</a> available (please keep secret, otherwise <a href=\"%s\">reset the api key</a>)."), page_link_to_absolute('ical') . '&key=' . $user['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $user['api_key'], page_link_to('user_myshifts') . '&reset') . '</p>', 'filter' => _("Filter"))), '</div>'));
}
开发者ID:Bartzi,项目名称:engelsystem,代码行数:101,代码来源:user_shifts.php

示例9: draw_date_picker

/**
 * Returns a date picker
 * @todo replace this function with the formvalidator datepicker
 *
 */
function draw_date_picker($prefix, $default = '')
{
    if (empty($default)) {
        $default = date('Y-m-d H:i:s');
    }
    $parts = split(' ', $default);
    list($d_year, $d_month, $d_day) = split('-', $parts[0]);
    list($d_hour, $d_minute) = split(':', $parts[1]);
    $month_list = array(1 => get_lang('JanuaryLong'), 2 => get_lang('FebruaryLong'), 3 => get_lang('MarchLong'), 4 => get_lang('AprilLong'), 5 => get_lang('MayLong'), 6 => get_lang('JuneLong'), 7 => get_lang('JulyLong'), 8 => get_lang('AugustLong'), 9 => get_lang('SeptemberLong'), 10 => get_lang('OctoberLong'), 11 => get_lang('NovemberLong'), 12 => get_lang('DecemberLong'));
    $minute = range(10, 59);
    array_unshift($minute, '00', '01', '02', '03', '04', '05', '06', '07', '08', '09');
    $date_form = make_select($prefix . '_day', array_combine(range(1, 31), range(1, 31)), $d_day);
    $date_form .= make_select($prefix . '_month', $month_list, $d_month);
    $date_form .= make_select($prefix . '_year', array($d_year - 2 => $d_year - 2, $d_year - 1 => $d_year - 1, $d_year => $d_year, $d_year + 1 => $d_year + 1, $d_year + 2 => $d_year + 2), $d_year) . '&nbsp;&nbsp;&nbsp;&nbsp;';
    $date_form .= make_select($prefix . '_hour', array_combine(range(0, 23), range(0, 23)), $d_hour) . ' : ';
    $date_form .= make_select($prefix . '_minute', $minute, $d_minute);
    return $date_form;
}
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:23,代码来源:wiki.inc.php

示例10: ms_newPointObj

    $pt = ms_newPointObj();
    $pt->setXY($cities[$station]['lon'], $cities[$station]['lat'], 0);
    $pt->draw($map, $datal, $img, 0, $row["d"]);
}
$namer->draw($img);
$counties->draw($img);
$stlayer->draw($img);
//$ttt->draw($img);
$datal->draw($img);
iemmap_title($map, $img, $plotDate . " " . $var[$plot]);
$map->drawLabelCache($img);
$url = $img->saveWebImage();
$ar = array("all" => "Iowa", "ne" => "NE Iowa", "se" => "SE Iowa", "sw" => "SW Iowa", "nw" => "NW Iowa");
$aselect = make_select("area", $area, $ar);
$ar = array("high" => "Average High Temperature", "low" => "Average Low Temperature", "precip" => "Average Precip", "max_high" => "Record High Temperature", "min_low" => "Record Low Temperature", "max_precip" => "Record Precip", "min_high" => "Record Minimum High Temp", "max_low" => "Record Maximum Low Temp");
$pselect = make_select("plot", $plot, $ar);
$mselect = monthSelect("month", $month);
$dselect = daySelect("day", $day);
$t->content = <<<EOF
<h3>COOP Climate Data</h3>

 Using the COOP data archive, daily averages and extremes
  were calculated.  These numbers are <b>not</b> official, but we believe them
  to be accurate.  Please make your form selections on the left hand side and
  then click the 'Generate Plot' button.

  <div class="row">
  <div class="col-md-7">

<img src="{$url}" class="img img-responsive" />
   <br><i>You can right-click on the image to save it.</i>
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:index.php

示例11: NetworkTable

include "../../include/vtec.php";
include "../../include/network.php";
include "../../include/forms.php";
$nt = new NetworkTable("WFO");
$clobber = isset($_REQUEST["clobber"]);
$wfo = isset($_REQUEST["wfo"]) ? strtoupper(substr($_REQUEST["wfo"], 0, 3)) : null;
$phenomena = isset($_REQUEST["phenomena"]) ? strtoupper(substr($_REQUEST["phenomena"], 0, 2)) : null;
$significance = isset($_REQUEST["significance"]) ? strtoupper(substr($_REQUEST["significance"], 0, 1)) : null;
$wfoLimiter = "";
$wfoMsg = "Data for all WFOs shown";
if ($wfo) {
    $wfoLimiter = " and wfo = '{$wfo}' ";
    $wfoMsg = "Data for only {$wfo} shown";
}
$p1 = make_select("phenomena", $phenomena, $vtec_phenomena);
$s1 = make_select("significance", $significance, $vtec_significance);
$t = new MyView();
$t->thispage = "severe-main";
$t->title = "VTEC Yearly Event Counts";
function get_data()
{
    global $wfoLimiter;
    $dbconn = iemdb("postgis");
    $rs = pg_query("\n\t\t\tSELECT yr, phenomena, significance, count(*) from\n\t\t\t(SELECT distinct extract(year from issue) as yr, wfo,\n\t\t\tphenomena, significance, eventid from warnings WHERE\n\t\t\tsignificance is not null and phenomena is not null and\n\t\t\tissue > '1980-01-01' {$wfoLimiter}) as foo\n\t\t\tGROUP by yr, phenomena, significance\n\t");
    $data = array();
    $pcodes = array();
    for ($i = 0; $row = @pg_fetch_assoc($rs, $i); $i++) {
        $yr = $row["yr"];
        if (!array_key_exists($yr, $data)) {
            $data[$yr] = array();
        }
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:yearly_counts.php

示例12: make_select

}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Selective Memory</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
        p, label, select, option {
            font: 12px verdana;
            color: #66f;
        }
    </style>
</head>

<body>
    <form action="index.php" method="post">
        <p>
            <?php 
// en hier simpel de select genereren
make_select('hobbies', $hobbies);
make_select('maanden', $maanden);
make_select('dagen', $dagen);
make_select('jaren', $jaren);
?>
            <input type="submit" value="verzenden">
        </p>
    </form>
</body>
</html> 
开发者ID:howywowy,项目名称:ca-gh-demo,代码行数:31,代码来源:select.php

示例13: MyView

<?php

include "../../../config/settings.inc.php";
include_once "../../../include/myview.php";
include_once "../../../include/imagemaps.php";
include_once "../../../include/forms.php";
$t = new MyView();
$t->title = "COOP Extremes Plots";
$t->thispage = "networks-coop";
$station = isset($_GET["station"]) ? $_GET["station"] : "";
$var = isset($_GET["var"]) ? $_GET["var"] : "";
$nselect = networkSelect("IACLIMATE", $station);
$ar = array("high" => "High Temperature", "low" => "Low Temperature");
$varselect = make_select("var", $var, $ar);
$imgurl = "";
if (strlen($station) > 0) {
    $imgurl = "<img src=\"extremes.php?var=" . $var . "&station=" . $station . "\">\n";
}
$t->content = <<<EOF
<ol class="breadcrumb">
<li><a href="http://mesonet.agron.iastate.edu/">IEM</a></li>
<li><a href="/climate/">Climatology</a></li>
<li class="active">COOP Daily Extremes</li>
</ol>

<BR>
<p>Using the NWS COOP dataset, the IEM has calculated daily
temperature extremes.  You can create a annual plot of this dataset for a
station of your choice.</p> 

开发者ID:muthulatha,项目名称:iem,代码行数:29,代码来源:extremes_fe.php

示例14: main_screen

function main_screen($mode = 'reg')
{
    global $INSTALLER09;
    $page_title = "Statistic Center";
    $page_detail = "Please define the date ranges and other options below.<br />Note: The statistics generated are based on the information currently held in the database.";
    if ($mode == 'reg') {
        $form_code = 'show_reg';
        $table = 'Registration Statistics';
    } else {
        if ($mode == 'topic') {
            $form_code = 'show_topic';
            $table = 'New Topic Statistics';
        } else {
            if ($mode == 'post') {
                $form_code = 'show_post';
                $table = 'Post Statistics';
            } else {
                if ($mode == 'msg') {
                    $form_code = 'show_msg';
                    $table = 'PM Statistics';
                } else {
                    if ($mode == 'views') {
                        $form_code = 'show_views';
                        $table = 'Topic View Statistics';
                    } else {
                        if ($mode == 'comms') {
                            $form_code = 'show_comms';
                            $table = 'Comment Statistics';
                        } else {
                            if ($mode == 'torrents') {
                                $form_code = 'show_torrents';
                                $table = 'Torrrents Statistics';
                            } else {
                                if ($mode == 'reps') {
                                    $form_code = 'show_reps';
                                    $table = 'Reputation Statistics';
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $old_date = getdate(time() - 3600 * 24 * 90);
    $new_date = getdate(time() + 3600 * 24);
    $menu = make_side_menu();
    $htmlout = "<div>\n      <div style='background: grey; height: 25px;'>\n      <span style='font-weight: bold; font-size: 12pt;'>Statistics Center</span>\n      </div><br />\n    {$menu}\n    <form action='{$INSTALLER09['baseurl']}/staffpanel.php?tool=stats_extra&amp;action=stats_extra' method='post' name='StatsForm'>\n    <input name='mode' value='{$form_code}' type='hidden' />\n\n\t\n    <div style='text-align: left; width: 50%; border: 1px solid blue; padding: 5px;'>\n\t\t<div style='background: grey; height: 25px; margin-bottom:20px;'>\n      <span style='font-weight: bold; font-size: 12pt;'>{$table}</span>\n    </div>\n    <fieldset><legend><strong>Info</strong></legend>\n    {$page_detail}</fieldset>\n\t\t<fieldset><legend><strong>Date From</strong></legend>";
    $htmlout .= make_select('from_month', make_month(), $old_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_day', make_day(), $old_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('from_year', make_year(), $old_date['year']) . '</fieldset>';
    $htmlout .= "<fieldset><legend><strong>Date To</strong></legend>";
    $htmlout .= make_select('to_month', make_month(), $new_date['mon']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_day', make_day(), $new_date['mday']) . '&nbsp;&nbsp;';
    $htmlout .= make_select('to_year', make_year(), $new_date['year']) . '</fieldset>';
    if ($mode != 'views') {
        $htmlout .= "<fieldset><legend><strong>Time scale</strong></legend>";
        $htmlout .= make_select('timescale', array(0 => array('daily', 'Daily'), 1 => array('weekly', 'Weekly'), 2 => array('monthly', 'Monthly'))) . '</fieldset>';
    }
    $htmlout .= "<fieldset><legend><strong>Result Sorting</strong></legend>";
    $htmlout .= make_select('sortby', array(0 => array('asc', 'Ascending - Oldest dates first'), 1 => array('desc', 'Descending - Newest dates first')), 'desc') . '</fieldset>';
    $htmlout .= "<fieldset><legend><strong>Submit it!</strong></legend>\n\t\t\t\t<input value='Show' class='btn' accesskey='s' type='submit' />\n\t\t\t</fieldset>\n\n\t\t</div>\n\t\n    </form></div>";
    echo stdhead($page_title) . $htmlout . stdfoot();
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:64,代码来源:stats_extra.php

示例15: array

        $s1 .= " SELECTED ";
    }
    $s1 .= ">" . $cities[$key]["name"] . "\n";
}
$s2 = "";
for (reset($cities); $key = key($cities); next($cities)) {
    $s2 .= "<option value=\"" . $cities[$key]["id"] . "\"";
    if ($cities[$key]["id"] == $station2) {
        $s2 .= " SELECTED ";
    }
    $s2 .= ">" . $cities[$key]["name"] . "\n";
}
$ar = array("o" => "One Station", "c" => "Compare Two");
$modeselect = make_select("mode", $mode, $ar);
$ar = array("all" => "All", "winter" => "Winter (DJF)", "spring" => "Spring (NAM)", "summer" => "Summer (JJA)", "fall" => "Fall (SON)");
$seasonselect = make_select("season", $season, $ar);
if ($mode == "c") {
    $im = "<img src=\"yearly_diff.php?station1=" . $station1 . "&station2=" . $station2 . "&season=" . $season . "\">\n";
} else {
    if (strlen($station1) > 0) {
        $im = "<img src=\"yearly.php?station=" . $station1 . "&season=" . $season . "\">\n";
    } else {
        $im = "<p>Please make plot selections above.\n";
    }
}
$t->content = <<<EOF
<ol class="breadcrumb">
<li><a href="http://mesonet.agron.iastate.edu/">IEM</a></li>
<li><a href="/climate/">Climatology</a></li>
<li class="active">COOP Yearly Averages</li>
</ol>
开发者ID:raprasad,项目名称:iem,代码行数:31,代码来源:yearly_fe.php


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