1 | <?php declare(strict_types=1); |
||
2 | |||
3 | /* |
||
4 | * You may not change or alter any portion of this comment or credits |
||
5 | * of supporting developers from this source code or any supporting source code |
||
6 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
7 | * |
||
8 | * This program is distributed in the hope that it will be useful, |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
11 | */ |
||
12 | |||
13 | /** |
||
14 | * @copyright XOOPS Project (https://xoops.org) |
||
15 | * @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
||
16 | * @author XOOPS Development Team |
||
17 | * @author Pascal Le Boustouller: original author ([email protected]) |
||
18 | * @author Luc Bizet (www.frxoops.org) |
||
19 | * @author jlm69 (www.jlmzone.com) |
||
20 | * @author mamba (www.xoops.org) |
||
21 | */ |
||
22 | |||
23 | use Xmf\Request; |
||
24 | use XoopsModules\Adslight\{ |
||
25 | Helper |
||
26 | }; |
||
27 | |||
28 | /** @var Helper $helper */ |
||
29 | require_once __DIR__ . '/header.php'; |
||
30 | if (null !== Request::getInt('cod_img', null, 'GET')) { |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
31 | $cod_img = Request::getInt('cod_img', null, 'GET'); |
||
32 | } else { |
||
33 | $helper->redirect('index.php', 1, _ADSLIGHT_VALIDATE_FAILED); |
||
34 | } |
||
35 | xoops_header(); |
||
36 | |||
37 | global $xoopsConfig, $xoopsTheme, $xoopsDB, $xoops_footer, $xoopsLogger; |
||
38 | $currenttheme = getTheme(); |
||
39 | |||
40 | $sql = 'SELECT url FROM ' . $xoopsDB->prefix('adslight_picture') . " WHERE cod_img={$cod_img}"; |
||
41 | $result = $xoopsDB->query($sql); |
||
42 | $recordexist = $xoopsDB->getRowsNum($result); |
||
43 | |||
44 | if ($recordexist) { |
||
45 | [$url] = $xoopsDB->fetchRow($result); |
||
46 | echo "<br><br><div style='text-align:center'><img class=\"thumb\" src=\"photo/{$url}\" border=0></div>"; |
||
47 | } |
||
48 | |||
49 | echo "<table><tr><td><div style='text-align:center'><a href=# onClick='window.close()'>" . _ADSLIGHT_CLOSEF . '</a></div></td></tr></table>'; |
||
50 | |||
51 | xoops_footer(); |
||
52 |