summaryrefslogtreecommitdiff
path: root/includes/section.inc
blob: c816818d437f32a9e60f0ac8dbf6e654cd39aef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

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 = '". check_input($section) ."'");
  return ($result) ? db_result($result, 0) : $threshold;
}

function section_dump_threshold($section, $threshold = - 3) {
  $result = db_query("SELECT dump FROM sections WHERE name = '". check_input($section) ."'");
  return ($result) ? db_result($result, 0) : $threshold;
}

function section_timout_threshold($section, $threshold = 10) {
  $result = db_query("SELECT timout FROM sections WHERE name = '". check_input($section) ."'");
  return ($result) ? db_result($result, 0) : $threshold;
}

?>