-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·49 lines (40 loc) · 2.27 KB
/
index.php
File metadata and controls
executable file
·49 lines (40 loc) · 2.27 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
<?php
/**
* User index page of the module
*
* Including the content page
*
* @copyright The ImpressCMS Project
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* @since 1.0
* @author Rodrigo P Lima aka TheRplima <therplima@impresscms.org>
* @package content
* @version $Id$
*/
include_once 'header.php';
$xoopsOption['template_main'] = 'content_index.html';
include_once ICMS_ROOT_PATH . '/header.php';
$content_content_handler = icms_getModuleHandler('content', basename(__DIR__), 'content');
if (icms::$module->config['default_page'] == 0) {
// At which record shall we start display
$clean_start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
$clean_content_uid = isset($_GET['uid']) ? (int)$_GET['uid'] : false;
$clean_content_tags = isset($_GET['tag']) ? filter_input(INPUT_GET, 'tag', FILTER_SANITIZE_ADD_SLASHES) : false;
$clean_content_pid = isset($_GET['pid']) ? (int)$_GET['pid'] : (($clean_content_uid || $clean_content_tags) ? false : 0);
$content = $content_content_handler->getContents($clean_start, icms::$module->config['contents_limit'], $clean_content_uid, $clean_content_tags, false, $clean_content_pid);
$icmsTpl->assign('content_contents', $content);
$extra = ($clean_content_uid !== false) ? 'uid=' . $clean_content_uid : FALSE;
$contents_count = $content_content_handler->getContentsCount($clean_content_uid);
$pagenav = new icms_view_PageNav($contents_count, icms::$module->config['contents_limit'], $clean_start, 'start', $extra);
$icmsTpl->assign('navbar', $pagenav->renderNav());
if ($clean_content_uid) {
$icmsTpl->assign('content_category_path', sprintf(_CO_CONTENT_CONTENT_FROM_USER, icms_member_user_Handler::getUserLink($clean_content_uid)));
}
} else {
$content = $content_content_handler->getContents(0, 1, false, false, icms::$module->config['default_page']);
$icmsTpl->assign('content_contents', $content);
}
$icmsTpl->assign('showInfo', icms::$module->config['show_contentinfo']);
$icmsTpl->assign('content_module_home', '<a href="' . ICMS_URL . '/modules/' . icms::$module->getVar('dirname') . '">' . icms::$module->getVar('name') . '</a>');
$xoTheme->addStylesheet(ICMS_URL . '/modules/content/include/content.css');
include_once 'footer.php';