



<?php

#### Vygenerovano pomoci Creatoru na Blassenwebu (http://blassenweb.net) ###

if (stristr($_SERVER['SCRIPT_NAME'], basename(__FILE__)) OR !defined('UN_KERNELFILES_LOADED')) {

Header("Location: ../index.php");

die();

}

global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $sitename, $admin, $module_name, $ThemeSel, $bgcolor1, $bgcolor2, $bgcolor3;




// When set to 1 then Forums permissions which View and/or Read are NOT set to 'ALL' will NOT be displayed in the center block

$HideViewReadOnly = 1;

// Show only 5 last new topics

$Last_New_Topics = 3; 

// Icon that is displayed in Center Block in front of Topic

$IconPath = "images/msg.gif"; 




/*******************************************************/

$border = 0;

$cellspacing = 1;

/*********************************************************/




/* Total Amount of Topics */

$result = sql_query( "SELECT * FROM ".$prefix."_bbtopics", $dbi );

$Amount_Of_Topics = sql_num_rows( $result );




/* Total Amount of Posts */

$result = sql_query( "SELECT * FROM ".$prefix."_bbposts", $dbi );

$Amount_Of_Posts = sql_num_rows( $result );




/* Total Amount of Topic Views */

$Amount_Of_Topic_Views = 0;

$result = sql_query( "SELECT topic_views FROM ".$prefix."_bbtopics", $dbi );

while( list( $topic_views ) = sql_fetch_row( $result, $dbi ) )

{

$Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views;

}




/* Total Amount of Topic Replies */

$Amount_Of_Topic_Replies = 0;

$result = sql_query( "SELECT topic_replies FROM ".$prefix."_bbtopics", $dbi );

while( list( $topic_replies ) = sql_fetch_row( $result, $dbi ) )

{

$Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies;

}




/* Total Amount of Members */

$result = sql_query( "SELECT * FROM ".$prefix."_users", $dbi );

$Amount_Of_Members = sql_num_rows( $result );




/* Last X New Topics */

$Count_Topics = 0;

$Topic_Buffer = "";

$result1 = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC", $dbi );

while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result1, $dbi ) )

{

$skip_display = 0;

if( $HideViewReadOnly == 1 )

{

$result5 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $dbi );

list( $auth_view, $auth_read ) = sql_fetch_row( $result5, $dbi );

if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }

}



if( $topic_moved_id != 0 )

{

// Shadow Topic !!

$skip_display = 1;

}



if( $skip_display == 0 )

{

$Count_Topics += 1;

$result2 = sql_query( "SELECT topic_id, poster_id, FROM_UNIXTIME( post_time,'%d.%m,%Y v %T') as post_time FROM ".$prefix."_bbposts where post_id = '$topic_last_post_id'", $dbi );

list( $topic_id, $poster_id, $post_time ) = sql_fetch_row( $result2, $dbi );




$result3 = sql_query( "SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi );

list( $username, $user_id ) = sql_fetch_row( $result3, $dbi );

$LastPoster = "<a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\">$username</a>";



$result4 = sql_query( "SELECT username, user_id FROM ".$prefix."_users where user_id='$topic_poster'", $dbi );

list( $username, $user_id ) = sql_fetch_row( $result4, $dbi );

$OrigPoster = "<a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a>";



$TopicImage = "<img src=\"$IconPath\" border=\"0\" alt=\"\" />";

$TopicTitleShow = "<a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\">$topic_title</a>";



$Topic_Buffer .= "<tr><td bgcolor=\"$bgcolor1\">$TopicImage $TopicTitleShow</td><td bgcolor=\"$bgcolor1\"><div align=\"center\">$OrigPoster</div></td><td bgcolor=\"$bgcolor1\"><div align=\"center\"><b>$topic_views</b></div></td><td bgcolor=\"$bgcolor1\"><div align=\"center\"><b>$topic_replies</b></div></td><td align=\"center\" bgcolor=\"$bgcolor1\">$LastPoster <a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"modules/Forums/templates/subSilver/images/icon_latest_reply.gif\" border=\"0\" alt=\"\" /></a><br /><font size=\"-2\"><i>$post_time</i></font></td></tr>";

}



if( $Last_New_Topics == $Count_Topics ) { break 1; }



}




$cat = sql_query("SELECT * FROM ".$prefix."_bbcategories", $dbi);

$content = "";







/* Write Table to Screen */

$content = "<table width=\"100%\" border=\"$border\" cellspacing=\"$cellspacing\" bgcolor=\"#000000\">";

$content .= "<tr><td width=\"100%\" height=\"21\" colspan=\"5\" align=\"center\" bgcolor=\"$bgcolor1\">Poslední příspěvky v <b>$sitename Fóru</b></td></tr>";

$content .= "<tr>";

$content .= "<td align=\"center\" bgcolor=\"$bgcolor1\">"._BBFORUM_TOTTOPICS."</td><td align=\"center\" bgcolor=\"$bgcolor1\">"._BBFORUM_POSTER."</td><td align=\"center\" bgcolor=\"$bgcolor1\">"._BBFORUM_VIEWS."</td><td align=\"center\" bgcolor=\"$bgcolor1\">"._BBFORUM_REPLIES."</td><td align=\"center\" bgcolor=\"$bgcolor1\">"._BBFORUM_LASTPOSTER."</td></tr>";

$content .= "$Topic_Buffer";

$content .= "<tr><td align=\"center\" colspan=\"6\" bgcolor=\"$bgcolor1\"><center>"._BBFORUM_TOTTOPICS."<b>$Amount_Of_Topics</b> <b>|</b> "._BBFORUM_TOTPOSTS."<b>$Amount_Of_Posts</b> <b>|</b> "._BBFORUM_TOTVIEWS."<b>$Amount_Of_Topic_Views</b> <b>|</b> "._BBFORUM_TOTREPLIES."<b>$Amount_Of_Topic_Replies</b> <b>|</b> <a href=\"modules.php?name=Members_List\">"._BBFORUM_TOTMEMBERS."</a> <b>$Amount_Of_Members</b> <br>[ <a href=\"modules.php?name=Forums\">"._BBFORUM_FORUM."</a> ] [ <a href=\"modules.php?name=Forums&file=search\">"._BBFORUM_SEARCH."</a> ]</center></td></tr>";




$content .= "</table>";

$content .= "<!--\n\n\n\n\n

GENERATED BY:

\\|//// 

\ _ _ // 

( o o ) 

+===============oOOo-(_)-oOOo===========+ 

http://blassenweb.net 

+=======================Oooo============+ 

oooO ( ) 

( ) ) / 

\ ( (_/ 

\_) 

\n\n\n\n\n-->";

?>








/*****************************************************/
// block-Forums_Center BB BLASSENweb
/*****************************************************/


define("_BBFORUM_NEWTOPICS","Nová témata");
define("_BBFORUM_POSTER","Publikoval");
define("_BBFORUM_VIEWS","Četlo");
define("_BBFORUM_REPLIES","Odp.");
define("_BBFORUM_LASTPOSTER","Poslední odpověď");
define("_BBFORUM_TOTTOPICS","Diskuze ");
define("_BBFORUM_TOTPOSTS","Příspěvků ");
define("_BBFORUM_TOTVIEWS","Zobrazení ");
define("_BBFORUM_TOTREPLIES","Odpovědí ");
define("_BBFORUM_TOTMEMBERS","Uľivatelů ");
define("_BBFORUM_FORUM","Diskuzní fórum");
define("_BBFORUM_SEARCH","Hledej v diskuzích");
define("_BBFORUM_TITLE","Poslední příspěvky do Diskuzního fóra");



$content .= "<tr><td width=\"5%\"><img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"></td><td width=\"45%\"><a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a></td><td width=\"25%\"nowrap><A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a></td><td width=\"25%\"nowrap>$post_time</td></tr>";


$IconPath = "images/msg.gif"; 


$TopicImage = "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\" />";




![]() |
|