Просмотр файла mc-2.7.0/modules/comments/views/default/list_comments.tpl

Размер файла: 3.44Kb
  1. <?php $this->display('header.tpl', array('sub_title' => 'Комментарии')) ?>
  2.  
  3. <?php if ($error) echo '<div class="error">'. $error .'</div>' ?>
  4.  
  5. <?php $this->display('title', array('text' => 'Комментарии')) ?>
  6.  
  7. <div class="block">
  8. <a href="<?php echo a_url('comments', 'module='. $_GET['module'] .'&amp;item_id='. $_GET['item_id'] .'&amp;return='. urlencode($_GET['return']) .'&amp;start='. $start) ?>">Обновить</a>
  9. </div>
  10.  
  11. <?php if($comments): ?>
  12. <?php foreach($comments AS $comment): ?>
  13. <div class="menu">
  14. <?php echo user::get_icon($comment['user_id']) ?> <?php echo user::get_username($comment['user_id'], TRUE) ?> <?php echo user::online_status($comment['last_visit']) ?> (<?php echo main::display_time($comment['time']) ?>)<br />
  15. <?php echo $comment['text'] ?>
  16. <?php if (a_check_rights($comment['user_id'], $comment['user_status'])): ?>
  17. <br />
  18. <span class="action">
  19. [<a href="<?php echo a_url('comments/comment_edit', 'comment_id='. $comment['comment_id'] .'&amp;return_name='. urlencode('Вернуться') .'&amp;return_url='. urlencode(a_url('comments/list_comments', 'module='. $_GET['module'] .'&item_id='. $_GET['item_id'] .'&return='. $_GET['return'] .'&start='. $start))) ?>">Изменить</a>] [<a href="<?php echo a_url('comments/comment_delete', 'comment_id='. $comment['comment_id'] . '&amp;module='. $_GET['module'] .'&amp;item_id='. $_GET['item_id'] .'&amp;return='. urlencode($_GET['return']) .'&amp;start='. $start) ?>">Удалить</a>]
  20. </span>
  21. <?php endif ?>
  22. </div>
  23. <?php endforeach; ?>
  24. <?php else: ?>
  25. <div class="menu">
  26. Комментариев нет.
  27. </div>
  28. <?php endif; ?>
  29.  
  30. <?php if ($pagination): ?>
  31. <div class="block">
  32. <?php echo $pagination ?>
  33. </div>
  34. <?php endif ?>
  35.  
  36. <div class="block">
  37. Всего комментариев: <?php echo $total ?>
  38. </div>
  39.  
  40. <?php if ($_config['comments_posting'] != 'users' || USER_ID != -1): ?>
  41. <form action="<?php echo a_url('comments/say', 'module='. $_GET['module'] .'&amp;item_id='. $_GET['item_id'] .'&amp;return='. urlencode($_GET['return']) .'&amp;start='. $start) ?>" method="post">
  42. <div class="menu">
  43. Сообщение: (<a href="<?php echo a_url('smiles', 'return_name='. urlencode('Вернуться') .'&amp;return_url='. urlencode(a_url('comments/list_comments', 'module='. $_GET['module'] .'&item_id='. $_GET['item_id'] .'&return='. $_GET['return']))) ?>">смайлы</a> / <a href="<?php echo a_url('main/bbcode', 'return_name='. urlencode('Вернуться') .'&amp;return_url='. urlencode(a_url('comments', 'module='. $_GET['module'] .'&item_id='. $_GET['item_id'] .'&return='. urlencode($_GET['return'])))) ?>">теги</a>)<br />
  44. <textarea name="message" rows="5" cols="20"><?php if (isset($_GET['reply'])) echo '[b]'. htmlspecialchars($_GET['reply']) .'[/b], '; else echo htmlspecialchars($_POST['message']) ?></textarea><br />
  45. <?php if (USER_ID == -1): ?>
  46. Введите код с картинки:<br />
  47. <img src="<?php echo URL ?>utils/captcha.php" /><br />
  48. <input name="captcha_code" type="text" /><br />
  49. <?php endif; ?>
  50. <input type="submit" name="submit" value="Отправить" />
  51. </div>
  52. </form>
  53. <?php endif; ?>
  54.  
  55. <div class="block">
  56. <a href="<?php echo urldecode($_GET['return']) ?>">Вернуться</a><br />
  57. <a href="<?php echo URL ?>">На главную</a>
  58. </div>
  59.  
  60. <?php $this->display('footer') ?>