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


PHP FORM::radio方法代码示例

本文整理汇总了PHP中FORM::radio方法的典型用法代码示例。如果您正苦于以下问题:PHP FORM::radio方法的具体用法?PHP FORM::radio怎么用?PHP FORM::radio使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FORM的用法示例。


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

示例1: DISTINCT

    }
    // Suche itself
    $sql = "SELECT DISTINCT(e.id), title, filename, date, link FROM press_entries AS e " . $join . " " . $where;
    $res = $SQL->select($sql);
}
// head
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n" . "<html>" . "\t<head>" . "\t\t<title>Suche Pressesystem</title>\n" . "\t\t<meta name=\"author\" content=\"Christoph Becker\" >" . "\t\t<meta name=\"keywords\" content=\"Pressesystem Suche Uni Rostock Fakultät für Informatik und Elektrotechnik\" >" . "\t\t<meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\" >" . "\t\t<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" >" . "\t\t<style>" . "\t\t\t.presstitle{ font-family:Verdana,Geneva,sans;" . "\t\t\t\t\t\t font-size:14pt;" . "\t\t\t\t\t\t color:black; " . "\t\t\t}" . "\t\t\ttd {font-family:Verdana,Geneva,sans;" . "\t\t\t\t\t\tfont-size:10pt;" . "\t\t\t\t\t\tcolor:black;" . "\t\t\t\t\t\tmargin-top:10pt;" . "\t\t\t\t\t\t" . "\t\t\t}" . "\t\t\ttd.presssearchtitle {" . "\t\t\t\t\tfont-weight: bold;" . "\t\t\t}" . "\t\t\ta.presslink:hover {" . "\t\t\t\t\tcolor:red;\t" . "\t\t\t}" . "\t\t</style>" . "\t\t" . "\t</head>" . "\t<body link=\"#090851\" text=\"#000000\" bgcolor=\"#ffffff\">";
// content
if ($search_debug == true) {
    echo "<pre>Sites_selected: ";
    var_export($sites);
    echo "\nSQL: {$sql} \n Results:\n";
    var_export($res);
    echo "\n<hr noshade=noshade />";
}
echo "<div class='presstitle'>Suche</div>" . "<form name=\"sform\" method=\"POST\" action =\"" . $abs_path . "\">" . "<table>" . "<tr><td colspan='2' class='presssearchtitle'>Volltextsuche</td><td>&nbsp;</td></tr>" . "<tr><td>&nbsp;</td><td colspan='2'>" . FORM::text("fulltext", $fulltext, "", 70) . "</td></tr>" . "<tr><td colspan='2' class='presssearchtitle'>Zeige alle Einträge</td><td>&nbsp;</td></tr>" . "<tr><td align='right'><table><tr><td>" . FORM::radio("range", "before", "", $range) . "vor</td>" . "<td rowspan='2'>" . FORM::text("date", $date, "", 10) . "</td></tr>" . "<tr><td>" . FORM::radio("range", "after", "", $range) . "nach </td></tr>" . "</table></td>" . "<td colspan='2'>" . "<b>oder</b> " . FORM::radio("range", "all", "", $range) . "egal, wann sie erstellt wurden</td>" . "<tr><td valign='top'  class='presssearchtitle' colspan='2'>Suche auf bestimmte Institute beschränken</td><td>&nbsp;</td></tr>" . "\t<td>&nbsp;</td><td>" . FORM::select("sites[]", $PS->get_all(1), $sites, 6) . "</td></tr>" . "<tr><td>&nbsp;</td><td colspan='2'>" . FORM::submit("send", "suche!") . "</td></tr> " . "</table>" . "</form>" . "\t\t</div>";
// footer
echo "\t</body>" . "</html>";
// close debug
require "init.php";
//----
function set_date($d, $dateform = "german")
{
    //$ret = $d;
    //$dateform	=	"german"; 		// what do i suppose, which form i got
    $buffer = $d;
    // save for error_msg
    $preset_year = strftime("%Y");
    // with current year
    $d = trim($d);
    if (strlen($d) < 3) {
开发者ID:BackupTheBerlios,项目名称:unipress-svn,代码行数:31,代码来源:suche.php

示例2: form_row

 function form_row($field)
 {
     $this->DBG->enter_method();
     require_once "form.class.php";
     $hoverColor = "#FFFFF0";
     //TODO: should not stand here
     // DO NOT CHANGE!!! next two lines
     $tip = "t" . $field['name'];
     // field id for js
     $aPrefix = "a" . $field['name'];
     // ok.
     $aImage = "images/help/attention.gif";
     // att. image
     $divclass = "class=\"attention\"";
     $this->set_startup_focus($field['name']);
     //$this->add_field($field);
     // error
     if (array_key_exists($field['name'], $this->fielderrors) and $this->fielderrors[$field['name']] != false) {
         $error = "<span style='color:white;background:red'>" . $this->fielderrors[$field['name']] . "</span>" . BR;
         $bgcolor = " bgcolor='red'";
         $divclass = "";
     } else {
         $error = "";
         $bgcolor = "";
     }
     // prefill, first: posted, 2nd: formfilled (code)
     // remove [] for multiple choice fields
     $fname = eregi("\\[\\]\$", $field['name']) ? substr($field['name'], 0, -2) : $field['name'];
     if (array_key_exists($fname, $_REQUEST)) {
         $prefill = $_REQUEST[$fname];
     } elseif (array_key_exists("prefill", $field)) {
         $prefill = $field["prefill"];
     } else {
         $prefill = "";
     }
     $this->DBG->watch_var("prefill(" . $field['name'] . ")", $prefill);
     if (array_key_exists("help", $field)) {
         $helpdiv = "<div class=\"tip\" id=\"" . $tip . "\">" . "<span id=\"menu\">Hilfe" . " zu " . strip_tags($field['label']) . " </span><br />" . nl2br($field['help']) . "</div>";
         $this->add_help($field['name'], $helpdiv);
         // add to local help
         $helptip_focus = "onfocus=\"zeige('" . $tip . "');\"";
         $helptip_mouse = "zeige('" . $tip . "');";
     }
     #$error = check_field($field);
     $prepare_row_start = "<tr " . $helptip_focus . " onmouseover=\"" . $helptip_mouse . "this.style.backgroundColor='" . $hoverColor . "';\"" . "onblur=\"this.style.backgroundColor=''\"" . "onmouseout=\"this.style.backgroundColor=''\">" . "<td>" . "<label for=\"" . $field['name'] . "\" accesskey=\"" . $field['key'] . "\">" . $field['label'] . ":</label>" . "</td><td>" . "<div {$divclass} id=\"" . $aPrefix . "\">" . "<img src=\"" . $aImage . "\" height=\"10\" width=\"10\" alt=\"Fehler\"" . "title=\"Fehler: " . strip_tags($error) . "\"/>" . "</div>" . "</td><td>";
     $prepare_row_end = BR . HINT . $error . CSPAN . "</td></tr>";
     switch ($field['type']) {
         default:
         case 'dummy':
             $r = "\n" . $field['help'];
             break;
         case 'link':
         case 'text':
             $prefill = $prefill == "" ? "" : " value=\"" . $prefill . "\"";
             $r = "\n<input type=\"text\" size=\"40\" name=\"" . $field['name'] . "\" " . $prefill . " id=\"" . $field['name'] . "\" " . $helptip_focus . " />";
             break;
         case 'password':
             //$prefill = ($prefill == "") ? "" : " value=\"".$prefill."\"";
             $prefill = "";
             $r = "\n<input type=\"password\" size=\"40\" name=\"" . $field['name'] . "\" " . $prefill . " id=\"" . $field['name'] . "\" " . $helptip_focus . " />";
             break;
         case 'file':
             $prefill = $this->_get_result($field['name']);
             if ($prefill == "") {
                 $r = "\n<input type=\"file\" name=\"" . $field['name'] . "\" " . $helptip_focus . " />";
             } else {
                 $r = "<input type=\"hidden\" name=\"" . $field['name'] . "\" value=\"" . $prefill . "\">{$prefill}";
             }
             break;
         case 'select':
             // using "values"
             $r = "prefill: {$prefill} " . FORM::select($field['name'], $field['values'], array(0 => $prefill), 1);
             break;
         case 'source_select':
             $list = $field['values'];
             $pre = array($prefill);
             if (!is_array($list) || count($list) < 1) {
                 $r = "Es existieren keine Quellen. Bitte legen Sie eine an." . "<input type=\"hidden\" name=\"source\" value=\"-1\" />";
             } else {
                 $list = array_merge(array(0 => array("value" => "-1", "name" => "Neue Quelle")), $list);
                 $r = "\n" . FORM::select("source", $list, $pre, 1);
             }
             break;
         case 'site_select':
             $pre = $prefill;
             $list = $field['values'];
             //if ($pre==0)	$pre	=	array(9999);
             if (!is_array($list) || count($list) < 1) {
                 $r = "Es existieren keine Bereiche.";
                 $this->block = "\n<a class=\"errorlink\" href='?menu=news'>" . "- Bereich anlegen</a><br>";
             } else {
                 $this->DBG->watch_var("site_select, prefill", $pre);
                 $r = FORM::select("sites[]", $list, $pre, 6);
             }
             break;
         case 'radio':
             $r = "";
             $br = "";
             $this->DBG->watch_var("radio, values", $field['values']);
             $this->DBG->watch_var("radio, prefill", $field['prefill']);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:unipress-svn,代码行数:101,代码来源:template2.class.php

示例3: current

</table>

<br>
<br>
<legend>Способ оплаты</legend>
<br>
<table class="table table-condensed">
	<?php 
$first_value = current($payments);
$current_payment = Arr::get($values, 'payment_system', $first_value['id']);
foreach ($payments as $id => $p) {
    $checked = $current_payment == $id ? TRUE : FALSE;
    ?>
			<tr>
				<td><?php 
    echo FORM::radio('payment_system', $id, $checked);
    ?>
</td>
				<td>
					<?php 
    echo $p['payment_name'];
    ?>
					<br>
					<small class="muted"><?php 
    echo $p['tips'];
    ?>
</small>
				</td>
				<td><?php 
    echo $p['description'];
    ?>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:add.php

示例4: foreach

    </div>
    <div class="control-group <?php 
echo $status_error_css;
?>
">
        <label class="control-label">Статус задачи</label>
        <div class="controls">
            <?php 
foreach ($statuses as $id => $value) {
    ?>
            <?php 
    $checked = Arr::get($values, 'status', 1) == $id ? TRUE : FALSE;
    ?>
                <label class="radio">
                    <?php 
    echo FORM::radio('status', $id, $checked) . '<span class="' . $value['css'] . '">' . __($value['i18n']) . '</span>';
    ?>
                </label>
            <?php 
}
?>
        </div>
    </div>
    <div class="control-group <?php 
echo $text_error_css;
?>
">
        <label class="control-label">Текст</label>
        <div class="controls">
             <?php 
echo FORM::textarea('text', Arr::get($values, 'text'), array('id' => 'text', array('style' => 'width: 300px;')));
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:form.php

示例5: __

    </tr>
    <!-- Org. type -->
    <tr>
        <td><label class="label"><?php 
echo __('f_org_type');
?>
</label></td>
        <td>
            <?php 
foreach ($org_types as $value => $text) {
    ?>
                <?php 
    $selected = Arr::get($values, 'org_type') == $value ? TRUE : FALSE;
    ?>
                <?php 
    echo FORM::radio('org_type', $value, $selected) . $text;
    ?>
            <?php 
}
?>
        </td>
        <td>
            <?php 
echo NError::show_error('org_type', $errors);
?>
        </td>
    </tr>
    <!-- Name -->
    <tr>
        <td><label class="label" for="name"><?php 
echo __('f_full_company_name');
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:add.php

示例6: form_row

 function form_row($field, $error = "", $prefill = "")
 {
     require_once "form.class.php";
     $hoverColor = "#FFFFF0";
     //TODO: should not stand here
     // DO NOT CHANGE!!! next two lines
     $tip = "t" . $field['name'];
     // field id for js
     $aPrefix = "a";
     // Attention prefix for div layer
     // ok.
     $aImage = "images/help/attention.gif";
     // att. image
     $this->set_startup_focus($field['name']);
     $this->add_field($field);
     if (array_key_exists("help", $field)) {
         $helpdiv = "<div class=\"tip\" id=\"" . $tip . "\">" . "<span id=\"menu\">Hilfe" . " zu " . strip_tags($field['label']) . " </span><br />" . nl2br($field['help']) . "</div>";
         $this->add_help($field['name'], $helpdiv);
         // add to local help
         $helptip_focus = "onfocus=\"zeige('" . $tip . "');\"";
         $helptip_mouse = "zeige('" . $tip . "');";
     }
     #$error = check_field($field);
     $prepare_row_start = "<tr " . $helptip_focus . " onmouseover=\"" . $helptip_mouse . "this.style.backgroundColor='" . $hoverColor . "';\"" . "onblur=\"this.style.backgroundColor=''\"" . "onmouseout=\"this.style.backgroundColor=''\">" . "<td>" . "<label for=\"" . $field['name'] . "\" accesskey=\"" . $field['key'] . "\">" . $field['label'] . ":</label>" . "</td><td>" . "<div class=\"attention\" id=\"" . $aPrefix . $field['name'] . "\">" . "<img src=\"" . $aImage . "\" height=\"10\" width=\"10\" alt=\"Fehler: " . $error . "\" />" . "</div>" . "</td><td>";
     $prepare_row_end = BR . HINT . $error . CSPAN . "</td></tr>";
     switch ($field['type']) {
         default:
         case 'text':
             $prefill = $prefill == "" ? "" : " value=\"" . $prefill . "\"";
             $r = "<input type=\"text\" size=\"40\" name=\"" . $field['name'] . "\" " . $prefill . " id=\"" . $field['name'] . "\" " . $helptip_focus . " />";
             break;
         case 'file':
             $r = "<input type=\"file\" name=\"" . $field['name'] . "\" " . $helptip_focus . " />";
             break;
         case 'source_select':
             $list = $field['values'];
             $pre = array($prefill);
             if (!is_array($list) || count($list) < 1) {
                 $r = "Es existieren keine Quellen. Bitte legen Sie eine an." . "<input type=\"hidden\" name=\"source\" value=\"-1\" />";
             } else {
                 $list = array_merge(array(0 => array("value" => "-1", "name" => "Neue Quelle")), $list);
                 $r = FORM::select("source", $list, $pre, 1);
             }
             break;
         case 'site_select':
             $pre = $prefill;
             $list = $field['values'];
             //if ($pre==0)	$pre	=	array(9999);
             if (!is_array($list) || count($list) < 1) {
                 $r = "Es existieren keine Bereiche.";
                 $this->block = "<a class=\"errorlink\" href='?menu=news'>" . "- Bereich anlegen</a><br>";
             } else {
                 $r = FORM::select("sites[]", $list, $pre, 4);
             }
             break;
         case 'yn_radio':
             $r = FORM::radio($field['name'], "ja", "", $prefill) . "ja<br />" . FORM::radio($field['name'], "nein", "", $prefill) . "nein";
             break;
         case 'date':
             $r = "<input type=\"text\" size=\"28\" name=\"" . $field['name'] . "\"" . " " . $prefill . " id=\"" . $field['name'] . "\" " . $helptip_focus . " />" . "<a href=\"javascript:cal_" . $field['name'] . ".popup()\" title=\"Datum\">" . "&nbsp;<img src=\"images/b_calendar.gif\" width=\"16\"" . " height=\"16\" border=\"0\" alt=\"Datum\"></a>\n" . "\n\n<script type=\"text/javascript\"><!--\n" . "var cal_" . $field['name'] . " = " . "new calendar1(document.forms['myform'].elements['" . $field['name'] . "']); " . "cal_" . $field['name'] . ".year_scroll = true;" . "// --></script>\n";
             $this->add_js("js/calendar.js");
             break;
     }
     // switch
     return $prepare_row_start . $r . $prepare_row_end;
 }
开发者ID:BackupTheBerlios,项目名称:unipress-svn,代码行数:66,代码来源:template.class.php

示例7: foreach

echo Arr::get($options, 'label', $name);
?>
</label>
    <div class="controls">
        <?php 
foreach ($buttons as $value => $text) {
    ?>
            <label <?php 
    echo HTML::attributes($radio_label_attr);
    ?>
>
                <?php 
    $checked = Arr::get($values, $name) == $value ? TRUE : FALSE;
    ?>
                <?php 
    echo FORM::radio($name, $value, $checked) . $text;
    ?>
            </label>
        <?php 
}
?>
        <?php 
if (Arr::get($options, 'help')) {
    ?>
            <p class="help-block" style="color: #999999;"><?php 
    echo $options['help'];
    ?>
</p>
        <?php 
}
?>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:radiobuttons.php

示例8: array

?>
        </li>
    </ul>
    <ul class="form hvv" style="margin-left: 15px;">
        <li>
            <label for="engine-volume"  style="width: 100px;">Объем двигателя</label>
            <?php 
echo FORM::input('volume', Arr::get($values, 'volume'), array('style' => 'width: 100px;', 'id' => 'engine-volume'));
?>
        </li>
        <li>
            <label style="width: 100px;">Коробка передач</label>
            <?php 
foreach ($gearboxes as $id => $name) {
    $selected = Arr::get($values, 'gearbox_id', 1) == $id ? TRUE : FALSE;
    echo '<label style="width: 55px; float: left;">' . FORM::radio('gearbox_id', $id, $selected) . $name . '</label>';
}
?>
        </li>
        <li class="divider"></li>
        <li>
            <label style="width: 75px;" for="vehicle-year">Год выпуска</label>
            <?php 
echo FORM::input('year', Arr::get($values, 'year'), array('id' => 'vehicle-year', 'style' => 'width: 75px;'));
?>
        </li>
        <li>
            <label style="width: 135px;" for="vin">VIN</label>
            <?php 
echo FORM::input('vin', Arr::get($values, 'vin'), array('id' => 'vin', 'style' => 'width: 135px;'));
?>
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:add.php


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