| @@ 269-306 (lines=38) @@ | ||
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | while (false !== ($rowres = $GLOBALS['xoopsDB']->fetchArray($queryresult))) { |
|
| 270 | if ($rowres['d_roft'] == '0') { |
|
| 271 | $gender = "<img src=\"assets/images/male.gif\">"; |
|
| 272 | } else { |
|
| 273 | $gender = "<img src=\"assets/images/female.gif\">"; |
|
| 274 | } |
|
| 275 | $name = stripslashes($rowres['d_naam']); |
|
| 276 | //empty array |
|
| 277 | unset($columnvalue); |
|
| 278 | //fill array |
|
| 279 | for ($i = 1; $i < $numofcolumns; ++$i) { |
|
| 280 | $x = $columns[$i]['columnnumber']; |
|
| 281 | if (is_array($columns[$i]['lookupval'])) { |
|
| 282 | foreach ($columns[$i]['lookupval'] as $key => $keyvalue) { |
|
| 283 | if ($keyvalue['id'] == $rowres['user' . $x]) { |
|
| 284 | $value = $keyvalue['value']; |
|
| 285 | } |
|
| 286 | } |
|
| 287 | //debug information |
|
| 288 | ///echo $columns[$i]['columnname']."is an array !"; |
|
| 289 | } //format value - cant use object because of query count |
|
| 290 | elseif (0 === strpos($rowres['user' . $x], 'http://')) { |
|
| 291 | $value = "<a href=\"" . $rowres['user' . $x] . "\">" . $rowres['user' . $x] . '</a>'; |
|
| 292 | } else { |
|
| 293 | $value = $rowres['user' . $x]; |
|
| 294 | } |
|
| 295 | $columnvalue[] = array('value' => $value); |
|
| 296 | } |
|
| 297 | $dogs[] = array( |
|
| 298 | 'id' => $rowres['d_id'], |
|
| 299 | 'name' => $name, |
|
| 300 | 'gender' => $gender, |
|
| 301 | 'link' => "<a href=\"dog.php?id=" . $rowres['d_id'] . "\">" . $name . '</a>', |
|
| 302 | 'colour' => '', |
|
| 303 | 'number' => '', |
|
| 304 | 'usercolumns' => $columnvalue |
|
| 305 | ); |
|
| 306 | } |
|
| 307 | ||
| 308 | return null; |
|
| 309 | } |
|
| @@ 352-390 (lines=39) @@ | ||
| 349 | } |
|
| 350 | } |
|
| 351 | ||
| 352 | while (false !== ($rowres = $GLOBALS['xoopsDB']->fetchArray($queryresult))) { |
|
| 353 | if (0 == $rowres['roft']) { |
|
| 354 | $gender = "<img src='assets/images/male.gif'>"; |
|
| 355 | } else { |
|
| 356 | $gender = "<img src='assets/images/female.gif'>"; |
|
| 357 | } |
|
| 358 | $name = stripslashes($rowres['NAAM']); |
|
| 359 | //empty array |
|
| 360 | // unset($columnvalue1); |
|
| 361 | $columnvalue1 = array(); |
|
| 362 | //fill array |
|
| 363 | for ($i = 1; $i < $numofcolumns1; ++$i) { |
|
| 364 | $x = $columns1[$i]['columnnumber']; |
|
| 365 | if (is_array($columns1[$i]['lookupval'])) { |
|
| 366 | foreach ($columns1[$i]['lookupval'] as $key => $keyvalue) { |
|
| 367 | if ($keyvalue['id'] == $rowres['user' . $x]) { |
|
| 368 | $value = $keyvalue['value']; |
|
| 369 | } |
|
| 370 | } |
|
| 371 | //debug information |
|
| 372 | ///echo $columns[$i]['columnname']."is an array !"; |
|
| 373 | } //format value - cant use object because of query count |
|
| 374 | elseif (0 === strpos($rowres['user' . $x], 'http://')) { |
|
| 375 | $value = "<a href=\"" . $rowres['user' . $x] . "\">" . $rowres['user' . $x] . '</a>'; |
|
| 376 | } else { |
|
| 377 | $value = $rowres['user' . $x]; |
|
| 378 | } |
|
| 379 | $columnvalue1[] = array('value' => $value); |
|
| 380 | } |
|
| 381 | $dogs1[] = array( |
|
| 382 | 'id' => $rowres['Id'], |
|
| 383 | 'name' => $name, |
|
| 384 | 'gender' => $gender, |
|
| 385 | 'link' => "<a href=\"dog.php?id=" . $rowres['Id'] . "\">" . $name . '</a>', |
|
| 386 | 'colour' => '', |
|
| 387 | 'number' => '', |
|
| 388 | 'usercolumns' => $columnvalue1 |
|
| 389 | ); |
|
| 390 | } |
|
| 391 | ||
| 392 | return null; |
|
| 393 | } |
|