1 | <?php |
||||
2 | /* |
||||
3 | * You may not change or alter any portion of this comment or credits |
||||
4 | * of supporting developers from this source code or any supporting source code |
||||
5 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||||
6 | * |
||||
7 | * This program is distributed in the hope that it will be useful, |
||||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
10 | */ |
||||
11 | |||||
12 | /** |
||||
13 | * @copyright {@link https://xoops.org/ XOOPS Project} |
||||
14 | * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later} |
||||
15 | * @package efqdirectory |
||||
16 | * @since |
||||
17 | * @author Martijn Hertog (aka wtravel) |
||||
18 | * @author XOOPS Development Team, |
||||
19 | */ |
||||
20 | |||||
21 | include __DIR__ . '/../../mainfile.php'; |
||||
22 | include XOOPS_ROOT_PATH . '/header.php'; |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
23 | $moduleDirName = basename(__DIR__); |
||||
24 | $coupid = isset($_GET['coupid']) ? (int)$_GET['coupid'] : 0; |
||||
25 | if (!($coupid > 0)) { |
||||
26 | redirect_header('index.php'); |
||||
0 ignored issues
–
show
The function
redirect_header was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
27 | } |
||||
28 | |||||
29 | /** |
||||
30 | * @param $coupid |
||||
31 | */ |
||||
32 | function PrintPage($coupid) |
||||
33 | { |
||||
34 | global $xoopsModule, $xoopsTpl, $xoopsModuleConfig, $moduleDirName; |
||||
35 | $couponHandler = xoops_getModuleHandler('coupon', $moduleDirName); |
||||
0 ignored issues
–
show
The function
xoops_getModuleHandler was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
36 | $couponHandler->increment($coupid); |
||||
37 | $coupon = $couponHandler->getLinkedCoupon($coupid); |
||||
38 | $coupon_arr = $couponHandler->prepare2show($coupon); |
||||
39 | //$xoopsTpl->assign('coupon_footer', $xoopsModuleConfig['coupon_footer']); |
||||
40 | $xoopsTpl->assign('coupon', $coupon_arr['items']['coupons'][0]); |
||||
41 | $xoopsTpl->template_dir = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname(); |
||||
0 ignored issues
–
show
|
|||||
42 | $xoopsTpl->display('db:efqdiralpha1_print_savings.tpl'); |
||||
43 | } |
||||
44 | |||||
45 | //Smarty directory autodetect |
||||
46 | $smartydir = $moduleDirName; |
||||
47 | $xoopsTpl->assign('smartydir', $smartydir); |
||||
48 | PrintPage($coupid); |
||||
49 |