Beispiel #1
0
 function parse_price_tpl($tpl_file, $is_runtime = false)
 {
     global $TMS;
     $tms = new TMutiSection(true);
     if ($is_runtime) {
         $TMS->AddFileSection(Common::get_module_tpl($this->_module_name, 'edit_price.html'));
     }
     $tms->AddFileSection(Common::get_site_tpl($this->_module_name, $tpl_file));
     if ($tms->Extended) {
         foreach ($tms->Extended['xtr_price'] as $field_name => $ext) {
             switch ($ext['type']) {
                 case 'IMAGE':
                 case 'INPUT':
                     $TMS->AddReplace($ext['type'], '_field_name', $field_name);
                     $TMS->AddMassReplace($ext['type'], $ext);
                     $TMS->ParseSection($ext['type'], true);
                     break;
                 case 'TEXT':
                     $TMS->AddReplace($ext['type'], '_field_name', $field_name);
                     $TMS->AddMassReplace($ext['type'], $ext);
                     $TMS->ParseSection($ext['type'], true);
             }
         }
         $this->result['fields'] = $TMS->ParseSection('fields');
     }
 }
Beispiel #2
0
                        if ($_module->_tree) {
                            $_module->_tree->WriteNodeParam(1, 'Name', $module['alias'] . '(' . $_SERVER["HTTP_HOST"] . ')');
                        }
                        $this->result['modules'][] = 'Модуль ' . $module['name'] . " инициализирован\r\n";
                    }
                }
            }
        }
    }
    function xoadGetMeta()
    {
        XOAD_Client::mapMethods($this, array('execute'));
        XOAD_Client::publicMethods($this, array('execute'));
    }
}
$TMS->AddFileSection('install/install.html');
session_start();
$inst = new x3minstall();
if ($_REQUEST['xoadCall']) {
    ob_start();
    if (XOAD_Server::runServer()) {
        $all = ob_get_contents();
        ob_end_clean();
        echo $all;
        exit;
    }
} else {
    $TMS->AddReplace('main', 'xoadHeader', XOAD_Utilities::header("http://" . $_SERVER["HTTP_HOST"] . '/inc/xoad/'));
    $TMS->AddReplace('main', 'xObject', XOAD_Client::register($inst));
    echo $inst->start_install($data);
}
Beispiel #3
0
 function parse_content_tpl($params)
 {
     global $TMS, $Adm;
     $tms = new TMutiSection(true);
     $TMS->AddFileSection($Adm->load_module_tpls($this->_module_name, array(array('tpl_name' => 'edit_content')), true), true);
     $tms->AddFileSection(Common::get_site_tpl($this->_module_name, $params['tpl_file']));
     if ($tms->Extended) {
         foreach ($tms->Extended['xtr_content'] as $field_name => $ext) {
             switch ($ext['type']) {
                 case 'ARTICLE':
                     if ($cnt = $this->_tree->Search('', true, array('obj_type' => array('_CONTENT', '_CONTENTGROUP')))) {
                         while (list($id, $cntObj) = each($cnt)) {
                             if ($cntObj['obj_type'] == '_CONTENT') {
                                 $cntNew[$id] = $cnt[$cntObj['ancestor']]['basic'] . '/' . $cntObj['basic'];
                             }
                         }
                         if ($cntNew) {
                             asort($cntNew);
                             $articlesList = XHTML::as_select_opt($cntNew);
                         }
                     }
                     $TMS->AddReplace($ext['type'], '_field_initial', $articlesList);
                     $TMS->AddReplace($ext['type'], '_field_name', $field_name);
                     $TMS->AddMassReplace($ext['type'], $ext);
                     $TMS->parseSection($ext['type'], true);
                     break;
                 case 'IMAGE':
                 case 'TEXT':
                 case 'INPUT':
                     $TMS->AddReplace($ext['type'], '_field_name', $field_name);
                     $TMS->AddMassReplace($ext['type'], $ext);
                     $TMS->parseSection($ext['type'], true);
                     break;
             }
         }
         $this->result['fields'] = $TMS->parseSection('fields');
     }
 }