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


PHP Comp_Load函数代码示例

本文整理汇总了PHP中Comp_Load函数的典型用法代码示例。如果您正苦于以下问题:PHP Comp_Load函数的具体用法?PHP Comp_Load怎么用?PHP Comp_Load使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: send

 public function send(Msg $msg)
 {
     // Get template file path.
     $templatePath = SPrintF('Notifies/SMS/%s.tpl', $msg->getTemplate());
     $smarty = JSmarty::get();
     if (!$smarty->templateExists($templatePath)) {
         throw new jException('Template file not found: ' . $templatePath);
     }
     $smarty->assign('Config', Config());
     foreach (array_keys($msg->getParams()) as $paramName) {
         $smarty->assign($paramName, $msg->getParam($paramName));
     }
     try {
         $message = $smarty->fetch($templatePath);
     } catch (Exception $e) {
         throw new jException(SPrintF("Can't fetch template: %s", $templatePath), $e->getCode(), $e);
     }
     $recipient = $msg->getParam('User');
     if (!$recipient['Params']['NotificationMethods']['SMS']['Address']) {
         throw new jException('Mobile phone number not found for user: ' . $recipient['ID']);
     }
     $taskParams = array('UserID' => $recipient['ID'], 'TypeID' => 'SMS', 'Params' => array($recipient['Params']['NotificationMethods']['SMS']['Address'], $message, $recipient['ID'], $msg->getParam('ChargeFree') ? TRUE : FALSE));
     #Debug(SPrintF('[system/classes/SMS.class.php]: msg = %s,',print_r($msg,true)));
     $result = Comp_Load('www/Administrator/API/TaskEdit', $taskParams);
     switch (ValueOf($result)) {
         case 'error':
             throw new jException("Couldn't add task to queue: " . $result);
         case 'exception':
             throw new jException("Couldn't add task to queue: " . $result->String);
         case 'array':
             return TRUE;
         default:
             throw new jException("Unexpected error.");
     }
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:35,代码来源:SMS.class.php

示例2: getParams

 public function getParams()
 {
     #$Message = Preg_Replace("#\[hidden\](.+)\[/hidden\]#sU", ' ', $this->params['Message'], -1);
     $Message = Comp_Load('Edesks/Text', array('String' => $this->params['Message'], 'IsEmail' => TRUE));
     if (Is_Error($Message)) {
         return ERROR | @Trigger_Error(500);
     }
     $this->params['Message'] = $Message;
     return $this->params;
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:10,代码来源:FromTicketsMessagesMsg.class.php

示例3: send

 public function send(Msg $msg)
 {
     #-------------------------------------------------------------------------------
     // Get template file path.
     $templatePath = SPrintF('Notifies/ICQ/%s.tpl', $msg->getTemplate());
     #-------------------------------------------------------------------------------
     $smarty = JSmarty::get();
     #-------------------------------------------------------------------------------
     if (!$smarty->templateExists($templatePath)) {
         throw new jException('Template file not found: ' . $templatePath);
     }
     #-------------------------------------------------------------------------------
     $smarty->assign('Config', Config());
     #-------------------------------------------------------------------------------
     foreach (array_keys($msg->getParams()) as $paramName) {
         $smarty->assign($paramName, $msg->getParam($paramName));
     }
     #-------------------------------------------------------------------------------
     try {
         #-------------------------------------------------------------------------------
         $message = $smarty->fetch($templatePath);
         #-------------------------------------------------------------------------------
     } catch (Exception $e) {
         #-------------------------------------------------------------------------------
         throw new jException(SPrintF("Can't fetch template: %s", $templatePath), $e->getCode(), $e);
         #-------------------------------------------------------------------------------
     }
     #-------------------------------------------------------------------------------
     $recipient = $msg->getParam('User');
     #-------------------------------------------------------------------------------
     if (!$recipient['Params']['NotificationMethods']['ICQ']['Address']) {
         throw new jException("ICQ UIN not found for user: " . $recipient['ID']);
     }
     #-------------------------------------------------------------------------------
     $taskParams = array('UserID' => $recipient['ID'], 'TypeID' => 'ICQ', 'Params' => array($recipient['Params']['NotificationMethods']['ICQ']['Address'], $message, $recipient['ID']));
     #-------------------------------------------------------------------------------
     $result = Comp_Load('www/Administrator/API/TaskEdit', $taskParams);
     switch (ValueOf($result)) {
         case 'error':
             throw new jException("Couldn't add task to queue: " . $result);
         case 'exception':
             throw new jException("Couldn't add task to queue: " . $result->String);
         case 'array':
             return TRUE;
         default:
             throw new jException("Unexpected error.");
     }
     #-------------------------------------------------------------------------------
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:49,代码来源:ICQ.class.php

示例4: smarty_function_table

function smarty_function_table($params, $smarty)
{
    $tableName = $params['name'];
    if (!$tableName) {
        return "";
    }
    $DOM = new DOM();
    $Links =& Links();
    # Коллекция ссылок
    $Links['DOM'] =& $DOM;
    $comp = Comp_Load('Tables/Super', $tableName);
    if (Is_Error($comp)) {
        return ERROR | @Trigger_Error(500);
    }
    $DOM->Object = $comp;
    $Out = $DOM->Build();
    if (Is_Error($Out)) {
        return ERROR | @Trigger_Error(500);
    }
    return $Out;
}
开发者ID:carriercomm,项目名称:jbs,代码行数:21,代码来源:function.table.php

示例5: DB_Select

}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Scheme = DB_Select(SPrintF('%sSchemes', $Service['Code']), array('*'), array('UNIQ', 'ID' => $DNSmanagerOrder['SchemeID']));
switch (ValueOf($Scheme)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'array':
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Params = array('SchemeID' => $DNSmanagerOrder['SchemeID'], 'OrderID' => $DNSmanagerOrder['OrderID'], 'MaxOrders' => $Scheme['MaxOrders'], 'MinOrdersPeriod' => $Scheme['MinOrdersPeriod'], 'ServiceID' => $Service['ID'], 'ServiceName' => $Service['Name'], 'SchemeName' => $Scheme['Name']);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Services/Orders/OrdersHistory', $Params);
switch (ValueOf($Comp)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return $Comp;
    case 'array':
        return TRUE;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Waiting.comp.php

示例6: Tag

$Tr = new Tag('TR', new Tag('TD', 'С даты'));
#-------------------------------------------------------------------------------
$Comp = Comp_Load('jQuery/DatePicker', SPrintF('%s1', $ColumnID), $Date1 ? $Date1 : Time() - 189216000);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Tr->AddChild(new Tag('TD', $Comp));
#-------------------------------------------------------------------------------
$Tr->AddChild(new Tag('TD', 'по дату'));
#-------------------------------------------------------------------------------
$Comp = Comp_Load('jQuery/DatePicker', SPrintF('%s2', $ColumnID), $Date2 ? $Date2 : Time());
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Tr->AddChild(new Tag('TD', $Comp));
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('onclick' => 'TableSuperReload();', 'type' => 'button', 'value' => 'Вывести'));
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Tr->AddChild(new Tag('TD', $Comp));
#-------------------------------------------------------------------------------
$Table = new Tag('TABLE', array('class' => 'Standard', 'cellspacing' => 5), $Tr);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return $Table;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:DateSelect.comp.php

示例7: eval

<?php

#-------------------------------------------------------------------------------
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Comp = Comp_Load('Tables/Widget', 'ExtraIPOrders[User]');
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
if (!$Comp->Attribs['count']) {
    return FALSE;
}
#-------------------------------------------------------------------------------
return array('Title' => 'Последние заказы на выделенные IP адреса', 'DOM' => $Comp);
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:20,代码来源:ExtraIPOrders.comp.php

示例8: System_XML

$Config = System_XML('config/Config.xml', array(HOST_ID));
if (Is_Error($Config)) {
    return new gException('ERROR_TEMPLATE_LOAD', 'Ошибка загрузки шаблона');
}
#-------------------------------------------------------------------------------
$Params = Array_ToLine($Config);
#-------------------------------------------------------------------------------
foreach (Array_Keys($Params) as $Key) {
    #-------------------------------------------------------------------------------
    if (!In_Array($Key, $ShareConfigsParams)) {
        #-------------------------------------------------------------------------------
        Debug(SPrintF('[comp/Tasks/GC/CheckConfigParams]: в конфигурационном файле обнаружен не используемый параметр: %s', $Key));
        #-------------------------------------------------------------------------------
        if ($Settings['IsEvent']) {
            #-------------------------------------------------------------------------------
            $Event = array('IsReaded' => FALSE, 'PriorityID' => 'System', 'Text' => SPrintF('Обнаружен неиспользуемый параметр конфигурационного файла: %s, со значением (%s). Удалите его, или отключите задачу поиска неиспользуемых параметров. При удалении, будте аккуратны и внимательны, сохраняйте бэкап конфигурационного файла.', $Key, $Params[$Key]));
            $Event = Comp_Load('Events/EventInsert', $Event);
            if (!$Event) {
                return ERROR | @Trigger_Error(500);
            }
            #-------------------------------------------------------------------------------
        }
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return TRUE;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:CheckConfigParams.comp.php

示例9: Debug

        if (!$Event) {
            return ERROR | @Trigger_Error(500);
        }
        #-------------------------------------------------------------------------------
        break;
        #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    default:
        #-------------------------------------------------------------------------------
        Debug(SPrintF('[comp/Invoices/PaymentSystems/Uniteller]: статус "%s", счёт #%u проигнорирован', $Args['Status'], $Args['Order_ID']));
        return "OK\n";
        #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('www/API/StatusSet', array('ModeID' => 'Invoices', 'StatusID' => $StatusID, 'RowsIDs' => $InvoiceID, 'Comment' => $Comment));
#-------------------------------------------------------------------------------
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);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# если была транзакция - коммитим
if (isset($TransactionID)) {
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Uniteller.comp.php

示例10: Str_Replace

     #-----------------------------------------------------
     $Text = (string) $Replace[$LinkID];
     #-----------------------------------------------------
     $Document = Str_Replace(SPrintF('%%%s%%', $LinkID), $Text ? $Text : '-', $Document);
 }
 #-------------------------------------------------------
 $PDF = HTMLDoc_CreatePDF('WorksCompliteReport', $Document);
 #-------------------------------------------------------
 switch (ValueOf($PDF)) {
     case 'error':
         return ERROR | @Trigger_Error(500);
     case 'exception':
         return ERROR | @Trigger_Error(400);
     case 'string':
         #---------------------------------------------------
         $Comp = Comp_Load('Formats/WorkComplite/Report/Number', $ContractID, $Month);
         if (Is_Error($Comp)) {
             return ERROR | @Trigger_Error(500);
         }
         #---------------------------------------------------
         $Tmp = System_Element('tmp');
         if (Is_Error($Tmp)) {
             return ERROR | @Trigger_Error(500);
         }
         #---------------------------------------------------
         $File = SPrintF('Report%s.pdf', Md5($_SERVER['REMOTE_ADDR']));
         #---------------------------------------------------
         $IsWrite = IO_Write(SPrintF('%s/files/%s', $Tmp, $File), $PDF, TRUE);
         if (Is_Error($IsWrite)) {
             return ERROR | @Trigger_Error(500);
         }
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:WorksCompliteReportDownload.comp.php

示例11: Comp_Load

}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Panel', array('Comp' => $Comp1, 'Name' => 'Добавить заказ'), array('Comp' => $Comp2, 'Name' => 'Компенсация времени'));
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody->AddChild($Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Super', 'DNSmanagerOrders');
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody->AddChild($Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tab', 'Administrator/DNSmanager', $NoBody);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Comp);
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
return $Out;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:DNSmanagerOrders.comp.php

示例12: Comp_Load

}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Buttons/Panel', array('Comp' => $Comp, 'Name' => 'Новый бонус'));
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY', $Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Super', 'Bonuses');
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$NoBody->AddChild($Comp);
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tab', 'Administrator/Bonuses', $NoBody);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Comp);
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
#-------------------------------------------------------------------------------
if (Is_Error($Out)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
return $Out;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Bonuses.comp.php

示例13: DB_Insert

             $IsInsert = DB_Insert('InvoicesItems', $IItem);
             if (Is_Error($IsInsert)) {
                 return ERROR | @Trigger_Error(500);
             }
         }
     } else {
         #-------------------------------------------------------------------
         $IItem = array('InvoiceID' => $InvoiceID, 'ServiceID' => 1000, 'Amount' => 1, 'Summ' => $Invoice['Summ']);
         #-------------------------------------------------------------------
         $IsInsert = DB_Insert('InvoicesItems', $IItem);
         if (Is_Error($IsInsert)) {
             return ERROR | @Trigger_Error(500);
         }
     }
     #---------------------------------------------------------------------
     $Comp = Comp_Load('Invoices/Build', $InvoiceID);
     if (Is_Error($Comp)) {
         return ERROR | @Trigger_Error(500);
     }
 }
 #-----------------------------------------------------------------------
 if (isset($Contract['HostingOrders'])) {
     #---------------------------------------------------------------------
     $HostingOrders = $Contract['HostingOrders'];
     #---------------------------------------------------------------------
     $HostingOrders = Is_Array($HostingOrders) ? $HostingOrders : array();
     #---------------------------------------------------------------------
     foreach ($HostingOrders as $HostingOrder) {
         #-------------------------------------------------------------------
         $DaysRemainded = Max(0, (int) $HostingOrder['DaysRemainded']);
         #-------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Import.comp.php

示例14: Tag

}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Form = new Tag('FORM', array('method' => 'POST', 'name' => 'OrderConsiderInfoForm'), $Comp);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Params = array('type' => 'hidden', 'name' => 'IsAutoProlong', 'value' => $Order['IsAutoProlong'] ? '0' : '1');
$Comp = Comp_Load('Form/Input', $Params);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('type' => 'hidden', 'name' => 'OrderID', 'value' => $Order['OrderID']));
#-------------------------------------------------------------------------------
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Form->AddChild($Comp);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Form);
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Build(FALSE))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:ServiceAutoProlong.comp.php

示例15: array

<?php

#-------------------------------------------------------------------------------
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('TableID', 'RowID');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Comp = Comp_Load('Form/Input', array('name' => 'RowsIDs[]', 'type' => 'checkbox', 'value' => $RowID, 'onkeydown' => SPrintF("if(event.keyCode == 69) ShowWindow('/Administrator/RowEdit',{TableID:'%s',RowID:%u});", $TableID, $RowID)));
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
return $Comp;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:18,代码来源:SelectIDs.comp.php


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