file = collect_content($GLOBALS["db"], $_GET["name"], $_GET["folder"]); } else { $this->file = $val; } $f = $this->file; $DirRes = false; $FileRes = false; $DirCnt = 0; $FileCnt = 0; for($i=0; $iDirList = $DirRes; $this->FileList = $FileRes; $db = $GLOBALS["db"]; $OwnerId = user_id($GLOBALS["db"], $_GET["name"]); $this->OwnerId = $OwnerId; if(!$val){ return; } else { $FileId = select_file_id($db, $OwnerId, $_GET["folder"]); if(!$FileId){ return; } $ParentId_db = $db->query("SELECT parent FROM files WHERE id=".$FileId.";"); $ParentId = $ParentId_db->fetchArray(SQLITE3_NUM); $this->ParentId = $ParentId[0]; $ParentName_db = $db->query("SELECT name FROM files WHERE id=".$ParentId[0]); $ParentName = $ParentName_db->fetchArray(SQLITE3_NUM); $this->ParentName = $ParentName[0]; } } 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; $iParentId; } function getParentName(){ return $this->ParentName; } function getOwnerId(){ return $this->OwnerId; } 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; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][4]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][5]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][6]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][7]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][8]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][9]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][10]; } else { $res; for($i=0; $ifile; if($val != null){ if(!preg_match("/^[0-9]+$/", $val)){ return false; } return $ar[$val][11]; } else { $res; for($i=0; $ifile; } function getDirList(){ return $this->DirList; } function getFileList(){ return $this->FileList; } function getDirNum(){ if(!$this->DirList){ return false; } else { return count($this->DirList); } } function getFileNum(){ if(!$this->FileList){ return false; } else { return count($this->FileList); } } }