Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="widget topics" style="border-bottom: 1px solid #5a4b49;margin-top:-2px;box-shadow: 0px 0px 26px 6px rgba(0,0,0,0.75);">
- <div class="topics-up-section">
- <div class="topics-up-image">
- <img src="layout/img/icons/topics-icon.png">
- </div>
- <div class="topics-up-text">
- Changelog
- </div>
- <div style="clear: both;"></div>
- </div>
- <?php
- $posts = mysql_select_multi("
- ( SELECT `t`.`title` AS `thread_title`,
- `t`.`id` AS `thread_id`,
- `p`.`id` AS `post_id`,
- IFNULL(`p`.`created`, `t`.`created`) AS `created`,
- IFNULL(`p`.`player_name`, `t`.`player_name`) AS `player_name`,
- IFNULL(`p`.`player_id`, `t`.`player_id`) AS `player_id`
- FROM `znote_forum_threads` AS `t`
- LEFT JOIN `znote_forum_posts` AS `p` ON `t`.`id` = `p`.`thread_id`
- ) union all (
- SELECT `t`.`title` AS `thread_title`,
- `t`.`id` AS `thread_id`,
- `p`.`id` AS `post_id`,
- IFNULL(`p`.`created`, `t`.`created`) AS `created`,
- IFNULL(`p`.`player_name`, `t`.`player_name`) AS `player_name`,
- IFNULL(`p`.`player_id`, `t`.`player_id`) AS `player_id`
- FROM `znote_forum_threads` AS `t`
- RIGHT JOIN `znote_forum_posts` AS `p` ON `t`.`id` = `p`.`thread_id`
- WHERE `p`.`id` = NULL
- ) ORDER BY `created` DESC LIMIT 5;
- ");
- //data_dump($posts, false, "POSTS");
- if ($posts !== false): foreach ($posts as $post):
- ?>
- <a href="changelog">
- <div class="new-topic">
- <div class="topic-title">
- <?php echo $post['thread_title']; ?>
- </div>
- <div class="topic-info">
- <time><?php echo getClock($post['created'], true); ?></time>
- <span><?php echo $post['player_name']; ?></span>
- </div>
- </div>
- </a>
- <?php endforeach; endif; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement