source: Tattertools Online Reference/site/doc/functions/index.php @ 132

Revision 132, 2.8 KB checked in by graphittie, 6 years ago (diff)
  • [129]에 따라 구조 일관성을 위해 디렉토리 구조 재정리 및 새 디렉토리 추가.
Line 
1<?php
2define('ROOT', '../../..');
3
4require ROOT . '/lib/include.php';
5
6$data = DBQuery::queryAll("SELECT DISTINCT `path` FROM `Functions` ORDER BY `path` ASC");
7$tempContents = array();
8for ($i=0; $i<count($data); $i++) {
9    $tempContents[$i]['title'] = basename($data[$i]['path']);
10    $tempContents[$i]['link'] = "{$config['path']}/doc/functions/list/?type=path&amp;path={$data[$i]['path']}";
11}
12
13$tableIndex = array(
14                        array(
15                                'title' => '/components',
16                                'id' => 'components',
17                                'contents' => $tempContents
18                        ),
19                        array(
20                                'title' => '/lib',
21                                'id' => 'library',
22                                'contents' => array(
23                                    array('title' => _text('auth.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/auth.php"),
24                                    array('title' => _text('config.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/config.php"),
25                                    array('title' => _text('database.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/database.php"),
26                                    array('title' => _text('functions.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/functions.php"),
27                                    array('title' => _text('include'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/include.php"),
28                                    array('title' => _text('includeForOwner.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/includeForOwner.php"),
29                                    array('title' => _text('locale.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/locale.php"),
30                                    array('title' => _text('plugins.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/plugins.php"),
31                                    array('title' => _text('session.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/session.php"),
32                                    array('title' => _text('skin.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/skin.php"),
33                                    array('title' => _text('suri.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/suri.php"),
34                                    array('title' => _text('trace.php'), 'link' => "{$config['path']}/doc/functions/list/?type=path&amp;path=/lib/trace.php")
35                                )
36                        )
37                    );
38               
39// 본문 생성.
40$smarty->assign('arrayTableIndex', $tableIndex);
41$smarty->assign('contentAreaTemplate', SMARTY_TEMPLATE_ROOT . "/theme/{$config['theme']}/site/doc/functions/content-area.tpl");
42$smarty->assign('sidebarTemplate', SMARTY_TEMPLATE_ROOT . "/theme/{$config['theme']}/site/doc/functions/sidebar.tpl");
43$smarty->assign('currentPath', array(array('name' => _text('documentation'), 'path' => '/doc'), array('name' => _text('functions'), 'path' => '/doc/functions')));
44$smarty->display(SMARTY_TEMPLATE_ROOT . "/theme/{$config['theme']}/site/doc/functions/index.tpl");
45?>
Note: See TracBrowser for help on using the repository browser.