From fbd2513b6094d8b902e1ac687e6d9d4889a48701 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 20 Apr 2014 05:52:42 +0200 Subject: Added class file. --- www/functions/class_files.php | 49 +++++++++++++++++++++++++++++++++++++++++++ www/include.php | 2 ++ 2 files changed, 51 insertions(+) create mode 100644 www/functions/class_files.php (limited to 'www') diff --git a/www/functions/class_files.php b/www/functions/class_files.php new file mode 100644 index 0000000..716d4c2 --- /dev/null +++ b/www/functions/class_files.php @@ -0,0 +1,49 @@ +file=$f; + } + function initFile($val){ + $this->file=$val; + } + function getDim(){ + return count($this->file); + } + function getParent($val){ + $ar = $this->file; + return $ar[$val][1]; + } + function getOwner($val){ + $ar = $this->file; + return $ar[$val][2]; + } + function getName($val){ + $ar = $this->file; + return $ar[$val][3]; + } + function getFolder($val){ + $ar = $this->file; + return $ar[$val][4]; + } + function getMime($val){ + $ar = $this->file; + return $ar[$val][5]; + } + function getSize($val){ + $ar = $this->file; + return $ar[$val][6]; + } + function getHash($val){ + $ar = $this->file; + return $ar[$val][7]; + } + function getDownLink($val){ + $ar = $this->file; + return $ar[$val][8]; + } +} diff --git a/www/include.php b/www/include.php index e24a0c3..11d5451 100755 --- a/www/include.php +++ b/www/include.php @@ -14,6 +14,8 @@ require_once("constants.php"); $func_dir = "functions/"; +require_once($func_dir . "class_files.php"); + require_once($func_dir . "func_failure.php"); // 404 and other errors require_once($func_dir . "func_interface.php"); // presents the vfs content require_once($func_dir . "func_invite.php"); // handles the invite routine -- cgit v1.2.3