PageRenderTime 30ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/webapp/WEB-INF/template/main.ftl

http://fishkang.googlecode.com/
Freemarker Template | 403 lines | 386 code | 8 blank | 9 comment | 94 complexity | 471de2de861e3915931d319d78ad1261 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1
  1. <#--
  2. ?????????
  3. ???fishkang
  4. ???v1.0
  5. -->
  6. <#import "inc/page_comm.ftl" as comm />
  7. <@comm.header/>
  8. <div id="foruminfo">
  9. <div id="userinfo">
  10. <div id="nav">
  11. <p><a id="forumlist" href="${config.forumurl}" <#if config.forumjump==1>onmouseover="showMenu(this.id);" onmouseout="showMenu(this.id);"</#if>>${config.forumtitle}</a> ??:<em>${totaltopic}</em>, ??:<em>${totalpost}</em>
  12. </p>
  13. <p>
  14. <#if userid==-1>
  15. <form id="loginform" name="login" method="post" action="login.action?loginsubmit=true">
  16. <input type="hidden" name="referer" value="main.action" />
  17. <input onclick="if(this.value=='???')this.value = ''" value="???" maxlength="40" size="15" name="username" id="username"
  18. type="text" />
  19. <input type="password" size="10" name="password" id="password" />
  20. <button value="true" type="submit" name="userlogin" onclick="javascript:window.location.replace('?agree=yes')"> ?? </button>
  21. </form>
  22. <#else>
  23. ???????: ${userinfo.lastvisit}
  24. <a href="showtopiclist.action">????</a>
  25. </#if>
  26. </p>
  27. </div>
  28. </div>
  29. <div id="forumstats">
  30. <#if (usergroupinfo.allowsearch>0)>
  31. <@comm.quicksearch />
  32. </#if>
  33. <p>
  34. ??:<em>${todayposts}</em>, ??:<em>${yesterdayposts}</em>,
  35. <#if highestpostsdate!="">
  36. ???:<em>${highestposts}</em>(${highestpostsdate})
  37. </#if>
  38. <a href="showtopiclist.action?type=digest&amp;forums=all">???</a>
  39. <#if config.rssstatus!=0>
  40. <a href="tools/rss.action" target="_blank"><img src="templates/${templatepath}/images/rss.gif" alt="rss"/></a>
  41. </#if>
  42. </p>
  43. </div>
  44. </div>
  45. <#-- ???? -->
  46. <#if (announcementcount>0)>
  47. <div onmouseout="annstop = 0" onmouseover="annstop = 1" id="announcement">
  48. <div id="announcementbody">
  49. <ul>
  50. <#list announcementlist as announcement>
  51. <li><a href="announcement.action#${announcement[id]}">${announcement.title}<em>${announcement.starttime}</em></a></li>
  52. </#list>
  53. </ul>
  54. </div>
  55. </div>
  56. <script type="text/javascript">
  57. var anndelay = 3000;
  58. var annst = 0;
  59. var annstop = 0;
  60. var annrowcount = 0;
  61. var anncount = 0;
  62. var annlis = $('announcementbody').getElementsByTagName("LI");
  63. var annrows = new Array();
  64. var annstatus;
  65. function announcementScroll() {
  66. if(annstop) {
  67. annst = setTimeout('announcementScroll()', anndelay);
  68. return;
  69. }
  70. if(!annst) {
  71. var lasttop = -1;
  72. for(i = 0;i < annlis.length;i++) {
  73. if(lasttop != annlis[i].offsetTop) {
  74. if(lasttop == -1) {
  75. lasttop = 0;
  76. }
  77. annrows[annrowcount] = annlis[i].offsetTop - lasttop;
  78. annrowcount++;
  79. }
  80. lasttop = annlis[i].offsetTop;
  81. }
  82. if(annrows.length == 1) {
  83. $('announcement').onmouseover = $('announcement').onmouseout = null;
  84. } else {
  85. annrows[annrowcount] = annrows[1];
  86. $('announcementbody').innerHTML += '<br style="clear:both" />' + $('announcementbody').innerHTML;
  87. annst = setTimeout('announcementScroll()', anndelay);
  88. }
  89. annrowcount = 1;
  90. return;
  91. }
  92. if(annrowcount >= annrows.length) {
  93. $('announcementbody').scrollTop = 0;
  94. annrowcount = 1;
  95. annst = setTimeout('announcementScroll()', anndelay);
  96. } else {
  97. anncount = 0;
  98. announcementScrollnext(annrows[annrowcount]);
  99. }
  100. }
  101. function announcementScrollnext(time) {
  102. $('announcementbody').scrollTop++;
  103. anncount++;
  104. if(anncount != time) {
  105. annst = setTimeout('announcementScrollnext(' + time + ')', 10);
  106. } else {
  107. annrowcount++;
  108. annst = setTimeout('announcementScroll()', anndelay);
  109. }
  110. }
  111. announcementScroll();
  112. </script>
  113. </#if>
  114. <@comm.newpmmsgbox/>
  115. <#-- ?????? -->
  116. <!--topic-->
  117. <#assign lastforumlayer=-1 lastcolcount=1 lastforumid=0 subforumcount=0 />
  118. <#list forumlist as forum>
  119. <#if forum.layer==0>
  120. <#if (lastforumlayer>-1)>
  121. <#if lastcolcount!=1>
  122. <#if subforumcount!=0>
  123. <#list 0..(lastcolcount-subforumcount) as x>
  124. <td>&nbsp;</td>
  125. </#list>
  126. </tr>
  127. </#if>
  128. </table>
  129. </div>
  130. <#else>
  131. </table>
  132. </div>
  133. </#if>
  134. <div id="ad_intercat_${lastforumid}"></div>
  135. </#if>
  136. <#if forum.colcount==1>
  137. <div class="mainbox forumlist">
  138. <span class="headactions">
  139. <#if forum.forumfields.moderators!="">
  140. ????: ${forum.forumfields.moderators}
  141. </#if><img id="category_${forum.fid}_img"
  142. <#if forum.collapse!="">
  143. src="templates/${templatepath}/images/collapsed_yes.gif"
  144. <#else>
  145. src="templates/${templatepath}/images/collapsed_no.gif"
  146. </#if>
  147. alt="??/??" onclick="toggle_collapse('category_${forum.fid}');"/>
  148. </span>
  149. <h3>
  150. <a href="showforum.action?forumid=${forum.fid}">${forum.name}</a>
  151. </h3>
  152. <table id="category_${forum.fid}" summary="category_${forum.fid}" cellspacing="0" cellpadding="0" style="${forum.collapse}">
  153. <thead class="category">
  154. <tr>
  155. <th>??</th>
  156. <td class="nums">??</td>
  157. <td class="nums">??</td>
  158. <td class="lastpost">????</td>
  159. </tr>
  160. </thead>
  161. <#else>
  162. <#assign subforumcount=0 />
  163. <div class="mainbox forumlist">
  164. <span class="headactions">
  165. <#if forum.forumfields.moderators!="">
  166. ????: ${forum.forumfields.moderators}
  167. </#if>
  168. <img id="category_${forum.fid}_img"
  169. <#if forum.collapse!="">
  170. src="templates/${templatepath}/images/collapsed_yes.gif"
  171. <#else>
  172. src="templates/${templatepath}/images/collapsed_no.gif"
  173. </#if>
  174. alt="??/??" onclick="toggle_collapse('category_${forum.fid}');"/>
  175. </span>
  176. <h3>
  177. <a href="showforum.action?forumid=${forum.fid}">${forum.name}</a>
  178. </h3>
  179. <table id="category_${forum.fid}" summary="category_${forum.fid}" cellspacing="0" cellpadding="0" style="${forum.collapse}">
  180. </#if>
  181. <#assign lastforumlayer=0 />
  182. <#assign lastcolcount=forum.colcount />
  183. <#assign lastforumid=forum.fid/>
  184. <#else>
  185. <#if forum.colcount==1>
  186. <tbody id="forum${forum.fid}">
  187. <tr>
  188. <th <#if forum.havenew=="new" >class="new"</#if>>
  189. <#if forum.forumfields.icon!="">
  190. <img src="${forum.forumfields.icon}" border="0" align="left" hspace="5" alt="${forum.name}"/>
  191. </#if>
  192. <h2>
  193. <#if forum.forumfields.redirect=="">
  194. <a href="showforum.action?forumid=${forum.fid}">
  195. <#else>
  196. <a href="${forum.forumfields.redirect}" target="_blank">
  197. </#if>
  198. ${forum.name}</a><#if (forum.todayposts>0)><em>(${forum.todayposts})</em></#if>
  199. </h2>
  200. <#if forum.forumfields.description!=""><p>${forum.forumfields.description}</p></#if>
  201. <#if forum.forumfields.moderators!=""><p class="moderators">??: ${forum.forumfields.moderators}</p></#if>
  202. </th>
  203. <td class="nums"><#if forum.istrade!=1>${forum.topics_1}<#else>&nbsp;</#if></td>
  204. <td class="nums"><#if forum.istrade!=1>${forum.posts}<#else>&nbsp;</#if></td>
  205. <td class="lastpost">
  206. <#if forum.istrade!=1>
  207. <#if forum.status==-1>
  208. ????
  209. <#else>
  210. <#if forum.topics.tid!=0>
  211. <p>
  212. <a href="showtopic.action?topicid=${forum.topics.tid}">${forum.lasttitle}</a>
  213. </p>
  214. <div class="topicbackwriter">by
  215. <#if forum.lastposter!="">
  216. <#if forum.users.uid==-1>
  217. ??
  218. <#else>
  219. <a href="userinfo.action?userid=${forum.users.uid}" target="_blank">${forum.lastposter}</a>
  220. </#if>
  221. <#else>
  222. ??
  223. </#if>
  224. - <a href="showtopic.action?topicid=${forum.topics.tid}&page=end#lastpost" title="${forum.lastpost}"><span>${forum.lastpost}</span></a>
  225. </div>
  226. <#else>
  227. ??
  228. </#if>
  229. </#if>
  230. <#else>
  231. <p>${forum.forumfields.description}</p>
  232. </#if>
  233. </td>
  234. </tr>
  235. </tbody>
  236. <#else>
  237. <#assign subforumcount=subforumcount+1 />
  238. <#assign colwidth = 99.9 / forum.colcount />
  239. <#if subforumcount==1>
  240. <tbody>
  241. <tr>
  242. </#if>
  243. <th style="width:{colwidth}%;"<#if forum.havenew=="new" >class="new"</#if>>
  244. <h2>
  245. <#if forum.forumfields.icon!="">
  246. <img src="${forum.forumfields.icon}" border="0" align="left" hspace="5" alt="${forum.name}"/>
  247. </#if>
  248. <#if forum.forumfields.redirect=="">
  249. <a href="showforum.action?forumid=${forum.fid}">
  250. <#else>
  251. <a href="${forum.forumfields.redirect}" target="_blank">
  252. </#if>
  253. ${forum.name}</a>
  254. <#if (forum.todayposts>0)>
  255. <em>(${forum.todayposts})</em>
  256. </#if>
  257. </h2>
  258. <p><#if forum.istrade!=1>??:${forum.topics_1}, ??:${forum.posts}</#if></p>
  259. <#if forum.istrade!=1>
  260. <#if forum.status==-1>
  261. <p>????</p>
  262. <#else>
  263. <#if forum.topics.tid!=0>
  264. <p>??: <a href="showtopic.action?topicid=${forum.topics.tid}&page=end#lastpost" title="${forum.lasttitle}"><span>${forum.lastpost}</span></a> by
  265. <#if forum.lastposter!="">
  266. <#if forum.users.uid==-1>
  267. ??
  268. <#else>
  269. <a href="userinfo.action?userid=${forum.users.uid}" target="_blank">${forum.lastposter}</a>
  270. </#if>
  271. <#else>
  272. ??
  273. </#if>
  274. </p>
  275. </#if>
  276. </#if>
  277. <#else>
  278. <p>${forum.forumfields.description}</p>
  279. </#if>
  280. </th>
  281. <#if subforumcount==forum.colcount>
  282. </tr>
  283. </tbody>
  284. <#assign subforumcount=0 />
  285. </#if>
  286. </#if>
  287. <#assign lastforumlayer=1 />
  288. <#assign lastcolcount=forum.colcount />
  289. </#if>
  290. </#list>
  291. <#if lastcolcount!=1 && subforumcount!=0>
  292. <#list 0..(lastcolcount-subforumcount) as x>
  293. <td>&nbsp;</td>
  294. </#list>
  295. </tr>
  296. </#if>
  297. </table>
  298. </div>
  299. <!--end topic-->
  300. <@comm.hottagbox />
  301. <#if (forumlinkcount>0)>
  302. <#-- ?????? -->
  303. <div class="box">
  304. <span class="headactions"><img id="forumlinks_img" src="templates/${templatepath}/images/collapsed_no.gif" alt="" onclick="toggle_collapse('forumlinks');"/></span>
  305. <h4>????</h4>
  306. <table id="forumlinks" cellspacing="0" cellpadding="0" style="table-layout: fixed;" summary="????">
  307. <#list forumlinklist as forumlink>
  308. <tbody>
  309. <tr>
  310. <#if forumlink.logo!="">
  311. <td>
  312. <a href="${forumlink.url}" target="_blank"><img src="${forumlink.logo}" alt="${forumlink.name}" class="forumlink_logo"/></a>
  313. <h5><a href="${forumlink.url}" target="_blank">${forumlink.name}</a></h5>
  314. <p>${forumlink.note}</p>
  315. </td>
  316. <#elseif forumlink.name!="$$otherlink$$">
  317. <td>
  318. <h5>
  319. <a href="${forumlink.url}" target="_blank">${forumlink.name}</a>
  320. </h5>
  321. <p>${forumlink.note}</p>
  322. </td>
  323. <#else>
  324. <td>
  325. ${forumlink.note}
  326. </td>
  327. </#if>
  328. </tr>
  329. </tbody>
  330. </#list>
  331. </table>
  332. </div>
  333. </#if>
  334. <#-- ?????? -->
  335. <#if config.whosonlinestatus!=0 && config.whosonlinestatus!=2>
  336. <div class="box" id="online">
  337. <span class="headactions">
  338. <#if !showforumonline>
  339. <a href="?showonline=yes#online"><img src="templates/${templatepath}/images/collapsed_yes.gif" alt="??/??" />
  340. <#else>
  341. <a href="?showonline=no#online"><img src="templates/${templatepath}/images/collapsed_no.gif" alt="??/??" />
  342. </#if></a>
  343. </span>
  344. <h4>
  345. <strong><a href="${forumurl}onlineuser.action">????</a></strong>- <em>${totalonline}</em> ??? <#if showforumonline>- ${totalonlineuser} ??<span id="invisible"></span>, ${totalonlineguest} ??</#if>- ????? <em>${highestonlineusercount}</em> ? <em>${highestonlineusertime}</em>
  346. </h4>
  347. <dl id="onlinelist">
  348. <dt>${onlineiconlist}</dt>
  349. <dd class="onlineusernumber">
  350. ?<strong>${totalusers}</strong>??? <span class="newuser">???:
  351. <a href="userinfo.action?userid=${lastuserid}">${lastusername}</a></span>
  352. </dd>
  353. <dd>
  354. <ul class="userlist">
  355. <#if showforumonline>
  356. <#assign invisiblecount = 0 />
  357. <#list onlineuserlist as onlineuser>
  358. <#if onlineuser.invisible==1>
  359. <#assign invisiblecount = invisiblecount+1 />
  360. <li>(????)</li>
  361. <#else>
  362. <li>${onlineuser.olimg}
  363. <#if onlineuser.users.uid==-1>
  364. ${onlineuser.username}
  365. <#else>
  366. <a href="userinfo.action?userid=${onlineuser.users.uid}" target="_blank" title="??: ${onlineuser.lastupdatetime}
  367. ??: ${onlineuser.actionname}
  368. <#if onlineuser.forumname!="">
  369. ??: ${onlineuser.forumname}
  370. </#if> ">${onlineuser.username}</a>
  371. </#if>
  372. </li>
  373. </#if>
  374. </#list>
  375. <#if (invisiblecount>0)>
  376. <script type="text/javascript">$('invisible').innerHTML = '(${invisiblecount}' + " ??)";</script>
  377. </#if>
  378. <#else>
  379. <li style="width: auto"><a href="?showonline=yes#online">????????</a></li>
  380. </#if>
  381. </ul>
  382. </dd>
  383. </dl>
  384. </div>
  385. </#if>
  386. <div class="legend">
  387. <label><img src="templates/${templatepath}/images/forum_new.gif" alt="??????" />??????</label>
  388. <label><img src="templates/${templatepath}/images/forum.gif" alt="??????" />??????</label>
  389. </div>
  390. <#if config.forumjump==1>
  391. ${navhomemenu}
  392. </#if>
  393. </div>
  394. <@comm.copyright/>
  395. <@comm.footer/>