mambax7 /
adslight
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /* |
||
| 3 | ------------------------------------------------------------------------- |
||
| 4 | ADSLIGHT 2 : Module for Xoops |
||
| 5 | |||
| 6 | Redesigned and ameliorate By Luc Bizet user at www.frxoops.org |
||
| 7 | Started with the Classifieds module and made MANY changes |
||
| 8 | Website : http://www.luc-bizet.fr |
||
| 9 | Contact : [email protected] |
||
| 10 | ------------------------------------------------------------------------- |
||
| 11 | Original credits below Version History |
||
| 12 | ########################################################################## |
||
| 13 | # Classified Module for Xoops # |
||
| 14 | # By John Mordo user jlm69 at www.xoops.org and www.jlmzone.com # |
||
| 15 | # Started with the MyAds module and made MANY changes # |
||
| 16 | ########################################################################## |
||
| 17 | Original Author: Pascal Le Boustouller |
||
| 18 | Author Website : [email protected] |
||
| 19 | Licence Type : GPL |
||
| 20 | ------------------------------------------------------------------------- |
||
| 21 | */ |
||
| 22 | |||
| 23 | include_once __DIR__ . '/header.php'; |
||
| 24 | require_once XOOPS_ROOT_PATH . '/modules/adslight/include/gtickets.php'; |
||
| 25 | include XOOPS_ROOT_PATH . '/modules/adslight/include/functions.php'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param $lid |
||
| 29 | */ |
||
| 30 | function PrintAd($lid) |
||
| 31 | { |
||
| 32 | global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsModuleConfig, $useroffset, $myts, $xoopsLogger, $moduleDirName, $main_lang; |
||
| 33 | |||
| 34 | $currenttheme = $xoopsConfig['theme_set']; |
||
| 35 | $lid = (int)$lid; |
||
| 36 | |||
| 37 | $result = $xoopsDB->query('SELECT l.lid, l.title, l.expire, l.type, l.desctext, l.tel, l.price, l.typeprice, l.date, l.email, l.submitter, l.town, l.country, l.photo, p.cod_img, p.lid, p.uid_owner, p.url FROM ' |
||
| 38 | . $xoopsDB->prefix('adslight_listing') |
||
| 39 | . ' l LEFT JOIN ' |
||
| 40 | . $xoopsDB->prefix('adslight_pictures') |
||
| 41 | . ' p ON l.lid=p.lid WHERE l.lid=' |
||
| 42 | . $xoopsDB->escape($lid) |
||
| 43 | . ''); |
||
| 44 | list($lid, $title, $expire, $type, $desctext, $tel, $price, $typeprice, $date, $email, $submitter, $town, $country, $photo, $cod_img, $pic_lid, $uid_owner, $url) = $xoopsDB->fetchRow($result); |
||
| 45 | |||
| 46 | $title = $myts->htmlSpecialChars($title); |
||
| 47 | $expire = $myts->htmlSpecialChars($expire); |
||
| 48 | $type = adslight_NameType($myts->htmlSpecialChars($type)); |
||
| 49 | $desctext = $myts->displayTarea($desctext, 1, 1, 1, 1, 1); |
||
| 50 | $tel = $myts->htmlSpecialChars($tel); |
||
| 51 | $price = $myts->htmlSpecialChars($price); |
||
| 52 | $typeprice = $myts->htmlSpecialChars($typeprice); |
||
| 53 | $submitter = $myts->htmlSpecialChars($submitter); |
||
| 54 | $town = $myts->htmlSpecialChars($town); |
||
| 55 | $country = $myts->htmlSpecialChars($country); |
||
| 56 | |||
| 57 | echo ' |
||
| 58 | <html> |
||
| 59 | <head><title>' . $xoopsConfig['sitename'] . "</title> |
||
| 60 | <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> |
||
| 61 | <meta http-equiv=\”robots\” content=\"noindex, nofollow, noarchive\" /> |
||
| 62 | <link rel=\"StyleSheet\" href=\"../../themes/" . $currenttheme . "/style/style.css\" type=\"text/css\"> |
||
| 63 | </head> |
||
| 64 | <body bgcolor=\"#FFFFFF\" text=\"#000000\"> |
||
| 65 | <table border=0><tr><td> |
||
| 66 | <table border=0 width=100% cellpadding=0 cellspacing=1 bgcolor=\"#000000\"><tr><td> |
||
| 67 | <table border=0 width=100% cellpadding=15 cellspacing=1 bgcolor=\"#FFFFFF\"><tr><td>"; |
||
| 68 | |||
| 69 | $useroffset = 0; |
||
| 70 | if ($xoopsUser instanceof XoopsUser) { |
||
|
0 ignored issues
–
show
|
|||
| 71 | $timezone = $xoopsUser->timezone(); |
||
| 72 | $useroffset = (!empty($timezone)) ? $xoopsUser->timezone() : $xoopsConfig['default_TZ']; |
||
| 73 | } |
||
| 74 | $date = ($useroffset * 3600) + $date; |
||
| 75 | $date2 = $date + ($expire * 86400); |
||
| 76 | $date = formatTimestamp($date, 's'); |
||
| 77 | $date2 = formatTimestamp($date2, 's'); |
||
| 78 | |||
| 79 | echo '<br><br><table width=99% border=0> |
||
| 80 | <tr> |
||
| 81 | <td>' . _ADSLIGHT_CLASSIFIED . " (No. $lid ) <br>" . _ADSLIGHT_FROM . " $submitter <br><br>"; |
||
| 82 | |||
| 83 | echo " <strong>$type :</strong> <i>$title</i><br>"; |
||
| 84 | if ($price > 0) { |
||
| 85 | echo '<strong>' . _ADSLIGHT_PRICE2 . "</strong> $price " . $xoopsModuleConfig['adslight_money'] . " - $typeprice<br>"; |
||
| 86 | } |
||
| 87 | if ($photo) { |
||
| 88 | echo "<tr><td><left><img class=\"thumb\" src=\"" . XOOPS_URL . "/uploads/AdsLight/$url\" width=\"130px\" border=0 /></center>"; |
||
| 89 | } |
||
| 90 | echo '</td> |
||
| 91 | </tr> |
||
| 92 | <tr> |
||
| 93 | <td><strong>' . _ADSLIGHT_DESC . "</strong><br><br><div style=\"text-align:justify;\">$desctext</div><p>"; |
||
| 94 | if ($tel) { |
||
| 95 | echo '<br><strong>' . _ADSLIGHT_TEL . "</strong> $tel"; |
||
| 96 | } |
||
| 97 | if ($town) { |
||
| 98 | echo '<br><strong>' . _ADSLIGHT_TOWN . "</strong> $town"; |
||
| 99 | } |
||
| 100 | if ($country) { |
||
| 101 | echo '<br><strong>' . _ADSLIGHT_COUNTRY . "</strong> $country"; |
||
| 102 | } |
||
| 103 | echo '<hr />'; |
||
| 104 | echo '' . _ADSLIGHT_NOMAIL . ' <br>' . XOOPS_URL . '/modules/adslight/viewads.php?lid=' . $lid . '<br>'; |
||
| 105 | echo '<br><br>' . _ADSLIGHT_DATE2 . " $date " . _ADSLIGHT_AND . ' ' . _ADSLIGHT_DISPO . " $date2<br><br>"; |
||
| 106 | echo '</td> |
||
| 107 | </tr> |
||
| 108 | </table>'; |
||
| 109 | echo '<br><br></td></tr></table></td></tr></table> |
||
| 110 | <br><br><center> |
||
| 111 | ' . _ADSLIGHT_EXTRANN . ' <strong>' . $xoopsConfig['sitename'] . "</strong><br> |
||
| 112 | <a href=\"" . XOOPS_URL . "/modules/adslight/\">" . XOOPS_URL . '/modules/adslight/</a> |
||
| 113 | </td></tr></table> |
||
| 114 | </body> |
||
| 115 | </html>'; |
||
| 116 | } |
||
| 117 | |||
| 118 | ############################################################## |
||
| 119 | |||
| 120 | $lid = XoopsRequest::getInt('lid', 0); |
||
| 121 | $op = XoopsRequest::getCmd('op', ''); |
||
| 122 | |||
| 123 | switch ($op) { |
||
| 124 | |||
| 125 | case 'PrintAd': |
||
| 126 | PrintAd($lid); |
||
| 127 | break; |
||
| 128 | |||
| 129 | default: |
||
| 130 | redirect_header('index.php', 3, '' . _RETURNGLO . ''); |
||
| 131 | break; |
||
| 132 | |||
| 133 | } |
||
| 134 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.jsonfile (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.jsonto be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
requireorrequire-devsection?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceofchecks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.