* @link http://pioder.gim2przemysl.int.pl/ * @license GNU GPL v3 **/ define('IN_uF', true); //include files include('./config.php'); include('./includes/constants.php'); include('./includes/class_db.php'); include('./includes/class_error.php'); //connect to database DataBase::db_connect(); include('./includes/sessions.php'); include('./includes/class_user.php'); include('./common.php'); include('./includes/class_overall.php'); include('./includes/class_forum.php'); include('./includes/class_topic.php'); include('./includes/classes/secure.php'); $default_lang = Over::DefaultLang(); include('./lngs/'.$default_lang.'/main.php'); $start = Over::TimeGeneration(); $fid = intval($_GET['f']); sess_del_invalid($_SESSION['uid']); sess_register($_SESSION['uid']); sess_delete_old(); include('./includes/cache/cache_forums.php'); //add skin variables $skin = array( 'ntopic' => ($forum['lock']==1) ? 'ntopic' : ' reply', 'lposts'=>$lng['posts'], 'llastposts'=>$lng['lastpost'], 'lposts'=>$lng['posts'], 'lauthor'=>$lng['author'], 'llastpost'=>$lng['lastpost'], 'ltopicname'=>$lng['ltopicname'], 'f_id' => $fid, 'lang'=> $default_lang ); $skin = array_push_associative($skin,Over::generate_header($lng['showforum'].': '.$forum['name'], '> '.$forum['name'])); //do it! include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/forum_body.tpl'); $sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE f_id='$fid' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; $query = DataBase::sql_query($sql,'GENERAL','Could not obtain topics information'); $value = mysql_num_rows($query); if ($value>0) { while($record = mysql_fetch_array($query)) { $skin = array( 't_id'=>$record['t_id'], 'fname'=>($record['sticky']=='1') ? ''.$lng['sticky'].''.$record['name'] : $record['name'], 'author'=>Topic::TopicAuthor($record['author']), 'tposts'=>$count_topic[$record['t_id']], 'new_post'=>Topic::LastPostImg(), 'lastpost'=>Topic::LastPostInTopic($record['t_id']) ); include('./skins/'.$default_skin.'/forum_forum_add.tpl'); } $skin['noposts']=''; } else { $skin['noposts']='

'.$lng['nopost'].'!

'; } $skin = array_push_associative($skin, array( 'option_pages' => Over::AddPages(), 'lwith' => $lng['with'], 'lpage' => $lng['page'], 'lpages' => $count, 'f_id' => $fid, 'lang' => $default_lang, 'ntopic' => ($forum['lock']==1) ? 'ntopic' : '
reply' )); include('./skins/'.$default_skin.'/forum_end_body.tpl'); if ($_SESSION['uid']>0) { if(RANK=='2') { $skin['pa_link']=''.$lng['pa_link'].''; } else { $skin['pa_link']=''; } } else { $skin['pa_link']=''; } $stop = Over::TimeGeneration(); $skin['queries'] = Over::ShowQueries($start, $stop); include('./skins/'.$default_skin.'/overall_footer.tpl'); ?>