summaryrefslogtreecommitdiff
path: root/www/functions/func_content.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions/func_content.php')
-rw-r--r--www/functions/func_content.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/www/functions/func_content.php b/www/functions/func_content.php
new file mode 100644
index 0000000..2536dcc
--- /dev/null
+++ b/www/functions/func_content.php
@@ -0,0 +1,27 @@
+<?
+
+function get_content($db, $parentdir, $owner){
+
+ $content_db = $db->query("SELECT * FROM files WHERE parent=" . $parentdir . " AND owner=" . $owner . ";");
+
+ $count=0;
+
+ while($row = $content_db->fetchArray(SQLITE3_NUM)){
+ $content[$count][0] = $row[0];
+ $content[$count][1] = $row[1];
+ $content[$count][2] = $row[2];
+ $content[$count][3] = $row[3];
+ $content[$count][4] = $row[4];
+ $content[$count][5] = $row[5];
+ $content[$count][6] = $row[6];
+ $content[$count][7] = $row[7];
+ $content[$count][8] = $row[8];
+ $count++;
+ }
+
+ if(!empty($content)){
+ return $content;
+ } else {
+ return false;
+ }
+}