summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-11-30 20:38:36 +1100
committerPaul Merrill <napalminc@gmail.com>2010-12-01 04:14:16 -0800
commit4115cf1c7d11729f4881932240b8150507c2b0bb (patch)
treea371159b803e67f4870f3174ce19540b694ce496 /inc
parent5a4741377a761ba044f90f72f0e61aacfe712f02 (diff)
More board functions
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 230de3ef..9436e4b6 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -42,6 +42,14 @@
if(!file_exists($board['dir'] . DIR_RES)) @mkdir($board['dir'] . DIR_RES, 0777) or error("Couldn't create " . DIR_RES . ". Check permissions.", true);
}
+ function openBoard($uri) {
+ $boards_res = mysql_query(sprintf("SELECT * FROM `boards` WHERE `uri` = '%s' LIMIT 1", mysql_real_escape_string($uri)), $sql) or error(mysql_error($sql));
+ if($_board = mysql_fetch_array($boards_res)) {
+ setupBoard($_board);
+ return true;
+ } else return false;
+ }
+
function post($post, $OP) {
global $sql, $board;
if($OP) {