-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
67 lines (52 loc) · 1.99 KB
/
index.php
File metadata and controls
67 lines (52 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* Index page
*
* @copyright INBOX International
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* @since 1.0
* @author Rodrigo Pereira Lima <rodrigo@inboxinternational.com>
* @package imfaq
* @version $Id$
*/
include_once 'header.php';
$clean_start = isset ( $_GET ['start'] ) ? intval ( $_GET ['start'] ) : 0;
$xoopsOption ['template_main'] = 'imfaq_index.html';
include_once ICMS_ROOT_PATH . '/header.php';
$imfaq_category_handler = icms_getModuleHandler ( 'category' );
/**
* list categorys
*/
include_once ICMS_ROOT_PATH . "/kernel/icmspersistabletable.php";
$icmsTpl->assign ( 'imfaq_title', _MD_IMFAQ_ALL_CATEGORYS );
/**
* Create Navbar
*/
include_once ICMS_ROOT_PATH . '/class/pagenav.php';
$cats_count = count ( $imfaq_category_handler->getCategories ( false, false, false, 0 ) );
$pagenav = new XoopsPageNav ( $cats_count, $imfaqConfig ['cats_limit'], $clean_start, 'start' );
$icmsTpl->assign ( 'navbar', $pagenav->renderNav () );
switch ($imfaqConfig ['categs_order']){
case 'weight':
$sort = 'cat_weight';
$order = 'ASC';
break;
case 'pub_date_asc':
$sort = 'cat_published_date';
$order = 'ASC';
break;
case 'pub_date_desc':
$sort = 'cat_published_date';
$order = 'DESC';
break;
}
$icmsTpl->assign ( 'imfaq_categories', $imfaq_category_handler->getCategories ( $clean_start, $imfaqConfig ['cats_limit'], 0, 0, $sort, $order ) );
$icmsTpl->assign ( 'imfaq_module_home', imfaq_getModuleName ( true, true ) );
$icmsTpl->assign ( 'displaytopcatdsc', $xoopsModuleConfig ['displaytopcatdsc'] );
$icmsTpl->assign ( 'displaysubcatonindex', $xoopsModuleConfig ['displaysubcatonindex'] );
$icmsTpl->assign ( 'displaysubcatdsc', $xoopsModuleConfig ['displaysubcatdsc'] );
$icmsTpl->assign ( 'module_header', $myts->displayTarea ( $xoopsModuleConfig ['module_header'], 1 ) );
$icmsTpl->assign ( 'imfaq_rss_url', IMFAQ_URL . 'rss.php' );
$icmsTpl->assign ( 'imfaq_rss_info', _MD_IMFAQ_RSS_GLOBAL );
include_once 'footer.php';
?>