This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
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 | * pedigree module for XOOPS |
||
14 | * |
||
15 | * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} |
||
16 | * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} |
||
17 | * @package pedigree |
||
18 | * @author XOOPS Module Dev Team |
||
19 | */ |
||
20 | |||
21 | use Xmf\Request; |
||
22 | |||
23 | //require_once \dirname(__DIR__, 2) . '/mainfile.php'; |
||
24 | require_once __DIR__ . '/header.php'; |
||
25 | $moduleDirName = basename(__DIR__); |
||
26 | xoops_loadLanguage('main', $moduleDirName); |
||
27 | require_once __DIR__ . '/config/config.php'; |
||
28 | require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
||
29 | $dogid = Request::getInt('dogid', 0, 'GET'); |
||
30 | |||
31 | //create data and variables |
||
32 | $sql = ' |
||
33 | SELECT d.Id as d_id, |
||
34 | d.pname as d_pname, |
||
35 | d.roft as d_roft, |
||
36 | d.foto as d_foto, |
||
37 | f.Id as f_id, |
||
38 | f.pname as f_pname, |
||
39 | f.foto as f_foto, |
||
40 | m.Id as m_id, |
||
41 | m.pname as m_pname, |
||
42 | m.foto as m_foto, |
||
43 | ff.Id as ff_id, |
||
44 | ff.pname as ff_pname, |
||
45 | ff.foto as ff_foto, |
||
46 | mf.Id as mf_id, |
||
47 | mf.pname as mf_pname, |
||
48 | mf.foto as mf_foto, |
||
49 | fm.Id as fm_id, |
||
50 | fm.pname as fm_pname, |
||
51 | fm.foto as fm_foto, |
||
52 | mm.Id as mm_id, |
||
53 | mm.pname as mm_pname, |
||
54 | mm.foto as mm_foto, |
||
55 | fff.Id as fff_id, |
||
56 | fff.pname as fff_pname, |
||
57 | ffm.Id as ffm_id, |
||
58 | ffm.pname as ffm_pname, |
||
59 | fmf.Id as fmf_id, |
||
60 | fmf.pname as fmf_pname, |
||
61 | fmm.Id as fmm_id, |
||
62 | fmm.pname as fmm_pname, |
||
63 | mmf.Id as mmf_id, |
||
64 | mmf.pname as mmf_pname, |
||
65 | mff.Id as mff_id, |
||
66 | mff.pname as mff_pname, |
||
67 | mfm.Id as mfm_id, |
||
68 | mfm.pname as mfm_pname, |
||
69 | mmm.Id as mmm_id, |
||
70 | mmm.pname as mmm_pname |
||
71 | FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' d |
||
72 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' f ON d.father = f.Id |
||
73 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' m ON d.mother = m.Id |
||
74 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' ff ON f.father = ff.Id |
||
75 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' fff ON ff.father = fff.Id |
||
76 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' ffm ON ff.mother = ffm.Id |
||
77 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' mf ON m.father = mf.Id |
||
78 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' mff ON mf.father = mff.Id |
||
79 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' mfm ON mf.mother = mfm.Id |
||
80 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' fm ON f.mother = fm.Id |
||
81 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' fmf ON fm.father = fmf.Id |
||
82 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' fmm ON fm.mother = fmm.Id |
||
83 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' mm ON m.mother = mm.Id |
||
84 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' mmf ON mm.father = mmf.Id |
||
85 | LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . " mmm ON mm.mother = mmm.Id |
||
86 | where d.Id=$dogid"; |
||
87 | |||
88 | $result = $GLOBALS['xoopsDB']->query($sql); |
||
89 | $male = "<img src=\"" . PEDIGREE_IMAGE_URL . "/male.gif\">"; |
||
90 | $female = "<img src=\"" . PEDIGREE_IMAGE_URL . "/female.gif\">"; |
||
91 | $gender = ''; |
||
92 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
||
93 | $gender = (Constants::MALE == $row['d_roft']) ? $male : $female; |
||
94 | echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
||
95 | <html><head> |
||
96 | <meta http-equiv="Content-Type" content="text/html"> |
||
97 | <meta name="AUTHOR" content="' . $GLOBALS['xoopsConfig']['sitename'] . '"> |
||
98 | <meta name="COPYRIGHT" content="Copyright (c) 2019 by ' . $GLOBALS['xoopsConfig']['sitename'] . '"> |
||
99 | <meta name="GENERATOR" content="XOOPS Pedigree database"> |
||
100 | </head> |
||
101 | <body bgcolor="#ffffff" text="#000000" onload="window.print()"> |
||
102 | <table border="0" width="640"> |
||
103 | <tr> |
||
104 | <td>'; |
||
105 | |||
106 | echo " <table width='100%' cellspacing='2' border='2'>\n" |
||
107 | . " <!-- header (dog name) -->\n" |
||
108 | . " <tr>\n" |
||
109 | . " <th colspan='4' style='text-align:center;'>\n" |
||
110 | . ' ' |
||
111 | . stripslashes($row['d_pname']) |
||
112 | . "\n" |
||
113 | . " </th>\n" |
||
114 | . " </tr>\n" |
||
115 | . " <tr>\n" |
||
116 | . " <!-- selected dog -->\n" |
||
117 | . " <td width='25%' rowspan='8'>\n" |
||
118 | . " {$gender}" |
||
119 | . stripslashes($row['d_pname']) |
||
120 | . "\n"; |
||
121 | if ('' != $row['d_foto']) { |
||
122 | echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['d_foto'] . "_150.jpeg' width='150px;'>"; |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
123 | } |
||
124 | echo " </td>\n" . " <!-- father -->\n" . " <td width='25%' rowspan='4'>\n" . " {$male}" . stripslashes($row['f_pname']) . "\n"; |
||
125 | if ('' != $row['f_foto']) { |
||
126 | echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['f_foto'] . "_150.jpeg' width='150px;'>\n"; |
||
127 | } |
||
128 | echo " </td>\n" . " <!-- father father -->\n" . " <td width='25%' rowspan='2'>\n" . " {$male}" . stripslashes($row['ff_pname']) . "\n"; |
||
129 | if ('' != $row['ff_foto']) { |
||
130 | echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['ff_foto'] . "_150.jpeg' width='150px;'>\n"; |
||
131 | } |
||
132 | echo " </td>\n" |
||
133 | . " <!-- father father father -->\n" |
||
134 | . " <td width='25%'>\n" |
||
135 | . " {$male}" |
||
136 | . stripslashes($row['fff_pname']) |
||
137 | . "\n" |
||
138 | . " </td>\n" |
||
139 | . " </tr>\n" |
||
140 | . " <tr>\n" |
||
141 | . " <!-- father father mother -->\n" |
||
142 | . " <td width='25%'>\n" |
||
143 | . " {$female}" |
||
144 | . stripslashes($row['ffm_pname']) |
||
145 | . "\n" |
||
146 | . " </td>\n" |
||
147 | . " </tr>\n" |
||
148 | . " <tr>\n" |
||
149 | . " <!-- father mother -->\n" |
||
150 | . " <td width='25%' rowspan='2'>\n" |
||
151 | . " {$female}" |
||
152 | . stripslashes($row['fm_pname']) |
||
153 | . "\n"; |
||
154 | if ('' != $row['fm_foto']) { |
||
155 | echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['fm_foto'] . "_150.jpeg' width='150px;'>\n"; |
||
156 | } |
||
157 | echo " </td>\n" |
||
158 | . " <!-- father mother father -->\n" |
||
159 | . " <td width='25%'>\n" |
||
160 | . " {$male}" |
||
161 | . stripslashes($row['fmf_pname']) |
||
162 | . "\n" |
||
163 | . " </td>\n" |
||
164 | . " </tr>\n" |
||
165 | . " <tr>\n" |
||
166 | . " <!-- father mother mother -->\n" |
||
167 | . " <td width='25%'>\n" |
||
168 | . " {$female}" |
||
169 | . stripslashes($row['fmm_pname']) |
||
170 | . "\n" |
||
171 | . " </td>\n" |
||
172 | . " </tr>\n" |
||
173 | . " <tr>\n" |
||
174 | . " <!-- mother -->\n" |
||
175 | . " <td width='25%' rowspan='4'>\n" |
||
176 | . " {$female}" |
||
177 | . stripslashes($row['m_pname']) |
||
178 | . "\n"; |
||
179 | if ('' != $row['m_foto']) { |
||
180 | echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['m_foto'] . "_150.jpeg' width='150px;'>\n"; |
||
181 | } |
||
182 | echo " </td>\n" . " <!- mother father -->\n" . " <td width='25%' rowspan='2'>\n" . " {$male}" . stripslashes($row['mf_pname']) . "\n"; |
||
183 | if ('' != $row['mf_foto']) { |
||
184 | echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['mf_foto'] . "_150.jpeg' width='150px;'>\n"; |
||
185 | } |
||
186 | echo " </td>\n" |
||
187 | . " <!-- mother father father -->\n" |
||
188 | . " <td width='25%'>\n" |
||
189 | . " {$male}" |
||
190 | . stripslashes($row['mff_pname']) |
||
191 | . "\n" |
||
192 | . " </td>\n" |
||
193 | . " </tr>\n" |
||
194 | . " <tr>\n" |
||
195 | . " <!-- mother father mother -->\n" |
||
196 | . " <td width='25%'>\n" |
||
197 | . " {$female}" |
||
198 | . stripslashes($row['mfm_pname']) |
||
199 | . "\n" |
||
200 | . " </td>\n" |
||
201 | . " </tr>\n" |
||
202 | . " <tr>\n" |
||
203 | . " <!-- mother mother -->\n" |
||
204 | . " <td width='25%' rowspan='2'>\n" |
||
205 | . " {$female}" |
||
206 | . stripslashes($row['mm_pname']) |
||
207 | . "\n" |
||
208 | . " </td>\n" |
||
209 | . " <!-- mother mother father -->\n" |
||
210 | . " <td width='25%'>\n" |
||
211 | . " {$male}" |
||
212 | . stripslashes($row['mmf_pname']) |
||
213 | . "\n" |
||
214 | . " </td>\n" |
||
215 | . " </tr>\n" |
||
216 | . " <tr>\n" |
||
217 | . " <!-- mother mother mother -->\n" |
||
218 | . " <td width='25%'>\n" |
||
219 | . " {$female}" |
||
220 | . stripslashes($row['mmm_pname']) |
||
221 | . "\n" |
||
222 | . " </td>\n" |
||
223 | . " </tr>\n" |
||
224 | . " <!-- footer (dog url) -->\n" |
||
225 | . " <tr>\n" |
||
226 | . " <th colspan='4' style='text-align:center;'>\n" |
||
227 | . " <a href='" |
||
228 | . $GLOBALS['xoops']->url("www/modules/pedigree/pedigree.php?pedid={$dogid}") |
||
229 | . "'>" |
||
230 | . $GLOBALS['xoops']->url("www/modules/pedigree/pedigree.php?pedid={$dogid}") |
||
231 | . "</a>\n" |
||
232 | . " </th>\n" |
||
233 | . " </tr>\n" |
||
234 | . " </table>\n" |
||
235 | . " </td>\n" |
||
236 | . " </tr>\n" |
||
237 | . " </table>\n" |
||
238 | . " </body>\n" |
||
239 | . " </html>\n"; |
||
240 | } |
||
241 |