17 include_once
"FDL/Lib.Dir.php";
29 $numFunc =
$usage->addRequiredParameter(
"CKEditorFuncNum",
"CKEditorFuncNum");
31 $startpage = intval(
$usage->addOptionalParameter(
"page",
"pageNumber", array() ,
"0"));
32 $key =
$usage->addOptionalParameter(
"key",
"key", array() ,
"");
34 $usage->setStrictMode(
false);
41 if ($startpage == 0)
$start = 0;
43 $sqlfilters = array();
44 if ($key) $sqlfilters[] =
"svalues ~* '" . pg_escape_string($key) .
"'";
47 $oaimg = $wimg->getAttribute(
"img_file");
48 foreach ($limg as $k => $img) {
49 $wimg->id = $img[
"id"];
50 $limg[$k][
"imgsrc"] = $wimg->GetHtmlValue($oaimg, $img[
"img_file"]);
51 $limg[$k][
"imgcachesrc"] = str_replace(
"cache=no",
"", $limg[$k][
"imgsrc"]);
52 if (preg_match(
"/^file/", $limg[$k][
"imgsrc"], $vids)) {
53 $limg[$k][
"imgcachesrc"] = $limg[$k][
"imgsrc"] .
"&width=100";
55 $limg[$k][
'title'] = htmlspecialchars($limg[$k][
'title'], ENT_QUOTES);
56 $limg[$k][
'imgcachesrc'] = htmlspecialchars($limg[$k][
'imgcachesrc'], ENT_QUOTES);
59 $action->lay->eSet(
"key", $key);
60 if (($startpage == 0) && (count($limg) <
$slice)) {
61 $action->lay->set(
"morepages",
false);
64 $action->lay->set(
"morepages",
true);
65 $action->lay->set(
"hppage",
true);
66 if ($startpage > 0) $action->lay->set(
"ppage", $startpage - 1);
67 else $action->lay->set(
"hppage",
false);
68 $action->lay->set(
"cpage", $startpage + 1);
69 if (
$slice == count($limg)) $action->lay->set(
"npage", $startpage + 1);
70 else $action->lay->set(
"npage", 0);
73 $action->lay->setBlockData(
"IMAGES", $limg);
74 $action->lay->set(
"NOIMAGES", (count($limg) == 0));
75 $action->lay->set(
"FUNCNUM", urlencode($numFunc));
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
Verify arguments for action function.
internalGetDocCollection($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true, $trash="", &$debug=null, $folderRecursiveLevel=2, $join= '',\SearchDoc &$searchDoc=null)
if($file) if($subject==""&&$file) if($subject=="") $err