本文整理汇总了PHP中Preg_Match函数的典型用法代码示例。如果您正苦于以下问题:PHP Preg_Match函数的具体用法?PHP Preg_Match怎么用?PHP Preg_Match使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Preg_Match函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetTime
function GetTime($Data)
{
#-------------------------------------------------------------------------------
if (Preg_Match('/^[0-9]+$/', $Data)) {
return $Data;
}
#-------------------------------------------------------------------------------
$Date = @Date_Parse($Data);
#-------------------------------------------------------------------------------
if (!Is_Array($Date)) {
return ERROR | @Trigger_Error('[GetTime]: ошибка получения даты');
}
#-------------------------------------------------------------------------------
return MkTime($Date['hour'], $Date['minute'], $Date['second'], $Date['month'], $Date['day'], $Date['year']);
#-------------------------------------------------------------------------------
}
示例2: Cache_Delete
function Cache_Delete($Pattern)
{
#-----------------------------------------------------------------------------
$Cache =& Link_Get('Cache', 'array');
#-----------------------------------------------------------------------------
foreach (Array_Keys($Cache) as $Key) {
#---------------------------------------------------------------------------
if (Preg_Match(SPrintF('/%s/', $Pattern), $Key)) {
#-------------------------------------------------------------------------
# Debug(SPrintF('[Cache_Delete]: удаление объекта из кеша (%s)',$Key));
#-------------------------------------------------------------------------
unset($Cache[$Key]);
}
}
#-----------------------------------------------------------------------------
return TRUE;
}
示例3: CleanUpElem
function CleanUpElem(&$elem_name, &$cfg_file, &$template)
{
// Fixes HEX strings to look like 0xABCDEF12345 rather than 0Xabc or 0xaf
if (Preg_Match("/(0x)([a-fA-F0-9]+)/i", $elem_name, $matches)) {
$elem_name = Preg_Replace("/(0x)([a-fA-F0-9]+)/i", "0x" . StrToUpper($matches[2]), $elem_name);
}
print " Cleaning up elem '{$elem_name}'\n";
$cfg_elem = FindConfigElem($cfg_file, $elem_name);
$cfg_elem = array_change_key_case($cfg_elem, CASE_LOWER);
$new_elem = array();
$last_label = 0;
foreach ($template as $indice => $line) {
if (Preg_Match('/\\[Label=([[:alnum:][:space:][:punct:]]+)\\]/', $line, $matches)) {
if ($last_label) {
unset($new_elem[$last_label]);
}
$matches[1] = Preg_Replace("/%s/i", " ", $matches[1]);
$line = "//{$matches[1]}";
if ($indice > 1) {
$line = "\n\t{$line}";
}
$last_label = $line;
$new_elem[$line] = array("");
continue;
} else {
$property = StrToLower($line);
if ($cfg_elem[$property]) {
$new_elem[$line] = $cfg_elem[$property];
unset($cfg_elem[$property]);
$last_label = 0;
}
}
}
if (Count($cfg_elem) > 0) {
$new_elem["\n\t//Custom Values"] = array("");
// Lines not in the template go at the end as custom values
foreach ($cfg_elem as $key => $value) {
$new_elem[$key] = $value;
}
}
if ($last_label) {
unset($new_elem[$last_label]);
}
return $new_elem;
}
示例4: TemplateReplace
function TemplateReplace($Text, $Params = array(), $NoBody = TRUE)
{
#-------------------------------------------------------------------------------
$Text = Trim($Text);
#-------------------------------------------------------------------------------
# проверяем что нам сунули - текст или файл
if (!Preg_Match('/\\s/', $Text)) {
#-------------------------------------------------------------------------------
# достаём текст из файла
$Path = System_Element(SPrintF('templates/modules/%s.html', $Text));
#-------------------------------------------------------------------------------
if (Is_Error($Path)) {
#-------------------------------------------------------------------------------
$Text = SprintF('Отсутствует шаблон сообщения (templates/modules/%s.html)', $Text);
#-------------------------------------------------------------------------------
} else {
#-------------------------------------------------------------------------------
$Text = Trim(IO_Read($Path));
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if ($NoBody) {
$Text = SPrintF('<NOBODY><SPAN>%s</SPAN></NOBODY>', $Text);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Replace = Array_ToLine($Params, '%');
#-------------------------------------------------------------------------------
foreach (Array_Keys($Replace) as $Key) {
$Text = Str_Replace($Key, $Replace[$Key], $Text);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return $Text;
#-------------------------------------------------------------------------------
}
示例5: BuildItemDesc
function BuildItemDesc($file)
{
print " * Loading multis config file...\n";
$cfg_file = ReadConfigFile($file);
if ($cfg_file == FALSE) {
print "Cant open {$file} ({$php_errormsg}). Blame Stephen Donald.\n";
exit;
}
print " * Purging itemdesc.cfg for new write...\n";
$handle = FOpen("itemdesc.cfg", "w");
FClose($handle);
$handle = FOpen("itemdesc.cfg", "a");
print " * Finding elem names...";
$elem_names = GetConfigStringKeys($cfg_file, CLASS_LABELS_ON);
print "(" . Count($elem_names) . ")\n";
foreach ($elem_names as $elem_name) {
if (!Preg_Match("/^House\\s+/i", $elem_name)) {
continue;
}
$multi_id = Preg_Replace("/^House\\s+/i", "", $elem_name);
$objtype = HexDec($multi_id);
$objtype += 16384;
// 0x4000
$objtype = "0x" . DecHex($objtype);
FWrite($handle, "House {$objtype}\n");
FWrite($handle, "{\n");
FWrite($handle, "\t// Main Stuff\n");
FWrite($handle, "\tName\t\tHouse{$objtype}\n");
FWrite($handle, "\tGraphic\t\t{$objtype}\n");
FWrite($handle, "\n");
FWrite($handle, "\t// Multi Info\n");
FWrite($handle, "\tMultiID\t\t{$multi_id}\n");
FWrite($handle, "}\n\n");
}
FClose($handle);
return 1;
}
示例6: Cpanel_Password_Change
function Cpanel_Password_Change($Settings, $Login, $Password, $Params)
{
/****************************************************************************/
$__args_types = array('array', 'string', 'string', 'array');
#-----------------------------------------------------------------------------
$__args__ = Func_Get_Args();
eval(FUNCTION_INIT);
/****************************************************************************/
$HTTP = array('Address' => $Settings['Params']['IP'], 'Port' => $Settings['Port'], 'Host' => $Settings['Address'], 'Protocol' => $Settings['Protocol'], 'Basic' => SPrintF('%s:%s', $Settings['Login'], $Settings['Password']), 'IsLogging' => $Settings['Params']['IsLogging']);
#-----------------------------------------------------------------------------
$Request = array('user' => $Login, 'pass' => $Password);
#-----------------------------------------------------------------------------
$Response = HTTP_Send('/xml-api/passwd', $HTTP, $Request);
if (Is_Error($Response)) {
return ERROR | @Trigger_Error('[Cpanel_Password_Change]: не удалось осуществить запрос');
}
#-----------------------------------------------------------------------------
$Response = Trim($Response['Body']);
#-----------------------------------------------------------------------------
if (Preg_Match('/Password\\schanged/', $Response)) {
return TRUE;
}
#-----------------------------------------------------------------------------
return new gException('WRONG_ANSWER', $Response);
}
示例7: Debug
# No more...
# No more...
case 'Hidden':
# No more...
# No more...
case 'TextArea':
#-------------------------------------------------------------------------------
if ($Value) {
#-------------------------------------------------------------------------------
$Check = $Attrib['Check'];
#-------------------------------------------------------------------------------
if (isset($Regulars[$Check])) {
$Check = $Regulars[$Check];
}
#-------------------------------------------------------------------------------
if (!Preg_Match($Check, $Value)) {
#-------------------------------------------------------------------------------
$Errors[] = $AttribID;
#-------------------------------------------------------------------------------
Debug(SPrintF('[comp/www/Administrator/API/ServerEdit]: Check = %s; Value = %s', $Check, $Value));
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
} else {
#-------------------------------------------------------------------------------
if ($Attrib['IsDuty']) {
$Errors[] = $AttribID;
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
示例8: Delete
/**
* Удаляет объект из списка объектов
*
* Функция удаляет объект из массива ссылок на объкты по идентификатору $LinkID.
*
* @param string <идентификатор ссылки>
*/
public function Delete($LinkID)
{
#-----------------------------------------------------------------------------
$Names = Func_Get_Args();
#-----------------------------------------------------------------------------
foreach (Array_Keys($this->Links) as $LinkID) {
#---------------------------------------------------------------------------
foreach ($Names as $Name) {
#-------------------------------------------------------------------------
if (Preg_Match(SPrintF('/^%s(#[a-zA-Z0-9]+){0,1}$/', $Name), $LinkID)) {
#-----------------------------------------------------------------------
# Debug(SPrintF('[DOM->Delete]: удаление объектов по ссылке (%s -> %s)',$Name,$LinkID));
#-----------------------------------------------------------------------
$this->Links[$LinkID] = NULL;
}
}
}
#-----------------------------------------------------------------------------
$this->Linking();
}
示例9: foreach
foreach ($HostsIDs as $HostID) {
#-------------------------------------------------------------------------------
$Path = SPrintF('%s/%s/%s', SYSTEM_PATH, $Folder, $HostID);
#-------------------------------------------------------------------------------
if (!File_Exists($Path)) {
continue;
}
#-------------------------------------------------------------------------------
$Files = IO_Files($Path);
if (Is_Error($Files)) {
return SPrintF("---\n%s\n---\n", Implode("\n", Array_Slice($__SYSLOG, Count($__SYSLOG) - 20)));
}
#-------------------------------------------------------------------------------
foreach ($Files as $File) {
#-------------------------------------------------------------------------------
if (Preg_Match('/(tmp|LastPatchFiles)/', $File)) {
continue;
}
#-------------------------------------------------------------------------------
$MD5 = MD5_File($File);
if (!$MD5) {
return SPrintF("---\n%s\n---\n", Implode("\n", Array_Slice($__SYSLOG, Count($__SYSLOG) - 20)));
}
#-------------------------------------------------------------------------------
$File = SubStr($File, StrLen(SYSTEM_PATH) + 1);
#-------------------------------------------------------------------------------
$Snapshot[SPrintF('MD5%s', MD5(SPrintF('%s-%s', $MD5, MD5($File))))] = $File;
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
示例10: Str_Replace
# prepare for java script
$Text = Str_Replace("\n", '\\n', $Text);
# format: SortOrder:ImageName.gif
# button image, get image name
$Partition = Explode(":", $Article['Partition']);
$Extension = isset($Partition[1]) ? Explode(".", StrToLower($Partition[1])) : '';
#-------------------------------------------------------------------------------
# если есть чё-то после точки, и если оно похоже на расширение картинки, ставим это как картинку
$Image = 'Info.gif';
#дефолтовую информационную картинку
if (isset($Extension[1]) && In_Array($Extension[1], array('png', 'gif', 'jpg', 'jpeg'))) {
$Image = $Partition[1];
}
#-------------------------------------------------------------------------------
# делаем кнопку, если это системная кнопка или этого админа
if (!Preg_Match('/@/', $Partition[0]) && $Partition[0] < 2000 && $__USER['Params']['Settings']['EdeskButtons'] == "No" || StrToLower($Partition[0]) == StrToLower($__USER['Email'])) {
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Standard', array('onclick' => SPrintF("form.Message.value += '%s';form.Message.focus();", $Text), 'style' => 'cursor: pointer;'), $Article['Title'], $Image);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Tr->AddChild(new Tag('TD', $Comp));
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
break;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
示例11: gException
if (!$Count) {
return new gException('GROUP_NOT_FOUND', 'Группа не найдена');
}
#-------------------------------------------------------------------------------
$Count = DB_Count('Users', array('ID' => $UserID));
if (Is_Error($Count)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
if (!$Count) {
return new gException('USER_NOT_FOUND', 'Пользователь не найден');
}
#-------------------------------------------------------------------------------
$Regulars = Regulars();
#-------------------------------------------------------------------------------
if (!Preg_Match('/^[A-Za-zА-ЯёЁа-я0-9\\s\\.\\-]+$/u', $Name)) {
return new gException('WRONG_SCHEME_NAME', 'Неверное имя тарифа');
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Count = DB_Count('ServersGroups', array('ID' => $ServersGroupID));
if (Is_Error($Count)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
if (!$Count) {
return new gException('SERVERS_GROUP_NOT_FOUND', 'Группа серверов не найдена');
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if ($HardServerID > 0) {
示例12: eval
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Args = Args();
#-------------------------------------------------------------------------------
$ModeID = (string) @$Args['ModeID'];
$RowID = (int) @$Args['RowID'];
#-------------------------------------------------------------------------------
if (Is_Error(System_Load('modules/Authorisation.mod', 'classes/DOM.class.php'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Regulars = Regulars();
#-------------------------------------------------------------------------------
if (!Preg_Match($Regulars['ID'], $ModeID)) {
return ERROR | @Trigger_Error(201);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Config = Config();
#-------------------------------------------------------------------------------
$Statuses = $Config['Statuses'][$ModeID];
#-------------------------------------------------------------------------------
$Row = DB_Select(SPrintF('%sOwners', $ModeID), 'UserID', array('UNIQ', 'Limits' => array(0, 1), 'Where' => SPrintF("`ID` = %u", $RowID)));
#-------------------------------------------------------------------------------
switch (ValueOf($Row)) {
case 'error':
return ERROR | @Trigger_Error(500);
case 'exception':
return ERROR | @Trigger_Error(400);
示例13: RuCenter_Contract_Register
function RuCenter_Contract_Register($Settings, $PepsonID, $Person, $DomainZone)
{
/****************************************************************************/
$__args_types = array('array', 'string', 'array', 'string');
#-----------------------------------------------------------------------------
$__args__ = Func_Get_Args();
eval(FUNCTION_INIT);
/****************************************************************************/
$HTTP = array('Address' => $Settings['Address'], 'Port' => $Settings['Port'], 'Host' => $Settings['Address'], 'Protocol' => $Settings['Protocol'], 'Charset' => 'KOI8-R', 'IsLogging' => $Settings['Params']['IsLogging']);
#-----------------------------------------------------------------------------
$Query = array();
#---------------------------------------------------------------------------
$RequestID = UniqID('ID');
#---------------------------------------------------------------------------
$Query[] = 'lang: ru';
$Query[] = 'request: contract';
$Query[] = 'operation: create';
$Query[] = SPrintF('login: %s', $Settings['Login']);
$Query[] = SPrintF('password: %s', $Settings['Password']);
$Query[] = SPrintF('request-id: %s', $RequestID);
#---------------------------------------------------------------------------
$Query[] = '';
#---------------------------------------------------------------------------
$Query[] = '[contract]';
$Query[] = SPrintF('password: %s', UniqID());
$Query[] = SPrintF('tech-password: %s', UniqID());
$Query[] = 'currency-id: RUR';
#---------------------------------------------------------------------------
$Query[] = '';
#---------------------------------------------------------------------------
switch ($PepsonID) {
case 'Natural':
#-----------------------------------------------------------------------
$Query[] = 'contract-type: PRS';
$Query[] = SPrintF('person: %s %s %s', Translit($Person['Name']), Mb_SubStr(Translit($Person['Lastname']), 0, 1), Translit($Person['Sourname']));
$Query[] = SPrintF('person-r: %s %s %s', $Person['Sourname'], $Person['Name'], $Person['Lastname']);
$Query[] = SPrintF('country: %s', isset($Person['PasportCountry']) ? $Person['PasportCountry'] : $Person['pCountry']);
$Query[] = SPrintF('phone: %s', $Person['Phone']);
$Query[] = SPrintF('fax-no: %s', $Person['Fax']);
$Query[] = SPrintF('birth-date: %s', $Person['BornDate']);
$Query[] = SPrintF('passport: %s %s выдан %s, %s', $Person['PasportLine'], $Person['PasportNum'], $Person['PasportWhom'], $Person['PasportDate']);
$Query[] = SPrintF('p-addr: %s, %s, %s, %s %s, %s', $Person['pIndex'], $Person['pState'], $Person['pCity'], $Person['pType'], $Person['pAddress'], $Person['pRecipient']);
$Query[] = SPrintF('e-mail: %s', $Person['Email']);
break;
case 'Juridical':
#-----------------------------------------------------------------------
$Query[] = 'client-type: ORG';
$Query[] = SPrintF('org: %s %s', Translit($Person['CompanyName']), Translit($Person['CompanyFormFull']));
$Query[] = SPrintF('org-r: %s', SPrintF('%s "%s"', $Person['CompanyFormFull'], $Person['CompanyName']));
$Query[] = SPrintF('country: %s', $Person['jCountry']);
$Query[] = SPrintF('e-mail: %s', $Person['Email']);
$Query[] = SPrintF('phone: %s', $Person['Phone']);
$Query[] = SPrintF('fax-no: %s', $Person['Fax']);
$Query[] = SPrintF('code: %s', $Person['Inn']);
$Query[] = SPrintF('kpp: %s', $Person['Kpp']);
$Query[] = SPrintF('address-r: %s, %s, %s, %s %s', $Person['jIndex'], $Person['jState'], $Person['jCity'], $Person['jType'], $Person['jAddress']);
$Query[] = SPrintF('p-addr: %s, %s, %s, %s %s, %s "%s"', $Person['pIndex'], $Person['pState'], $Person['pCity'], $Person['pType'], $Person['pAddress'], $Person['CompanyFormFull'], $Person['CompanyName']);
$Query[] = SPrintF('d-addr: %s, %s, %s, %s %s', $Person['jIndex'], $Person['jState'], $Person['jCity'], $Person['jType'], $Person['jAddress']);
break;
default:
return new gException('WRONG_PROFILE_ID', 'Неверный идентификатор профиля');
}
#-----------------------------------------------------------------------------
$Result = HTTP_Send('/dns/dealer', $HTTP, array(), array('SimpleRequest' => Implode("\n", $Query)));
if (Is_Error($Result)) {
return ERROR | @Trigger_Error('[RuCenter_Contract_Register]: не удалось выполнить запрос к серверу');
}
#-----------------------------------------------------------------------------
if (Preg_Match('/HTTP\\/1.0\\s502/i', $Result['Heads'])) {
return false;
}
#-----------------------------------------------------------------------------
$Result = Trim($Result['Body']);
#-----------------------------------------------------------------------------
if (Preg_Match('/State:\\s([0-9]+)/', $Result, $CodeID)) {
#---------------------------------------------------------------------------
$CodeID = Next($CodeID);
#---------------------------------------------------------------------------
switch ($CodeID) {
case '200':
#-----------------------------------------------------------------------
if (!Preg_Match('/nic-hdl:\\s([0-9]+\\/[A-Z\\-]+)/', $Result, $ContractID)) {
return new gException('LOGIN_NOT_FOUND', 'Неудалось получить номер договора');
} else {
$ContractID = Next($ContractID);
}
break;
case '500':
return FALSE;
default:
return new gException('WRONG_ERROR', SPrintF('Неизвестный статус ошибки (%s)', $Result));
}
} else {
return new gException('WRONG_ANSWER', $Result);
}
#-----------------------------------------------------------------------------
# Делаем паузу перед запросом
Sleep(10);
#-----------------------------------------------------------------------------
if (!In_Array($DomainZone, array('ru', 'su'))) {
//.........这里部分代码省略.........
示例14: getParams
public function getParams()
{
#-------------------------------------------------------------------------------
# Достаем registrar и его префикс
if (Preg_Match('/registrar:\\s+((\\w+|-)+)/', $this->params['WhoIs'], $String)) {
#-------------------------------------------------------------------------------
$Registrar = Next($String);
#-------------------------------------------------------------------------------
if (Preg_Match('/((\\w+|-)+)-(REG|RU)/', $Registrar, $String)) {
$PrefixRegistrar = Next($String);
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Получаем параметры для формирования Event
$Where = SPrintF('`OrderID` = %s', $this->params['OrderID']);
$UserID = DB_Select('DomainOrdersOwners', 'UserID as ID', array('UNIQ', 'Where' => $Where));
$SchemeName = DB_Select('DomainSchemes', 'Name as SchemeName', array('UNIQ', 'ID' => $this->params['SchemeID']));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if (In_Array($SchemeName['SchemeName'], array('ru', 'su', 'рф'))) {
#-------------------------------------------------------------------------------
if (isset($Registrar) && isset($PrefixRegistrar)) {
#-------------------------------------------------------------------------------
$this->params['registrar'] = $Registrar;
$this->params['prefixRegistrar'] = $PrefixRegistrar;
#-------------------------------------------------------------------------------
# Получаем параметры регистратора к которому осуществляется трансфер
$ServerID = DB_Select('DomainSchemes', '`ServerID` AS `ID`', array('UNIQ', 'ID' => $this->params['SchemeID']));
$Settings = DB_Select('Servers', '*', array('UNIQ', 'ID' => $ServerID['ID']));
#-------------------------------------------------------------------------------
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: Servers[SystemID] - " . $Settings['Params']['SystemID']);
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: Settings[PrefixNic] - " . $Settings['Params']['PrefixNic']);
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: Registrar - " . $Registrar);
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: PrefixRegistrar - " . $PrefixRegistrar);
#-------------------------------------------------------------------------------
# Проверяем является ли регистрар нашим регистратором
if ($PrefixRegistrar == $Settings['Params']['PrefixNic']) {
#-------------------------------------------------------------------------------
$this->params['internalRegister'] = true;
#---------------------------------------------------------------------------
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: IsOurRegistrar - TRUE");
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: Инструкция по трансферу в пределах регистратора");
#---------------------------------------------------------------------------
$this->params['registratorID'] = $Settings['Params']['SystemID'];
$this->params['partnerLogin'] = $Settings['Params']['PartnerLogin'];
$this->params['partnerContract'] = $Settings['Params']['PartnerContract'];
#-------------------------------------------------------------------------------
# Достаем статью с информацией о шаблонах документов и контактами регистратора
$Where = SPrintF('`Partition` = "Registrators/%s/internal"', $PrefixRegistrar);
$Clause = DB_Select('Clauses', '*', array('UNIQ', 'Where' => $Where));
switch (ValueOf($Clause)) {
case 'array':
#-------------------------------------------------------------------------------
$TransferDoc = trim(Strip_Tags($Clause['Text']));
break;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
default:
#-------------------------------------------------------------------------------
Debug(SPrintF('[system/classes/DomainOrdersForTransferMsg.class.php]: Статья не найдена. Ожидалась Registrators/%s/internal', $PrefixRegistrar));
#-------------------------------------------------------------------------------
$TransferDoc = "Для получения информации об оформлении писем Вашему текущему регистратору и его контактах перейдите на его сайт.";
#-------------------------------------------------------------------------------
# Уведомление об ошибке статьи
$Event = array('UserID' => $UserID['ID'], 'PriorityID' => 'Error', 'Text' => SPrintF('Статья по переносу домена не найдена. Ожидалась Registrators/%s/internal', $PrefixRegistrar), 'IsReaded' => FALSE);
#-------------------------------------------------------------------------------
$Event = Comp_Load('Events/EventInsert', $Event);
if (!$Event) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$this->params['transferDoc'] = $TransferDoc;
#-------------------------------------------------------------------------------
} else {
#-------------------------------------------------------------------------------
$this->params['internalRegister'] = false;
#-------------------------------------------------------------------------------
Debug("[system/classes/DomainOrdersForTransferMsg.class.php]: Инструкция по трансферу от стороннего регистратора");
#-------------------------------------------------------------------------------
# Формируем постфикс идентификатора
switch ($SchemeName['SchemeName']) {
case 'su':
$PostfixNic = 'FID';
break;
case 'рф':
$PostfixNic = 'RF';
break;
default:
$PostfixNic = 'RU';
}
#-------------------------------------------------------------------------------
$this->params['registrar'] = $Registrar;
$this->params['registratorID'] = $Settings['Params']['SystemID'];
$this->params['jurName'] = $Settings['Params']['JurName'];
$this->params['prefixNic'] = $Settings['Params']['PrefixNic'];
$this->params['postfixNic'] = $PostfixNic;
//.........这里部分代码省略.........
示例15: isset
continue 2;
}
#-------------------------------------------------------------------------------
break;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
default:
return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# проверяем, есть ли такие услуги у юзера
$Code = isset($Type['Code']) ? $Type['Code'] : $Code;
$Regulars = SPrintF('/^%s/', $Code);
#-------------------------------------------------------------------------------
if (Preg_Match($Regulars, $TypeID)) {
#-------------------------------------------------------------------------------
# код уведомления совпадает с уведомлением
$Count = DB_Count(SPrintF('%sOrdersOwners', $Code), array('Where' => SPrintF('`UserID` = %u', $__USER['ID'])));
if (Is_Error($Count)) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
if (!$Count) {
continue;
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if (isset($Type['Title'])) {