blob: 0cf066c58a8434916f1ea330b573faacee15cb71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<?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){
$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];
}
}
|