| @@ 107-124 (lines=18) @@ | ||
| 104 | $pictures_number = $album_factory->getCount($criteria_lid, $criteria_uid); |
|
| 105 | ||
| 106 | // Are there pictures in the album? |
|
| 107 | if (0 == $pictures_number) { |
|
| 108 | $xoopsTpl->assign('lang_nopicyet', _ADSLIGHT_NOTHINGYET); |
|
| 109 | } else { |
|
| 110 | // no pictures in the album |
|
| 111 | /** |
|
| 112 | * Lets populate an array with the data from the pictures |
|
| 113 | */ |
|
| 114 | $i = 0; |
|
| 115 | foreach ($pictures_object_array as $picture) { |
|
| 116 | $pictures_array[$i]['url'] = $picture->getVar('url', 's'); |
|
| 117 | $pictures_array[$i]['desc'] = $picture->getVar('title', 's'); |
|
| 118 | $pictures_array[$i]['cod_img'] = $picture->getVar('cod_img', 's'); |
|
| 119 | $pictures_array[$i]['lid'] = $picture->getVar('lid', 's'); |
|
| 120 | $xoopsTpl->assign('pics_array', $pictures_array); |
|
| 121 | ||
| 122 | ++$i; |
|
| 123 | } |
|
| 124 | } |
|
| 125 | ||
| 126 | /** |
|
| 127 | * Show the form if it is the owner and he can still upload pictures |
|
| @@ 425-443 (lines=19) @@ | ||
| 422 | $album_factory = new Xoopsjlm_picturesHandler($xoopsDB); |
|
| 423 | $pictures_object_array = $album_factory->getObjects($criteria_lid, $criteria_uid); |
|
| 424 | $pictures_number = $album_factory->getCount($criteria_lid, $criteria_uid); |
|
| 425 | if ($pictures_number == 0) { |
|
| 426 | $nopicturesyet = _ADSLIGHT_NOTHINGYET; |
|
| 427 | $xoopsTpl->assign('lang_nopicyet', $nopicturesyet); |
|
| 428 | } else { |
|
| 429 | ||
| 430 | /** |
|
| 431 | * Lets populate an array with the data from the pictures |
|
| 432 | */ |
|
| 433 | $i = 0; |
|
| 434 | foreach ($pictures_object_array as $picture) { |
|
| 435 | $pictures_array[$i]['url'] = $picture->getVar('url', 's'); |
|
| 436 | $pictures_array[$i]['desc'] = $picture->getVar('title', 's'); |
|
| 437 | $pictures_array[$i]['cod_img'] = $picture->getVar('cod_img', 's'); |
|
| 438 | $pictures_array[$i]['lid'] = $picture->getVar('lid', 's'); |
|
| 439 | $xoopsTpl->assign('pics_array', $pictures_array); |
|
| 440 | ||
| 441 | ++$i; |
|
| 442 | } |
|
| 443 | } |
|
| 444 | $owner = new XoopsUser(); |
|
| 445 | $identifier = $owner->getUnameFromId($usid); |
|
| 446 | if ($xoopsModuleConfig['adslight_lightbox'] == 1) { |
|