diff options
| author | Horus3 | 2014-04-21 18:35:43 +0200 |
|---|---|---|
| committer | Horus3 | 2014-04-21 18:35:43 +0200 |
| commit | def084a19a19e1d5c77600c0c0967e5a8fed5b93 (patch) | |
| tree | 6b8eb4b3af0decc1d0a48dc9304789f2794fd98a /www/functions/class_files.php | |
| parent | 2a1a332c4e7625a40008d5c4565fca1bbf062d91 (diff) | |
| download | files.iamfabulous.de-def084a19a19e1d5c77600c0c0967e5a8fed5b93.tar.gz | |
Now you can get a full list of FILES or DIRECTORY from class files. Also changed database layout to log every up- and download.
Diffstat (limited to 'www/functions/class_files.php')
| -rw-r--r-- | www/functions/class_files.php | 174 |
1 files changed, 0 insertions, 174 deletions
diff --git a/www/functions/class_files.php b/www/functions/class_files.php deleted file mode 100644 index 10182a9..0000000 --- a/www/functions/class_files.php +++ /dev/null @@ -1,174 +0,0 @@ -<?php - -class file { - - public $file; - - function __construct($val = null){ - if($val == null){ - $this->file = collect_content($GLOBALS["db"], $_GET["name"], $_GET["folder"]); - } else { - $this->file = $val; - } - } - function NotFound(){ - if($this->file == FILE_NOT_FOUND){ - return true; - } else { - return false; - } - } - function isEmpty(){ - if($this->file == EMPTY_FOLDER){ - return true; - } else { - return false; - } - } - function isFile(){ - if(check_if_file($GLOBALS["db"], $_GET["name"], $_GET["folder"])){ - return true; - } else { - return false; - } - } - function initFile($val){ - if(!$val){ - return false; - } - $this->file=$val; - } - function getDim(){ - return count($this->file); - } - function getId($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][0]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][0]; - } - return $res; - } - } - function getParent($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][1]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][1]; - } - return $res; - } - } - function getOwnerId(){ - $id = user_id($GLOBALS["db"], $_GET["name"]); - return $id; - } - function getOwnerName(){ - return $_GET["name"]; - } - function getName($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][3]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][3]; - } - return $res; - } - } - function getType($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][4]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][4]; - } - return $res; - } - } - function getMime($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][5]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][5]; - } - return $res; - } - } - function getSize($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][6]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][6]; - } - return $res; - } - } - function getHash($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][7]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][7]; - } - return $res; - } - } - function getDownLink($val = null){ - $ar = $this->file; - if($val != null){ - if(!preg_match("/^[0-9]+$/", $val)){ - return false; - } - return $ar[$val][8]; - } else { - $res; - for($i=0; $i<count($ar); $i++){ - $res[$i] = $ar[$i][8]; - } - return $res; - } - } - function getAll(){ - return $this->file; - } -} |
