0 Üye ve 1 Ziyaretçi konuyu incelemekte.
global $smcFunc, $scripturl;$boards = array(107,49,977,105,298);$request = $smcFunc['db_query']('', ' SELECT t.id_topic, m.subject, m.body FROM {db_prefix}topics AS t INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg) WHERE t.id_board IN ({array_int:boards}) ORDER BY RAND() LIMIT {int:limit}', array( 'boards' => $boards, 'limit' => 5, ));$topics = array();while ($row = $smcFunc['db_fetch_assoc']($request)) $topics[] = array( 'id_topic' => $row['id_topic'], 'subject' => $row['subject'], 'short_subject' => shorten_subject($row['subject'], 26), 'body' => $row['body'], 'first_image' => preg_match_all('~\[img\]([^\]]+)\[\/img\]~i', $row['body'], $images) ? '<img src="' . $images[1][0] . '" alt="' . $row['subject'] . '" height="50" width="50" />' : '', );$smcFunc['db_free_result']($request);echo '<table style="width: 100%;">';foreach ($topics as $topic)if (!empty($topic['first_image'])) echo ' <tr><td style="border: 1px solid rgb(204, 204, 204); width: 51px; height: 51px;"> <a target="_blank" title="', $topic['subject'], '" href="', $scripturl, '?topic=', $topic['id_topic'], '.0"> ', $topic['first_image'], '</a></td><td style="border: 1px solid rgb(204, 204, 204);"><a target="_blank" title="', $topic['subject'], '" href="', $scripturl, '?topic=', $topic['id_topic'], '.0">', $topic['subject'], '</a> </td></tr>'; else { echo '<tr><td style="border: 1px solid rgb(204, 204, 204); width: 51px; height: 51px;"> <a target="_blank" title="', $topic['subject'], '" href="', $scripturl, '?topic=', $topic['id_topic'], '.0"> <img src="http://www.uyanangenclik.com/Themes/default/images/sp/post.png" alt="' . $row['subject'] . '" height="50" width="50" /></a></td><td style="border: 1px solid rgb(204, 204, 204);"><a target="_blank" title="', $topic['subject'], '" href="', $scripturl, '?topic=', $topic['id_topic'], '.0">', $topic['subject'], '</a> </td></tr>'; } echo '</table>';
$boards = array(107,49,977,105,298);
Not:Kod: You are not allowed to view links. Register or Login$boards = array(107,49,977,105,298);Bu kısmı kendinize göre düzenlemyi unutmayın. burasini biraz aciklarmisiniz rica etsem