/** * @return string * @throws \Bitrix\Main\ArgumentException */ public function getForm() { $listInput = '<select name="' . $this->getFieldName('LIST_ID') . '">'; $listDb = ListTable::getList(array('select' => array('ID', 'NAME'), 'order' => array('NAME' => 'ASC', 'ID' => 'DESC'))); while ($list = $listDb->fetch()) { $inputSelected = $list['ID'] == $this->getFieldValue('LIST_ID') ? 'selected' : ''; $listInput .= '<option value="' . $list['ID'] . '" ' . $inputSelected . '>'; $listInput .= htmlspecialcharsbx($list['NAME']); $listInput .= '</option>'; } $listInput .= '</select>'; return ' <table> <tr> <td>' . Loc::getMessage('sender_connector_contact_list') . '</td> <td>' . $listInput . '</td> </tr> </table> '; }
<?php echo SelectBoxFromArray("find_unsubscribed", $filterMailingUnSubList, $rub_f_unsubscribed, GetMessage("MAIN_ALL"), ""); ?> </td> </tr> <tr> <td><?php echo GetMessage("rub_f_list"); ?> :</td> <td> <?php $arr = array(); $arr['reference'][] = GetMessage("SENDER_CONTACT_ADM_FILTER_WITHOUT"); $arr['reference_id'][] = 'NONE'; $listDb = \Bitrix\Sender\ListTable::getList(array('select' => array('REFERENCE' => 'NAME', 'REFERENCE_ID' => 'ID'))); while ($arList = $listDb->fetch()) { $arr['reference'][] = $arList['REFERENCE']; $arr['reference_id'][] = $arList['REFERENCE_ID']; } echo SelectBoxFromArray("find_list", $arr, $find_list, GetMessage("MAIN_ALL"), ""); ?> </td> </tr> <?php $oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage(), "form" => "find_form")); $oFilter->End(); ?> </form>
if(count($aEmailInvalid)>0) { foreach($aEmailInvalid as $email) if(!empty($email)) $arError[] = array("id"=>"", "text"=>htmlspecialcharsbx($email)); $nSuccess += count($aEmailInvalid); $nError += count($aEmailInvalid); } }//$REQUEST_METHOD=="POST" else { $LIST_TYPE = "E"; } $listDict = array(); $listDb = \Bitrix\Sender\ListTable::getList(); while($arList = $listDb->fetch()) { $listDict[] = $arList; } if(empty($listDict)) $LIST_TYPE = "N"; $APPLICATION->SetTitle(GetMessage("sender_imp_title")); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php"); if(count($arError)>0) { $e = new CAdminException($arError); $message = new CAdminMessage(GetMessage("sender_imp_error"), $e);
$DB->Commit(); break; case "activate": case "deactivate": $arFields["ACTIVE"] = $_REQUEST['action'] == "activate" ? "Y" : "N"; $dataUpdateDb = \Bitrix\Sender\ListTable::update($dataPrimary, $arFields); if (!$dataUpdateDb->isSuccess()) { $LAST_ERROR = $dataUpdateDb->getErrorMessages(); $LAST_ERROR = $LAST_ERROR[0]; $lAdmin->AddGroupError(GetMessage("rub_save_error") . $LAST_ERROR, $ID); } break; } } } $listDb = \Bitrix\Sender\ListTable::getList(array('filter' => $arFilter, 'order' => array($by => $order))); $rsData = new CAdminResult($listDb, $sTableID); $rsData->NavStart(); $lAdmin->NavText($rsData->GetNavPrint(GetMessage("rub_nav"))); $lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "ID", "align" => "right", "default" => true), array("id" => "NAME", "content" => GetMessage("rub_name"), "sort" => "NAME", "default" => true), array("id" => "SORT", "content" => GetMessage("rub_sort"), "sort" => "SORT", "align" => "right", "default" => true), array("id" => "CODE", "content" => GetMessage("rub_code"), "sort" => "CODE", "default" => true))); while ($arRes = $rsData->NavNext(true, "f_")) { $row =& $lAdmin->AddRow($f_ID, $arRes); $row->AddInputField("NAME", array("size" => 20)); $row->AddInputField("SORT", array("size" => 6)); $row->AddInputField("CODE", array("size" => 20)); $arActions = array(); $arActions[] = array("ICON" => "edit", "DEFAULT" => true, "TEXT" => GetMessage("rub_edit"), "ACTION" => $lAdmin->ActionDoGroup($f_ID, "edit")); if ($POST_RIGHT >= "W") { $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("rub_del"), "ACTION" => "if(confirm('" . GetMessage('rub_del_conf') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete")); } $arActions[] = array("SEPARATOR" => true);