3_3_common_block_thread.tpl.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php if(!defined('IN_DISCUZ')) exit('Access Denied'); ?><?php
  2. $__IMGDIR = IMGDIR;$return = <<<EOF
  3. EOF;
  4. if($thread['special'] == 1) {
  5. $return .= <<<EOF
  6. <form method="post" autocomplete="off" action="forum.php">
  7. <input type="hidden" name="mod" value="misc">
  8. <input type="hidden" name="action" value="votepoll">
  9. <input type="hidden" name="fid" value="{$fid}">
  10. <input type="hidden" name="tid" value="{$tid}">
  11. <input type="hidden" name="pollsubmit" value="yes">
  12. <ul class="side_poll">
  13. EOF;
  14. if(is_array($polloptions)) foreach($polloptions as $key => $option) {
  15. $return .= <<<EOF
  16. <li>
  17. <label>
  18. <input type="{$optiontype}" name="pollanswers[]" id="option_{$key}" class="pc" value="{$option['polloptionid']}" />
  19. {$option['polloption']}
  20. </label>
  21. </li>
  22. EOF;
  23. }
  24. $return .= <<<EOF
  25. </ul>
  26. <p class="ptn pns"><button type="submit" name="submit" id="submit" value="true" class="pn"><em>投票</em></button></p>
  27. </form>
  28. EOF;
  29. } elseif($thread['special'] == 2) {
  30. $return .= <<<EOF
  31. <ul class="side_trade cl">
  32. EOF;
  33. if(is_array($trades[$tid])) foreach($trades[$tid] as $key => $trade) {
  34. $return .= <<<EOF
  35. <li class="cl">
  36. EOF;
  37. if($trade['aid']) {
  38. $return .= <<<EOF
  39. <a href="forum.php?mod=viewthread&amp;do=tradeinfo&amp;tid={$tid}&amp;pid={$trade['pid']}" target="_blank"><img src="{$trade['aid']}" width="80" alt="{$trade['subject']}" /></a>
  40. EOF;
  41. } else {
  42. $return .= <<<EOF
  43. <a href="forum.php?mod=viewthread&amp;do=tradeinfo&amp;tid={$tid}&amp;pid={$trade['pid']}" target="_blank"><img src="{$__IMGDIR}/nophoto.gif" width="80" alt="{$trade['subject']}" /></a>
  44. EOF;
  45. } if($trade['price'] > 0) {
  46. $return .= <<<EOF
  47. &yen; {$trade['price']}
  48. EOF;
  49. } if($trade['credit'] > 0) { if($trade['price'] > 0) {
  50. $return .= <<<EOF
  51. 附加
  52. EOF;
  53. }
  54. $return .= <<<EOF
  55. {$trade['credit']} {$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['5']]['unit']}{$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['5']]['title']}
  56. EOF;
  57. }
  58. $return .= <<<EOF
  59. <p><a href="forum.php?mod=viewthread&amp;do=tradeinfo&amp;tid={$tid}&amp;pid={$trade['pid']}" target="_blank">{$trade['subject']}</a></p>
  60. </li>
  61. EOF;
  62. }
  63. $return .= <<<EOF
  64. </ul>
  65. EOF;
  66. } elseif($thread['special'] == 3) {
  67. $return .= <<<EOF
  68. <label
  69. EOF;
  70. if($rewardend) {
  71. $return .= <<<EOF
  72. style="text-decoration: line-through"
  73. EOF;
  74. }
  75. $return .= <<<EOF
  76. >[+{$rewardprice}]</label><div>{$message}</div>
  77. EOF;
  78. } elseif($thread['special'] == 4) {
  79. $return .= <<<EOF
  80. <div>{$message}</div>
  81. EOF;
  82. if($activity['aid']) {
  83. $return .= <<<EOF
  84. <a href="forum.php?mod=viewthread&amp;tid={$tid}" target="_blank"><img src="{$activity['aid']}" width="80" alt="{$activity['subject']}" /></a>
  85. EOF;
  86. } else {
  87. $return .= <<<EOF
  88. <a href="forum.php?mod=viewthread&amp;tid={$tid}" target="_blank"><img src="{$__IMGDIR}/nophoto.gif" width="80" alt="{$activity['subject']}" /></a>
  89. EOF;
  90. }
  91. $return .= <<<EOF
  92. <p>已参加人数 {$activity['applynumber']}</p>
  93. EOF;
  94. if($activity['number']) {
  95. $return .= <<<EOF
  96. <p>剩余名额: {$activity['aboutmember']}</p>
  97. EOF;
  98. } } elseif($thread['special'] == 5) {
  99. $return .= <<<EOF
  100. <div>{$message}</div>
  101. <div class="chart">
  102. <strong class="debater1">{$debate['affirmvotes']}</strong>
  103. <div class="chart1" style="height: {$debate['affirmvoteswidth']}%;">&nbsp;</div>
  104. <strong class="debater2">{$debate['negavotes']}</strong>
  105. <div class="chart2" style="height: {$debate['negavoteswidth']}%;">&nbsp;</div>
  106. </div>
  107. <p>正方: {$debate['affirmpoint']}</p>
  108. <p>反方: {$debate['negapoint']}</p>
  109. EOF;
  110. } else {
  111. $return .= <<<EOF
  112. {$message}
  113. EOF;
  114. }
  115. $return .= <<<EOF
  116. EOF;
  117. ?>