当前位置: 首页>>代码示例>>PHP>>正文


PHP NotificationManager::sendMsg方法代码示例

本文整理汇总了PHP中NotificationManager::sendMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP NotificationManager::sendMsg方法的具体用法?PHP NotificationManager::sendMsg怎么用?PHP NotificationManager::sendMsg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NotificationManager的用法示例。


在下文中一共展示了NotificationManager::sendMsg方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Debug

     }
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 # если есть превышения за вчера, за неделю, и разрешено лочить
 if ($SUsage > $HostingOrder['QuotaCPU'] * $Settings['LockRatio'] && $BUsage > $HostingOrder['QuotaCPU'] * $Settings['LockRatio'] && $BUsage > $Settings['LockBeginFrom'] && $Settings['LockOverlimits'] && Date('d') % $Settings['LockDays'] == 0) {
     // разрешено лочить именно в этот день
     #-------------------------------------------------------------------------------
     Debug(SPrintF('[comp/Tasks/HostingCPUUsage]: Надо лочить: Login = %s; SUsage = %s; BUsage = %s; QuotaCPU = %s', $HostingOrder['Login'], $SUsage, $BUsage, $HostingOrder['QuotaCPU']));
     #-------------------------------------------------------------------------------
     $LockedCount++;
     #-------------------------------------------------------------------------------
     if (!$Settings['CreateTicket']) {
         #-------------------------------------------------------------------------------
         $IsSend = NotificationManager::sendMsg(new Message('HostingCPUUsageNoticeLock', $HostingOrder['UserID'], array('HostingOrder' => $Params)));
         #-------------------------------------------------------------------------------
         switch (ValueOf($IsSend)) {
             case 'error':
                 return ERROR | @Trigger_Error(500);
             case 'exception':
                 # No more...
             # No more...
             case 'true':
                 #-------------------------------------------------------------------------------
                 # событие, чтоле прибить...
                 #-------------------------------------------------------------------------------
                 break;
                 #-------------------------------------------------------------------------------
             #-------------------------------------------------------------------------------
             default:
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:HostingCPUUsage.comp.php

示例2: Explode

$SendToIDs = Explode(',', $Task['Params']['SendToIDs']);
$SendedIDs = isset($Task['Params']['SendedIDs']) ? Explode(',', $Task['Params']['SendedIDs']) : array();
#-------------------------------------------------------------------------------
$Count = 0;
$Replace = array('Theme' => $Task['Params']['Theme'], 'Message' => $Task['Params']['Message']);
#-------------------------------------------------------------------------------
foreach ($SendToIDs as $User) {
    # пропускаем циклы, если счётчик уже больше 10
    if ($Count > $Settings['Limit'] - 1) {
        continue;
    }
    #-------------------------------------------------------------------------
    Debug(SPrintF('[comp/Tasks/Dispatch]: send message to UserID = %s;', $User));
    #-------------------------------------------------------------------------
    $msg = new DispatchMsg($Replace, (int) $User, $Task['Params']['FromID']);
    $IsSend = NotificationManager::sendMsg($msg, $Methods);
    #-------------------------------------------------------------------------
    switch (ValueOf($IsSend)) {
        case 'error':
            return ERROR | @Trigger_Error(500);
        case 'exception':
            # Исключение - системные юзеры, например...
            $SendedIDs[] = $User;
            Array_Shift($SendToIDs);
            break;
        case 'true':
            #-------------------------------------------------------------------------
            $Count++;
            $SendedIDs[] = $User;
            Array_Shift($SendToIDs);
            #-------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Dispatch.comp.php

示例3: gException

         return new gException('CANNOT_SAVE_UPLOADED_FILE', 'Не удалось сохранить загруженный файл');
     }
 }
 #---------------------------------------------------------------------------
 $Users = DB_Select('Users', 'ID', array('Where' => SPrintF('`ID` != %u AND `ID` > 50', $__USER['ID'])));
 #---------------------------------------------------------------------------
 switch (ValueOf($Users)) {
     case 'error':
         return ERROR | @Trigger_Error(500);
     case 'exception':
         return ERROR | @Trigger_Error(400);
     case 'array':
         #-----------------------------------------------------------------------
         foreach ($Users as $User) {
             #---------------------------------------------------------------------
             $IsSend = NotificationManager::sendMsg('EdeskCreate', (int) $User['ID'], array('EdeskID' => $EdeskID, 'Theme' => $Theme, 'Message' => $Message));
             #---------------------------------------------------------------------
             switch (ValueOf($IsSend)) {
                 case 'error':
                     return ERROR | @Trigger_Error(500);
                 case 'exception':
                     # No more...
                 # No more...
                 case 'true':
                     # No more...
                     break;
                 default:
                     return ERROR | @Trigger_Error(101);
             }
         }
         #-----------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:EdeskEdit.comp.php

示例4: Debug

 #-------------------------------------------------------------------------------
 if ($Accounts[$Order['Login']]['Limit'] < $Accounts[$Order['Login']]['Used']) {
     Debug(SPrintF('[comp/Tasks/GC/DiskUsageNotifies]: account %s overlimit, used %s/%s', $Order['Login'], $Accounts[$Order['Login']]['Used'], $Accounts[$Order['Login']]['Limit']));
 }
 #-------------------------------------------------------------------------------
 if (Ceil($Accounts[$Order['Login']]['Used'] / $Accounts[$Order['Login']]['Limit'] * 100) > $Settings['DiskUsageNotifiesPercent']) {
     #-------------------------------------------------------------------------------
     Debug(SPrintF('[comp/Tasks/GC/DiskUsageNotifies]: account %s used %s/%s', $Order['Login'], $Accounts[$Order['Login']]['Used'], $Accounts[$Order['Login']]['Limit']));
     #-------------------------------------------------------------------------------
     if (!$Settings['IsNotify']) {
         continue;
     }
     #-------------------------------------------------------------------------------
     $Array = array('Login' => $Order['Login'], 'Used' => $Accounts[$Order['Login']]['Used'], 'Limit' => $Accounts[$Order['Login']]['Limit']);
     #-------------------------------------------------------------------------------
     $IsSend = NotificationManager::sendMsg(new Message('DiskUsageNotice', (int) $Order['UserID'], array('Order' => $Array)));
     #-------------------------------------------------------------------------------
     switch (ValueOf($IsSend)) {
         case 'error':
             return ERROR | @Trigger_Error(500);
         case 'exception':
             # No more...
         # No more...
         case 'true':
             # No more...
             break;
         default:
             return ERROR | @Trigger_Error(101);
     }
     #-------------------------------------------------------------------------------
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:DiskUsageNotifies.comp.php

示例5: gException

if (!Preg_Match($Regulars['Email'], $Email)) {
    return new gException('WRONG_EMAIL', 'Неверно указан электронный адрес');
}
#-------------------------------------------------------------------------------
if (!$Message) {
    return new gException('MESSAGE_IS_EMPTY', 'Не указано сообщение');
}
#-------------------------------------------------------------------------------
$Update = DB_Update('Users', array('Email' => $Email), array('ID' => 200));
if (Is_Error($Update)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$msg = new Message('Feedback', 100, array('Message' => $Message), 200);
#-------------------------------------------------------------------------------
$IsSend = NotificationManager::sendMsg($msg);
#-------------------------------------------------------------------------------
switch (ValueOf($IsSend)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'true':
        #---------------------------------------------------------------------------
        $Update = DB_Update('Users', array('Email' => 'user@company.com'), array('ID' => 200));
        if (Is_Error($Update)) {
            return ERROR | @Trigger_Error(500);
        }
        #---------------------------------------------------------------------------
        return array('Status' => 'Ok');
    default:
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Feedback.comp.php

示例6: DB_Select

#-------------------------------------------------------------------------------
$Orders = DB_Select('OrdersOwners', $Columns, array('Where' => $Where));
#-------------------------------------------------------------------------------
switch (ValueOf($Orders)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        # No more...
        break;
    case 'array':
        #---------------------------------------------------------------------------
        $GLOBALS['TaskReturnInfo'] = SPrintF('Handled %u orders', SizeOf($Orders));
        #---------------------------------------------------------------------------
        foreach ($Orders as $Order) {
            #-------------------------------------------------------------------------
            $IsSend = NotificationManager::sendMsg(new Message('OrdersSuspend', (int) $Order['UserID'], array('Order' => $Order)));
            #-------------------------------------------------------------------------
            switch (ValueOf($IsSend)) {
                case 'error':
                    return ERROR | @Trigger_Error(500);
                case 'exception':
                    # No more...
                # No more...
                case 'true':
                    # No more...
                    break;
                default:
                    return ERROR | @Trigger_Error(101);
            }
        }
        # end foreach
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:OrdersNoticeSuspend.comp.php

示例7: DB_Select

 $Employers = DB_Select('Users', 'ID', array('Where' => SPrintF('`GroupID` IN (%s)', $String)));
 #---------------------------------------------------------------
 switch (ValueOf($Employers)) {
     case 'error':
         return ERROR | @Trigger_Error(500);
     case 'exception':
         # No more...
         break;
     case 'array':
         # send messages to personal
         Debug("[comp/Tasks/CaclulatePartnersReward]: Need send messages to users = " . SizeOf($Employers));
         foreach ($Employers as $Employer) {
             # select real users
             if ($Employer['ID'] > 2000 || $Employer['ID'] == 100) {
                 Debug("[comp/Tasks/CaclulatePartnersReward]: Need send messages to #" . (int) $Employer['ID']);
                 $IsSend = NotificationManager::sendMsg(new Message('PartnersReward', (int) $Employer['ID'], array('Theme' => $Theme, 'Message' => $MessageToAdmins, 'Summ' => SPrintF('%01.2f', $TotalSumm))));
                 #---------------------------------------------------------
                 switch (ValueOf($IsSend)) {
                     case 'error':
                         return ERROR | @Trigger_Error(500);
                     case 'exception':
                         # No more...
                     # No more...
                     case 'true':
                         # No more...
                         break;
                     default:
                         return ERROR | @Trigger_Error(101);
                 }
             }
         }
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:CaclulatePartnersReward.comp.php

示例8: foreach

                return ERROR | @Trigger_Error(500);
            }
            #-------------------------------------------------------------------------
            foreach ($SessionIDsIDs as $SessionID) {
                #-----------------------------------------------------------------------
                if (Preg_Match(SPrintF('/^(REMEBMER|SESSION)%s/', MD5($User['ID'])), $SessionID)) {
                    #-------------------------------------------------------------------
                    if (!@UnLink(SPrintF('%s/%s', $Path, $SessionID))) {
                        return ERROR | @Trigger_Error(500);
                    }
                }
            }
        }
        #-----------------------------------------------------------------------------
        #---------------------------------------------------------------------------
        $IsSend = NotificationManager::sendMsg(new Message('UserPasswordRestore', (int) $User['ID'], array('Password' => $Password, 'ChargeFree' => TRUE, 'IsImmediately' => TRUE)));
        #---------------------------------------------------------------------------
        switch (ValueOf($IsSend)) {
            case 'error':
                return ERROR | @Trigger_Error(500);
            case 'exception':
                return ERROR | @Trigger_Error(400);
            case 'true':
                return array('Status' => 'Ok');
            default:
                return ERROR | @Trigger_Error(101);
        }
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:UserPasswordRestore.comp.php

示例9: Comp_Load

$Comp = Comp_Load('www/API/ContractMake', array('TypeID' => 'Default'));
#-------------------------------------------------------------------------------
switch (ValueOf($Comp)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'array':
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
$ContractID = $Comp['ContractID'];
#-------------------------------------------------------------------------------
$IsSend = NotificationManager::sendMsg(new Message('UserRegister', (int) $UserID, array('Password' => $Password)));
#-------------------------------------------------------------------------------
switch (ValueOf($IsSend)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        break;
    case 'true':
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
$Event = array('UserID' => 1, 'Text' => SPrintF('%s (%s)', $Message ? $Message : 'Зарегистрирован пользователь', $Email));
$Event = Comp_Load('Events/EventInsert', $Event);
if (!$Event) {
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:UserRegister.comp.php

示例10: Comp_Load

     #-------------------------------------------------------------------------------
     $Summ = Comp_Load('Formats/Currency', $InvoicesItem['Summ']);
     if (Is_Error($Summ)) {
         return ERROR | @Trigger_Error(500);
     }
     #-------------------------------------------------------------------------------
     $Items[] = SPrintF("\t* %s / %s%s", $InvoicesItem['ServiceName'], $Comment, $Summ);
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 #----------------------------------TRANSACTION----------------------------------
 if (Is_Error(DB_Transaction($TransactionID = UniqID('comp/Tasks/GC/NotifyWaitingInvoice')))) {
     return ERROR | @Trigger_Error(500);
 }
 #-------------------------------------------------------------------------
 $IsSend = NotificationManager::sendMsg(new Message('NotPayedInvoice', (int) $Invoice['UserID'], array('Theme' => SPrintF('Неоплаченный счёт #%d', $Invoice['ID']), 'InvoiceID' => $Invoice['ID'], 'Items' => Implode("\n", $Items))));
 #-------------------------------------------------------------------------
 switch (ValueOf($IsSend)) {
     case 'true':
         #-------------------------------------------------------------------------------
         $Event = array('UserID' => $Invoice['UserID'], 'PriorityID' => 'Billing', 'Text' => SPrintF('Уведомление о неоплаченном счёте #%d, неоплачен более %d дней', $Invoice['ID'], $Params['Invoices']['DaysBeforeNotice']));
         $Event = Comp_Load('Events/EventInsert', $Event);
         #-------------------------------------------------------------------------------
         if (!$Event) {
             return ERROR | @Trigger_Error(500);
         }
         #-------------------------------------------------------------------------------
         break;
         #-------------------------------------------------------------------------------
     #-------------------------------------------------------------------------------
     case 'exception':
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:NotifyWaitingInvoice.comp.php


注:本文中的NotificationManager::sendMsg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。