-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprint.php
63 lines (51 loc) · 2.12 KB
/
print.php
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
<?php
/**
* $Id$
* Module: SmartContent
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
*/
include_once 'header.php';
require_once XOOPS_ROOT_PATH.'/class/template.php';
$pageid = isset($_GET['pageid']) ? intval($_GET['pageid']) : 0;
if ($pageid == 0) {
redirect_header("javascript:history.go(-1)", 1, _MD_SCONTENT_NOITEMSELECTED);
exit();
}
// Creating the ITEM object for the selected ITEM
$pageObj = $smartcontent_page_handler->get($pageid);
// if the selected ITEM was not found, exit
if ($pageObj->isNew()) {
redirect_header("javascript:history.go(-1)", 1, _MD_SCONTENT_NOITEMSELECTED);
exit();
}
// Creating the category object that holds the selected ITEM
//$categoryObj = $smartcontent_category_handler->get($pageObj->getVar('parentid'));
$xoopsTpl = new XoopsTpl();
global $xoopsConfig, $xoopsDB, $xoopsModule, $myts;
$page= $pageObj->toArray();
/*
*Trouver une meilleure façon ( pas le temps auj...)
*/
if (method_exists($myts, 'formatForML')) {
$xoopsConfig['sitename'] = $myts->FormatForML($xoopsConfig['sitename']);
}
$page['title'] = str_replace("\n", "", $page['title'] );
$printtitle = $xoopsConfig['sitename']." > ".$myts->displayTarea($page['title']);
$printheader = $myts->displayTarea(smartcontent_getConfig('headerprint'));
//$page['categoryname'] = $myts->displayTarea($categoryObj->getVar('name'));
$xoopsTpl->assign('printtitle', $printtitle);
$xoopsTpl->assign('printlogourl', $xoopsModuleConfig['printlogourl']);
$xoopsTpl->assign('printheader', $printheader);
$xoopsTpl->assign('lang_category', _MD_SCONTENT_CATEGORY);
$xoopsTpl->assign('lang_author_date', $who_where);
$xoopsTpl->assign('sitetitle', $myts->displayTarea($xoopsConfig['sitename']));
$xoopsTpl->assign('siteslogan', $myts->displayTarea($xoopsConfig['slogan']));
$xoopsTpl->assign('page', $page);
$xoopsTpl->assign('printfooter', $myts->displayTarea($xoopsModuleConfig['printfooter']));
$xoopsTpl->assign('doNotStartPrint', $doNotStartPrint);
$xoopsTpl->assign('noTitle', $noTitle);
$xoopsTpl->assign('smartPopup', $smartPopup);
$xoopsTpl->assign('current_language', $xoopsConfig['language']);
$xoopsTpl->display('db:smartcontent_print.html');
?>