FORUM SECTION : ".getfieldvalue("forum_threads_".$_SESSION["lang"], "forum_threads_name","forum_threads_id",$_GET["forum_threads"])."
";
$this->list_posts($_GET["forum_threads"],$logat,$level,$userid);
}
if ($logat){
echo "";
} else {
echo " ";
echo "Please register to be able to post into this forum...";
echo " ";
}
$this->forumrules();
}
/*******************************************************************
* addthread - add a active or inactive thread according to userlevel
*******************************************************************/
Function addthread($text,$level,$userid){\
if($level==9){
$query = '
INSERT INTO forum_threads_'.$_SESSION["lang"].' (
forum_threads_id ,
forum_threads_name ,
forum_threads_user ,
forum_threads_active
)
VALUES (
"0",
"'.quote_smart($text).'",
"'.quote_smart($userid).'",
"1"
)';
} else {
$query = '
INSERT INTO forum_threads_'.$_SESSION["lang"].' (
forum_threads_id ,
forum_threads_name ,
forum_threads_user ,
forum_threads_active
)
VALUES (
"0",
"'.quote_smart($text).'",
"'.quote_smart($userid).'",
"0"
)';
sendMail($this->email,"New thread on your site","\n\nNew thread on your site\n".$text);
}
$result = mysql_query($query);
}
/*******************************************************************
* list_threads - list threads of the current forum
*******************************************************************/
Function list_threads($logat,$level,$userid){
$query = "select * from forum_threads_".$_SESSION["lang"]." where forum_threads_active = 1 ORDER by forum_threads_name";
$result = mysql_query($query) or die (mysql_error());
echo "
";
While ( $row = mysql_fetch_array($result) )
{
echo "