tag; else { //ADW $showpagename = $vars[0]; //ADW $vars[0] = $this->UnwrapLink($vars[0]); //ADW $page_href = $this->Href("", $vars[0]); //ADW $showpageandpath = ''.$showpagename.''; //ADW } //ADW $can_view = $this->HasAccess("read",$vars[0]) || $this->IsAdmin() || $this->UserIsOwner($vars[0]); $can_delete = $this->IsAdmin() || $this->UserIsOwner($vars[0]); } else { $can_view = 1; $vars[0] = $this->tag; } if ($can_view) { if ($global || ($tag == $vars[0])) $filepage = $this->page; else $filepage = $this->LoadPage($vars[0]); if (!$global && !$filepage["id"]) return; // load files list $files = $this->LoadAll( "select id, page_id, filesize, picture_w, picture_h, filename, description, uploaded_dt, user from ". $this->config["table_prefix"]."upload where ". " page_id = '". ($global?0:$filepage["id"])."' ".$user_add. " order by ".$orderby ); if (!is_array($files)) $files = array(); // if (!$nomark){ $title = $this->GetResourceValue("UploadTitle".($global?"Global":"")); print("
".$title.": ".$showpageandpath."\n"); //ADW } // display $kb = $this->GetResourceValue("UploadKB"); $del = $this->GetResourceValue("UploadRemove"); if (!$global) $path = "@".str_replace("/", "@", $this->NpjTranslit($vars[0]))."@"; else $path = ""; if (!$global) $path2 = "file:/".($this->NpjTranslit($vars[0]))."/"; else $path2 = "file:"; // !!!!! patch link not to show pictures when not needed if (!$pictures) $path2 = str_replace("file:", "_file:", $path2); if (count($files)) { ?> filesCache[$file["page_id"]][$file["filename"]] = &$file; $dt = $file["uploaded_dt"]; $desc = $this->Format( $file["description"], "typografica" ); if ($desc == "") $desc = " "; $filename = $file["filename"]; $filesize = ceil($file["filesize"]/1024); $link = $this->Link($path2.$filename, "", $filename ); if ($this->IsAdmin() || (!$is_global && ($this->GetPageOwner($vars[0]) == $this->GetUserName())) || ($file["user"] == $this->GetUserName())) $remove_mode=1; else $remove_mode=0; $remove_href = $this->Href("upload", $vars[0], "remove=".($global?"global":"local")."&file=".$filename); ?>
      ( ) 
\n"; } else echo "".$this->GetResourceValue("ActionDenied")." "; ?>