source: trunk/components/frontend.template.php @ 782

Revision 782, 1.9 KB checked in by r2, 13 months ago (diff)

копирайты

  • Property svn:executable set to *
Line 
1<?php
2/******************************************************************************/
3//                                                                            //
4//                             InstantCMS v1.8                                //
5//                        http://www.instantcms.ru/                           //
6//                                                                            //
7//                   written by                                               //
8//                produced by                                                 //
9//                                                                            //
10//                        LICENSED BY GNU/GPL v2                              //
11//                                                                            //
12/******************************************************************************/
13
14if(!defined('VALID_CMS')) { die('ACCESS DENIED'); }
15
16function my_component(){
17
18    $inCore = cmsCore::getInstance();       //ÿäðî
19    $inPage = cmsPage::getInstance();       //ñòðàíèöà
20    $inDB   = cmsDatabase::getInstance();   //áàçà äàííûõ
21
22        $cfg    = ñmsLoadComponentConfig('my_component');
23       
24        $id = $inCore->request('id', 'int', 0);
25        $do = $inCore->request('do', 'str', 'view');
26
27    //Ïîäêëþ÷àåì JS ê ñòðàíèöå
28        $inPage->addHeadJS('components/my_component/js/common.js');
29
30    //Ïîäêëþ÷àåì CSS ê ñòðàíèöå
31        $inPage->addHeadCSS('components/my_component/css/styles.css');
32
33//============================================================================//
34        if ($do=='view'){
35
36                $inPage->printHeading('ÇÀÃÎËÎÂÎÊ ÊÎÌÏÎÍÅÍÒÀ');
37                       
38                $smarty = $inCore->initSmarty('components', 'com_mycomponent_view.tpl');                       
39                $smarty->display('com_mycomponent_view.tpl');
40       
41        }
42//============================================================================//
43
44} //end of component
45?>
Note: See TracBrowser for help on using the repository browser.