コード例 #1
0
 // file ersetzen
 if ($_FILES["upload"]["name"] != "") {
     $error = file_validate($_FILES["upload"]["tmp_name"], $_FILES["upload"]["size"], $cfg["file"]["filesize"], array($form_values["ffart"]), "upload");
     if ($error == 0) {
         $newname = $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"] . $_SESSION["uid"] . "_" . $_FILES["upload"]["name"];
         rename($_FILES["upload"]["tmp_name"], $newname);
         $file_id = $form_values["fid"];
         arrange($file_id, $newname, $_FILES["upload"]["name"]);
     } else {
         $ausgaben["form_error"] .= "#(error_replace) " . $file["name"] . " g(file_error" . $error . ")";
     }
 }
 if ($_POST["extract"] != "") {
     // naechste freie compilation-id suchen
     if ($_POST["selection"] == -1) {
         $buffer = compilation_list();
         reset($buffer);
         $compid = key($buffer) + 1;
     } else {
         $compid = "";
     }
     // zip auspacken
     $not_extracted = zip_handling($file_srv, $cfg["file"]["base"]["maindir"] . $cfg["file"]["base"]["new"], $cfg["file"]["filetyp"], $cfg["file"]["filesize"], "", $compid, $cfg["fileed"]["zip_handling"]["sektions"]);
     if (count($not_extracted) > 0) {
         $buffer = array();
         foreach ($not_extracted as $value) {
             $buffer[] = $value["name"];
         }
         $ausgaben["form_error"] .= "#(not_compl_extracted)" . implode(", ", $buffer);
     } else {
         header("Location: " . $cfg["fileed"]["basis"] . "/add.html");
コード例 #2
0
         {
             return $a["sort"] < $b["sort"] ? -1 : 1;
         }
     }
     $result = $db->query($sql);
     filelist($result, "fileed", $ausgaben["compid"]);
     if (is_array($dataloop["list_images"])) {
         uasort($dataloop["list_images"], "pics_sort");
         $dataloop["chosen"] = $dataloop["list_images"];
         unset($dataloop["list_images"]);
     }
 } else {
     /* compilation hinzufuegen */
     $hidedata["modus"]["heading"] = "#(ueberschrift_add)";
     // id der naechsten compilation rausfinden
     $dataloop["group_dropdown"] = compilation_list($environment["parameter"][1]);
     reset($dataloop["group_dropdown"]);
     $ausgaben["compid"] = key($dataloop["group_dropdown"]) + 1;
     // dateien aus der gruppierung (Session)
     if (count($_SESSION["compilation_temp"][$ausgaben["compid"]]["contain"]) > 0) {
         $sql = "SELECT *\n                          FROM " . $cfg["fileed"]["db"]["file"]["entries"] . "\n                         WHERE " . $cfg["fileed"]["db"]["file"]["key"] . " IN (" . implode(",", $_SESSION["compilation_temp"][$ausgaben["compid"]]["contain"]) . ")";
         $result = $db->query($sql);
         filelist($result, "fileed", $ausgaben["compid"]);
         $dataloop["chosen"] = $dataloop["list_images"];
         unset($dataloop["list_images"]);
     }
 }
 // dateien aus ablage und file_memo
 $clipboard = array();
 if (is_array($_SESSION["compilation_temp"][$ausgaben["compid"]]["trash"])) {
     $clipboard = array_merge($_SESSION["compilation_temp"][$ausgaben["compid"]]["trash"], $clipboard);
コード例 #3
0
                 $result = $db->query($sql);
                 $dataloop["list_images"] = array();
                 filelist($result, "fileed", $key);
                 uasort($dataloop["list_images"], "pics_sort");
                 foreach ($dataloop["list_images"] as $key => $value) {
                     $_SESSION["compilation_memo"][$cid][$key] = $key;
                 }
             }
         }
     }
     echo print_r($_SESSION["compilation_memo"], true);
     echo "</pre>";
     die;
 }
 // compilation-array bauen lassen
 $compilations = compilation_list($environment["parameter"][1]);
 // suche
 // * * * * *
 /* suchfeld */
 $filters = array();
 if ($_POST["send"] != "") {
     if ($_POST["search"] != "") {
         $_SESSION["compilation_search"] = $_POST["search"];
     } elseif (isset($_SESSION["compilation_search"])) {
         unset($_SESSION["compilation_search"]);
     }
 }
 $ausgaben["search"] = $_SESSION["compilation_search"];
 if ($_SESSION["compilation_search"] != "") {
     // array wird durchsucht
     function compilation_search($comp)
コード例 #4
0
     foreach ($pages as $value) {
         $dataloop["list"][$data["fid"]] = array("id" => $data["fid"], "item" => $data["ffname"], "link" => $link, "reason" => "#(content_error)" . $value);
     }
     $forbidden[$data["fid"]] = $data["fid"];
 }
 // selection-check
 if (strstr($data["fhit"], "#p")) {
     preg_match_all("/#p([0-9]*)[,0-9]*#/i", $data["fhit"], $match);
     foreach ($match[1] as $value) {
         $view_link = "<a href=\"" . $cfg["fileed"]["basis"] . "/delete/view,o," . $data["fid"] . "," . $value . ".html\">Gruppe #" . $value . "</a>";
         $dataloop["list"][] = array("id" => $data["fid"], "item" => $data["ffname"], "link" => $link, "reason" => "#(group_error)" . $view_link);
         $forbidden["sel_db" . $value] = $data["fid"];
     }
 }
 // selection-check2
 $compilations_OnTheFly = compilation_list("", 25, 1);
 foreach ($compilations_OnTheFly as $ofl_id) {
     $ofl = trim($ofl_id["id"], ":");
     $ofl_array = explode(":", $ofl);
     if (in_array($data["fid"], $ofl_array)) {
         if (count($ofl_id["content"]) > 0) {
             foreach ($ofl_id["content"] as $content) {
                 $view_link = "<a href=\"" . $cfg["fileed"]["basis"] . "/delete/view,o," . $ofl_array[0] . "," . $ofl_id["id"] . ",.html\">Gruppe (On The Fly)</a>";
                 $dataloop["list"][] = array("id" => "a" . $data["fid"], "item" => $data["ffname"], "link" => $link, "reason" => "#(group_error)" . $view_link);
             }
         }
         if ($group_content != "") {
             $group_content = " (#(used_in) " . $group_content . ")";
         }
         $forbidden["sel_fly"] = $data["fid"];
     }