summaryrefslogtreecommitdiff
path: root/www/functions/func_content.php
diff options
context:
space:
mode:
authorHorus32014-03-12 22:11:50 +0100
committerHorus32014-03-12 22:11:50 +0100
commit2f0f4ca056f92ffd2bbf80e7b7c49b489d6e7ed4 (patch)
treeb14d63c782c3088d904858140d947492d946e29f /www/functions/func_content.php
parent478a6dbc03c1ed65f5a187a6752bc130d3b82ac3 (diff)
downloadfiles.iamfabulous.de-2f0f4ca056f92ffd2bbf80e7b7c49b489d6e7ed4.tar.gz
more modular for greater flexibility
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;
+ }
+}