summaryrefslogtreecommitdiff
path: root/includes/section.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/section.inc')
-rw-r--r--includes/section.inc25
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/section.inc b/includes/section.inc
new file mode 100644
index 000000000..0bebaf026
--- /dev/null
+++ b/includes/section.inc
@@ -0,0 +1,25 @@
+<?
+
+function section_get() {
+ $array = array();
+ $result = db_query("SELECT name FROM sections");
+ while ($section = db_fetch_object($result)) array_push($array, $section->name);
+ return $array;
+}
+
+function section_post_threshold($section, $threshold = 5) {
+ $result = db_query("SELECT post FROM sections WHERE name = '$section'");
+ return ($result) ? db_result($result, 0) : $threshold;
+}
+
+function section_dump_threshold($section, $threshold = - 3) {
+ $result = db_query("SELECT dump FROM sections WHERE name = '$section'");
+ return ($result) ? db_result($result, 0) : $threshold;
+}
+
+function section_timout_threshold($section, $threshold = 10) {
+ $result = db_query("SELECT timout FROM sections WHERE name = '$section'");
+ return ($result) ? db_result($result, 0) : $threshold;
+}
+
+?> \ No newline at end of file