国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 line
3.4KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang;?>" />
  5. <title>digg</title>
  6. <style>
  7. body {
  8. text-align:center;
  9. }
  10. #digg {
  11. margin:0 auto;
  12. width:420px;
  13. overflow:hidden;
  14. }
  15. .diggbox {
  16. cursor:pointer;
  17. float:left;
  18. height:51px;
  19. margin-right:8px;
  20. overflow:hidden;
  21. width:195px;
  22. }
  23. .diggbox .digg_act {
  24. float:left;
  25. font-size:14px;
  26. font-weight:bold;
  27. height:29px;
  28. line-height:31px;
  29. overflow:hidden;
  30. text-indent:32px;
  31. }
  32. .diggbox .digg_num {
  33. float:left;
  34. line-height:29px;
  35. text-indent:5px;
  36. }
  37. .diggbox .digg_percent {
  38. text-align:left;
  39. clear:both;
  40. overflow:hidden;
  41. padding-left:10px;
  42. width:180px;
  43. }
  44. .diggbox .digg_percent .digg_percent_bar {
  45. background:#E8E8E8 none repeat scroll 0 0;
  46. border-right:1px solid #CCCCCC;
  47. float:left;
  48. height:7px;
  49. margin-top:3px;
  50. overflow:hidden;
  51. width:100px;
  52. }
  53. .diggbox .digg_percent .digg_percent_num {
  54. float:left;
  55. font-size:10px;
  56. padding-left:10px;
  57. }
  58. .diggbox .digg_percent .digg_percent_bar span {
  59. background:#000000 none repeat scroll 0 0;
  60. display:block;
  61. height:5px;
  62. overflow:hidden;
  63. }
  64. .digg_good {
  65. background:transparent url(../templets/default/images/newdigg-bg.png) no-repeat scroll left top;
  66. }
  67. .digg_bad {
  68. background:transparent url(../templets/default/images/newdigg-bg.png) no-repeat scroll right top;
  69. }
  70. .digg_good .digg_act {
  71. color:#CC3300;
  72. }
  73. .digg_good .digg_num {
  74. color:#CC6633;
  75. }
  76. .digg_bad .digg_act {
  77. color:#3366CC;
  78. }
  79. .digg_bad .digg_num {
  80. color:#3399CC;
  81. }
  82. .digg_good .digg_percent .digg_percent_bar span {
  83. background:#FFC535 none repeat scroll 0 0;
  84. border:1px solid #E37F24;
  85. }
  86. .digg_bad .digg_percent .digg_percent_bar span {
  87. background:#94C0E4 none repeat scroll 0 0;
  88. border:1px solid #689ACC;
  89. }
  90. </style>
  91. <script>
  92. //读写cookie函数
  93. function GetCookie(c_name)
  94. {
  95. if (document.cookie.length > 0)
  96. {
  97. c_start = document.cookie.indexOf(c_name + "=")
  98. if (c_start != -1)
  99. {
  100. c_start = c_start + c_name.length + 1;
  101. c_end = document.cookie.indexOf(";",c_start);
  102. if (c_end == -1)
  103. {
  104. c_end = document.cookie.length;
  105. }
  106. return unescape(document.cookie.substring(c_start,c_end));
  107. }
  108. }
  109. return null
  110. }
  111. function SetCookie(c_name,value,expiredays)
  112. {
  113. var exdate = new Date();
  114. exdate.setDate(exdate.getDate() + expiredays);
  115. document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。增加toGMTString()
  116. }
  117. function postDigg(ac, aid)
  118. {
  119. var saveid = GetCookie('diggid');
  120. if(saveid != null)
  121. {
  122. var saveids = saveid.split(',');
  123. var hasid = false;
  124. saveid = '';
  125. j = 1;
  126. for(i=saveids.length-1;i>=0;i--)
  127. {
  128. if(saveids[i]==aid && hasid) continue;
  129. else {
  130. if(saveids[i]==aid && !hasid) hasid = true;
  131. saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);
  132. j++;
  133. if(j==20 && hasid) break;
  134. if(j==19 && !hasid) break;
  135. }
  136. }
  137. if(hasid) { alert("您已经顶过该帖,请不要重复顶帖 !"); return false; }
  138. else saveid += ','+aid;
  139. SetCookie('diggid',saveid,1);
  140. } else {
  141. SetCookie('diggid',aid,1);
  142. }
  143. location.href='digg_frame.php?action='+ac+'&id='+aid;
  144. }
  145. </script>
  146. <body>
  147. <div id="digg">
  148. <?php
  149. echo $digg;
  150. ?>
  151. </div>
  152. </body>
  153. </html>