本文整理汇总了PHP中SelectBoxMFromArray函数的典型用法代码示例。如果您正苦于以下问题:PHP SelectBoxMFromArray函数的具体用法?PHP SelectBoxMFromArray怎么用?PHP SelectBoxMFromArray使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SelectBoxMFromArray函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMultiSelectField
function GetMultiSelectField($FIELD_NAME, $arMultiSelect, $arSELECTED = array(), $HEIGHT = "", $PARAM = "")
{
if (strlen($PARAM) <= 0) {
$PARAM = " class=\"inputselect\" ";
}
return SelectBoxMFromArray("form_multiselect_" . $FIELD_NAME . "[]", $arMultiSelect, $arSELECTED, "", false, $HEIGHT, $PARAM);
}
示例2: uksort
}
uksort($arrSEARCHERS, "multiselect_sort");
$ref = array();
$ref_id = array();
if (is_array($arrSEARCHERS)) {
$ref = array_values($arrSEARCHERS);
$ref_id = array_keys($arrSEARCHERS);
}
?>
<tr valign="top">
<td width="0%" nowrap><?php
echo GetMessage("STAT_F_SEACHERS");
?>
<br><IMG SRC="/bitrix/images/statistic/mouse.gif" WIDTH="44" HEIGHT="21" BORDER=0 ALT=""></td>
<td width="0%" nowrap><?php
echo SelectBoxMFromArray("find_searchers[]", array("REFERENCE" => $ref, "REFERENCE_ID" => $ref_id), $find_searchers, "", false, "11", "' style=\"width:100%\"");
?>
</td>
</tr>
<?php
}
$oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage()));
$oFilter->End();
?>
</form>
<?php
if ($message) {
echo $message->Show();
}
$aMenu = array(array("TEXT" => GetMessage("STAT_LIST"), "TITLE" => GetMessage("STAT_LIST_TITLE"), "LINK" => "searcher_list.php?lang=" . LANG, "ICON" => "btn_list"), array("LINK" => "searcher_graph_list.php?lang=" . LANGUAGE_ID . "&set_default=Y", "TEXT" => GetMessage("STAT_GRAPH_FULL_S"), "TITLE" => GetMessage("STAT_GRAPH_TITLE")));
示例3: GetMessage
<td><?php
echo GetMessage("STAT_F_PERIOD") . " (" . FORMAT_DATE . "):";
?>
</td>
<td><?php
echo CalendarPeriod("find_date1", $find_date1, "find_date2", $find_date2, "find_form", "Y");
?>
</td>
</tr>
<tr valign="top">
<td><?php
echo GetMessage("STAT_F_EVENTS");
?>
<br><IMG SRC="/bitrix/images/statistic/mouse.gif" WIDTH="44" HEIGHT="21" BORDER=0 ALT=""></td>
<td><?php
echo SelectBoxMFromArray("find_events[]", array("REFERENCE" => $find_events_names, "REFERENCE_ID" => $find_events), false, "", false, "11", 'id="find_events[]"');
?>
<script language="Javascript">
function selectEventType(form, field)
{
jsUtils.OpenWindow('event_multiselect.php?target_control=select&lang=<?php
echo LANG;
?>
&form='+form+'&field='+field, 600, 600);
}
jsSelectUtils.sortSelect('find_events[]');
jsSelectUtils.selectAllOptions('find_events[]');
</script>
<br>
<input type="button" OnClick="selectEventType('find_form','find_events[]')" value="<?php
echo GetMessage("STAT_ADD");
示例4: GetMessage
echo GetMessage("AD_F_WHAT_TO_SHOW");
?>
:<br><img src="/bitrix/images/advertising/mouse.gif" width="44" height="21" border=0 alt=""></td>
<td><?php
$arr = array("reference" => array(GetMessage("AD_VISITOR_GRAPH"), GetMessage("AD_SHOW_GRAPH"), GetMessage("AD_CLICK_GRAPH"), "CTR"), "reference_id" => array("visitor", "show", "click", "ctr"));
echo SelectBoxMFromArray("find_what_show[]", $arr, $find_what_show, "", false, "4");
?>
</td>
</tr>
<tr>
<td nowrap valign="top"><span class="required">*</span><?php
echo GetMessage("AD_F_CONTRACTS");
?>
:<br><img src="/bitrix/images/advertising/mouse.gif" width="44" height="21" border=0 alt=""></td>
<td nowrap><?php
echo SelectBoxMFromArray("find_contract_id[]", array("REFERENCE" => $contract_ref, "REFERENCE_ID" => $contract_ref_id), $find_contract_id, "", false, "5", "style='width:100%'");
?>
</td>
</tr>
<?php
$filter->Buttons();
?>
<input type="submit" id="set_filter" name="set_filter" value="<?php
echo GetMessage("ADV_F_FIND");
?>
" title="<?php
echo GetMessage("ADV_F_FIND_TITLE");
?>
">
<input type="submit" name="del_filter" value="<?php
echo GetMessage("ADV_F_CLEAR");
示例5: GetMessage
</tr>
<tr valign="top">
<td><?php
echo GetMessage("POST_F_DISTRIBUTION");
?>
:</td>
<td><?php
$ref = array();
$ref_id = array();
$rsRubric = CRubric::GetList(array("LID" => "ASC", "SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"));
while ($arRubric = $rsRubric->Fetch()) {
$ref[] = "[" . $arRubric["ID"] . "] (" . $arRubric["LID"] . ") " . $arRubric["NAME"];
$ref_id[] = $arRubric["ID"];
}
$arr = array("reference" => $ref, "reference_id" => $ref_id);
echo SelectBoxMFromArray("find_distribution[]", $arr, $find_distribution, "", false, 5);
?>
</td>
</tr>
<?php
$oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage(), "form" => "find_form"));
$oFilter->End();
?>
</form>
<?php
$lAdmin->DisplayList();
?>
<?php
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例6: GetMessage
<td><?php
echo GetMessage("STAT_PERIOD") . " (" . FORMAT_DATE . "):";
?>
</td>
<td><?php
echo CalendarPeriod("find_date1", $find_date1, "find_date2", $find_date2, "find_form", "Y");
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("STAT_SITE");
?>
:</td>
<td><?php
echo SelectBoxMFromArray("find_site_id[]", $arSiteDropdown, $find_site_id, "", "");
?>
</td>
</tr>
<tr valign="top">
<td><?php
echo GetMessage("STAT_SHOW");
?>
:</td>
<td>
<?php
echo InputType("checkbox", "find_hit", "Y", $find_hit, false, false, 'id="find_hit"');
?>
<label for="find_hit"><?php
echo GetMessage("STAT_HITS_2");
?>
示例7: while
while($arGroup = $rsGroups -> Fetch())
$arRatingVoteAuthorityGroupID[] = $arGroup["GROUP_ID"];
?>
<tr class="heading">
<td colspan="2"><?php
echo GetMessage('RATING_SETTINGS_FRM_AUTHORITY');
?>
</td>
</tr>
<tr>
<td width="50%" valign="top"><?php
echo GetMessage('RATING_SETTINGS_FRM_RATING_VOTE_AUTHORITY_GROUP_ID');
?>
</td>
<td><?php
echo SelectBoxMFromArray("RATING_VOTE_AUTHORITY_GROUP_ID[]", $arRatingVoteGroupIdList, $arRatingVoteAuthorityGroupID, "", true, 5);
?>
</td>
</tr>
<tr id="rating_settings_auto_assign_2_1">
<td width="50%"><?php
echo GetMessage('RATING_SETTINGS_FRM_AUTO_ASSIGN');
?>
:</td>
<td><?php
echo SelectBoxFromArray("RATING_ASSIGN_AUTHORITY_GROUP", $arRatingVoteGroupIdList2, $ratingAssignAuthorityGroup);
?>
</td>
</tr>
<tr id="rating_settings_auto_assign_2_2">
<td width="50%"></td>
示例8: uksort
}
uksort($arrCOUNTRY, "multiselect_sort");
$ref = array();
$ref_id = array();
if (is_array($arrCOUNTRY)) {
$ref = array_values($arrCOUNTRY);
$ref_id = array_keys($arrCOUNTRY);
}
?>
<tr valign="top">
<td valign="top"><?php
echo GetMessage("STAT_F_COUNTRY_ID");
?>
:<br><img src="/bitrix/images/statistic/mouse.gif" width="44" height="21" border=0 alt=""></td>
<td><?php
echo SelectBoxMFromArray("find_country_id[]", array("REFERENCE" => $ref, "REFERENCE_ID" => $ref_id), $find_country_id, "", false, "11", "style=\"width:100%\"");
?>
</td>
</tr>
<?php
}
?>
<?php
$filter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage(), "form" => "form1"));
$filter->End();
?>
</form>
示例9: ShowHTML
public function ShowHTML()
{
global $APPLICATION;
$arP = array();
foreach ($this->arGroups as $group_id => $group_params) {
$arP[$group_params['TAB']][$group_id] = array();
}
if (is_array($this->arOptions)) {
foreach ($this->arOptions as $option => $arOptParams) {
$val = $this->arCurOptionValues[$option];
if ($arOptParams['SORT'] < 0 || !isset($arOptParams['SORT'])) {
$arOptParams['SORT'] = 0;
}
$label = isset($arOptParams['TITLE']) && $arOptParams['TITLE'] != '' ? $arOptParams['TITLE'] : '';
$opt = htmlspecialchars($option);
switch ($arOptParams['TYPE']) {
case 'DATE':
$input = '<input type="text" name="' . $opt . '" id="' . $opt . '" value="' . $val . '" /><script>$(\'#' . $opt . '\').datetimepicker({lang:"en",format:"F d, Y H:i", step:"30"});</script>';
break;
case 'CHECKBOX':
$input = '<input type="checkbox" name="' . $opt . '" id="' . $opt . '" value="Y"' . ($val == 'Y' ? ' checked' : '') . ' ' . ($arOptParams['REFRESH'] == 'Y' ? 'onclick="document.forms[\'' . $this->module_id . '\'].submit();"' : '') . ' />';
break;
case 'TEXT':
if (!isset($arOptParams['COLS'])) {
$arOptParams['COLS'] = 25;
}
if (!isset($arOptParams['ROWS'])) {
$arOptParams['ROWS'] = 5;
}
$input = '<textarea rows="' . $type[1] . '" cols="' . $arOptParams['COLS'] . '" rows="' . $arOptParams['ROWS'] . '" name="' . $opt . '">' . htmlspecialchars($val) . '</textarea>';
if ($arOptParams['REFRESH'] == 'Y') {
$input .= '<input type="submit" name="refresh" value="OK" />';
}
break;
case 'SELECT':
$input = SelectBoxFromArray($opt, $arOptParams['VALUES'], $val, '', '', $arOptParams['REFRESH'] == 'Y' ? true : false, $arOptParams['REFRESH'] == 'Y' ? $this->module_id : '');
if ($arOptParams['REFRESH'] == 'Y') {
$input .= '<input type="submit" name="refresh" value="OK" />';
}
break;
case 'MSELECT':
$input = SelectBoxMFromArray($opt . '[]', $arOptParams['VALUES'], $val);
if ($arOptParams['REFRESH'] == 'Y') {
$input .= '<input type="submit" name="refresh" value="OK" />';
}
break;
case 'COLORPICKER':
if (!isset($arOptParams['FIELD_SIZE'])) {
$arOptParams['FIELD_SIZE'] = 25;
}
ob_start();
echo '<input id="__CP_PARAM_' . $opt . '" name="' . $opt . '" size="' . $arOptParams['FIELD_SIZE'] . '" value="' . htmlspecialchars($val) . '" type="text" style="float: left;" ' . ($arOptParams['FIELD_READONLY'] == 'Y' ? 'readonly' : '') . ' />
<script>
function onSelect_' . $opt . '(color, objColorPicker)
{
var oInput = BX("__CP_PARAM_' . $opt . '");
oInput.value = color;
}
</script>';
$APPLICATION->IncludeComponent('bitrix:main.colorpicker', '', array('SHOW_BUTTON' => 'Y', 'ID' => $opt, 'NAME' => 'Выбор цвета', 'ONSELECT' => 'onSelect_' . $opt), false);
$input = ob_get_clean();
if ($arOptParams['REFRESH'] == 'Y') {
$input .= '<input type="submit" name="refresh" value="OK" />';
}
break;
case 'FILE':
if (!isset($arOptParams['FIELD_SIZE'])) {
$arOptParams['FIELD_SIZE'] = 25;
}
if (!isset($arOptParams['BUTTON_TEXT'])) {
$arOptParams['BUTTON_TEXT'] = '...';
}
CAdminFileDialog::ShowScript(array('event' => 'BX_FD_' . $opt, 'arResultDest' => array('FUNCTION_NAME' => 'BX_FD_ONRESULT_' . $opt), 'arPath' => array(), 'select' => 'F', 'operation' => 'O', 'showUploadTab' => true, 'showAddToMenuTab' => false, 'fileFilter' => '', 'allowAllFiles' => true, 'SaveConfig' => true));
$input = '<input id="__FD_PARAM_' . $opt . '" name="' . $opt . '" size="' . $arOptParams['FIELD_SIZE'] . '" value="' . htmlspecialchars($val) . '" type="text" style="float: left;" ' . ($arOptParams['FIELD_READONLY'] == 'Y' ? 'readonly' : '') . ' />
<input value="' . $arOptParams['BUTTON_TEXT'] . '" type="button" onclick="window.BX_FD_' . $opt . '();" />
<script>
setTimeout(function(){
if (BX("bx_fd_input_' . strtolower($opt) . '"))
BX("bx_fd_input_' . strtolower($opt) . '").onclick = window.BX_FD_' . $opt . ';
}, 200);
window.BX_FD_ONRESULT_' . $opt . ' = function(filename, filepath)
{
var oInput = BX("__FD_PARAM_' . $opt . '");
if (typeof filename == "object")
oInput.value = filename.src;
else
oInput.value = (filepath + "/" + filename).replace(/\\/\\//ig, \'/\');
}
</script>';
if ($arOptParams['REFRESH'] == 'Y') {
$input .= '<input type="submit" name="refresh" value="OK" />';
}
break;
case 'CUSTOM':
$input = $arOptParams['VALUE'];
break;
default:
if (!isset($arOptParams['SIZE'])) {
$arOptParams['SIZE'] = 25;
}
//.........这里部分代码省略.........
示例10: GetMessage
<td valign="top"><?php
echo GetMessage("STAT_SEARCHERS");
?>
<br><IMG SRC="/bitrix/images/statistic/mouse.gif" WIDTH="44" HEIGHT="21" BORDER=0 ALT=""><br><?php
echo GetMessage("STAT_SELECT_WHAT_YOU_NEED");
?>
</td>
<td><?php
$ref = $ref_id = array();
$strSql = "SELECT ID, NAME FROM b_stat_searcher WHERE ID>1 ORDER BY NAME";
$rs = $statDB->Query($strSql, false, $err_mess . __LINE__);
while ($ar = $rs->Fetch()) {
$ref[] = $ar["NAME"] . " [" . $ar["ID"] . "]";
$ref_id[] = $ar["ID"];
}
echo SelectBoxMFromArray("arSEARCHERS[]", array("REFERENCE" => $ref, "REFERENCE_ID" => $ref_id), $arSEARCHERS, "", false, "10", "class=typeselect");
?>
</td>
</tr>
<tr>
<td valign=top><?php
echo GetMessage("STAT_PAGES_TO");
?>
</td>
<td><textarea name="PAGES_TO" cols="50" rows="8"><?php
echo implode("\r\n", $arPAGES_TO);
?>
</textarea></td>
</tr>
<?php
//********************
示例11: ShowExactMatchCheckbox
echo ShowExactMatchCheckbox("find_event2");
?>
<?php
echo ShowFilterLogicHelp();
?>
</td>
</tr>
<tr valign="top">
<td><?php
echo GetMessage("STAT_F_SELECT_EVENTS");
?>
:</td>
<td>
<?php
echo SelectBoxMFromArray("find_events[]", array("REFERENCE" => $find_events_names, "REFERENCE_ID" => $find_events), $find_events, "", false, "10", "style=\"width:300px;\"");
?>
<script language="Javascript">
function selectEvent(form, field)
{
jsUtils.OpenWindow('event_multiselect.php?lang=<?php
echo LANGUAGE_ID;
?>
&form='+form+'&field='+field, 600, 600);
}
jsSelectUtils.sortSelect('find_events[]');
jsSelectUtils.selectAllOptions('find_events[]');
</script>
<br>
<input type="button" OnClick="selectEvent('find_form','find_events[]')" value="<?php
echo GetMessage("MAIN_ADMIN_MENU_ADD");
示例12: GetMessage
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage('FORM_EDIT_RIGHTS') . " [EDIT]";
?>
<br><img src="/bitrix/images/form/mouse.gif" width="44" height="21" border=0 alt=""></td>
<td><?php
echo SelectBoxMFromArray("arPERMISSION_EDIT[]", array("REFERENCE" => $arr_ref, "REFERENCE_ID" => $arr_ref_id), $arPERMISSION_EDIT, "", false, 8, "");
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage('FORM_DELETE_RIGHTS') . " [DELETE]";
?>
<br><img src="/bitrix/images/form/mouse.gif" width="44" height="21" border=0 alt=""></td>
<td><?php
echo SelectBoxMFromArray("arPERMISSION_DELETE[]", array("REFERENCE" => $arr_ref, "REFERENCE_ID" => $arr_ref_id), $arPERMISSION_DELETE, "", false, 8, "");
?>
</td>
</tr>
<?php
$tabControl->EndTab();
$tabControl->Buttons(array("disabled" => $F_RIGHT < 30, "back_url" => "form_list.php?lang=" . LANGUAGE_ID));
$tabControl->End();
?>
</form>
<?php
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例13: array
<?php
$arr = array("reference" => array(GetMessage("LEARNING_YES"), GetMessage("LEARNING_NO")), "reference_id" => array("Y", "N"));
echo SelectBoxFromArray("filter_completed", $arr, htmlspecialcharsex($filter_completed), GetMessage('LEARNING_ALL'));
?>
</td>
</tr>
<tr valign="top">
<td><?php
echo GetMessage('LEARNING_ADMIN_STATUS');
?>
:</b></td>
<td>
<?php
$arr = array("reference" => array_values($arStatus), "reference_id" => array_keys($arStatus));
echo SelectBoxMFromArray("filter_status[]", $arr, $filter_status, "", false, "3");
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("LEARNING_ADMIN_SCORE");
?>
:</td>
<td nowrap>
<input type="text" name="filter_score_from" size="10" value="<?php
echo htmlspecialcharsex($filter_score_from);
?>
">
...
示例14: GetMessage
</td>
</tr>
<tr>
<td><?php
echo GetMessage("POST_F_RUBRIC");
?>
:</td>
<td>
<?php
$arr = array("reference" => array(), "reference_id" => array());
$rsRubrics = CRubric::GetList();
while ($arRubric = $rsRubrics->Fetch()) {
$arr["reference"][] = "[" . $arRubric["ID"] . "] " . $arRubric["NAME"];
$arr["reference_id"][] = $arRubric["ID"];
}
echo SelectBoxMFromArray("find_rubric[]", $arr, $find_rubric, GetMessage("MAIN_ALL"), "");
?>
</td>
</tr>
<?php
$oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage(), "form" => "find_form"));
$oFilter->End();
?>
</form>
<?php
//******************************
// Send message and show progress
//******************************
if ($_REQUEST['action'] == "send") {
?>
示例15: GetMessage
</td>
</tr>
<?php
}
?>
<?php
if ($isEditMode && ($isAdmin || $isDemo && !$isOwner)) {
?>
<tr valign="top">
<td><?php
echo GetMessage("AD_EDIT_CONTRACT");
?>
<br><IMG SRC="/bitrix/images/advertising/mouse.gif" WIDTH="44" HEIGHT="21" BORDER=0 ALT=""></td>
<td><?php
echo SelectBoxMFromArray("arrUSER_EDIT[]", array("REFERENCE" => $ref, "REFERENCE_ID" => $ref_id), $arrUSER_EDIT, "", true, 15);
?>
</td>
</tr>
<?php
} else {
?>
<tr valign="top">
<td><?php
echo GetMessage("AD_EDIT_CONTRACT");
?>
</td>
<td><?php
reset($ref_id);
while (list($key, $value) = each($ref_id)) {
if (is_array($arrUSER_EDIT) && in_array($value, $arrUSER_EDIT)) {