示例#1
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_gallery_list':
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = false;
                 $galleries = $this->_tree->GetChilds(1, 'ASC', 0, 0, '_GALLERY');
                 $sel_galleries = array(array("value" => "", "text" => ""));
                 foreach ($galleries as $gallery) {
                     $node = $this->_tree->GetNodeParam($gallery["id"]);
                     $sel_galleries[] = array("value" => $gallery["id"], "text" => $node["Name"]);
                 }
                 $this->result['action_properties_form']['GalleryStartId'] = $sel_galleries;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers(array('show_gallery_server', 'show_selected_gallery')), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_selected_album':
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = true;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $pppp = $pages->get_page_module_servers('show_search_results');
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_search_results'), 'id', 'params', 'Name'), false, true);
                 $albums = $this->_tree->GetChilds();
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_from_folder':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('gallery');
                 $this->result['xlist'] = false;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $pppp = $pages->get_page_module_servers('show_search_results');
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_search_results'), 'id', 'params', 'Name'), false, true);
                 $albums = $this->_tree->GetChilds();
                 $this->result['action_properties_form']['GalleryStart'] = XHTML::arr_select_opt(XARRAY::arr_to_keyarr($this->_tree->GetChilds(1), 'id', 'basic'), $category_selected, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_gallery_server':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('gallery');
                 $this->result['xlist'] = null;
                 $this->result['action_properties_form']['MTemplate'] = $this->get_template_list($this->_module_name, array('.show_selected_album.html'));
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_search_results':
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = false;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array(''));
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
         }
     }
 }
示例#2
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         switch ($parameters['Action']) {
             case 'show_subscribe_form':
                 $this->result['xlist'] = true;
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['news_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_news_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('subscriber_page'), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 break;
             case 'subscriber_page':
                 $albums = $this->_tree->GetChilds();
                 $this->result['action_properties_form']['subscribeStart'] = XHTML::arr_select_opt(XARRAY::arr_to_keyarr($this->_tree->GetChilds(1), 'id', 'basic'), $category_selected, true);
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = false;
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['aTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 break;
         }
     }
 }
示例#3
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_level_menu':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('menu', array('.' . $parameters['Action'] . '.html'));
                 $this->result['xlist'] = true;
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_level_menu2':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('menu', array('.' . $parameters['Action'] . '.html'));
                 $this->result['xlist'] = true;
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_map':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('menu', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_user_menu':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('menu', array('.show_level_menu.html', '.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 $this->result['action_properties_form']['menu'] = $this->generate_select_umenus();
                 break;
             case 'show_path':
                 $this->result['action_properties'] = true;
                 $TMS->AddFileSection(Common::get_module_tpl($this->_module_name, 'ainterface.html'));
                 $files = Common::get_module_template_list('menu', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
         }
     }
 }
示例#4
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_search_form':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('search', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), null, true);
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('search_server'), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection('show_search_form');
                 break;
             case 'search_server':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), null, true);
                 $this->lct['action_properties'] = $TMS->parseSection('search_server');
                 break;
         }
     }
 }
示例#5
0
 /**
  * Expand a translated string, and escape the output to meet XHTML safety needs
  *
  * @param string $module  where is the translation for this string?
  * @param string $message what is the name of this translation?
  * @param array  $params  any parameters required by the translation
  * @return string the translated string, expanded and suitably escaped for XHTML
  */
 public static function translation($module, $message, $params = array())
 {
     return XHTML::escapeOutput(app_translation($module, $message, $params), ENT_QUOTES, 'UTF-8', false);
 }
示例#6
0
 function get_childs($params)
 {
     if (!$params[0]['obj_type']) {
         $obj_type = array('obj_type' => array('_CATOBJ', '_CATGROUP'));
     }
     if ($nodes = $this->_tree->GetChildsParam($params[0]['id'], '%', true, $obj_type)) {
         switch ($params[0]['as']) {
             case 'options':
                 return XHTML::as_select_opt(XARRAY::arr_to_lev($nodes, 'id', 'params', 'Name'), $params[0]['selected']);
                 break;
             default:
                 return $nodes;
         }
     }
 }
示例#7
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_categories':
                 $this->result['xlist'] = true;
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_faq_server'), 'id', 'params', 'Name'), false, true);
                 $root = $this->_tree->GetChildsParam(1);
                 $this->result['action_properties_form']['folder'] = XHTML::arr_select_opt(XARRAY::askeyval($root, 'Name'), null, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 $files = Common::get_module_template_list($this->_module_name, array('.show_categories.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 break;
             case 'show_folder_questions':
                 $this->result['xlist'] = true;
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_faq_server'), 'id', 'params', 'Name'), false, true);
                 $root = $this->_tree->GetChildsParam(1);
                 $this->result['action_properties_form']['folder'] = XHTML::arr_select_opt(XARRAY::askeyval($root, 'Name'), null, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 break;
             case 'show_faq_server':
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = false;
                 $files = Common::get_module_template_list($this->_module_name, array('.show_question.html'));
                 $this->result['action_properties_form']['qTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $files = Common::get_module_template_list($this->_module_name, array('.show_category.html'));
                 $this->result['action_properties_form']['cTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 $root = $this->_tree->GetChildsParam(1);
                 $this->result['action_properties_form']['root'] = XHTML::arr_select_opt(XARRAY::askeyval($root, 'Name'), null, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_selected_category':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_faq_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['xlist'] = true;
                 $files = Common::get_module_template_list($this->_module_name, array('.show_category.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_faq_search':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_faq_search_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['xlist'] = false;
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_faq_search_server':
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = false;
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['MDestination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_faq_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list($this->_module_name, array('.show_search_results.html'));
                 $this->result['action_properties_form']['MTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
         }
     }
 }
示例#8
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_selected_banner':
                 $this->result['action_properties'] = true;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html', '.show_random_banner.html'));
                 $this->result['xlist'] = true;
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_random_banner':
                 $this->result['action_properties'] = true;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html', '.show_selected_banner.html'));
                 $this->result['action_properties']['category'] = XHTML::arr_select_opt(XARRAY::arr_to_keyarr($this->_tree->GetChilds(1), 'id', 'basic'), $category_selected, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_banners_from_group':
                 $this->result['action_properties'] = true;
                 $this->result['action_properties_form']['Template'] = $this->get_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties']['category'] = XHTML::arr_select_opt(XARRAY::arr_to_keyarr($this->_tree->GetChilds(1), 'id', 'basic'), $category_selected, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
         }
     }
 }
示例#9
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_news_by_author':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_news_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list($this->_module_name, array('.show_news_interval.html', '.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 Common::call_common_instance('users');
                 $users =& users_module_common::getInstance();
                 $this->result['action_properties_form']['author_id'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($users->load_users_list(true), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_news_interval':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_news_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->get_categories('action_properties_form', null, true, 'Category');
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_news_archive':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_news_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list($this->_module_name, array('.show_news_interval.html', '.' . $parameters['Action'] . '.html'));
                 $this->get_categories('action_properties_form', null, true, 'Category');
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_news_categories':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_news_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['TemplateInterval'] = $this->result['action_properties_form']['Template'];
                 $this->result['action_properties_form']['TemplateSingle'] = $this->result['action_properties_form']['Template'];
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_news_server':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list($this->_module_name, array('.show_news_interval.html', '.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 $this->result['action_properties_form']['MTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
         }
     }
 }
示例#10
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_last_comments':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list($this->_module_name, array('.' . $parameters['Action'] . '.html'));
                 $childs = $this->_tree->GetChildsParam(1, array('Alias'));
                 $childs = XARRAY::askeyval($childs, 'Alias');
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), null, true);
                 $this->result['action_properties_form']['treads'] = XHTML::arr_select_opt($childs, null);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
         }
     }
 }
示例#11
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_forms':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $files = Common::get_module_template_list('forms', array('.' . $parameters['Action'] . '.html'));
                 $this->result['xlist'] = true;
                 $this->result['action_properties_form']['Template_group'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['Template1'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             default:
                 break;
         }
     }
 }
示例#12
0
 function get_template_list($module_name, $actions)
 {
     $files = Common::get_module_template_list($module_name, $actions);
     $files_aliases = array();
     foreach ($files as $file) {
         for ($i = 0; $i < count($actions); $i++) {
             $file = str_replace($actions[$i], '', $file);
         }
         $files_aliases[] = $file;
     }
     return XHTML::arr_select_opt(XARRAY::combine($files_aliases, $files), $se, true);
 }
示例#13
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         switch ($parameters['Action']) {
             case 'show_content':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('content', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 //включает xlist
                 $this->result['xlist'] = true;
                 $this->result['action_template'] = true;
                 $this->lct['action_properties'] = $TMS->parseSection('show_content');
                 break;
             case 'show_content_announce':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('content', array('show_content', '.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['aTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['show_category_with_link_contents_list'] = Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('content_server'), 'id', 'params', 'Name'), false, true);
                 //включает xlist
                 $this->result['xlist'] = true;
                 $this->result['action_template'] = true;
                 $this->lct['action_properties'] = $TMS->parseSection('show_content_announce');
                 break;
             case 'show_contents_list':
                 $this->result['action_properties'] = true;
                 $categories = $this->result['Category'] = $files = Common::get_module_template_list('content', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['xTemplate'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Category'] = XHTML::arr_select_opt(XARRAY::arr_to_keyarr($this->_tree->GetChilds(1), 'id', 'basic'), false, true);
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('content_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['xlist'] = false;
                 $this->result['action_template'] = true;
                 $this->lct['action_properties'] = $TMS->parseSection('show_contents_list');
                 break;
             case 'show_contentgroups_list':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('content', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('content_server'), 'id', 'params', 'Name'), false, true);
                 //$this->result['xlist']                         =true;
                 $this->lct['action_properties'] = $TMS->parseSection('show_contentgroups_list');
                 break;
             case 'content_server':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list($this->_module_name, array('.show_content.html', '.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['xlist'] = false;
                 $this->result['action_template'] = true;
                 $this->lct['action_properties'] = $TMS->parseSection('content_server');
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 break;
         }
     }
 }
示例#14
0
 function get_action_properties($parameters)
 {
     global $TMS, $Adm;
     if (array_key_exists($parameters['Action'], $this->_common_obj->get_actions())) {
         $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'ainterface')), true), true);
         Common::call_common_instance('pages');
         $pages =& pages_module_common::getInstance();
         if ($this->ishop) {
             $this->result['action_properties_form']['BasketPage'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_ishop_basket'), 'id', 'params', 'Name'), false, true);
             $TMS->parseSection('ishop', true);
         }
         switch ($parameters['Action']) {
             case 'show_level_catmenu':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $this->result['xlist'] = true;
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 $this->result['action_properties_form']['Cat_destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 break;
             case 'show_catalog_server':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html', '.show_object.html', '.show_category.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['CategoryTemplate'] = $tpls;
                 $this->result['action_properties_form']['ObjectTemplate'] = $tpls;
                 $this->result['url_point_xlist'] = true;
                 $this->result['action_properties_form']['Default_action'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->get_non_server_actions(), 'front_name'), null, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_search_results':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['action_properties_form']['ResultTemplate'] = $tpls;
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_search_form':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['SearchTemplate'] = $tpls;
                 $this->result['action_properties_form']['SearchForm'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->search_forms_tree->GetChildsParam(1, '%'), 'Name'), false, true);
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_search_results'), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_smart_search_form':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['SearchTemplate'] = $tpls;
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_search_results'), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_branch_info':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['Template'] = $tpls;
                 $this->result['action_properties_form']['SearchForm'] = XHTML::arr_select_opt(XARRAY::askeyval($this->_common_obj->search_forms_tree->GetChildsParam(1, '%'), 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'catalog_filter':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 $this->result['action_properties_form']['FilterTemplate'] = $tpls;
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'catalog_comparsion':
                 $this->result['action_properties'] = true;
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['ComparsionTemplate'] = $tpls;
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_category':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $this->result['xlist'] = true;
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['InnerCategoryTemplate'] = $tpls;
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'catalog_filter_results':
                 $this->result['action_properties'] = true;
                 Common::call_common_instance('pages');
                 $pages =& pages_module_common::getInstance();
                 $this->result['action_properties_form']['Destination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $tpls = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->result['action_properties_form']['ResultTemplate'] = $tpls;
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
             case 'show_react_menu':
                 $this->result['action_properties'] = true;
                 $this->result['xlist'] = true;
                 $this->result['action_properties_form']['CatObjDestination_page'] = XHTML::arr_select_opt(XARRAY::arr_to_lev($pages->get_page_module_servers('show_catalog_server'), 'id', 'params', 'Name'), false, true);
                 $files = Common::get_module_template_list('catalog', array('.' . $parameters['Action'] . '.html'));
                 $this->result['action_properties_form']['Template'] = XHTML::arr_select_opt(XARRAY::combine($files, $files), $se, true);
                 $this->lct['action_properties'] = $TMS->parseSection($parameters['Action']);
                 break;
         }
     }
 }
示例#15
0
 function get_groups($selected = '')
 {
     return XHTML::arr_select_opt(XARRAY::arr_to_lev($this->_tree->Search(null, true, array('ancestor' => 1, 'obj_type' => '_USERSGROUP')), 'id', 'params', 'Name'), $selected, true);
 }
示例#16
0
 public static function hidden($name = '', $value = '')
 {
     return XHTML::input('hidden')->name($name)->value($value);
 }
示例#17
0
 function construct_message($form_id, $tpl, $data = array())
 {
     global $TMS, $TDB;
     if (empty($data) && !empty($_POST)) {
         $data = $_POST;
     }
     $TMS->AddFileSection(Common::get_fmodule_tpl_path('forms', $tpl));
     $form = $this->_tree->getNodeInfo($form_id);
     $fields = $this->_tree->GetChildsParam($form_id, '%', true, array('obj_type' => array('_FIELDS')));
     foreach ($fields as $id => $field) {
         switch ($field['params']['field_type']) {
             case 'flag':
                 $value = $data[$field['params']['identifier']] || $data['field_' . $form_id . $id] ? 'Yes' : 'No';
                 break;
             default:
                 $value = $field['params']['identifier'] ? $data[$field['params']['identifier']] : $data['field_' . $form_id . $id];
                 break;
         }
         if (is_array($value)) {
             $value = implode('<br />', $value);
         }
         $TMS->AddMassReplace('row', array('name' => $field['params']['Name'], 'value' => $value));
         $TMS->parseSection('row', true);
     }
     $TMS->AddMassReplace('message', $form['params']);
     $TMS->AddMassReplace('saved_message', $form['params']);
     $message['to_email'] = XHTML::xss_clean($TMS->parseSection('message'));
     //htmlentities();
     $message['to_save'] = XHTML::xss_clean($TMS->parseSection('saved_message'));
     return $message;
 }
示例#18
0
 function init_comment($id, $data)
 {
     global $TDB;
     // проверка на авторизацию. сессия после логаута почему-то не вычищается
     if ($_SESSION["siteuser"]["authorized"]) {
         if (!$data['UserId']) {
             $data['UserId'] = $_SESSION['siteuser']['id'];
         }
         if (!$data['UserName']) {
             $data['UserName'] = $_SESSION['siteuser']['Name'];
         }
     }
     //DebugBreak();
     if (!$data['UserId']) {
         $data['UserId'] = 'NULL';
     }
     if (!$data['ReplyId']) {
         $data['ReplyId'] = 'NULL';
     }
     $data['Date'] = $data['LastModified'] = time();
     $data['cid'] = $id;
     $data['Message'] = XHTML::xss_clean($data['Message']);
     $data['UserName'] = XHTML::xss_clean($data['UserName']);
     $data['Header'] = XHTML::xss_clean($data['Header']);
     return $TDB->InsertIN('comments', $data);
 }