#------------------------------------------------------------------------------- switch (ValueOf($Profiles)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': # No more... break; case 'array': #------------------------------------------------------------------------------- $Result = array(); #------------------------------------------------------------------------------- foreach ($Profiles as $Profile) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('Notes.User.Profiles', $Profile)); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- break; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- default: return ERROR | @Trigger_Error(101); } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $currentVersion = VERSION; #------------------------------------------------------------------------------- $opts = array('http' => array('timeout' => 2)); $context = stream_context_create($opts); $versionInfoJson = @file_get_contents("http://joonte.com/public/version", false, $context); #Debug(SprintF('[comp/Notes/Administrator/CheckVersion]: versionInfoJson = %s',$versionInfoJson)); #------------------------------------------------------------------------------- $versionInfo = @json_decode($versionInfoJson, true); #------------------------------------------------------------------------------- if ($versionInfoJson && $versionInfo) { #------------------------------------------------------------------------------- if (!isset($versionInfo['version'])) { return $Result; } #------------------------------------------------------------------------------- $LastVersion = $versionInfo['version']; #------------------------------------------------------------------------------- if ($LastVersion != $currentVersion) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace('Notes.Administrator.CheckVersion', array('LastVersion' => $LastVersion))); $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- $Params = array('Invoice' => $Invoice, 'Summ' => $Comp); #------------------------------------------------------------------------------- $Array = array(); #------------------------------------------------------------------------------- foreach ($InvoicesItems as $InvoicesItem) { #------------------------------------------------------------------------------- $Comment = $InvoicesItem['Comment'] ? SPrintF('%s / ', $InvoicesItem['Comment']) : ''; #------------------------------------------------------------------------------- $Summ = Comp_Load('Formats/Currency', $InvoicesItem['Summ']); if (Is_Error($Summ)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- $Array[] = SPrintF("<li>%s / %s%s</li>", $InvoicesItem['ServiceName'], $Comment, $Summ); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $Params['Items'] = Implode("\n", $Array); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace(SPrintF('Notes.User.Invoices.%s', $Invoice['StatusID']), $Params)); $Result[] = $NoBody; unset($NoBody); } } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- $Settings = $Config['Interface']['Administrator']['Notes']['Tasks']; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!$Settings['ShowUnExecuted']) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Result = array(); #------------------------------------------------------------------------------- $Count = DB_Count('Tasks', array('Where' => "(`IsActive` = 'no' OR `Errors` > 0) AND `IsExecuted` = 'no'")); if (Is_Error($Count)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- if ($Count) { #------------------------------------------------------------------------------- $Result = array(); #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('Notes.Administrator.Tasks', array('Tasks' => $Count))); #------------------------------------------------------------------------------- $Result = array($NoBody); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- switch (ValueOf($Users)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': # No more... break; case 'array': #------------------------------------------------------------------------------- $Table = new Tag('TABLE', array('class' => 'Standard', 'cellspacing' => 5), new Tag('CAPTION', 'Сейчас в сети')); #------------------------------------------------------------------------------- $Block = new Tag('TR'); #------------------------------------------------------------------------------- foreach ($Users as $User) { #------------------------------------------------------------------------------- $Block->AddHTML(TemplateReplace('www.TicketEdit', $User)); #------------------------------------------------------------------------------- if (Count($Block->Childs) % 2 == 0) { #------------------------------------------------------------------------------- $Table->AddChild($Block); #------------------------------------------------------------------------------- $Block = new Tag('TR'); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- if (Count($Block->Childs)) { $Table->AddChild($Block); } #-------------------------------------------------------------------------------
/** @author Alex Keda, for www.host-food.ru */ /******************************************************************************/ /******************************************************************************/ eval(COMP_INIT); /******************************************************************************/ /******************************************************************************/ $Result = array(); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Config = Config(); #------------------------------------------------------------------------------- $Settings = $Config['Interface']['Administrator']['Notes']['CheckCache']; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!$Settings['MakeCheckCache']) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!CacheManager::isEnabled()) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace('Notes.Administrator.CheckCache')); $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Pages/Basket.js}')); #------------------------------------------------------------------------------- $DOM->AddChild('Head', $Script); #------------------------------------------------------------------------------- $Columns = array('ID', 'ServiceID', 'ContractID', 'OrderID', 'Summ', 'Amount', 'Comment', '(SELECT `Measure` FROM `Services` WHERE `Services`.`ID` = `ServiceID`) as `Measure`', '(SELECT `Code` FROM `Services` WHERE `Services`.`ID` = `ServiceID`) as `ServiceCode`', '(SELECT `Customer` FROM `Contracts` WHERE `Contracts`.`ID` = `ContractID`) as `Customer`'); #------------------------------------------------------------------------------- $Basket = DB_Select('BasketOwners', $Columns, array('Where' => SPrintF('`UserID` = %u', $GLOBALS['__USER']['ID']), 'SortOn' => 'ContractID')); #------------------------------------------------------------------------------- switch (ValueOf($Basket)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': #--------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #--------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('www.Basket')); #--------------------------------------------------------------------------- $Comp = Comp_Load('Information', $NoBody, 'Notice'); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #--------------------------------------------------------------------------- $DOM->AddChild('Into', $Comp); break; case 'array': #--------------------------------------------------------------------------- $ContractID = UniqID(); #--------------------------------------------------------------------------- $Rows = array(); #--------------------------------------------------------------------------- for ($i = 0; $i < Count($Basket); $i++) {
<?php #------------------------------------------------------------------------------- /** @author Великодный В.В. (Joonte Ltd.) */ /******************************************************************************/ /******************************************************************************/ $__args_list = array('Element'); /******************************************************************************/ eval(COMP_INIT); /******************************************************************************/ /******************************************************************************/ $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $Path = System_Element($Element); if (Is_Error($Path)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- $HTML = IO_Read($Path); if (Is_Error($HTML)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- $NoBody->AddHTML($HTML); #------------------------------------------------------------------------------- return $NoBody; #-------------------------------------------------------------------------------
$Params = $Task['Params']; #----------------------------------------------------------------------- if (Count($Params)) { #--------------------------------------------------------------------- $Table[] = 'Параметры'; #--------------------------------------------------------------------- foreach (Array_Keys($Params) as $ParamID) { if (Is_String($Params[$ParamID])) { #------------------------------------------------------------------- $Text = Str_Replace("\n", '<BR />', HtmlSpecialChars(Trim($Params[$ParamID]))); #------------------------------------------------------------------- $Text = Preg_Replace('/(http\\:\\/\\/[a-zA-Z0-9\\/\\:\\?\\&\\=\\@\\-\\.\\;\\_]+)/', '<A href="\\1">[ссылка]</A>', $Text); #------------------------------------------------------------------- $Td = new Tag('TD', array('class' => 'Standard', 'style' => 'max-width:400px;')); #------------------------------------------------------------------- $Td->AddHTML(SPrintF('<SPAN>%s</SPAN>', $Text)); #------------------------------------------------------------------- if (isset($Type['Params'][$ParamID])) { $Table[] = array($Type['Params'][$ParamID], $Td); } else { $Table[] = array($ParamID, $Td); } } } } #----------------------------------------------------------------------- $Table[] = 'Текущее состояние'; #----------------------------------------------------------------------- $Comp = Comp_Load('Formats/Logic', $Task['IsExecuted']); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500);
$DomainOrder = DB_Select('DomainOrdersOwners', $Columns, array('UNIQ', 'Where' => SPrintF('`OrderID` = %u', $Order['ID']))); switch (ValueOf($DomainOrder)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': return ERROR | @Trigger_Error(400); case 'array': #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $Params['TransferDaysRemainded'] = Ceil(($DomainOrder['StatusDate'] + 180 * 24 * 3600 - Time()) / (24 * 3600)); $Params['DomainOrder'] = $DomainOrder; #------------------------------------------------------------------------------- if (In_Array($DomainOrder['Name'], array('ru', 'su', 'рф'))) { #------------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('Notes.User.NoticeOrders.OnTransfer.USSR', $Params)); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- } else { # ничё? } #------------------------------------------------------------------------- break; default: return ERROR | @Trigger_Error(101); } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- } else { # ничё не делаем?
#------------------------------------------------------------------------------- $LastExecuted = File_Get_Contents($Marker); #------------------------------------------------------------------------------- $LastExecuted = StrToTime($LastExecuted); #------------------------------------------------------------------------------- Debug(SPrintF('[comp/Notes/Administrator/CheckCronRun]: LastExecuted = %s', Date('Y-m-d H:i:s', $LastExecuted))); #------------------------------------------------------------------------------- if ($LastExecuted < Time() - $Settings['CronDownTime']) { $Array = array('Message' => SPrintF('Последнее задание было выполнено <B>%s в %s</B>', Date('Y-m-d', $LastExecuted), Date('H:i:s', $LastExecuted))); } } else { #------------------------------------------------------------------------------- $Array = array('Message' => SPrintF('Планировщик ни разу не запускался в штатном режиме, или, отсутствует доступ к файлу <BR /><B>%s</B>', $Marker)); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (isset($Array)) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('Notes.Administrator.CheckCronRun', $Array)); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- /** @author Alex Keda, for www.host-food.ru **/ /******************************************************************************/ /******************************************************************************/ eval(COMP_INIT); /******************************************************************************/ /******************************************************************************/ $Result = array(); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Config = Config(); #------------------------------------------------------------------------------- $Settings = $Config['Interface']['Administrator']['Notes']['CheckUserID']; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!$Settings['MakeCheckUserID']) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if ($GLOBALS['__USER']['ID'] != 100) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace('Notes.Administrator.CheckUserID')); $Result[] = $NoBody; #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $UniqID = UniqID('AnnouncementsText'); #------------------------------------------------------------------------------- $Text = SPrintF('Внимание, пользователям показываются объявления. Число отображаемых объявлений: %s штук', SizeOf($Announcements)); #------------------------------------------------------------------------------- $OnClick = SPrintF("var Style = document.getElementById('%s').style;Style.display = (Style.display != 'none'?'none':'');", $UniqID); #------------------------------------------------------------------------------- $NoBody->AddChild(new Tag('SPAN', array('style' => 'cursor:pointer;', 'onclick' => $OnClick), $Text)); #------------------------------------------------------------------------------- $Div = new Tag('DIV', array('ID' => $UniqID, 'style' => 'display:none;')); #------------------------------------------------------------------------------- foreach ($Announcements as $Announcement) { #------------------------------------------------------------------------------- $Div->AddChild(new Tag('HR', array('size' => 1))); #------------------------------------------------------------------------------- $Div->AddHTML(SPrintF('<SPAN>%s</SPAN>', $Announcement['Text'])); #------------------------------------------------------------------------------- $Div->AddChild(new Tag('DIV', array('align' => 'right'), new Tag('A', array('href' => SPrintF("javascript: var Window = window.open('/Administrator/ClauseEdit?ClauseID=%s','ClauseEdit',SPrintF('left=%%u,top=%%u,width=800,height=680,toolbar=0, scrollbars=1, location=0',(screen.width-800)/2,(screen.height-600)/2));", $Announcement['ID'])), '[редактировать]'))); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $NoBody->AddChild($Div); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
if ($Config['Other']['Modules']['Security']['IsNoReferer']) { return $Result; } #------------------------------------------------------------------------------- $CacheID = Md5(SPrintF('no-referer-%s-%s', $GLOBALS['__USER']['ID'], $_SERVER['REMOTE_ADDR'])); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!isset($_SERVER["HTTP_REFERER"])) { #------------------------------------------------------------------------------- $Count = IntVal(CacheManager::get($CacheID)); #------------------------------------------------------------------------------- if ($Count > 2) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('Notes.User.CheckReferer')); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $Count++; #------------------------------------------------------------------------------- CacheManager::add($CacheID, $Count, 600); #------------------------------------------------------------------------------- Debug(SPrintF('[comp/Notes/User/CheckReferer]: HTTP_REFERER is not set for IP = %s, Count = %u', $_SERVER['REMOTE_ADDR'], $Count)); #------------------------------------------------------------------------------- } else { #------------------------------------------------------------------------------- CacheManager::add($CacheID, 0, 600); #-------------------------------------------------------------------------------
$Parse = '<P><SPAN>К сожалению, необходимая статья не найдена: </SPAN><U>%s</U></P>'; #--------------------------------------------------------------------------- $P->AddHTML(SPrintF($Parse, $ClauseID)); #--------------------------------------------------------------------------- return array('Title' => 'Статья не найдена', 'DOM' => $P, 'IsExists' => FALSE); case 'array': #--------------------------------------------------------------------------- $Clause = Current($Clause); #--------------------------------------------------------------------------- if (!$Clause['IsPublish'] && !$Preview) { #------------------------------------------------------------------------- $P = new Tag('P'); #------------------------------------------------------------------------- $Parse = '<P><SPAN>К сожалению, необходимая статья еще не опубликована: </SPAN><U>%s</U></P>'; #--------------------------------------------------------------------------- $P->AddHTML(SPrintF($Parse, $Clause['Partition'])); #------------------------------------------------------------------------- return array('Title' => 'Статья не опубликована', 'DOM' => $P, 'IsExists' => TRUE); } #--------------------------------------------------------------------------- $Text = $Clause['Text']; #--------------------------------------------------------------------------- if (Preg_Match('/@link:([a-zA-Z0-9\\/\\_\\-]+)/', $Text, $Matches)) { #------------------------------------------------------------------------- $Comp = Comp_Load('Clauses/Load', Next($Matches)); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------- return $Comp; }
return $Result; } #------------------------------------------------------------------------------- if (!Is_Array($Cached)) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Array = Explode(',', $Settings['ExcludeIPs']); #------------------------------------------------------------------------------- foreach ($Array as $IP) { if (Trim($IP) == $Cached['EnterIP']) { return $Result; } } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if ($Cached['EnterIP'] != $GLOBALS['__USER']['EnterIP']) { #------------------------------------------------------------------------------- $Params = array('EnterIP' => $Cached['EnterIP'], 'IP' => $GLOBALS['__USER']['EnterIP'], 'EnterDate' => Date('Y-m-d H:i:s', $Cached['EnterDate'])); #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace('Notes.CheckEnterIP', $Params)); $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
if (!isset($GLOBALS['__USER'])) { #------------------------------------------------------------------------------- $Links['DOM']->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Logon.js}'))); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Path = System_Element('templates/TopPanel/Logon.xml'); if (Is_Error($Path)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- $Parse = IO_Read($Path); if (Is_Error($Parse)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- $Tr->AddHTML($Parse); #------------------------------------------------------------------------------- $Script = new Tag('SCRIPT', array('type' => 'text/javascript'), "function TopPanelLogon(){ Logon(document.getElementById('TopPanelEmail').value,document.getElementById('TopPanelPassword').value,document.getElementById('TopPanelIsRemember').checked); }"); #------------------------------------------------------------------------------- $Links['DOM']->AddChild('Head', $Script); #------------------------------------------------------------------------------- } else { #------------------------------------------------------------------------------- $__USER = $GLOBALS['__USER']; #------------------------------------------------------------------------------- if (Is_Null($__USER)) { return ERROR | @Trigger_Error(400); } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # передвинуто для всех юзеров, для реализации JBS-239
if (!Comp_IsLoaded('Upload')) { #------------------------------------------------------------------------------- $Links =& Links(); #------------------------------------------------------------------------------- $DOM =& $Links['DOM']; #------------------------------------------------------------------------------- $Script = new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{Js/Upload.js}')); #------------------------------------------------------------------------------- $DOM->AddChild('Head', $Script); #------------------------------------------------------------------------------- $Comp = Comp_Load('Css', array('Upload')); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- foreach ($Comp as $Css) { $DOM->AddChild('Head', $Css); } #------------------------------------------------------------------------------- $DOM->AddHTML('Floating', TemplateReplace('Upload.DIV')); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $Table = new Tag('TABLE', array('width' => '200', 'cellspacing' => 0)); #------------------------------------------------------------------------------- $Table->AddHTML(TemplateReplace('Upload.Button', array('Name' => $Name, 'Info' => $Info ? $Info : '-', 'MaxFileSize' => $Settings['MaxFileSize']))); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Table; #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
$Prefix = $Item['IsActive'] ? 'Active' : 'UnActive'; #------------------------------------------------------------------------------- $A = new Tag('A', array('href' => $Item['Href']), $Item['Text']); #----------------------------------------------------------------------------- if (isset($Item['Prompt'])) { #--------------------------------------------------------------------------- $LinkID = UniqID('ID'); #--------------------------------------------------------------------------- $Links =& Links(); #--------------------------------------------------------------------------- $Links[$LinkID] =& $A; #--------------------------------------------------------------------------- $Comp = Comp_Load('Form/Prompt', $LinkID, $Item['Prompt']); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #--------------------------------------------------------------------------- unset($Links[$LinkID]); } #----------------------------------------------------------------------------- $Td->AddHTML(TemplateReplace('Tab.Table2', array('Prefix' => $Prefix, 'Href' => $A->ToXMLString()))); #----------------------------------------------------------------------------- $Tr->AddChild($Td); } #------------------------------------------------------------------------------- $Tr->AddChild(new Tag('TD', array('width' => '10px'))); #------------------------------------------------------------------------------- $DOM->AddChild('TabMenu', $Tr); #------------------------------------------------------------------------------- return $DOM->Object; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- $Percent = $Bonus['Discont'] * 100; #------------------------------------------------------------------------------- Debug(SPrintF('[comp/Notes/User/Bonuses]: Code = %s; Percent = %s', $Bonus['Code'], $Percent)); #------------------------------------------------------------------------------- if ($Percent < $Settings['Percent']) { continue; } #------------------------------------------------------------------------------- if (Is_Null($Bonus['NameShort'])) { #------------------------------------------------------------------------------- $Bonus['NameShort'] = 'Любой сервис'; $Bonus['Code'] = 'Hosting'; $Bonus['Measure'] = 'шт.'; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $Params = array('Bonus' => $Bonus, 'Percent' => $Percent); #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace('Notes.User.Bonuses', $Params)); $Result[] = $NoBody; unset($NoBody); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
return ERROR | @Trigger_Error(500); } #--------------------------------------------------------------- $Table[] = new Tag('DIV', array('align' => 'center'), $Comp); } #----------------------------------------------------------------- $Comp = Comp_Load('Formats/Currency', $CostPay); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #----------------------------------------------------------------- $Table[] = array('Всего к оплате', $Comp); #----------------------------------------------------------------- $Div = new Tag('DIV', array('align' => 'right', 'class' => 'Standard')); #------------------------------------------------------------------------------- $Div->AddHTML(TemplateReplace('www.ServiceOrderPay', array('ServiceCode' => 'VPS'))); #----------------------------------------------------------------- $Table[] = $Div; #----------------------------------------------------------------- $Table[] = new Tag('DIV', array('align' => 'right', 'style' => 'font-size:10px;'), $CostPay > $VPSOrder['ContractBalance'] ? '[заказ будет добавлен в корзину]' : '[заказ будет оплачен с баланса договора]'); #----------------------------------------------------------------- $Div = new Tag('DIV', array('align' => 'right')); #----------------------------------------------------------------- if ($IsChange) { #--------------------------------------------------------------- $Comp = Comp_Load('Form/Input', array('type' => 'button', 'onclick' => 'WindowPrev();', 'value' => 'Изменить период')); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #--------------------------------------------------------------- $Div->AddChild($Comp);
/******************************************************************************/ $Result = array(); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Config = Config(); #------------------------------------------------------------------------------- $Settings = $Config['Interface']['User']['Notes']['Announcement']; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!$Settings['ShowAnnouncement']) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Where = array("`Partition` = '/User/Announcement'", "`IsPublish` = 'yes'", "`IsDOM` = 'yes'", "`IsXML` = 'yes'"); #------------------------------------------------------------------------------- $Clauses = DB_Select('Clauses', 'Text', array('Where' => $Where)); switch (ValueOf($Clauses)) { case 'array': #------------------------------------------------------------------------------- foreach ($Clauses as $Clause) { $NoBody = new Tag('NOBODY'); $NoBody->AddHTML($Clause['Text']); $Result[] = $NoBody; unset($NoBody); } } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- $Settings = $Config['Interface']['Administrator']['Notes']['Events']; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!$Settings['ShowUnReaded']) { return $Result; } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Result = array(); #------------------------------------------------------------------------------- $Count = DB_Count('Events', array('Where' => "`IsReaded` != 'yes'")); if (Is_Error($Count)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- if ($Count) { #------------------------------------------------------------------------------- $Result = array(); #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); #------------------------------------------------------------------------------- $NoBody->AddHTML(TemplateReplace('Notes.Administrator.Events', array('Count' => $Count))); #------------------------------------------------------------------------------- $Result = array($NoBody); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------
#------------------------------------------------------------------------- $Compile = Comp_Load('www/Administrator/API/ProfileCompile', array('ProfileID' => $Profile['ID'])); #------------------------------------------------------------------------- switch (ValueOf($Compile)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': return ERROR | @Trigger_Error(400); case 'array': #--------------------------------------------------------------------- $Compile = $Compile['Attribs']; #--------------------------------------------------------------------- $Td = new Tag('TD', array('colspan' => 2, 'class' => 'Separator')); #--------------------------------------------------------------------- if ($Compile['Type'] != 'Не указан') { $Td->AddHTML(SPrintF('<SPAN>%s: </SPAN>', $Compile['Type'])); } #--------------------------------------------------------------------- $Td->AddHTML(SPrintF('<NOBODY><B>%s</B>, %s</NOBODY>', $Compile['Name'], $Compile['City'])); #--------------------------------------------------------------------- if ($Compile['Phone']) { $Td->AddHTML(SPrintF('<SPAN>, %s</SPAN>', $Compile['Phone'])); } #--------------------------------------------------------------------- $Table->AddChild(new Tag('TR', $Td)); #--------------------------------------------------------------------- $Tr = new Tag('TR'); #--------------------------------------------------------------------- $NoIndex = new Tag('NOINDEX', new Tag('A', array('class' => 'Image', 'target' => 'blank', 'href' => $Compile['SiteURL']), new Tag('IMG', array('border' => 0, 'style' => 'max-width:200px;max-height:150px;', 'src' => $Compile['LogoURL'])))); #--------------------------------------------------------------------- $Tr->AddChild(new Tag('TD', array('class' => 'Standard', 'style' => 'padding:0px;', 'align' => 'center'), $NoIndex));
default: return ERROR | @Trigger_Error(101); } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # проверяем наличие заполненного профиля $Where = array('`UserID` = @local.__USER_ID', '`TypeID` != "Default"', '`StatusID` = "Complite" OR `StatusID` = "Public"'); $Profiles = DB_Select('Contracts', array('*'), array('Where' => $Where)); #------------------------------------------------------------------------------- switch (ValueOf($Profiles)) { case 'error': return ERROR | @Trigger_Error(500); case 'exception': #------------------------------------------------------------------------------- # нету подходящих профилей $NoBody->AddHTML(TemplateReplace('Notes.User.OrdersTransfer.Contracts', $Params)); $NoBody->AddChild(new Tag('STRONG', new Tag('A', array('href' => "javascript:ShowWindow('/ContractMake');"), '[создать договор]'))); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- return $Result; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- case 'array': # No more... break; default: return ERROR | @Trigger_Error(101); } #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- case 'true': break; default: return ERROR | @Trigger_Error(101); } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $Params['Links'] = isset($Span) ? $Span->ToXMLString() : '-'; #------------------------------------------------------------------------------- $Table = new Tag('TABLE', array('class' => 'EdeskMessage', 'cellspacing' => 5, 'height' => '100%', 'width' => '100%')); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # JBS-1177 а код в подписи-то выполняется ... #$Params['User']['Sign'] = Nl2Br(HtmlSpecialChars($Params['User']['Sign'])); $Params['User']['Sign'] = Comp_Load('Edesks/Text', array('String' => $Params['User']['Sign'], 'IsLockText' => $OwnerID != @$GLOBALS['__USER']['ID'])); if (Is_Error($Text)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- # JBS-1178 да и в имени пользователя - тоже $Params['User']['Name'] = Nl2Br(HtmlSpecialChars($Params['User']['Name'])); #------------------------------------------------------------------------------- $Table->AddHTML(TemplateReplace(SPrintF('Edesks.Message.TABLE.%s', $__USER['Params']['Settings']['EdesksDisplay'] == 'Left' ? 'Left' : 'Right'), $Params)); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Table; #-------------------------------------------------------------------------------
} #------------------------------------------------------------------------------- if (!isset($GLOBALS['__USER']) && $_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR']) { #------------------------------------------------------------------------------- $Table[] = 'Защита от автоматических регистраций'; #------------------------------------------------------------------------------- $Table[] = array(new Tag('NOBODY', new Tag('SPAN', 'Защитный код'), new Tag('BR'), new Tag('SPAN', array('class' => 'Comment'), 'Цифры на изображении')), new Tag('DIV', $Img, new Tag('SPAN', ' = '), $Comp)); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!isset($GLOBALS['__USER'])) { #------------------------------------------------------------------------------- $Div = new Tag('DIV', array('class' => 'Standard', 'align' => 'right')); #------------------------------------------------------------------------------- $Div->AddHTML(TemplateReplace('www.UserRegister')); #------------------------------------------------------------------------------- $Table[] = $Div; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- $Comp = Comp_Load('Form/Input', array('type' => 'button', 'onclick' => "if(PasswordCheck(this.form,'Password')) UserRegister();", 'value' => 'Регистрация')); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- $Table[] = $Comp; #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $Comp = Comp_Load('Tables/Standard', $Table); if (Is_Error($Comp)) {
$Settings = $Config['Interface']['User']['Notes'][$MethodID]; #------------------------------------------------------------------------------- $NotificationMethods = $GLOBALS['__USER']['Params']['NotificationMethods']; #------------------------------------------------------------------------------- if ($NotificationMethods[$MethodID]['Address'] && !$NotificationMethods[$MethodID]['Confirmed'] && $Settings['ConfirmRequire']) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); $NoBody->AddHTML(TemplateReplace('Notes.User.Confirmation', array('Address' => $NotificationMethods[$MethodID]['Address'], 'Method' => $Config['Notifies']['Methods'][$MethodID]))); $NoBody->AddChild(new Tag('STRONG', new Tag('A', array('href' => "javascript:ShowWindow('/UserPersonalDataChange');"), '[Мои настройки]'))); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- if (!$NotificationMethods[$MethodID]['Address'] && $Settings['Require']) { #------------------------------------------------------------------------------- $NoBody = new Tag('NOBODY'); Debug(print_r($Config['Notifies']['Methods'][$MethodID], true)); $NoBody->AddHTML(TemplateReplace('Notes.User.Confirmation.NoAddress', array('Method' => $Config['Notifies']['Methods'][$MethodID]))); $NoBody->AddChild(new Tag('STRONG', new Tag('A', array('href' => "javascript:ShowWindow('/UserPersonalDataChange');"), '[Мои настройки]'))); #------------------------------------------------------------------------------- $Result[] = $NoBody; #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Result; #-------------------------------------------------------------------------------