rashit.php
Kod: Tümünü seç
<?php
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = './'; // phpBB3'ğ® «urulu olduğµ ¤izin
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// + setup
$config['exclude_forums'] = ''; // exclude forums id
$config['max_topics'] = '25'; // last xx topic
// - setup
//
// Exclude forums
//
$sql_where = '';
if ($config['exclude_forums'])
{
$exclude_forums = explode(',', $config['exclude_forums']);
foreach ($exclude_forums as $i => $id)
{
if ($id > 0)
{
$sql_where .= ' AND t.forum_id != ' . trim($id);
}
}
}
///SQL Son Eklenenler////
$forum_list = array(2,11); //Sadece bu dizideki forum_id degerleri olan forumlardan konu cekmek istiyoruz
$sql = 'SELECT t.topic_title, t.forum_id, t.topic_id, f.forum_id, f.forum_name, f.forum_image, t.topic_replies, u.user_id, u.username
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f, ' . USERS_TABLE . ' u
WHERE t.topic_status <> 2
AND t.topic_approved = 1
AND t.topic_type = 0
AND t.forum_id = f.forum_id
AND p.topic_id = t.topic_id
AND p.poster_id = u.user_id
AND p.post_id = t.topic_last_post_id
AND ' . $db->sql_in_set('t.forum_id', $forum_list) . '
' . $sql_where . '
ORDER BY t.topic_time DESC';
$result = $db->sql_query_limit($sql, $config['max_topics']);
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title'] != '') ){
// auto auth
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
$template->assign_block_vars('new_topic',array(
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'u=' . $row['user_id'])),
'U_TOPIC_USER' => censor_text($row['username'])
));
///SQL Son Eklenenler Bitiş////
///SQL Çok Okunanlar////
$forum_list = array(2,11); //Sadece bu dizideki forum_id degerleri olan forumlardan konu cekmek istiyoruz
$sql2 = 'SELECT t.topic_title, t.forum_id, t.topic_id, f.forum_id, f.forum_name, f.forum_image, t.topic_replies, u.user_id, u.username
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f, ' . USERS_TABLE . ' u
WHERE t.topic_status <> 2
AND t.topic_approved = 1
AND t.topic_type = 0
AND t.forum_id = f.forum_id
AND p.topic_id = t.topic_id
AND p.poster_id = u.user_id
AND p.post_id = t.topic_last_post_id
AND ' . $db->sql_in_set('t.forum_id', $forum_list) . '
' . $sql_where . '
ORDER BY t.topic_views DESC';
$result2 = $db->sql_query_limit($sql2, $config['max_topics']);
while( ($row2 = $db->sql_fetchrow($result2)) && ($row2['topic_title'] != '') ){
// auto auth
if ( ($auth->acl_get('f_read', $row2['forum_id'])) || ($row2['forum_id'] == '0') )
$template->assign_block_vars('new2_topic',array(
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row2['forum_id'] . '&t=' . $row2['topic_id']),
'TOPIC_TITLE' => censor_text($row2['topic_title']),
'TOPIC_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'u=' . $row2['user_id'])),
'U_TOPIC_USER' => censor_text($row2['username'])
));
///SQL Çok Okunanlar Bitiş////
$template->set_filenames(array(
'body' => 'rashit.html')
);
$db->sql_freeresult($result,$result2);
page_footer();
?>
Kod: Tümünü seç
Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\wamp\www\dende\rashit.php on line 61
Kod: Tümünü seç
<!-- INCLUDE overall_header.html -->
<div class="forumbg announcement">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<noscript><dl><dt>{L_NEW_TOPICS}</dt></dl></noscript>
<ul>
<!-- BEGIN new_topic -->
<li><a href="{new_topic.U_VIEW_TOPIC}" title="{new_topic.TOPIC_TITLE}">{new_topic.TOPIC_TITLE}</a> <small><a href="{new_topic.TOPIC_USER}" title="{new_topic.U_TOPIC_USER}">{new_topic.U_TOPIC_USER}</a></small></li>
<!-- END new_topic -->
<!-- BEGIN new2_topic -->
<li><a href="{new2_topic.U_VIEW_TOPIC}" title="{new2_topic.TOPIC_TITLE}">{new2_topic.TOPIC_TITLE}</a> <small><a href="{new2_topic.TOPIC_USER}" title="{new2_topic.U_TOPIC_USER}">{new2_topic.U_TOPIC_USER}</a></small></li>
<!-- END new2_topic -->
</ul>
</div>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->