From 2f0f4ca056f92ffd2bbf80e7b7c49b489d6e7ed4 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Wed, 12 Mar 2014 22:11:50 +0100 Subject: more modular for greater flexibility --- www/functions/func_content.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 www/functions/func_content.php (limited to 'www/functions/func_content.php') 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 @@ +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; + } +} -- cgit v1.2.3