$String = $Replacing[$Pattern] ? $Replacing[$Pattern] : '-';
                     #---------------------------------------------
                     $Td->Text = Str_Replace($Pattern, $String, $Td->Text);
                 }
                 #-----------------------------------------------
                 $Tr->AddChild($Td);
             }
             #-------------------------------------------------
             $DOM->AddChild('WorksComplite', $Tr);
             break;
         default:
             return ERROR | @Trigger_Error(101);
     }
 }
 #-------------------------------------------------------
 $DOM->Delete('WorkComplite');
 #-------------------------------------------------------
 $Comp = Comp_Load('Formats/WorkComplite/Report/Number', $ContractID, $Month);
 if (Is_Error($Comp)) {
     return ERROR | @Trigger_Error(500);
 }
 #-------------------------------------------------------
 $Report = array('Number' => $Comp);
 #-------------------------------------------------------
 $Comp = Comp_Load('Formats/Date/Month', $Month);
 if (Is_Error($Comp)) {
     return ERROR | @Trigger_Error(500);
 }
 #-------------------------------------------------------
 $Report['Month'] = $Comp;
 #-------------------------------------------------------
示例#2
0
                         $String = $Replacing[$Pattern] ? $Replacing[$Pattern] : '-';
                         #-------------------------------------------------------
                         $Td->Text = Str_Replace($Pattern, $String, $Td->Text);
                     }
                     #---------------------------------------------------------
                     $Tr->AddChild($Td);
                 }
                 #-----------------------------------------------------------
                 $DOM->AddChild('Items', $Tr);
                 break;
             default:
                 return ERROR | @Trigger_Error(101);
         }
     }
     #-----------------------------------------------------------------
     $DOM->Delete('Item');
 }
 #-------------------------------------------------------------------
 $Document = $DOM->Build();
 if (Is_Error($Document)) {
     return ERROR | @Trigger_Error(500);
 }
 #-------------------------------------------------------------------
 $Replace = Array_ToLine($Replace);
 #-------------------------------------------------------------------
 foreach (Array_Keys($Replace) as $LinkID) {
     #-----------------------------------------------------------------
     $Text = (string) $Replace[$LinkID];
     #-----------------------------------------------------------------
     $Document = Str_Replace(SPrintF('%%%s%%', $LinkID), $Text ? $Text : '-', $Document);
 }
示例#3
0
         return ERROR | @Trigger_Error(500);
     }
     #-------------------------------------------------------------------------------
     $File = SPrintF('VerifyReport%s.csv', Md5($_SERVER['REMOTE_ADDR']));
     #-------------------------------------------------------------------------------
     $IsWrite = IO_Write(SPrintF('%s/files/%s', $Tmp, $File), $CSV, TRUE);
     if (Is_Error($IsWrite)) {
         return ERROR | @Trigger_Error(500);
     }
     #-------------------------------------------------------------------------------
     return array('Status' => 'Ok', 'Location' => SPrintF('/GetTemp?File=%s&Name=VerifyReport%s.csv&Mime=application/csv', $File, $Number));
     #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 case 'PDF':
     #-------------------------------------------------------------------------------
     $DOM->Delete('Rubbish');
     #-------------------------------------------------------------------------------
     $PDF = HTMLDoc_CreatePDF('VerifyReport', $DOM);
     #-------------------------------------------------------------------------------
     switch (ValueOf($PDF)) {
         case 'error':
             return ERROR | @Trigger_Error(500);
         case 'exception':
             return ERROR | @Trigger_Error(400);
         case 'string':
             break;
         default:
             return ERROR | @Trigger_Error(101);
     }
     #-------------------------------------------------------------------------------
     $Tmp = System_Element('tmp');
示例#4
0
    #-------------------------------------------------------------------------------
    $DOM->AddChild('Into', new Tag('DIV', array('class' => 'Title'), new Tag('CDATA', $PaymentSystem['Name']), $A));
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# проверяем наличие файла
if (!GetUploadedFileSize('Invoices', $Invoice['ID'])) {
    return new gException('INVOICE_NOT_BUILDED', 'Счёт не сформирован');
}
#-------------------------------------------------------------------------------
$File = GetUploadedFile('Invoices', $Invoice['ID']);
#-------------------------------------------------------------------------------
$Document = new DOM($File['Data']);
#-------------------------------------------------------------------------------
$Document->Delete('Logo');
#-------------------------------------------------------------------------------
$Document->Delete('Rubbish');
#-------------------------------------------------------------------------------
$Document->DeleteIDs();
#-------------------------------------------------------------------------------
$Div = new Tag('DIV', array('class' => 'Standard', 'style' => 'max-width:700px;'), $Document->Object);
#-------------------------------------------------------------------------------
if ($IsPayed) {
    #-------------------------------------------------------------------------------
    $DOM->AddText('Title', ' (Оплачен)');
    #-------------------------------------------------------------------------------
} else {
    #-------------------------------------------------------------------------------
    if ($PaymentSystem['IsContinuePaying']) {
        #-------------------------------------------------------------------------------
示例#5
0
     return ERROR | @Trigger_Error(400);
 case 'false':
     return ERROR | @Trigger_Error(700);
 case 'true':
     #-----------------------------------------------------------------------
     $DOM = new DOM();
     #-----------------------------------------------------------------------
     $Links =& Links();
     # Коллекция ссылок
     $Links['DOM'] =& $DOM;
     #-----------------------------------------------------------------------
     if (Is_Error($DOM->Load('Standard'))) {
         return ERROR | @Trigger_Error(500);
     }
     #-----------------------------------------------------------------------
     $DOM->Delete('Title');
     #-----------------------------------------------------------------------
     #-------------------------------------------------------------------------------
     $DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{others/jQuery/effects.core.js}')));
     #-------------------------------------------------------------------------------
     $DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/ImageResize.js}')));
     #-------------------------------------------------------------------------------
     #-------------------------------------------------------------------------------
     $IsQuery = DB_Query(SPrintF('SET @local.EdeskID = %u', $Ticket['ID']));
     if (Is_Error($IsQuery)) {
         return ERROR | @Trigger_Error(500);
     }
     #-----------------------------------------------------------------------
     $Comp = Comp_Load('Tables/Super', 'TicketMessages');
     if (Is_Error($Comp)) {
         return ERROR | @Trigger_Error(500);
示例#6
0
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Standard'))) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddText('Title', $Title = $Comp['Title']);
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Comp['DOM']);
#-------------------------------------------------------------------------------
$DOM->Delete('ClauseTrash');
#-------------------------------------------------------------------------------
$Out = $DOM->Build();
if (Is_Error($Out)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$PDF = HTMLDoc_CreatePDF('Clause', $Out);
#-------------------------------------------------------------------------------
switch (ValueOf($PDF)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'string':
        #---------------------------------------------------------------------------