Beispiel #1
0
 function show_gallery_list($params)
 {
     global $TMS, $REQUEST_ASSOC, $_WEBPATH;
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance();
     $destination = $pages->create_page_path($params['page']);
     $TMS->AddFileSection(Common::get_fmodule_tpl_path('gallery', $params['Template']));
     $albums = $this->_tree->GetChilds($params["GalleryStartId"]);
     $album_info = $this->_tree->GetChildsParam($params["GalleryStartId"], array('Name', 'gallery_short', 'thumb_width', 'Avatar', 'isOuterLink', 'info', 'counter', 'basic'));
     if (!$albums) {
         return $TMS->parseSection('gallery_empty');
     }
     $sl = $REQUEST_ASSOC['sl'] ? $REQUEST_ASSOC['sl'] : 0;
     Common::parse_nav_pages(count($albums), $params['count'], $sl, $destination . '/~show_gallery_list');
     $i = 0;
     foreach ($albums as $album) {
         $id = $album["id"];
         $a = $album_info[$id];
         $a['basic'] = $album['basic'];
         $album['basic'] ? $a['link'] = $destination . '/~show_album/' . $album['basic'] : ($a['link'] = $destination . '/~show_album/' . $id);
         $a['inRow'] = (int) $params["Levels"];
         $a['_num'] = $i++;
         $TMS->AddMassReplace('item', $a);
         $TMS->parseSection('item', true);
     }
     $TMS->AddMassReplace('galleries', $this->_tree->GetNodeParam($params["GalleryStartId"]));
     return $TMS->parseSection('galleries', true);
 }
Beispiel #2
0
 function subscribe($params)
 {
     Common::call_common_instance('pages');
     $pages = pages_module_common::getInstance();
     $params = array_merge($params, $pages->obj_tree->getNodeInfo($params['mod_id']));
     $pm = $pages->get_page_modules($params['params']['page'], null, 'subscribe');
     reset($pm);
     $pm = current($pm);
     $this->result['content'] = $this->subscriber_page(array_merge($params, array('aTemplate' => $pm['params']['aTemplate'])));
 }
Beispiel #3
0
 function showUserMenu($params)
 {
     //global $this->_TMS, $TDB, $TPA;
     $menu = $TDB->get_results('select pages, header from user_menu where id=' . $params['menu']);
     $pages = $menu[1]['pages'];
     $pages1 = explode(',', $pages);
     $w = array();
     $x = array_keys($pages1);
     $items = $this->_tree->GetNodesByIdArray($pages1);
     $cur_page_id = $TPA->page_node['id'];
     $cur_page_basic = $TPA->page_node['basic'];
     foreach ($x as $x1) {
         $w[$pages1[$x1]] = $x1;
     }
     foreach ($items as $i) {
         $key = $w[$i['id']];
         $arr[$key] = array('id' => $i['id'], 'text' => $i['params']['Name'], 'obj_type' => $i['obj_type'], 'Icon' => $i["params"]["Icon"], 'basic' => $i["basic"], 'Comment' => $i["params"]["Comment"], 'StartPage' => $i["params"]["StartPage"]);
     }
     ksort($arr);
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance();
     $this->_TMS->AddFileSection(Common::get_fmodule_tpl_path('menu', $params['Template']));
     $i = 0;
     $umenu = '';
     foreach ($arr as $p) {
         if ($p['obj_type'] != '_LINK') {
             $alink = $pages->create_page_path($p['id']);
         } else {
             $alink = $items[$p['id']]['params']['Link'];
         }
         $selected = '';
         if ($p["id"] == $TPA->page_node["id"] || $p['obj_type'] == '_GROUP' && $TPA->page_node['id'] == $p['StartPage']) {
             $selected = 'selected_';
         }
         $r = array('link' => $alink, 'basic' => $p["basic"], 'caption' => $p['text'], '_num' => $i, 'oddeven' => $i % 2, 'Icon' => $p['Icon'], 'Comment' => $p['Comment']);
         if ($i == 0 && $this->_TMS->isSectionDefined('_menu_item_first_' . $selected . 'level0')) {
             $this->_TMS->AddMassReplace('_menu_item_first_' . $selected . 'level0', $r);
             $umenu .= $this->_TMS->parseSection('_menu_item_first_' . $selected . 'level0');
         } elseif ($i == sizeof($arr) - 1 && $this->_TMS->isSectionDefined('_menu_item_last_' . $selected . 'level0')) {
             $this->_TMS->AddMassReplace('_menu_item_last_' . $selected . 'level0', $r);
             $umenu .= $this->_TMS->parseSection('_menu_item_last_' . $selected . 'level0');
         } else {
             $this->_TMS->AddMassReplace('_menu_item_middle_' . $selected . 'level0', $r);
             $umenu .= $this->_TMS->parseSection('_menu_item_middle_' . $selected . 'level0');
         }
         $i++;
     }
     $this->_TMS->AddReplace('_menu_main_level0', 'menu_buff', $umenu);
     $this->_TMS->AddReplace('_menu_main_level0', 'header', $menu[1]['header']);
     $menu = $this->_TMS->parseSection('_menu_main_level0');
     return $menu;
 }
Beispiel #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;
         }
     }
 }
Beispiel #5
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;
         }
     }
 }
Beispiel #6
0
 function show_search_form($params)
 {
     global $TMS, $TPA;
     static $property_sets;
     $psets =& $this->_common_obj->property_sets;
     $TMS->AddFileSection(Common::get_site_tpl($this->_module_name, $params['SearchTemplate']));
     if ($params["SearchProperty_set"]) {
         $TMS->AddReplace('_catalog_show_search', 'SearchProperty_set', $params["SearchProperty_set"]);
     }
     if ($params["ancestor"]) {
         $TMS->AddReplace('_catalog_show_search', 'ancestor', $params["ancestor"]);
     }
     // ??
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance();
     $cat_action = $pages->create_page_path($params['Destination_page']) . '/~catsearch/';
     $TMS->AddReplace('_catalog_show_search', 'action', $cat_action);
     if (!empty($_POST['search'])) {
         $spack = $_POST['search'];
     } elseif ($_SESSION['catalog']['last_search_form']) {
         $spack = $_SESSION['catalog']['last_search_form'];
     }
     if (is_array($spack)) {
         foreach ($spack as $group => $value) {
             if (is_array($value)) {
                 foreach ($value as $k => $v) {
                     $fields_values[$group . '_' . $k] = $v;
                 }
             }
         }
     }
     $_SESSION['catalog']['last_search_form'] = $spack;
     $sform = $this->_common_obj->search_forms_tree->GetNodeParam($params["SearchForm"]);
     $TMS->AddReplace('_catalog_show_search', 'SFromName', $sform["Name"]);
     $i = 0;
     if ($sfields = $this->_common_obj->search_forms_tree->GetChildsParam($params['SearchForm'], '%')) {
         foreach ($sfields as $sfid => $sfield) {
             //DebugBreak();
             if (!$property_sets[$sfield['property_set']]) {
                 if (!$psets[$sfield['property_set']]) {
                     $psets[$sfield['property_set']] = $this->_common_obj->get_properties($sfield['property_set']);
                 }
                 $prp = $psets[$sfield['property_set']];
                 if ($prp) {
                     $property_sets[$sfield['property_set']] = array(array_flip(XARRAY::arr_to_lev($prp, 'id', 'params', 'Name')), $prp);
                 } else {
                     $property_sets[$sfield['property_set']] = array();
                 }
             }
             $section = '_catalog_search_' . $sfield['criteria'];
             $psets = $property_sets[$sfield['property_set']][1][$property_sets[$sfield['property_set']][0][$sfield['property']]]['params'];
             if ($psets['catselector']) {
                 $sfield = $sfield + array('catselector' => $psets['catselector']);
             }
             $sfield = $sfield + array('type' => $psets['Type']);
             switch ($sfield['criteria']) {
                 case 'interval':
                     $sfield = $sfield + array('from' => 'search[from][' . $sfield['property'] . ']', 'to' => 'search[to][' . $sfield['property'] . ']', 'from_value' => $fields_values['from_' . $sfield['property']], 'to_value' => $fields_values['to_' . $sfield['property']]);
                     break;
                 case 'larger':
                     $sfield = $sfield + array('input_name' => 'search[from][' . $sfield['property'] . ']', 'value' => $fields_values['from_' . $sfield['property']]);
                     break;
                 case 'less':
                     $sfield = $sfield + array('input_name' => 'search[to][' . $sfield['property'] . ']', 'value' => $fields_values['to_' . $sfield['property']]);
                     break;
                 case 'equal':
                     $evalues = $params["search_objects"][$sfield['property']];
                     if ($evalues) {
                         $sfield['E_values'] = $evalues;
                     }
                     $sfield = $sfield + array('input_name' => 'search[' . $sfield['criteria'] . '][' . $sfield['property'] . ']', 'value' => $fields_values[$sfield['criteria'] . '_' . $sfield['property']]);
                     break;
                 case 'rlike':
                 case 'lrlike':
                 case 'rwords':
                     $sfield = $sfield + array('input_name' => 'search[' . $sfield['criteria'] . '][' . $sfield['property'] . ']', 'value' => $fields_values[$sfield['criteria'] . '_' . $sfield['property']]);
                     break;
             }
             $sfield["_num"] = $i++;
             //DebugBreak();
             $TMS->AddMassReplace($section, $sfield);
             $TMS->parseSection($section, true);
             $TMS->clear_section_fields($section);
         }
     }
     //if ($params[""])$TMS->AddMassReplace('_catalog_show_search', $fields_values);
     $TMS->AddMassReplace('_catalog_show_search', $fields_values);
     return $TMS->parseSection('_catalog_show_search');
 }
Beispiel #7
0
 function forgotpassword($params)
 {
     global $TMS, $TPA, $_COMMON_SITE_CONF;
     $TMS->AddFileSection(Common::get_site_tpl($this->_module_name, $params['Template']));
     if ($_POST['Email']) {
         $usr_email = trim($_POST['Email']);
         $User = $this->_tree->Search(array('Email' => $usr_email), true, array('obj_type' => '_FUSER'), null, '=', false);
         if (is_array($User)) {
             $uid = array_keys($User);
             $uid = $uid[0];
             $New_password = substr(Common::GenerateHash(rand(), 12), 0, 8);
             $New_password_hash = md5(strrev($New_password));
             $l = $this->_common_obj->get_translation('back_interface');
             $pages =& pages_module_common::getInstance();
             $plink = $pages->create_page_path($TPA->page_node['id']);
             $TMS->AddMassReplace('fuser_forgot_password_mailtext', array('HOST' => HOST, 'new_password' => $New_password, 'auth_link' => $plink . '/~auth'));
             $mailtext = $TMS->parseSection('fuser_forgot_password_mailtext', true);
             $m = Common::inc_module_factory('Mail');
             $m->From($_COMMON_SITE_CONF['admin_email']);
             $m->To($usr_email);
             $m->Content_type('text/html');
             $m->Subject($l['{password_recovery}'] . ' (' . HOST . ')');
             $m->Body($mailtext, $_COMMON_SITE_CONF['site_encoding']);
             if ($this->_tree->WriteNodeParam($uid, 'password', $New_password_hash) && $m->Send()) {
                 $TMS->AddReplace('fuser_forgot_password_email_send', 'auth_link', $plink . '/~auth');
                 return $TMS->parseSection('fuser_forgot_password_email_send');
             } else {
                 $error = $TMS->parseSection('fuser_forgot_password_email_notsend', true);
                 $TMS->AddReplace('fuser_forgot_password_enter_email', 'error', $error);
                 return $TMS->parseSection('fuser_forgot_password_enter_email');
             }
         } else {
             $error = $TMS->parseSection('fuser_forgot_password_email_notuser', true);
             $TMS->AddReplace('fuser_forgot_password_enter_email', 'error', $error);
             $TMS->AddReplace('fuser_forgot_password_enter_email', 'Email', $usr_email);
             return $TMS->parseSection('fuser_forgot_password_enter_email');
         }
     } else {
         return $TMS->parseSection('fuser_forgot_password_enter_email');
     }
 }
Beispiel #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_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;
         }
     }
 }
Beispiel #9
0
 function common_call()
 {
     $this->_common_obj =& pages_module_common::getInstance();
     //proxy for tree
     $this->_tree =& $this->_common_obj->obj_tree;
 }
Beispiel #10
0
 function bytag($parameters)
 {
     global $TMS, $REQUEST_ASSOC, $_CONFIG;
     $template = $parameters['TemplateInterval'] ? $parameters['TemplateInterval'] : $parameters['Template'];
     if ((int) $parameters['OnPage'] === 0) {
         $parameters['OnPage'] = $_CONFIG['news']['show_news_per_page'];
     }
     if (!$REQUEST_ASSOC['tag']) {
         $tag = $parameters['tag'];
     } else {
         $tag = $REQUEST_ASSOC['tag'];
     }
     $TMS->AddFileSection(Common::get_site_tpl($this->_module_name, $template));
     if (!($tag = mysql_real_escape_string(urldecode($tag)))) {
         return $TMS->parseSection('news_by_tag_fail');
     }
     $count = $this->get_similar_news($tag, $parameters['OnPage'], 0, false, true);
     if ($count[1]['ncount'] > 0) {
         $news_list = $this->get_similar_news($tag, $parameters['OnPage'], 0);
         $pages =& pages_module_common::getInstance(true);
         if ($parameters['Destination_page']) {
             $news_server_page = $pages->create_page_path($parameters['Destination_page']);
         } else {
             $news_server_page = $TPA->page_link;
         }
         return $this->render_news($news_list, $news_server_page, null, $count[1]['ncount'], $parameters['OnPage']);
     } else {
         return $TMS->parseSection('news_by_tag_fail');
     }
 }
Beispiel #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;
         }
     }
 }
Beispiel #12
0
 function show_vote($params)
 {
     global $TMS, $TDB;
     $TMS->AddFileSection(Common::get_fmodule_tpl_path('votes', $params['Template']));
     $a = $this->_tree->getNodeInfo($params['votesId']);
     Common::call_common_instance('pages');
     if ($a["id"] === null) {
         return $TMS->parseSection('vote_deleted');
     }
     $pages =& pages_module_common::getInstance();
     $link = $pages->create_page_path($params['page']);
     $a['results_link'] = $link . '/~showvresult/id/' . $params['votesId'];
     $a['action'] = $link . '/~addvote/id/' . $params['votesId'];
     if ($this->check_date($a['params']['date1'], $a['params']['date2'])) {
         $variants = $this->get_variants($params['votesId']);
         $multi = 0;
         if ($a['params']['vote_multiple'] == 1) {
             $rrr = 'check';
             $multi = 1;
         } else {
             $rrr = 'radio';
         }
         $TMS->AddReplace('multiple', 'value', $multi);
         $TMS->parseSection('multiple', true);
         $tmp = '';
         foreach ($variants as $v) {
             $TMS->AddMassReplace($rrr, $v);
             $tmp .= $TMS->parseSection($rrr);
         }
         $TMS->AddReplace('vote', 'inputs', $tmp);
         if ($a['params']['another_variant'] == 1) {
             $TMS->AddMassReplace('another_variant_' . $rrr, $v);
             $tmp = $TMS->parseSection('another_variant_' . $rrr);
             $TMS->AddReplace('vote', 'another', $tmp);
         }
         $TMS->AddMassReplace('vote', $a['params']);
         $TMS->AddMassReplace('vote', $a);
         return $TMS->parseSection('vote');
     } else {
         $a['show_results'] = $link . '/~showvresult/id/' . $params['votesId'];
         $TMS->AddMassReplace('vote_completed', $a);
         $TMS->AddMassReplace('vote_completed', $a['params']);
         return $menu = $TMS->parseSection('vote_completed');
     }
 }
Beispiel #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;
         }
     }
 }
Beispiel #14
0
 function show_search_form($parameters)
 {
     global $TMS;
     $TMS->AddFileSection(Common::get_site_tpl($this->_module_name, $parameters['Template']));
     $pages =& pages_module_common::getInstance(true);
     if ($parameters['Destination_page']) {
         $search_server_page = $pages->create_page_path($parameters['Destination_page'], false, 'find');
     }
     $TMS->AddReplace('xtr_search', 'action', $search_server_page);
     return $TMS->parseSection('xtr_search');
 }
Beispiel #15
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;
         }
     }
 }
Beispiel #16
0
 function show_faq_search_server($params)
 {
     global $TDB, $TMS, $TPA, $REQUEST_ASSOC;
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance();
     $TMS->AddFileSection(Common::get_fmodule_tpl_path('faq', $params["MTemplate"]));
     if (isset($REQUEST_ASSOC['sl'])) {
         $request = $_SESSION["faq"]["last_search"];
     } else {
         $request = urldecode($_POST["faqsearch"]);
     }
     if (!$request) {
         return $TMS->parseSection('_no_request');
     }
     $_SESSION["faq"]["last_search"] = $request;
     $words = explode(' ', $request);
     $OM = array();
     $sfields = array('question', 'answer', 'sanswer');
     $first = true;
     foreach ($words as $word) {
         $value = trim(mysql_real_escape_string($word));
         $cond = array();
         foreach ($sfields as $sfield) {
             $cond[] = " `" . $sfield . "` LIKE '%" . $value . "%' ";
         }
         $query = "SELECT `id` FROM `faq` WHERE (" . implode('OR', $cond) . ") AND `active`=1;";
         $r = $TDB->get_results($query, 'ARRAY_N');
         if (!count($r)) {
             $TMS->AddReplace('_no_results', 'request', $request);
             return $TMS->parseSection('_no_results');
         }
         $Mas = array();
         foreach ($r as $v) {
             $Mas[] = $v[0];
         }
         if ($first) {
             $OM = $Mas;
         } else {
             $OM = array_intersect($OM, $Mas);
         }
         if (!count($OM)) {
             $TMS->AddReplace('_no_results', 'request', $request);
             return $TMS->parseSection('_no_results');
         }
         $first = false;
     }
     $sl = $REQUEST_ASSOC['sl'] ? (int) $REQUEST_ASSOC['sl'] : 0;
     $dst = $pages->create_page_path($params["MDestination_page"]);
     $total = count($OM);
     if ($params["OnPage"] < $total && $params["OnPage"]) {
         $OM = array_slice($OM, $sl, $params["OnPage"]);
         Common::parse_nav_pages($total, $params["OnPage"], $sl, $TPA->page_link . '/~faqsearch');
     }
     $query = "SELECT * FROM `faq` WHERE `id` in ('" . implode("', '", $OM) . "');";
     $questions = $TDB->get_results($query);
     foreach ($questions as $question) {
         $question["timestamp"] = strtotime($question["date"]);
         $question["Link"] = $dst . "/~show_question/qid/" . $question["id"];
         $question["Destination"] = $dst;
         $TMS->AddMassReplace('_search_list_item', $question);
         $TMS->parseSection('_search_list_item', true);
     }
     $TMS->AddMassReplace('_faq_search_results', array("total" => $total, "Destination" => $dst));
     return $TMS->parseSection('_faq_search_results');
 }
Beispiel #17
0
 function show_banner($id, $params = null)
 {
     global $TMS, $TDB, $_PATH, $TPA;
     if (!$this->skip_stats) {
         $this->showed_banners[] = $id;
     }
     $info = $this->_tree->GetNodeInfo($id);
     if ($params['Template']) {
         $template = Common::get_site_tpl($this->_module_name, $params['Template']);
         $TMS->AddFileSection($template);
     }
     if ($info['params']['banner_type']) {
         switch ($info['params']['banner_type']) {
             case 'html':
                 $TMS->AddReplace('html', 'html_code', $info['params']['flash_text']);
                 break;
             case 'gif':
                 $fname = $_SERVER["DOCUMENT_ROOT"] . $info['params']['file_name'];
                 if (file_exists($fname)) {
                     $size = getimagesize($fname);
                 }
                 $a['fname'] = $info['params']['file_name'];
                 $a['alt'] = $info['params']['alt'];
                 $a['width'] = $size[0];
                 $a['height'] = $size[1];
                 $a['_num'] = $params['_num'];
                 if ($info["params"]["use_page"] && $info["params"]["pageId"]) {
                     $pages =& pages_module_common::getInstance();
                     $page = $pages->get_node($info["params"]["pageId"]);
                     if ($page['obj_type'] == '_LINK') {
                         $a['link'] = $page['params']['Link'];
                     } else {
                         $a['link'] = $pages->create_page_path($info["params"]["pageId"], true);
                     }
                     $a['page.Icon'] = $page["params"]["Icon"];
                     $a['page.Comment'] = $page["params"]["Comment"];
                     $a['page.Name'] = $page["params"]["Name"];
                     $a['use_page'] = 1;
                 } else {
                     $a['link'] = $info['params']['link'];
                 }
                 $TMS->AddMassReplace($info['params']['banner_type'], $a);
                 break;
             case 'flash':
                 if ($info['params']['flash_text'] != '') {
                     $banner = $info['params']['flash_text'];
                 } else {
                     $a['fname'] = $info['params']['file_name'];
                     $a['width'] = $info['params']['width'];
                     $a['height'] = $info['params']['height'];
                     $TMS->AddMassReplace($info['params']['banner_type'], $a);
                 }
                 break;
         }
         $banner = $TMS->parseSection($info['params']['banner_type']);
         if (!$this->skip_stats) {
             $this->set_banner_stats(array('id' => $id));
         }
         return $banner;
     }
 }
Beispiel #18
0
 function show_basket_status($parameters)
 {
     global $TMS;
     $TMS->AddFileSection(Common::get_site_tpl($this->_module_name, $parameters['Template']));
     $pages =& pages_module_common::getInstance();
     $TMS->AddMassReplace('ishop_basket_status', array('cartPageLink' => $pages->create_page_path($parameters['Basket_Page'])));
     $TMS->AddMassReplace('ishop_basket_status', $this->_calculate_order());
     return $TMS->parseSection('ishop_basket_status');
 }
Beispiel #19
0
 function load_xlist_link_pages($parameters)
 {
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance(true);
     $TD = Common::inc_module_factory('TTreeSource');
     $options['startNode'] = $parameters['anc_id'];
     $options['shownodesWithObjType'] = array('_PAGE', '_LINK', '_GROUP', '_ROOT');
     $options['columnsAsParameters'] = array('name' => 'Name');
     $options['columnsAsStructs'] = array('image' => 'obj_type');
     $options['transformResults']['image'] = array('_GROUP' => 'group', '_PAGE' => 'page', '_LINK' => 'page', '_ROOT' => 'group');
     $options['selectable'] = array('image' => array('_PAGE', '_LINK', '_GROUP', '_ROOT'));
     $this->result['data_set'] = null;
     $TD->init_from_source($pages->obj_tree);
     $TD->setOptions($options);
     $TD->CreateView($parameters['anc_id']);
     $this->result = array_merge_recursive($TD->result, $this->result);
 }
Beispiel #20
0
 function show_content_announce($params)
 {
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance();
     $params['Template'] = $params['aTemplate'];
     $params['link'] = $pages->create_page_path($params['page']) . '/~show_article/cid/' . $params['contentId'];
     return $this->show_content($params);
 }
Beispiel #21
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']);
         }
     }
 }
Beispiel #22
0
 function removeUser($subscribe_id, $email, $params)
 {
     global $TDB, $TMS;
     Common::call_common_instance('pages');
     $pages =& pages_module_common::getInstance();
     $link = $pages->create_page_path((int) $params['params']['page']);
     if ($link) {
         $hash = md5(time());
         $query = "SELECT * FROM subscribers_list WHERE email = '" . $email . "'";
         if ($results = $TDB->get_results($query)) {
             $subscribe_id = (int) $params['subscribe_id'];
             $subscr = $this->_tree->getNodeParam($subscribe_id);
             $TMS->AddMassReplace('unsubscribe_message', array('link' => $link . '/~complete_unsubscribe/code/' . $hash . '/id/' . $subscribe_id, 'subscribe' => $subscr['basic']));
             $message = $TMS->parseSection('unsubscribe_message');
             $TMS->AddMassReplace('unsubscribe_message_header', array('subscribe' => $subscr['basic']));
             $header = $TMS->parseSection('unsubscribe_message_header');
             $this->sendMail($email, $message, $header, $subscr['from']);
         }
         $query = "UPDATE subscribers_list SET code = '" . $hash . "' WHERE email = '" . $email . "'";
         $TDB->get_results($query);
         return $TDB->result;
     }
     return false;
 }
Beispiel #23
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;
         }
     }
 }