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