{ clearNodeFileCache($parent->getNodeId()); printToLog("Staring processing of ".count($_FILES)." uploaded files...<br/>"); $count = 0; $size = 0; foreach($_FILES as $tagname => $file) { // get the temporary name (e.g. /tmp/php34634.tmp) $tempName = $file['tmp_name']; // where to save the file? $targetFile = $_POST[$tagname . '_relativePath']; printToLog("Processing #$count: $targetFile<br/>"); $targetFile = utf8d($targetFile); $paths = pathinfo($targetFile); // Create folders $dir = $paths['dirname']; if (empty($dir) || $dir == ".") $parent_path = $parent->getPathInTree(); else $parent_path = $parent->getPathInTree()."/$dir"; if (getNode($parent_path) <= 0) { preg_match_all("/([^\/]*)\/?/i", $dir, $atmp);
function createZone($name) { $data = "<div id=\"$name\">"; if (isset($this->zones[$name])) $data .= utf8d($this->zones[$name]['data']); $data .= "</div>"; return $data; }
function utf8d($data) { if (is_array($data)) { $new = array(); foreach ($data as $key => $d) $new[$key] = utf8d($d); return $new; } return utf8_decode($data); }