本文整理汇总了PHP中SelectBox函数的典型用法代码示例。如果您正苦于以下问题:PHP SelectBox函数的具体用法?PHP SelectBox怎么用?PHP SelectBox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SelectBox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHtmlSelect
public static function getHtmlSelect($selected = 0, $name = 'car_gearbox')
{
$arValues = CarGearboxTable::getList(array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC')));
if ($selected > 0) {
return SelectBox($name, $arValues, '-- Выбрать --', $selected);
} else {
return SelectBox($name, $arValues, '-- Выбрать --');
}
}
示例2: showSelectRepairList
public static function showSelectRepairList($carID, $strBoxName, $strDetText = 'Не выбрано', $strSelectedVal = "null", $field1 = "class=\"repairlistselect\"")
{
$arRes = self::getRepairList($carID);
if ($arRes) {
$arValue = array();
foreach ($arRes as $ar_res) {
$arValue[] = array('NAME' => $ar_res['DATE'] . ' ' . $ar_res['NAME'], 'VALUE' => $ar_res['ID']);
}
return SelectBox($strBoxName, $arValue, $strDetText, $strSelectedVal, $field1);
}
}
示例3: showSelectPoints
public static function showSelectPoints($strBoxName = 'point', $strSelectedVal = 'null', $field1 = 'class="typeselect"', $pointType = null)
{
if ($arPoints = static::getPointsList($pointType)) {
$arValues = array();
foreach ($arPoints as $arPoint) {
$arValues[] = array('NAME' => '[' . mb_substr(static::getPointTypeCodeByID($arPoint['POINT_TYPES_ID']), 0, 4, 'utf-8') . '] (' . $arPoint['ID'] . ') ' . $arPoint['NAME'], 'VALUE' => $arPoint['ID']);
}
return SelectBox($strBoxName, $arValues, '--- Выбрать ---', $strSelectedVal, $field1);
} else {
return '[Нет путевых точек]';
}
}
示例4: getHtmlSelect
public static function getHtmlSelect($brand = null, $selected = 0, $name = 'car_model')
{
$arGetList = array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC'));
if (!is_null($brand)) {
$arGetList['filter']['BRANDS_ID'] = intval($brand);
}
$arValues = CarModelTable::getList($arGetList);
if ($selected > 0) {
return SelectBox($name, $arValues, '-- Выбрать --', $selected);
} else {
return SelectBox($name, $arValues, '-- Выбрать --');
}
}
示例5: GetMessage
?>
</textarea><?php
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<td valign="top"><?php
echo GetMessage("EXTRANET_USER_GROUP");
?>
</td>
<td valign="middle"><?php
echo SelectBox("EXTRANET_USER_GROUP_ID", CGroup::GetDropDownList("and ACTIVE='Y' and ID <> 2"), GetMessage("MAIN_NO"), htmlspecialcharsbx($EXTRANET_USER_GROUP_ID));
?>
</td>
</tr>
<?php
$tabControl->Buttons();
?>
<input type="submit" name="Update" value="<?php
echo GetMessage("EXTRANET_SAVE");
?>
">
<input type="hidden" name="Update" value="Y">
<input type="reset" name="reset" value="<?php
echo GetMessage("EXTRANET_RESET");
?>
">
示例6: SelectBoxBool
function SelectBoxBool($strBoxName, $strSelectedVal = "", $strYes = '', $strNo = '', $field1 = "class=\"typeselect\"")
{
if ($strYes == '') {
$strYes = 'Да';
}
if ($strNo == '') {
$strNo = 'Нет';
}
if ($strSelectedVal == "") {
$strSelectedVal = 0;
}
$arValues = array(array('VALUE' => 0, 'NAME' => $strNo), array('VALUE' => 1, 'NAME' => $strYes));
return SelectBox($strBoxName, $arValues, '', $strSelectedVal, $field1);
}
示例7: showSelectReasonReplacementList
public static function showSelectReasonReplacementList($strBoxName, $strDetText = '--- Выбрать ---', $strSelectedVal = "null", $field1 = "class=\"reasonreplacementselect\"")
{
$arRes = ReasonReplacementTable::getList(array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC')));
return SelectBox($strBoxName, $arRes, $strDetText, $strSelectedVal, $field1);
}
示例8: GetMessage
?>
][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]"
style="padding-left:16px;display:<?php
if ($arFields[$FIELD_ID]["DEFAULT_VALUE"]["USE_WATERMARK_TEXT"] === "Y") {
echo 'block';
} else {
echo 'none';
}
?>
"
>
<?php
echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_POSITION");
?>
: <?php
echo SelectBox("FIELDS[" . $FIELD_ID . "][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]", IBlockGetWatermarkPositions(), "", $arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_POSITION"]);
?>
</div>
</div>
<?php
break;
case "SECTION_CODE":
?>
<div class="adm-list">
<div class="adm-list-item">
<div class="adm-list-control">
<input
type="checkbox"
value="Y"
id="FIELDS[<?php
echo $FIELD_ID;
示例9: GetMessage
$sections .= '</select></div>';
$arActions["section"] = GetMessage("IBLIST_A_MOVE_TO_SECTION");
$arActions["add_section"] = GetMessage("IBLIST_A_ADD_TO_SECTION");
$arActions["section_chooser"] = array("type" => "html", "value" => $sections);
$arParams["select_onchange"] = "BX('section_to_move').style.display = (this.value == 'section' || this.value == 'add_section'? 'block':'none');";
}
if($bWorkFlow)
{
$arActions["unlock"] = GetMessage("IBLIST_A_UNLOCK_ACTION");
$arActions["lock"] = GetMessage("IBLIST_A_LOCK_ACTION");
$statuses = '<div id="wf_status_id" style="display:none">'.SelectBox("wf_status_id", CWorkflowStatus::GetDropDownList("N", "desc")).'</div>';
$arActions["wf_status"] = GetMessage("IBLIST_A_WF_STATUS_CHANGE");
$arActions["wf_status_chooser"] = array("type" => "html", "value" => $statuses);
$arParams["select_onchange"] .= "BX('wf_status_id').style.display = (this.value == 'wf_status'? 'block':'none');";
}
elseif($bBizproc)
{
$arActions["unlock"] = GetMessage("IBLIST_A_UNLOCK_ACTION");
}
$lAdmin->AddGroupActionTable($arActions, $arParams);
}
$sLastFolder = '';
示例10: GetMessage
<?
endif;
?></td>
</tr>
<?endif;
$tabControl->EndCustomField("WORKFLOW_PARAMS", "");
if ($WF=="Y" || $view=="Y"):
$tabControl->BeginCustomField("WF_STATUS_ID", GetMessage("IBLOCK_FIELD_STATUS").":");
?>
<tr id="tr_WF_STATUS_ID">
<td><?echo $tabControl->GetCustomLabelHTML()?></td>
<td>
<?if($ID > 0 && !$bCopy):?>
<?echo SelectBox("WF_STATUS_ID", CWorkflowStatus::GetDropDownList("N", "desc"), "", $str_WF_STATUS_ID);?>
<?else:?>
<?echo SelectBox("WF_STATUS_ID", CWorkflowStatus::GetDropDownList("N", "desc"), "", "");?>
<?endif?>
</td>
</tr>
<?
if($ID > 0 && !$bCopy)
$hidden = '<input type="hidden" name="WF_STATUS_ID" value="'.$str_WF_STATUS_ID.'">';
else
{
$rsStatus = CWorkflowStatus::GetDropDownList("N", "desc");
$arDefaultStatus = $rsStatus->Fetch();
if($arDefaultStatus)
$def_WF_STATUS_ID = intval($arDefaultStatus["REFERENCE_ID"]);
else
$def_WF_STATUS_ID = "";
$hidden = '<input type="hidden" name="WF_STATUS_ID" value="'.$def_WF_STATUS_ID.'">';
示例11: GetMessage
<?php
}
?>
<tr>
<td width="40%"><?php
echo GetMessage("FLOW_STATUS");
?>
</td>
<td width="60%"><?php
if ($str_STATUS_ID != 1 || $message) {
if ($ID <= 0) {
$z = CWorkflowStatus::GetDropDownList("N", "desc", array("!ID" => 1));
$zr = $z->Fetch();
$str_STATUS_ID = $zr["REFERENCE_ID"];
}
echo SelectBox("STATUS_ID", CWorkflowStatus::GetDropDownList(), "", $str_STATUS_ID);
} else {
?>
[<a href="workflow_status_edit.php?lang=<?php
echo LANG;
?>
&ID=<?php
echo $str_STATUS_ID;
?>
"><?php
echo $str_STATUS_ID;
?>
</a>] <?php
echo $str_STATUS_TITLE;
}
?>
示例12: GetMessage
echo GetMessage("IBLOCK_VALUE_ANY");
?>
</option><?php
while ($arr = $res->Fetch()) {
echo "<option value='" . $arr["ID"] . "'" . ($find_modified_by == $arr["ID"] ? " selected" : "") . ">(" . htmlspecialcharsbx($arr["LOGIN"] . ") " . $arr["NAME"] . " " . $arr["LAST_NAME"]) . "</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("IBLOCK_FIELD_STATUS");
?>
:</td>
<td><input type="text" name="find_status_id" value="<?php
echo htmlspecialcharsbx($find_status_id);
?>
" size="3"> <?php
echo SelectBox("find_status", CWorkflowStatus::GetDropDownList("Y"), GetMessage("IBLOCK_ALL"), htmlspecialcharsbx($find_status));
?>
</td>
</tr>
<?php
$oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage() . "?type=" . htmlspecialcharsbx($type) . "&IBLOCK_ID=" . intval($IBLOCK_ID) . "&ELEMENT_ID=" . $ELEMENT_ID, "form" => "find_form"));
$oFilter->End();
?>
</form>
<?php
$lAdmin->DisplayList();
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例13: dmsguestbook_meta_description_option_page
//.........这里部分代码省略.........
}
}
if ($setnr == $options["supergb"] && ($options["supergb"] != 0 || $options["supergb"] != "")) {
$checked = "checked";
} else {
$checked = 0;
}
$data .= "<td style='font-size:9px;background-color:#dddddd;padding:2px;'><input class='button-secondary action' style='width:70px;' id='pageid{$c}' name='pageid{$c}' type='action' value='{$set}' {$disabled} onclick=\"PageID('{$result->ID}', '{$c}')\"><br /><br />" . __("Activate this guestbook as super guestbook", "dmsguestbook") . "*<br /><input type='radio' name='supergb' value='{$setnr}' {$checked}></td>";
$data .= "<td style='font-size:9px;background-color:#dddddd;padding:2px;'><input style='width:120px;font-size:9px;background-color:#dddddd;border:1px;padding:2px;' type='text' id='language{$c}' name='language{$c}' value='{$lang}' readonly></td></tr>";
$c++;
}
$data .= "</table>";
$data .= "<input type='hidden' name='page_id' id='page_id' value='{$options['page_id']}'>";
$data .= "<input type='hidden' name='language' id='language' value='{$options['language']}'>";
$data .= "<input type='hidden' name='countpageid' id='countpageid' value='1'>";
$data .= "<input id='page_id_clear' name='page_id_clear' class='button-secondary action' style='width:150px;color:#bb0000;' type='action' value='" . __("Clear all", "dmsguestbook") . "' onclick=\"PageID_Clear('{$num_rows_posts}')\">";
$data .= "<span style='color:#bb0000;'><br />* " . __("Would you like to display one particular guestbook in a different languages? Select your desired guestbook and mark the radio button. After that all pages with the assigned language will be bound with the guestbook that you've selected.", "dmsguestbook") . "</span></td>";
$data .= "<script type='text/javascript'>";
$data .= "\n\t\t\t\tfunction PageID(id, c) {\n\t\t\t\tvar m = document.getElementById('countpageid').value;\n \t\t\t\tvar newpageid = document.getElementById('page_id').value;\n \t\t\t\tnewpageid = newpageid.concat(id + ',');\n \t\t\t\tdocument.getElementById('page_id').value = newpageid;\n \t\t\t\tdocument.getElementById('pageid' + c).value = '#' + m;\n \t\t\t\tdocument.getElementById('pageid' + c).disabled = true;\n\n \t\t\t\tdocument.getElementById('language' + c).value = document.getElementById('langselect').value;\n\n \t\t\t\tvar newlanguage = document.getElementById('language').value;\n \t\t\t\tnewlanguage = newlanguage.concat(document.getElementById('langselect').value + ',');\n \t\t\t\tdocument.getElementById('language').value = newlanguage;\n\n \t\t\t\tm++;\n \t\t\t\tdocument.getElementById('countpageid').value = m;\n \t\t\t\t}\n\n \t\t\t\tfunction PageID_Clear(c) {\n \t\t\t\t \tfor (var i = 0; i < c; i++) {\n \t\t\t \tdocument.getElementById('pageid' + i).disabled = false;\n \t\t\t\t \tdocument.getElementById('pageid' + i).value = '" . __("Set", "dmsguestbook") . "';\n \t\t\t\t \tdocument.getElementById('language' + i).value = '';\n \t\t\t\t \t}\n \t\t\t\tdocument.getElementById('page_id').value = '';\n \t\t\t\tdocument.getElementById('language').value = '';\n \t\t\t\tdocument.getElementById('countpageid').value = '1';\n \t\t\t\t}\n \t\t\t\t";
$data .= "</script>";
$tooltip = __("How to use:<br />1.) Reset all assigned guestbooks by clicking on \"Clear all\"<br />2.) Select your desired language<br /> 3.) Select your guestbook(s) by clicking \"Set\" in ascending order.<br />4.) Press the \"Save\" button", "dmsguestbook");
$data .= "<td style='text-align:right;'><a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='#tooltip_{$key}' class='tooltiplink'>?</a><div id='tooltip_{$key}' class='tooltip'>{$tooltip}</div></td>";
$data .= "</tr></table><br />";
$return_page_id = $data;
}
if ($key == "step") {
$label = __("Post per page", "dmsguestbook") . ":";
$option = "1@3@5@10@15@20@25@30@35@40@45@50@60@70@80@90@100@";
$value = $options["step"];
$additional = "";
$style = "";
$tooltip = __("Number of entry in each page", "dmsguestbook");
$jscript = "";
$return_step = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript);
}
if ($key == "messagetext_length") {
$label = __("Message text length", "dmsguestbook") . ":";
$type = "text";
$entries = 0;
$value = $options["messagetext_length"];
$char_lenght = "";
$additional = __(" chars", "dmsguestbook");
$style = "width:50px;";
$tooltip = __("Define the maximum allowed lenght each message text<br />Deactivate this feature to set 0", "dmsguestbook");
$jscript = "";
$base64 = 0;
/* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */
$return_messagetext_length = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64);
}
if ($key == "width1") {
$label = __("Guestbook width", "dmsguestbook") . ":";
$type = "text";
$entries = 0;
$value = $options["width1"];
$char_lenght = "";
$additional = "%";
$style = "width:50px;";
$tooltip = __("Guestbook width in percent<br /><br />Variable: {width1}", "dmsguestbook");
$jscript = "";
$base64 = 0;
/* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */
$return_width1 = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64);
}
if ($key == "width2") {
$label = __("Separator width", "dmsguestbook") . ":";
$type = "text";
示例14: showSelectCars
public static function showSelectCars($strBoxName, $strSelectedVal = null, $field1 = "class=\"typeselect\"")
{
$arCars = static::getListCar();
if (is_null($strSelectedVal)) {
$strSelectedVal = static::getDefaultCarID();
}
$arValues = array();
foreach ($arCars as $arCar) {
$arValues[] = array("NAME" => $arCar['NAME'] . ' - ' . $arCar['CAR_NUMBER'], "VALUE" => $arCar['ID']);
}
return SelectBox($strBoxName, $arValues, "", $strSelectedVal, $field1);
}
示例15: GetMessage
<?echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_SIZE")?>: <input
name="FIELDS[<?echo $FIELD_ID?>][DEFAULT_VALUE][WATERMARK_TEXT_SIZE]"
type="text"
value="<?echo htmlspecialcharsbx($arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_SIZE"])?>"
size="3"
>
</div>
<div class="adm-list-item"
id="SETTINGS[<?echo $FIELD_ID?>][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]"
style="padding-left:16px;display:<?
if($arFields[$FIELD_ID]["DEFAULT_VALUE"]["USE_WATERMARK_TEXT"]==="Y") echo 'block'; else echo 'none';
?>"
>
<?echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_POSITION")?>: <?echo SelectBox(
"FIELDS[".$FIELD_ID."][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]",
IBlockGetWatermarkPositions(),
"",
$arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_POSITION"]
);?>
</div>
</div>
<?
break;
case "SECTION_CODE":
?>
<div class="adm-list">
<div class="adm-list-item">
<div class="adm-list-control">
<input
type="checkbox"
value="Y"
id="FIELDS[<?echo $FIELD_ID?>][DEFAULT_VALUE][UNIQUE]"