summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2014-04-20 05:52:42 +0200
committerroot2014-04-20 05:52:42 +0200
commitfbd2513b6094d8b902e1ac687e6d9d4889a48701 (patch)
treeb3774a55e5f8debd25eae57d8000ae5331e7e698
parent20b0d524a0cbc9fa04c0ae03ed9e50d3ef295ee7 (diff)
downloadfiles.iamfabulous.de-fbd2513b6094d8b902e1ac687e6d9d4889a48701.tar.gz
Added class file.
-rw-r--r--www/functions/class_files.php49
-rwxr-xr-xwww/include.php2
2 files changed, 51 insertions, 0 deletions
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 @@
+<?php
+
+class file {
+
+ public $file;
+
+ function __construct(){
+ $f = collect_content($GLOBALS["db"], $_GET["name"], $_GET["folder"]);
+ $this->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