/** * @param $email */ public static function setEmailToMeList($email) { $emailList = \COption::GetOptionString('sender', 'address_send_to_me'); if (!empty($email)) { $addressToList = explode(',', $emailList); $addressToList = array_merge(array($email), $addressToList); $addressToList = array_unique($addressToList); trimArr($addressToList, true); \COption::SetOptionString('sender', 'address_send_to_me', implode(',', $addressToList)); } }
$ID = $mailingAddDb->getId(); $res = $ID > 0; } else { $arError = $mailingAddDb->getErrorMessages(); } } $GROUP = array(); if (isset($GROUP_INCLUDE)) { $GROUP_INCLUDE = explode(',', $GROUP_INCLUDE); trimArr($GROUP_INCLUDE); } else { $GROUP_INCLUDE = array(); } if (isset($GROUP_EXCLUDE)) { $GROUP_EXCLUDE = explode(',', $GROUP_EXCLUDE); trimArr($GROUP_EXCLUDE); } else { $GROUP_EXCLUDE = array(); } if ($res) { foreach ($GROUP_INCLUDE as $groupId) { if (is_numeric($groupId)) { $GROUP[] = array('MAILING_ID' => $ID, 'GROUP_ID' => $groupId, 'INCLUDE' => true); } } foreach ($GROUP_EXCLUDE as $groupId) { if (is_numeric($groupId)) { $GROUP[] = array('MAILING_ID' => $ID, 'GROUP_ID' => $groupId, 'INCLUDE' => false); } } \Bitrix\Sender\MailingGroupTable::delete(array('MAILING_ID' => $ID));
/** * @cc 修改商品属性 */ public function modAttribute() { if (IS_POST) { if (M("mall_attribute")->save(trimArr($_POST))) { $this->success("操作成功!", U('Shop/attribute')); } else { $this->error("操作失败!"); } } else { $this->category = $this->db->select(); $this->data = M("mall_attribute")->where(array("id" => intval($_GET['id'])))->find(); $this->display(); } }