19 include_once (
"FDL/Lib.Dir.php");
33 if ($startpage == 0)
$start = 0;
35 $sqlfilters = array();
36 if ($key) $sqlfilters[] =
"svalues ~* '" . pg_escape_string($key) .
"'";
39 $oaimg = $wimg->getAttribute(
"img_file");
41 foreach ($limg as $k =>
$img) {
42 $wimg->id =
$img[
"id"];
43 $limg[$k][
"imgsrc"] = $wimg->GetHtmlValue($oaimg,
$img[
"img_file"]);
44 $limg[$k][
"imgcachesrc"] = str_replace(
"cache=no",
"", $limg[$k][
"imgsrc"]);
45 if (preg_match(
"/vid=([0-9]+)/", $limg[$k][
"imgsrc"], $vids)) {
47 if ($vid > 0) $limg[$k][
"imgcachesrc"] = $limg[$k][
"imgsrc"] .
"&width=100";
52 if (($startpage == 0) && (count($limg) <
$slice)) {
53 $action->lay->set(
"morepages",
false);
56 $action->lay->set(
"morepages",
true);
57 $action->lay->set(
"hppage",
true);
58 if ($startpage > 0)
$action->lay->set(
"ppage", $startpage - 1);
59 else $action->lay->set(
"hppage",
false);
60 $action->lay->set(
"cpage", $startpage + 1);
61 if (
$slice == count($limg))
$action->lay->set(
"npage", $startpage + 1);
62 else $action->lay->set(
"npage", 0);
65 $action->lay->setBlockData(
"IMAGES", $limg);
66 $action->lay->set(
"NOIMAGES", (count($limg) == 0));