Просмотр файла forum/includes/polled.php

Размер файла: 1.75Kb
  1. <?php
  2. # Script by seg0ro http://mobilarts.ru
  3. # Not for sale!!!
  4.  
  5. # fixed
  6.  
  7. $set['title'] .= ' | Список проголосовавших';
  8. include H.'engine/includes/head.php';
  9.  
  10. if (!$topic){
  11. echo Core::msg_show('Отсутствыет идентификатор темы!<br /><a href="index.php">Форум</a>');
  12. include H . 'engine/includes/foot.php';
  13. }
  14.  
  15. if (!$user_id){
  16. echo Core::msg_show('Только для авторизованных!<br /><a href="index.php">Форум</a>');
  17. include H . 'engine/includes/foot.php';
  18. }
  19.  
  20. echo '<div class="fmenu"><a href="index.php">Форум</a> / <a href="index.php?topic='.$topic.'">'.text::output($topicRes['name']).'</a> / '.text::output($topicRes['poll_name']).'</div>';
  21.  
  22. $sql2 = $pollSet['poll_mod'] < 1 ? array('') : array(', COUNT(`forum_polled`.`user_id`) AS `count`', ' GROUP BY `forum_polled`.`user_id`');
  23.  
  24. $total = $pollSet['total_polled'];
  25. $page = new page($total, $set['p_str']);
  26. if ($total){
  27.  
  28. $page->display('index.php?act=polled&amp;topic='.$topic.'&amp;');
  29. $req = $sql->query("SELECT `forum_polled`.*".$sql2[0].", `user`.`id`, `user`.`nick`, `user`.`pol` FROM `forum_polled` LEFT JOIN `user` ON `forum_polled`.`user_id` = `user`.`id` WHERE `forum_polled`.`refid` = '$topic'".$sql2[1]." LIMIT ".$page->limit());
  30. while ($res = $sql->fetch()){
  31. echo $i % 2 ? '<div class="p_t">' : '<div class="p_m">';
  32. $array = array('status' => (($pollSet['poll_mod'] < 1 && $moder) ? '' : $res['count']));
  33. echo Core::user_show($res, $array);
  34. echo '</div>';
  35. ++$i;
  36. }
  37. echo '<div class="fmenu">Пользователей: '.$total.'</div>';
  38. $page->display('index.php?act=polled&amp;topic='.$topic.'&amp;');
  39. }
  40. else
  41. {
  42. Core::msg_show('Пусто');
  43. }