<td><?php echo GetMessage("SEARCH_REINDEX_MODULE"); ?> </td> <td> <select name="MODULE_ID" id="MODULE_ID"> <option value="NOT_REF"><?php echo GetMessage("SEARCH_REINDEX_ALL"); ?> </option> <option value="main"><?php echo GetMessage("SEARCH_REINDEX_MAIN"); ?> </option> <?php foreach (CSearchParameters::GetModulesList() as $module_id => $module_name) { ?> <option value="<?php echo $module_id; ?> "><?php echo htmlspecialcharsbx($module_name); ?> </option> <?php } ?> </select> </td> </tr> <tr>
public static function ModulesSelectBox($sFieldName, $sValue, $sDefaultValue = "", $sFuncName = "", $field = "class=\"typeselect\"") { $s = '<select name="' . $sFieldName . '" id="' . $sFieldName . '" ' . $field; if (strlen($sFuncName) > 0) { $s .= ' OnChange="' . $sFuncName . '"'; } $s .= '>' . "\n"; $s1 = '<option value="main"' . ($sValue == "main" ? ' selected' : '') . '>' . GetMessage("customrank_files") . '</option>' . "\n"; foreach (CSearchParameters::GetModulesList() as $module_id => $module_name) { $s1 .= '<option value="' . $module_id . '"' . ($sValue == $module_id ? ' selected' : '') . '>' . htmlspecialcharsex($module_name) . '</option>' . "\n"; } if (strlen($sDefaultValue) > 0) { $s .= "<option value='NOT_REF'>" . htmlspecialcharsex($sDefaultValue) . "</option>"; } return $s . $s1 . '</select>'; }