?> </select></td> </tr> <tr class="adm-detail-required-field"> <td><?php echo Loc::getMessage('FORMAT_NAME'); ?> </td> <td> <select name="" onchange="if(this.value != ''){this.form.FORMAT_NAME.value = this.value;}"> <option value=""><?php echo Loc::getMessage("culture_edit_other"); ?> </option> <?php foreach (CSite::GetNameTemplates() as $template => $value) { echo '<option value="' . $template . '"' . ($template == $culture["FORMAT_NAME"] ? ' selected' : '') . '>' . htmlspecialcharsex($value) . '</option>' . "\n"; } ?> </select> </td> </tr> <tr class="adm-detail-required-field"> <td></td> <td> <input type="text" name="FORMAT_NAME" size="30" maxlength="255" value="<?php echo $cultureField["FORMAT_NAME"]; ?> "> </td> </tr>
<tr> <td align ="right" valign="middle" width="50%"><?php echo GetMessage("IM_OPTIONS_NAME_TEMPLATE"); ?> :</td> <td> <?$curVal = COption::GetOptionString("im", "user_name_template", "#LAST_NAME# #NAME#", $site["LID"]);?> <select name="<?php echo $key; ?> _<?php echo $site["LID"]; ?> "> <? $arNameTemplates = CSite::GetNameTemplates(); $arNameTemplates = array_reverse($arNameTemplates, true); //prepend array with default '' => Site Format value $arNameTemplates[""] = GetMessage("IM_OPTIONS_NAME_IN_SITE_FORMAT"); $arNameTemplates = array_reverse($arNameTemplates, true); foreach ($arNameTemplates as $template => $phrase) { $template = str_replace(array("#NOBR#","#/NOBR#"), array("",""), $template); ?><option value="<?php echo $template; ?> " <?php echo $template == $curVal ? " selected" : ""; ?> ><?php echo $phrase; ?>