public function Grid() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); //display the display table $SQL = <<<SQL SELECT HelpID, Topic, Category, Link FROM `help` ORDER BY Topic, Category SQL; // Load results into an array $helplinks = $db->GetArray($SQL); if (!is_array($helplinks)) { trigger_error($db->error()); trigger_error(__('Error getting list of helplinks'), E_USER_ERROR); } $cols = array(array('name' => 'topic', 'title' => __('Topic')), array('name' => 'category', 'title' => __('Category')), array('name' => 'link', 'title' => __('Link'))); Theme::Set('table_cols', $cols); $rows = array(); foreach ($helplinks as $row) { $row['helpid'] = Kit::ValidateParam($row['HelpID'], _INT); $row['topic'] = Kit::ValidateParam($row['Topic'], _STRING); $row['category'] = Kit::ValidateParam($row['Category'], _STRING); $row['link'] = Kit::ValidateParam($row['Link'], _STRING); $row['buttons'] = array(); // we only want to show certain buttons, depending on the user logged in if ($user->usertypeid == 1) { // Edit $row['buttons'][] = array('id' => 'help_button_edit', 'url' => 'index.php?p=help&q=EditForm&HelpID=' . $row['helpid'], 'text' => __('Edit')); // Delete $row['buttons'][] = array('id' => 'help_button_delete', 'url' => 'index.php?p=help&q=DeleteForm&HelpID=' . $row['helpid'], 'text' => __('Delete')); // Test $row['buttons'][] = array('id' => 'help_button_test', 'url' => HelpManager::Link($row['topic'], $row['category']), 'text' => __('Test')); } $rows[] = $row; } Theme::Set('table_rows', $rows); $output = Theme::RenderReturn('table_render'); $response->SetGridResponse($output); $response->Respond(); }
/** * Список фолдингов */ public static function listFoldings() { $managers = array(MagManager::inst(), BlogManager::inst(), TrainManager::inst()); $foldings = array(); foreach ($managers as $manager) { if ($manager instanceof RubricsProcessor) { $foldings[] = $manager->getRubricsFolding(); } if ($manager instanceof PostsProcessor) { $foldings[] = $manager->getFolding(); } } //Фолдинги $foldings[] = PopupPagesManager::inst(); $foldings[] = PluginsManager::inst(); $foldings[] = IdentPagesManager::inst(); $foldings[] = TimeLineManager::inst(); $foldings[] = TemplateMessages::inst(); $foldings[] = UserPointsManager::inst(); $foldings[] = StockManager::inst(); $foldings[] = HelpManager::inst(); $foldings[] = EmailManager::inst(); $foldings[] = PSForm::inst(); $foldings[] = DialogManager::inst(); //Библиотеки $foldings[] = PoetsManager::inst(); $foldings[] = ScientistsManager::inst(); //Админские страницы $foldings[] = APagesResources::inst(); //Базовые страницы $foldings[] = BasicPagesManager::inst(); //Построитель страниц $foldings[] = PageBuilder::inst(); //Управление списком предпросмотра постов $foldings[] = ShowcasesCtrlManager::inst(); //Элементы в правой панели навигации $foldings[] = ClientBoxManager::inst(); //Все фолдинги системы return $foldings; }
/** * Функция вставляет текст всплывающей подсказки */ function smarty_block_help($params, $content, Smarty_Internal_Template &$template) { if (!$content) { return; //--- } //Параметры $ident = $params->get(array('name', 'ident')); //Текст $text = $text == '.' ? null : $text; $entity = HelpManager::inst()->getFoldedEntity($ident); if ($entity) { return $entity->getFolding()->getLibItemBubbleHref($entity->getIdent(), $text); } else { if ($text) { return $text; } else { $info = ($libType ? $libType . '-' : '') . $ident; return PsHtml::spanErr("Не найден библиотечный элемент [{$info}]"); } } }
private function __construct() { PsProfiler::inst(__CLASS__)->start(__FUNCTION__); //Фолдинги $this->foldings[] = PopupPagesManager::inst(); $this->foldings[] = PluginsManager::inst(); $this->foldings[] = TimeLineManager::inst(); $this->foldings[] = UserPointsManager::inst(); $this->foldings[] = StockManager::inst(); $this->foldings[] = HelpManager::inst(); $this->foldings[] = EmailManager::inst(); $this->foldings[] = PSForm::inst(); $this->foldings[] = DialogManager::inst(); //Библиотеки $this->foldings[] = PoetsManager::inst(); $this->foldings[] = ScientistsManager::inst(); //Админские страницы $this->foldings[] = APagesResources::inst(); /* * Выделим различные подклассы фолдингов */ foreach ($this->foldings as $folding) { //Фолдинги библиотек if ($folding instanceof LibResources) { $this->libs[] = $folding; } //Фолдинги для баблов if ($folding instanceof BubbledFolding) { $this->bubbles[] = $folding; } //Фолдинги, предоставляющие панели if ($folding instanceof PanelFolding) { $this->panels[] = $folding; } } PsProfiler::inst(__CLASS__)->stop(); }
/** * Shows the form to delete a template */ public function DeleteTemplateForm() { $response = new ResponseManager(); $templateId = Kit::GetParam('layoutid', _GET, _INT); $auth = $this->user->TemplateAuth($templateId, true); if (!$auth->del) { trigger_error(__('You do not have permissions to delete this template'), E_USER_ERROR); } Theme::Set('form_id', 'DeleteForm'); Theme::Set('form_action', 'index.php?p=template&q=DeleteTemplate'); Theme::Set('form_meta', '<input type="hidden" name="templateId" value="' . $templateId . '">'); Theme::Set('form_fields', array(FormManager::AddMessage(__('Are you sure you want to delete this template?')))); $form = Theme::RenderReturn('form_render'); $response->SetFormRequestResponse($form, __('Delete Template'), '300px', '200px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Template', 'Delete') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#DeleteForm").submit()'); $response->Respond(); }
public function FileAssociations() { $displayGroupId = Kit::GetParam('DisplayGroupID', _GET, _INT); // Auth $auth = $this->user->DisplayGroupAuth($displayGroupId, true); if (!$auth->edit) { trigger_error(__('You do not have permission to edit this display group'), E_USER_ERROR); } $id = uniqid(); Theme::Set('id', $id); Theme::Set('form_meta', '<input type="hidden" name="p" value="displaygroup"><input type="hidden" name="q" value="FileAssociationsView"><input type="hidden" name="displaygroupid" value="' . $displayGroupId . '">'); Theme::Set('pager', ResponseManager::Pager($id)); // Module types filter $modules = $this->user->ModuleAuth(0, '', -1); $types = array(); foreach ($modules as $module) { $type['moduleid'] = $module['Module']; $type['module'] = $module['Name']; $types[] = $type; } array_unshift($types, array('moduleid' => '', 'module' => 'All')); Theme::Set('module_field_list', $types); // Get the currently associated media items and put them in the top bar $existing = array(); try { $dbh = PDOConnect::init(); $sth = $dbh->prepare(' SELECT media.MediaID, media.Name FROM `media` INNER JOIN `lkmediadisplaygroup` ON lkmediadisplaygroup.mediaid = media.mediaid WHERE lkmediadisplaygroup.displaygroupid = :displaygroupid '); $sth->execute(array('displaygroupid' => $displayGroupId)); $existing = $sth->fetchAll(); } catch (Exception $e) { Debug::LogEntry('error', $e->getMessage(), get_class(), __FUNCTION__); trigger_error(__('Unable to get existing assignments.'), E_USER_ERROR); } Theme::Set('existing_associations', $existing); // Call to render the template $output = Theme::RenderReturn('displaygroup_fileassociations_form_assign'); // Construct the Response $response = new ResponseManager(); $response->html = $output; $response->success = true; $response->dialogSize = true; $response->dialogClass = 'modal-big'; $response->dialogWidth = '780px'; $response->dialogHeight = '580px'; $response->dialogTitle = __('Associate an item from the Library'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DisplayGroup', 'FileAssociations') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Assign'), 'FileAssociationsSubmit(' . $displayGroupId . ')'); $response->Respond(); }
<div class="carousel-caption"> <h3><?php echo Theme::Translate('Schedule'); ?> </h3> <p><?php echo Theme::Translate('Send something down to your display and watch %s come alive! Create events on Displays / Groups for Layouts / Campaigns, create repeat events and much more.', Theme::GetConfig('app_name')); ?> </p> <div class="btn-group"> <a class="btn btn-primary btn-lg" role="button" href="index.php?p=schedule"><?php echo Theme::Translate('Schedule Event'); ?> </a> <a class="btn btn-default btn-lg" role="button" href="<?php echo HelpManager::Link('Schedule', 'General'); ?> " target="_blank"><?php echo Theme::Translate('Read more'); ?> </a> </div> </div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#new-user-welcome-carousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#new-user-welcome-carousel" role="button" data-slide="next">
public function ImportCsvForm() { global $session; $db =& $this->db; $response = new ResponseManager(); $dataSetId = Kit::GetParam('datasetid', _GET, _INT); $dataSet = Kit::GetParam('dataset', _GET, _STRING); $auth = $this->user->DataSetAuth($dataSetId, true); if (!$auth->edit) { trigger_error(__('Access Denied'), E_USER_ERROR); } // Set the Session / Security information $sessionId = session_id(); $securityToken = CreateFormToken(); $session->setSecurityToken($securityToken); // Find the max file size $maxFileSizeBytes = convertBytes(ini_get('upload_max_filesize')); // Set some information about the form Theme::Set('form_id', 'DataSetImportCsvForm'); Theme::Set('form_action', 'index.php?p=dataset&q=ImportCsv'); Theme::Set('form_meta', '<input type="hidden" name="dataset" value="' . $dataSet . '" /><input type="hidden" name="datasetid" value="' . $dataSetId . '" /><input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /><input type="hidden" name="hidFileID" id="hidFileID" value="" />'); Theme::Set('form_upload_id', 'file_upload'); Theme::Set('form_upload_action', 'index.php?p=content&q=FileUpload'); Theme::Set('form_upload_meta', '<input type="hidden" id="PHPSESSID" value="' . $sessionId . '" /><input type="hidden" id="SecurityToken" value="' . $securityToken . '" /><input type="hidden" name="MAX_FILE_SIZE" value="' . $maxFileSizeBytes . '" />'); // Enumerate over the columns in the DataSet and offer a column mapping for each one (from the file) $SQL = ""; $SQL .= "SELECT DataSetColumnID, Heading "; $SQL .= " FROM datasetcolumn "; $SQL .= sprintf(" WHERE DataSetID = %d ", $dataSetId); $SQL .= " AND DataSetColumnTypeID = 1 "; $SQL .= "ORDER BY ColumnOrder "; // Load results into an array $dataSetColumns = $db->GetArray($SQL); if (!is_array($dataSetColumns)) { trigger_error($db->error()); trigger_error(__('Error getting list of dataSetColumns'), E_USER_ERROR); } $rows = array(); $i = 0; foreach ($dataSetColumns as $row) { $i++; $row['heading'] = Kit::ValidateParam($row['Heading'], _STRING); $row['formfieldid'] = 'csvImport_' . Kit::ValidateParam($row['DataSetColumnID'], _INT); $row['auto_column_number'] = $i; $rows[] = $row; } Theme::Set('fields', $rows); $form = Theme::RenderReturn('dataset_form_csv_import'); $response->SetFormRequestResponse($form, __('CSV Import'), '350px', '200px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DataSet', 'ImportCsv') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Import'), '$("#DataSetImportCsvForm").submit()'); $response->Respond(); }
public function tidyLibraryForm() { $response = new ResponseManager(); Theme::Set('form_id', 'TidyLibraryForm'); Theme::Set('form_action', 'index.php?p=content&q=tidyLibrary'); $formFields = array(); $formFields[] = FormManager::AddMessage(__('Tidying your Library will delete any media that is not currently in use.')); // Work out how many files there are $media = Media::entriesUnusedForUser($this->user->userid); $formFields[] = FormManager::AddMessage(sprintf(__('There is %s of data stored in %d files . Are you sure you want to proceed?', Kit::formatBytes(array_sum(array_map(function ($element) { return $element['fileSize']; }, $media))), count($media)))); Theme::Set('form_fields', $formFields); $response->SetFormRequestResponse(NULL, __('Tidy Library'), '350px', '275px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Content', 'TidyLibrary') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#TidyLibraryForm").submit()'); $response->Respond(); }
/** * Copy layout form */ public function CopyForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $layoutid = Kit::GetParam('layoutid', _REQUEST, _INT); $oldLayout = Kit::GetParam('oldlayout', _REQUEST, _STRING); $copyMediaChecked = Config::GetSetting('LAYOUT_COPY_MEDIA_CHECKB') == 'Checked' ? 'checked' : ''; Theme::Set('form_id', 'LayoutCopyForm'); Theme::Set('form_action', 'index.php?p=layout&q=Copy'); Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $layoutid . '">'); Theme::Set('copy_media_checked', $copyMediaChecked); Theme::Set('new_layout_default', $oldLayout . ' 2'); $form = Theme::RenderReturn('layout_form_copy'); $response->SetFormRequestResponse($form, __('Copy a Layout.'), '350px', '275px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Layout', 'Copy') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Copy'), '$("#LayoutCopyForm").submit()'); $response->Respond(); }
/** * Shows the Delete Group Form */ function DeleteForm() { $displayProfile = new DisplayProfile(); $displayProfile->displayProfileId = Kit::GetParam('displayprofileid', _GET, _INT); if (!$displayProfile->Load()) { trigger_error($displayProfile->GetErrorMessage(), E_USER_ERROR); } if ($this->user->usertypeid != 1 && $this->user->userid != $displayProfile->userId) { trigger_error(__('You do not have permission to edit this profile'), E_USER_ERROR); } // Set some information about the form Theme::Set('form_id', 'DisplayProfileDeleteForm'); Theme::Set('form_action', 'index.php?p=displayprofile&q=Delete'); Theme::Set('form_meta', '<input type="hidden" name="displayprofileid" value="' . $displayProfile->displayProfileId . '" />'); Theme::Set('form_fields', array(FormManager::AddMessage(__('Are you sure you want to delete?')))); $response = new ResponseManager(); $response->SetFormRequestResponse(NULL, __('Delete Display Profile'), '350px', '175px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DisplayProfile', 'Delete') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#DisplayProfileDeleteForm").submit()'); $response->Respond(); }
/** * Permissions form */ public function PermissionsForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $helpManager = new HelpManager($db, $user); $templateId = Kit::GetParam('templateid', _GET, _INT); if ($templateId == 0) { trigger_error(__('No template selected'), E_USER_ERROR); } // Is this user allowed to delete this template? $auth = $this->user->TemplateAuth($templateId, true); // Set some information about the form Theme::Set('form_id', 'TemplatePermissionsForm'); Theme::Set('form_action', 'index.php?p=template&q=Permissions'); Theme::Set('form_meta', '<input type="hidden" name="templateid" value="' . $templateId . '" />'); // List of all Groups with a view/edit/delete checkbox $SQL = ''; $SQL .= 'SELECT `group`.GroupID, `group`.`Group`, View, Edit, Del, `group`.IsUserSpecific '; $SQL .= ' FROM `group` '; $SQL .= ' LEFT OUTER JOIN lktemplategroup '; $SQL .= ' ON lktemplategroup.GroupID = group.GroupID '; $SQL .= ' AND lktemplategroup.TemplateID = %d '; $SQL .= ' WHERE `group`.GroupID <> %d '; $SQL .= 'ORDER BY `group`.IsEveryone DESC, `group`.IsUserSpecific, `group`.`Group` '; $SQL = sprintf($SQL, $templateId, $user->getGroupFromId($user->userid, true)); if (!($results = $db->query($SQL))) { trigger_error($db->error()); trigger_error(__('Unable to get permissions for this template'), E_USER_ERROR); } $checkboxes = array(); while ($row = $db->get_assoc_row($results)) { $groupId = $row['GroupID']; $rowClass = $row['IsUserSpecific'] == 0 ? 'strong_text' : ''; $checkbox = array('id' => $groupId, 'name' => Kit::ValidateParam($row['Group'], _STRING), 'class' => $rowClass, 'value_view' => $groupId . '_view', 'value_view_checked' => $row['View'] == 1 ? 'checked' : '', 'value_edit' => $groupId . '_edit', 'value_edit_checked' => $row['Edit'] == 1 ? 'checked' : '', 'value_del' => $groupId . '_del', 'value_del_checked' => $row['Del'] == 1 ? 'checked' : ''); $checkboxes[] = $checkbox; } Theme::Set('form_rows', $checkboxes); $form = Theme::RenderReturn('campaign_form_permissions'); $response->SetFormRequestResponse($form, __('Permissions'), '350px', '500px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . $helpManager->Link('Template', 'Permissions') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Save'), '$("#TemplatePermissionsForm").submit()'); $response->Respond(); }
/** * Edit Form */ public function EditForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $helpManager = new HelpManager($db, $user); // Can we edit? if (Config::GetSetting('MODULE_CONFIG_LOCKED_CHECKB') == 'Checked') { trigger_error(__('Module Config Locked'), E_USER_ERROR); } $moduleId = Kit::GetParam('ModuleID', _GET, _INT); // Pull the currently known info from the DB $SQL = ''; $SQL .= 'SELECT ModuleID, '; $SQL .= ' Name, '; $SQL .= ' Enabled, '; $SQL .= ' Description, '; $SQL .= ' RegionSpecific, '; $SQL .= ' ValidExtensions, '; $SQL .= ' ImageUri, '; $SQL .= ' PreviewEnabled '; $SQL .= ' FROM `module` '; $SQL .= ' WHERE ModuleID = %d '; $SQL = sprintf($SQL, $moduleId); if (!($row = $db->GetSingleRow($SQL))) { trigger_error($db->error()); trigger_error(__('Error getting Module')); } Theme::Set('validextensions', Kit::ValidateParam($row['ValidExtensions'], _STRING)); Theme::Set('imageuri', Kit::ValidateParam($row['ImageUri'], _STRING)); Theme::Set('isregionspecific', Kit::ValidateParam($row['RegionSpecific'], _INT)); Theme::Set('enabled_checked', Kit::ValidateParam($row['Enabled'], _INT) ? 'checked' : ''); Theme::Set('preview_enabled_checked', Kit::ValidateParam($row['PreviewEnabled'], _INT) ? 'checked' : ''); // Set some information about the form Theme::Set('form_id', 'ModuleEditForm'); Theme::Set('form_action', 'index.php?p=module&q=Edit'); Theme::Set('form_meta', '<input type="hidden" name="ModuleID" value="' . $moduleId . '" />'); $form = Theme::RenderReturn('module_form_edit'); $response->SetFormRequestResponse($form, __('Edit Module'), '350px', '325px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . $helpManager->Link('Module', 'Edit') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Save'), '$("#ModuleEditForm").submit()'); $response->Respond(); }
/** * Регистрация страниц SDK */ private function registerSdkFoldings() { $this->register(PopupPagesManager::inst()); $this->register(PluginsManager::inst()); $this->register(TimeLineManager::inst()); $this->register(UserPointsManager::inst()); $this->register(StockManager::inst()); $this->register(HelpManager::inst()); $this->register(EmailManager::inst()); $this->register(PSForm::inst()); $this->register(DialogManager::inst()); $this->register(PageBuilder::inst()); //Библиотеки $this->register(PoetsManager::inst()); $this->register(ScientistsManager::inst()); //Админские страницы $this->register(APagesResources::inst()); }
public static function GetPageHelpLink() { return HelpManager::Link(); }
/** * Return the Edit Form as HTML * @return */ public function EditForm() { $this->response = new ResponseManager(); // Edit calls are the same as add calls, except you will to check the user has permissions to do the edit if (!$this->auth->edit) { $this->response->SetError('You do not have permission to edit this assignment.'); $this->response->keepOpen = false; return $this->response; } // All forms should set some meta data about the form. // Usually, you would want this meta data to remain the same. Theme::Set('form_id', 'ModuleForm'); Theme::Set('form_action', 'index.php?p=module&mod=' . $this->type . '&q=Exec&method=EditMedia'); Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $this->layoutid . '"><input type="hidden" id="iRegionId" name="regionid" value="' . $this->regionid . '"><input type="hidden" name="showRegionOptions" value="' . $this->showRegionOptions . '" /><input type="hidden" id="mediaid" name="mediaid" value="' . $this->mediaid . '">'); // Extract the format from the raw node in the XLF $rawXml = new DOMDocument(); $rawXml->loadXML($this->GetRaw()); $formatNodes = $rawXml->getElementsByTagName('format'); $formatNode = $formatNodes->item(0); $formFields = array(); // Offer a choice of clock type $formFields[] = FormManager::AddCombo('clockTypeId', __('Clock Type'), $this->GetOption('clockTypeId'), array(array('clockTypeId' => '1', 'clockType' => 'Analogue'), array('clockTypeId' => '2', 'clockType' => 'Digital'), array('clockTypeId' => '3', 'clockType' => 'Flip Clock')), 'clockTypeId', 'clockType', __('Please select the type of clock to display.'), 'c'); $formFields[] = FormManager::AddNumber('duration', __('Duration'), $this->duration, __('The duration in seconds this item should be displayed'), 'd', 'required'); $formFields[] = FormManager::AddNumber('offset', __('Offset'), $this->GetOption('offset'), __('The offset in minutes that should be applied to the current time.'), 'o', NULL, 'offset-control-group'); // Offer a choice of theme $formFields[] = FormManager::AddCombo('themeid', __('Theme'), $this->GetOption('theme'), array(array('themeid' => '1', 'theme' => 'Light'), array('themeid' => '2', 'theme' => 'Dark')), 'themeid', 'theme', __('Please select a theme for the clock.'), 't', 'analogue-control-group'); $formFields[] = FormManager::AddMessage(sprintf(__('Enter a format for the Digital Clock below. e.g. [HH:mm] or [DD/MM/YYYY]. See the <a href="%s" target="_blank">format guide</a> for more information.'), HelpManager::Link('Widget', 'ClockFormat')), 'digital-control-group'); $formFields[] = FormManager::AddMultiText('ta_text', NULL, $formatNode != NULL ? $formatNode->nodeValue : '', __('Enter a format for the clock'), 'f', 10, '', 'digital-control-group'); Theme::Set('form_fields', $formFields); // Dependencies (some fields should be shown / hidden) $this->SetFieldDependencies(); // Modules should be rendered using the theme engine. $this->response->html = Theme::RenderReturn('form_render'); $this->response->dialogTitle = __('Edit Clock'); $this->response->callBack = 'text_callback'; // The response object outputs the required JSON object to the browser // which is then processed by the CMS JavaScript library (xibo-cms.js). if ($this->showRegionOptions) { $this->response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $this->layoutid . '®ionid=' . $this->regionid . '&q=RegionOptions")'); } else { $this->response->AddButton(__('Cancel'), 'XiboDialogClose()'); } $this->response->AddButton(__('Apply'), 'XiboDialogApply("#ModuleForm")'); $this->response->AddButton(__('Save'), '$("#ModuleForm").submit()'); // The response must be returned. return $this->response; }
/** * Displays the Library Assign form * @return */ function LayoutAssignForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); // Input vars $campaignId = Kit::GetParam('CampaignID', _GET, _INT); $id = uniqid(); Theme::Set('id', $id); Theme::Set('form_meta', '<input type="hidden" name="p" value="campaign"><input type="hidden" name="q" value="LayoutAssignView">'); Theme::Set('pager', ResponseManager::Pager($id)); // Get the currently assigned layouts and put them in the "well" // // Layouts in group $SQL = "SELECT layout.Layoutid, "; $SQL .= " layout.layout, "; $SQL .= " CONCAT('LayoutID_', layout.LayoutID) AS list_id "; $SQL .= "FROM layout "; $SQL .= " INNER JOIN lkcampaignlayout "; $SQL .= " ON lkcampaignlayout.LayoutID = layout.LayoutID "; $SQL .= sprintf("WHERE lkcampaignlayout.CampaignID = %d", $campaignId); $SQL .= " ORDER BY lkcampaignlayout.DisplayOrder "; $layoutsAssigned = $db->GetArray($SQL); if (!is_array($layoutsAssigned)) { trigger_error($db->error()); trigger_error(__('Error getting Layouts'), E_USER_ERROR); } Debug::LogEntry('audit', count($layoutsAssigned) . ' layouts assigned already'); // Set the layouts assigned Theme::Set('layouts_assigned', $layoutsAssigned); // Call to render the template $output = Theme::RenderReturn('campaign_form_layout_assign'); // Construct the Response $response->html = $output; $response->success = true; $response->dialogSize = true; $response->dialogWidth = '780px'; $response->dialogHeight = '580px'; $response->dialogTitle = __('Layouts on Campaign'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Campaign', 'Layouts') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Save'), 'LayoutsSubmit("' . $campaignId . '")'); $response->Respond(); }
/** * Permissions form */ public function PermissionsForm() { $db =& $this->db; $user =& $this->user; $response = $this->response; $helpManager = new HelpManager($db, $user); if (!$this->auth->modifyPermissions) { trigger_error(__('You do not have permissions to edit this media'), E_USER_ERROR); } // Form content $form = '<form id="LayoutPermissionsForm" class="XiboForm" method="post" action="index.php?p=module&mod=' . $this->type . '&q=Exec&method=Permissions">'; $form .= '<input type="hidden" name="layoutid" value="' . $this->layoutid . '" />'; $form .= '<input type="hidden" name="regionid" value="' . $this->regionid . '" />'; $form .= '<input type="hidden" name="mediaid" value="' . $this->mediaid . '" />'; $form .= ' <table class="table table-bordered">'; $form .= ' <tr>'; $form .= ' <th>' . __('Group') . '</th>'; $form .= ' <th>' . __('View') . '</th>'; $form .= ' <th>' . __('Edit') . '</th>'; $form .= ' <th>' . __('Delete') . '</th>'; $form .= ' </tr>'; // List of all Groups with a view/edit/delete checkbox $SQL = ''; $SQL .= 'SELECT `group`.GroupID, `group`.`Group`, View, Edit, Del, `group`.IsUserSpecific '; $SQL .= ' FROM `group` '; if ($this->assignedMedia) { $SQL .= ' LEFT OUTER JOIN lklayoutmediagroup '; $SQL .= ' ON lklayoutmediagroup.GroupID = group.GroupID '; $SQL .= sprintf(" AND lklayoutmediagroup.MediaID = '%s' AND lklayoutmediagroup.RegionID = '%s' AND lklayoutmediagroup.LayoutID = %d ", $this->mediaid, $this->regionid, $this->layoutid); } else { $SQL .= ' LEFT OUTER JOIN lkmediagroup '; $SQL .= ' ON lkmediagroup.GroupID = group.GroupID '; $SQL .= sprintf(' AND lkmediagroup.MediaID = %d ', $this->mediaid); } $SQL .= ' WHERE `group`.GroupID <> %d '; $SQL .= 'ORDER BY `group`.IsEveryone DESC, `group`.IsUserSpecific, `group`.`Group` '; $SQL = sprintf($SQL, $user->getGroupFromId($user->userid, true)); Debug::LogEntry('audit', $SQL, 'module', 'PermissionsForm'); if (!($results = $db->query($SQL))) { trigger_error($db->error()); trigger_error(__('Unable to get permissions for this layout'), E_USER_ERROR); } while ($row = $db->get_assoc_row($results)) { $groupId = $row['GroupID']; $group = $row['IsUserSpecific'] == 0 ? '<strong>' . $row['Group'] . '</strong>' : $row['Group']; $form .= '<tr>'; $form .= ' <td>' . $group . '</td>'; $form .= ' <td><input type="checkbox" name="groupids[]" value="' . $groupId . '_view" ' . ($row['View'] == 1 ? 'checked' : '') . '></td>'; $form .= ' <td><input type="checkbox" name="groupids[]" value="' . $groupId . '_edit" ' . ($row['Edit'] == 1 ? 'checked' : '') . '></td>'; $form .= ' <td><input type="checkbox" name="groupids[]" value="' . $groupId . '_del" ' . ($row['Del'] == 1 ? 'checked' : '') . '></td>'; $form .= '</tr>'; } $form .= '</table>'; $form .= '</form>'; $response->SetFormRequestResponse($form, __('Permissions'), '350px', '500px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . ($this->layoutid != 0 ? $helpManager->Link('LayoutMedia', 'Permissions') : $helpManager->Link('Media', 'Permissions')) . '")'); if ($this->assignedMedia) { $response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $this->layoutid . '®ionid=' . $this->regionid . '&q=RegionOptions")'); } else { $response->AddButton(__('Cancel'), 'XiboDialogClose()'); } $response->AddButton(__('Save'), '$("#LayoutPermissionsForm").submit()'); return $response; }
/** * Edit Form */ public function VerifyForm() { $user =& $this->user; $response = new ResponseManager(); $helpManager = new HelpManager(NULL, $user); // Set some information about the form Theme::Set('form_id', 'VerifyForm'); Theme::Set('form_action', 'index.php?p=module&q=Verify'); $formFields = array(); $formFields[] = FormManager::AddMessage(__('Verify all modules have been installed correctly by reinstalling any module related files')); Theme::Set('form_fields', $formFields); $response->SetFormRequestResponse(NULL, __('Verify'), '350px', '325px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . $helpManager->Link('Module', 'Edit') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Verify'), '$("#VerifyForm").submit()'); $response->Respond(); }
/** * Permissions form */ public function PermissionsForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $helpManager = new HelpManager($db, $user); if (!$this->auth->modifyPermissions) { trigger_error(__('You do not have permissions to edit this media'), E_USER_ERROR); } // List of all Groups with a view / edit / delete check box $permissions = new UserGroup(); if ($this->assignedMedia) { if (!($result = $permissions->GetPermissionsForObject('lklayoutmediagroup', NULL, NULL, sprintf(" AND lklayoutmediagroup.MediaID = '%s' AND lklayoutmediagroup.RegionID = '%s' AND lklayoutmediagroup.LayoutID = %d ", $this->mediaid, $this->regionid, $this->layoutid)))) { trigger_error($permissions->GetErrorMessage(), E_USER_ERROR); } } else { if (!($result = $permissions->GetPermissionsForObject('lkmediagroup', 'MediaID', $this->mediaid))) { trigger_error($permissions->GetErrorMessage(), E_USER_ERROR); } } if (count($result) <= 0) { trigger_error(__('Unable to get permissions'), E_USER_ERROR); } $checkboxes = array(); foreach ($result as $row) { $groupId = $row['groupid']; $rowClass = $row['isuserspecific'] == 0 ? 'strong_text' : ''; $checkbox = array('id' => $groupId, 'name' => Kit::ValidateParam($row['group'], _STRING), 'class' => $rowClass, 'value_view' => $groupId . '_view', 'value_view_checked' => $row['view'] == 1 ? 'checked' : '', 'value_edit' => $groupId . '_edit', 'value_edit_checked' => $row['edit'] == 1 ? 'checked' : '', 'value_del' => $groupId . '_del', 'value_del_checked' => $row['del'] == 1 ? 'checked' : ''); $checkboxes[] = $checkbox; } $formFields = array(); $formFields[] = FormManager::AddPermissions('groupids[]', $checkboxes); Theme::Set('form_fields', $formFields); // Set some information about the form Theme::Set('form_id', 'LayoutPermissionsForm'); Theme::Set('form_action', 'index.php?p=module&mod=' . $this->type . '&q=Exec&method=Permissions'); Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $this->layoutid . '" /><input type="hidden" name="regionid" value="' . $this->regionid . '" /><input type="hidden" name="mediaid" value="' . $this->mediaid . '" />'); $response->SetFormRequestResponse(NULL, __('Permissions'), '350px', '500px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . ($this->layoutid != 0 ? $helpManager->Link('LayoutMedia', 'Permissions') : $helpManager->Link('Media', 'Permissions')) . '")'); if ($this->assignedMedia) { $response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $this->layoutid . '®ionid=' . $this->regionid . '&q=RegionOptions")'); } else { $response->AddButton(__('Cancel'), 'XiboDialogClose()'); } $response->AddButton(__('Save'), '$("#LayoutPermissionsForm").submit()'); return $response; }
/** * Shows the DeleteEvent form * @return */ function DeleteForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $eventID = Kit::GetParam('EventID', _GET, _INT, 0); if ($eventID == 0) { trigger_error(__('No event selected.'), E_USER_ERROR); } Theme::Set('form_id', 'DeleteEventForm'); Theme::Set('form_action', 'index.php?p=schedule&q=DeleteEvent'); Theme::Set('form_meta', '<input type="hidden" name="EventID" value="' . $eventID . '" />'); Theme::Set('form_fields', array(FormManager::AddMessage(__('Are you sure you want to delete this event from <b>all</b> displays? If you only want to delete this item from certain displays, please deselect the displays in the edit dialogue and click Save.')))); $response->SetFormRequestResponse(NULL, __('Delete Event.'), '480px', '240px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Schedule', 'Delete') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#DeleteEventForm").submit()'); $response->Respond(); }
public function TidyLibraryForm() { $response = new ResponseManager(); Theme::Set('form_id', 'TidyLibraryForm'); Theme::Set('form_action', 'index.php?p=admin&q=TidyLibrary'); $formFields = array(); $formFields[] = FormManager::AddMessage(__('Tidying the Library will delete any temporary files. Are you sure you want to proceed?')); // Check box to also delete un-used media that has been revised. $formFields[] = FormManager::AddCheckbox('tidyOldRevisions', __('Remove old revisions'), 0, __('Cleaning up old revisions of media will result in any unused media revisions being permanently deleted.'), ''); // Check box to tidy up un-used files $formFields[] = FormManager::AddCheckbox('cleanUnusedFiles', __('Remove all media not currently in use?'), 0, __('Selecting this option will remove any media that is not currently being used in Layouts or linked to Displays. This process cannot be reversed.'), ''); Theme::Set('form_fields', $formFields); $response->SetFormRequestResponse(NULL, __('Tidy Library'), '350px', '275px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Settings', 'TidyLibrary') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#TidyLibraryForm").submit()'); $response->Respond(); }
public function ImportForm() { global $session; $db =& $this->db; $response = new ResponseManager(); // Set the Session / Security information $sessionId = session_id(); $securityToken = CreateFormToken(); $session->setSecurityToken($securityToken); // Find the max file size $maxFileSizeBytes = convertBytes(ini_get('upload_max_filesize')); // Set some information about the form Theme::Set('form_id', 'LayoutImportForm'); Theme::Set('form_action', 'index.php?p=layout&q=Import'); Theme::Set('form_meta', '<input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /><input type="hidden" name="hidFileID" id="hidFileID" value="" /><input type="hidden" name="template" value="' . Kit::GetParam('template', _GET, _STRING, 'false') . '" />'); Theme::Set('form_upload_id', 'file_upload'); Theme::Set('form_upload_action', 'index.php?p=content&q=FileUpload'); Theme::Set('form_upload_meta', '<input type="hidden" id="PHPSESSID" value="' . $sessionId . '" /><input type="hidden" id="SecurityToken" value="' . $securityToken . '" /><input type="hidden" name="MAX_FILE_SIZE" value="' . $maxFileSizeBytes . '" />'); Theme::Set('prepend', Theme::RenderReturn('form_file_upload_single')); $formFields = array(); $formFields[] = FormManager::AddText('layout', __('Name'), NULL, __('The Name of the Layout - (1 - 50 characters). Leave blank to use the name from the import.'), 'n'); $formFields[] = FormManager::AddCheckbox('replaceExisting', __('Replace Existing Media?'), NULL, __('If the import finds existing media with the same name, should it be replaced in the Layout or should the Layout use that media.'), 'r'); if (Kit::GetParam('template', _GET, _STRING, 'false') != 'true') { $formFields[] = FormManager::AddCheckbox('importTags', __('Import Tags?'), NULL, __('Would you like to import any tags contained on the layout.'), 't'); } Theme::Set('form_fields', $formFields); $response->SetFormRequestResponse(NULL, __('Import Layout'), '350px', '200px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DataSet', 'ImportCsv') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Import'), '$("#LayoutImportForm").submit()'); $response->Respond(); }
/** * Displays the Library Assign form * @return */ function LibraryAssignForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $id = uniqid(); Theme::Set('id', $id); Theme::Set('form_meta', '<input type="hidden" name="p" value="content"><input type="hidden" name="q" value="LibraryAssignView">'); Theme::Set('pager', ResponseManager::Pager($id)); // Module types filter $modules = $this->user->ModuleAuth(0, '', 1); $types = array(); foreach ($modules as $module) { $type['moduleid'] = $module['Module']; $type['module'] = $module['Name']; $types[] = $type; } array_unshift($types, array('moduleid' => '', 'module' => 'All')); Theme::Set('module_field_list', $types); // Call to render the template $output = Theme::RenderReturn('library_form_assign'); // Input vars $layoutId = Kit::GetParam('layoutid', _REQUEST, _INT); $regionId = Kit::GetParam('regionid', _REQUEST, _STRING); // Construct the Response $response->html = $output; $response->success = true; $response->dialogSize = true; $response->dialogClass = 'modal-big'; $response->dialogWidth = '780px'; $response->dialogHeight = '580px'; $response->dialogTitle = __('Assign an item from the Library'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Library', 'Assign') . '")'); $response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $layoutId . '®ionid=' . $regionId . '&q=RegionOptions")'); $response->AddButton(__('Assign'), 'LibraryAssignSubmit("' . $layoutId . '","' . $regionId . '")'); $response->Respond(); }
function ConfirmLogout() { $db =& $this->db; $response = new ResponseManager(); $userid = Kit::GetParam('userid', _GET, _INT); // Set some information about the form Theme::Set('form_id', 'SessionsLogoutForm'); Theme::Set('form_action', 'index.php?p=sessions&q=LogoutUser'); Theme::Set('form_meta', '<input type="hidden" name="userid" value="' . $userid . '" />'); Theme::Set('form_fields', array(FormManager::AddMessage(__('Are you sure you want to logout this user?')))); $response->SetFormRequestResponse(NULL, __('Logout User'), '430px', '200px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Sessions', 'Logout') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#SessionsLogoutForm").submit()'); $response->Respond(); }
/** * Shows the Authorised applications this user has */ public function UserTokens() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $store = OAuthStore::instance(); try { $list = $store->listConsumerTokens(Kit::GetParam('userID', _GET, _INT)); } catch (OAuthException $e) { trigger_error($e->getMessage()); trigger_error(__('Error listing Log.'), E_USER_ERROR); } $rows = array(); foreach ($list as $app) { $app['application_title'] = Kit::ValidateParam($app['application_title'], _STRING); $app['enabled'] = Kit::ValidateParam($app['enabled'], _STRING); $app['status'] = Kit::ValidateParam($app['status'], _STRING); $rows[] = $app; } Theme::Set('table_rows', $rows); $output = Theme::RenderReturn('application_form_user_applications'); $response->SetFormRequestResponse($output, __('Authorized applications for user'), '650', '450'); $response->AddButton(__('Help'), "XiboHelpRender('" . HelpManager::Link('User', 'Applications') . "')"); $response->AddButton(__('Close'), 'XiboDialogClose()'); $response->Respond(); }
/** * Member of Display Groups Form */ public function MemberOfForm() { $db =& $this->db; $response = new ResponseManager(); $displayID = Kit::GetParam('DisplayID', _REQUEST, _INT); // Auth $auth = $this->user->DisplayGroupAuth($this->GetDisplayGroupId($displayID), true); if (!$auth->modifyPermissions) { trigger_error(__('You do not have permission to change Display Groups on this display'), E_USER_ERROR); } // There needs to be two lists here. // - DisplayGroups this Display is already assigned to // - DisplayGroups this Display could be assigned to // Set some information about the form Theme::Set('displaygroups_assigned_id', 'displaysIn'); Theme::Set('displaygroups_available_id', 'displaysOut'); Theme::Set('displaygroups_assigned_url', 'index.php?p=display&q=SetMemberOf&DisplayID=' . $displayID); // Display Groups Assigned $SQL = ""; $SQL .= "SELECT displaygroup.DisplayGroupID, "; $SQL .= " displaygroup.DisplayGroup, "; $SQL .= " CONCAT('DisplayGroupID_', displaygroup.DisplayGroupID) AS list_id "; $SQL .= "FROM displaygroup "; $SQL .= " INNER JOIN lkdisplaydg ON lkdisplaydg.DisplayGroupID = displaygroup.DisplayGroupID "; $SQL .= sprintf("WHERE lkdisplaydg.DisplayID = %d ", $displayID); $SQL .= " AND displaygroup.IsDisplaySpecific = 0 "; $SQL .= " ORDER BY displaygroup.DisplayGroup "; $displaygroupsAssigned = $db->GetArray($SQL); if (!is_array($displaygroupsAssigned)) { trigger_error($db->error()); trigger_error(__('Error getting Display Groups'), E_USER_ERROR); } Theme::Set('displaygroups_assigned', $displaygroupsAssigned); // Display Groups not assigned $SQL = ""; $SQL .= "SELECT displaygroup.DisplayGroupID, "; $SQL .= " displaygroup.DisplayGroup, "; $SQL .= " CONCAT('DisplayGroupID_', displaygroup.DisplayGroupID) AS list_id "; $SQL .= " FROM displaygroup "; $SQL .= " WHERE displaygroup.IsDisplaySpecific = 0 "; $SQL .= " AND displaygroup.DisplayGroupID NOT IN "; $SQL .= " (SELECT lkdisplaydg.DisplayGroupID "; $SQL .= " FROM lkdisplaydg "; $SQL .= sprintf(" WHERE lkdisplaydg.DisplayID = %d ", $displayID); $SQL .= " )"; $SQL .= " ORDER BY displaygroup.DisplayGroup "; Debug::LogEntry('audit', $SQL); $displaygroups_available = $db->GetArray($SQL); if (!is_array($displaygroups_available)) { trigger_error($db->error()); trigger_error(__('Error getting Display Groups'), E_USER_ERROR); } Theme::Set('displaygroups_available', $displaygroups_available); // Render the theme $form = Theme::RenderReturn('display_form_group_assign'); $response->SetFormRequestResponse($form, __('Manage Membership'), '400', '375', 'DisplayGroupManageMembersCallBack'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DisplayGroup', 'Members') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Save'), 'DisplayGroupMembersSubmit()'); $response->Respond(); }
/** * Resolution Delete Form */ function DeleteForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $resolutionid = Kit::GetParam('resolutionid', _GET, _INT); // Set some information about the form Theme::Set('form_id', 'DeleteForm'); Theme::Set('form_action', 'index.php?p=resolution&q=Delete'); Theme::Set('form_meta', '<input type="hidden" name="resolutionid" value="' . $resolutionid . '" />'); Theme::Set('form_fields', array(FormManager::AddMessage(__('Are you sure you want to delete?')))); $response->SetFormRequestResponse(Theme::RenderReturn('form_render'), __('Delete Resolution'), '250px', '150px'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Campaign', 'Delete') . '")'); $response->AddButton(__('No'), 'XiboDialogClose()'); $response->AddButton(__('Yes'), '$("#DeleteForm").submit()'); $response->Respond(); }
/** * Displays the Library Assign form * @return */ function LayoutAssignForm() { $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); // Input vars $campaignId = Kit::GetParam('CampaignID', _GET, _INT); $id = uniqid(); Theme::Set('id', $id); Theme::Set('form_meta', '<input type="hidden" name="p" value="campaign"><input type="hidden" name="q" value="LayoutAssignView">'); Theme::Set('pager', ResponseManager::Pager($id, 'grid_pager')); // Get the currently assigned layouts and put them in the "well" $layoutsAssigned = Layout::Entries(array('lkcl.DisplayOrder'), array('campaignId' => $campaignId)); if (!is_array($layoutsAssigned)) { trigger_error($db->error()); trigger_error(__('Error getting Layouts'), E_USER_ERROR); } Debug::LogEntry('audit', count($layoutsAssigned) . ' layouts assigned already'); $formFields = array(); $formFields[] = FormManager::AddText('filter_name', __('Name'), NULL, NULL, 'l'); $formFields[] = FormManager::AddText('filter_tags', __('Tags'), NULL, NULL, 't'); Theme::Set('form_fields', $formFields); // Set the layouts assigned Theme::Set('layouts_assigned', $layoutsAssigned); Theme::Set('append', Theme::RenderReturn('campaign_form_layout_assign')); // Call to render the template Theme::Set('header_text', __('Choose Layouts')); $output = Theme::RenderReturn('grid_render'); // Construct the Response $response->html = $output; $response->success = true; $response->dialogSize = true; $response->dialogWidth = '780px'; $response->dialogHeight = '580px'; $response->dialogTitle = __('Layouts on Campaign'); $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('Campaign', 'Layouts') . '")'); $response->AddButton(__('Cancel'), 'XiboDialogClose()'); $response->AddButton(__('Save'), 'LayoutsSubmit("' . $campaignId . '")'); $response->Respond(); }
private function __construct() { PsProfiler::inst(__CLASS__)->start(__FUNCTION__); $managers = array(MagManager::inst(), BlogManager::inst(), TrainManager::inst()); foreach ($managers as $manager) { //Соберём типы постов $this->postTypes[] = $manager->getPostType(); if ($manager instanceof RubricsProcessor) { $this->rubricsProcessors[$manager->getPostType()] = $manager; $this->foldings[] = $manager->getRubricsFolding(); } if ($manager instanceof PostsProcessor) { $this->postsProcessors[$manager->getPostType()] = $manager; $this->foldings[] = $manager->getFolding(); } if ($manager instanceof CommentsProcessor) { $this->commentProcessors[$manager->getPostType()] = $manager; $this->discussionControllers[$manager->getDiscussionController()->getDiscussionUnique()] = $manager->getDiscussionController(); } if ($manager instanceof PagePreloadListener) { $this->pagePreloadListeners[] = $manager; } if ($manager instanceof NewsProvider) { $this->newsProviders[$manager->getNewsEventType()] = $manager; } } //Контроллеры дискуссий $this->discussionControllers[FeedbackManager::inst()->getDiscussionUnique()] = FeedbackManager::inst(); //Фолдинги $this->foldings[] = PopupPagesManager::inst(); $this->foldings[] = PluginsManager::inst(); $this->foldings[] = IdentPagesManager::inst(); $this->foldings[] = TimeLineManager::inst(); $this->foldings[] = TemplateMessages::inst(); $this->foldings[] = UserPointsManager::inst(); $this->foldings[] = StockManager::inst(); $this->foldings[] = HelpManager::inst(); $this->foldings[] = EmailManager::inst(); $this->foldings[] = PSForm::inst(); $this->foldings[] = DialogManager::inst(); //Библиотеки $this->foldings[] = PoetsManager::inst(); $this->foldings[] = ScientistsManager::inst(); //Админские страницы $this->foldings[] = APagesResources::inst(); //Базовые страницы $this->foldings[] = BasicPagesManager::inst(); //Построитель страниц $this->foldings[] = PageBuilder::inst(); //Управление списком предпросмотра постов $this->foldings[] = ShowcasesCtrlManager::inst(); //Элементы в правой панели навигации $this->foldings[] = ClientBoxManager::inst(); /* * Выделим различные подклассы фолдингов */ foreach ($this->foldings as $folding) { //Фолдинги библиотек if ($folding instanceof LibResources) { $this->libs[] = $folding; } //Фолдинги обработчиков постов if ($folding instanceof PostFoldedResources) { $this->postProcessorFoldings[] = $folding; } //Фолдинги для баблов if ($folding instanceof BubbledFolding) { $this->bubbles[] = $folding; } //Фолдинги, предоставляющие панели if ($folding instanceof PanelFolding) { $this->panels[] = $folding; } //Фолдинги, финализирующие контент страницы if ($folding instanceof PageFinalizerFolding) { $this->pageFinaliseFoldings[] = $folding; } //Индексированный список фолдингов $this->folding2unique[$folding->getUnique()] = $folding; //Префиксы smarty к фолдингам $this->folding2smartyPrefix[$folding->getSmartyPrefix()] = $folding; //Префиксы классов к фолдингам if ($folding->getClassPrefix()) { $this->folding2classPrefix[$folding->getClassPrefix()] = $folding; } } PsProfiler::inst(__CLASS__)->stop(); }