%%F5^F51^F51A8D6B%%events_article.html.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php /* Smarty version 2.6.17, created on 2018-05-29 15:03:54
  2. compiled from events_article.html */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'events_article.html', 14, false),)), $this); ?>
  5. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  6. $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
  7. $this->_tpl_vars = $_smarty_tpl_vars;
  8. unset($_smarty_tpl_vars);
  9. ?>
  10. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  11. $this->_smarty_include(array('smarty_include_tpl_file' => "nav.html", 'smarty_include_vars' => array()));
  12. $this->_tpl_vars = $_smarty_tpl_vars;
  13. unset($_smarty_tpl_vars);
  14. ?>
  15. <style>
  16. .praise {cursor: pointer;}
  17. </style>
  18. <!--公用标题居中显示-->
  19. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  20. $this->_smarty_include(array('smarty_include_tpl_file' => "common_header.html", 'smarty_include_vars' => array()));
  21. $this->_tpl_vars = $_smarty_tpl_vars;
  22. unset($_smarty_tpl_vars);
  23. ?>
  24. <div class="wrapper clear">
  25. <div class="arti_body">
  26. <div class="arti_title"><?php echo $this->_tpl_vars['article']['article_title']; ?>
  27. </div>
  28. <div class="arti_info">
  29. <span><?php echo ((is_array($_tmp=$this->_tpl_vars['article']['begin_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d') : smarty_modifier_date_format($_tmp, '%Y-%m-%d')); ?>
  30. </span><span><?php if ($this->_tpl_vars['article']['article_author']): ?>作者:<?php echo $this->_tpl_vars['article']['article_author']; ?>
  31. <?php endif; ?></span>
  32. </div>
  33. <div class="arti_content clear"><?php echo $this->_tpl_vars['article']['article_text']; ?>
  34. </div>
  35. <div class="clear"></div>
  36. <div class="vogue_read"><?php if ($this->_tpl_vars['article']['article_original_url']): ?><a href="<?php echo $this->_tpl_vars['article']['article_original_url']; ?>
  37. ">阅读原文</a> <?php endif; ?>阅读 <?php echo $this->_tpl_vars['clickNum']; ?>
  38. <span class="praise"><i class="fa <?php if ($this->_tpl_vars['isHasLikes']): ?>fa-thumbs-up<?php else: ?>fa-thumbs-o-up<?php endif; ?>"></i> <em><?php echo $this->_tpl_vars['likes']; ?>
  39. </em></span></div>
  40. <div class="clear"></div>
  41. </div>
  42. </div>
  43. <input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['article']['id']; ?>
  44. "/>
  45. <script>
  46. KISSY.use('node, io', function (S, Node, IO) {
  47. var $ = S.all;
  48. //视频自适应
  49. var screenWidth = $(window).width();
  50. var baseWidth = 510;
  51. var video_scale = screenWidth / baseWidth;
  52. $(".video_iframe").each(function () {
  53. var new_width = $(this).width() * video_scale;
  54. $(this).width(new_width - 20);
  55. var new_height = $(this).height() * video_scale;
  56. $(this).height(new_height - 20);
  57. });
  58. $('.vogue_add_btn').on('click', function() {
  59. $('#add_tips').show();
  60. });
  61. $('.add_join_btn').on('click', function () {
  62. $('#add_tips').hide();
  63. });
  64. $(".praise").on('click', function () {
  65. var num = $('em', $(this)).text();
  66. if ($('i', $(this)).hasClass('fa-thumbs-up')) { //已赞过
  67. $('em', $(this)).text(--num);
  68. submit(2);
  69. $('i', $(this)).replaceClass('fa-thumbs-up', 'fa-thumbs-o-up');
  70. } else { //未赞过
  71. $('em', $(this)).text(++num);
  72. submit(1);
  73. $('i', $(this)).replaceClass('fa-thumbs-o-up', 'fa-thumbs-up');
  74. }
  75. });
  76. function submit(type) {
  77. var events_id = $("input[name=events_id]").val();
  78. new IO({
  79. type: "post"
  80. , url: VG.conf.root_domain + '/?c=EventsArticle&a=Likes'
  81. , data: {'events_id':events_id, 'type': type}
  82. , success: function (data) {}
  83. , error: function (NULL, textStatus) {
  84. alert("请求服务器失败,原因:"+textStatus);
  85. }
  86. , dataType: "json"
  87. });
  88. }
  89. });
  90. </script>
  91. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  92. $this->_smarty_include(array('smarty_include_tpl_file' => "bottom.html", 'smarty_include_vars' => array()));
  93. $this->_tpl_vars = $_smarty_tpl_vars;
  94. unset($_smarty_tpl_vars);
  95. ?>