These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Module: Lexikon - glossary module |
||
4 | * orig. Author: nagl@dictionary |
||
5 | * Licence: GNU |
||
6 | */ |
||
7 | |||
8 | include __DIR__ . '/header.php'; |
||
9 | include XOOPS_ROOT_PATH . '/header.php'; |
||
10 | |||
11 | xoops_header(false); |
||
12 | |||
13 | $entryID = isset($_GET['entryID']) ? (int)((int)$_GET['entryID']) : 0; |
||
14 | if (!$entryID) { |
||
15 | exit(); |
||
16 | } |
||
17 | //global $xoopsModuleConfig; |
||
18 | $myts = MyTextSanitizer::getInstance(); |
||
19 | |||
20 | $sqlQuery = $xoopsDB->query('SELECT * FROM ' |
||
21 | . $xoopsDB->prefix('lxentries') |
||
22 | . " WHERE entryID=$entryID"); |
||
23 | $sqlfetch = $xoopsDB->fetchArray($sqlQuery); |
||
24 | View Code Duplication | if ($xoopsModuleConfig['multicats'] == 1) { |
|
0 ignored issues
–
show
|
|||
25 | $cID = $sqlfetch['categoryID']; |
||
26 | $sqlquery2 = $xoopsDB->query('SELECT name FROM ' |
||
27 | . $xoopsDB->prefix('lxcategories') |
||
28 | . " WHERE categoryID = $cID"); |
||
29 | $sqlfetch2 = $xoopsDB->fetchArray($sqlquery2); |
||
30 | $catname = $myts->htmlSpecialChars($sqlfetch2['name']); |
||
31 | } |
||
32 | $term = $myts->htmlSpecialChars($sqlfetch['term']); |
||
33 | $definition = $myts->displayTarea($sqlfetch['definition'], $sqlfetch['html'], $sqlfetch['smiley'], 1, 1, 1); |
||
34 | |||
35 | echo '</head><body> |
||
36 | <table width="100%" class="outer"> |
||
37 | <tr> |
||
38 | <th class="head">' . $term . '</th> |
||
39 | </tr> |
||
40 | </table>'; |
||
41 | if ($xoopsModuleConfig['multicats'] == 1) { |
||
42 | echo '<div class="itemBody">' . _MD_LEXIKON_ENTRYCATEGORY . '' . $catname . '</div>'; |
||
43 | } |
||
44 | echo '<div class="itemBody"><p class="itemText">' . $definition . '</p></div> |
||
45 | <div style="text-align:center;"><p><input value="' . _CLOSE . '" type="button" onclick="window.close();"></p></div>'; |
||
46 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.