search_sortoption.htm 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <script type="text/javascript">
  2. var forum_optionlist = <!--{if $forum_optionlist}-->'$forum_optionlist'<!--{else}-->''<!--{/if}-->;
  3. </script>
  4. <script type="text/javascript" src="{$_G['setting']['jspath']}threadsort.js?{VERHASH}"></script>
  5. <!--{loop $quicksearchlist $optionid $option}-->
  6. <!--{eval $formsearch = '';}-->
  7. <!--{if getstatus($option['search'], 1)}-->
  8. <!--{block formsearch}-->
  9. <div style="{if $option['type'] == 'checkbox'}clear:left;padding-bottom: 5px;{else}float: left;width: 48%;height: 30px; overflow: hidden;{/if}">
  10. <span style="padding-right: 1em;">$option[title]:</span>
  11. <!--{if in_array($option['type'], array('radio', 'checkbox', 'select', 'range'))}-->
  12. <span id="select_$option[identifier]">
  13. <!--{if $option[type] == 'select'}-->
  14. <!--{if $_GET[searchoption][$optionid][value]}-->
  15. <script type="text/javascript">
  16. changeselectthreadsort('$_GET[searchoption][$optionid][value]', $optionid, 'search');
  17. </script>
  18. <!--{else}-->
  19. <select name="searchoption[$optionid][value]" id="$option[identifier]" onchange="changeselectthreadsort(this.value, '$optionid', 'search');" class="ps vm">
  20. <option value="0">{lang please_select}</option>
  21. <!--{loop $option['choices'] $id $value}-->
  22. <!--{if !$value[foptionid]}-->
  23. <option value="$id">$value[content] <!--{if $value['level'] != 1}-->&raquo;<!--{/if}--></option>
  24. <!--{/if}-->
  25. <!--{/loop}-->
  26. </select>
  27. <input type="hidden" name="searchoption[$optionid][type]" value="$option[type]">
  28. <!--{/if}-->
  29. <!--{elseif $option[type] != 'checkbox'}-->
  30. <select name="searchoption[$optionid][value]" id="$option[identifier]" class="ps vm">
  31. <option value="0">{lang please_select}</option>
  32. <!--{loop $option['choices'] $id $value}-->
  33. <option value="$id" {if $_GET[searchoption][$optionid][value] == $id}selected="selected"{/if}>$value</option>
  34. <!--{/loop}-->
  35. </select>
  36. <input type="hidden" name="searchoption[$optionid][type]" value="$option[type]">
  37. <!--{else}-->
  38. <!--{loop $option['choices'] $id $value}-->
  39. <label><input type="checkbox" class="pc" name="searchoption[$optionid][value][$id]" value="$id" {if is_array($_GET[searchoption][$optionid]) && $_GET[searchoption][$optionid][value][$id]}checked="checked"{/if}>$value</label>
  40. <!--{/loop}-->
  41. <input type="hidden" name="searchoption[$optionid][type]" value="checkbox">
  42. <!--{/if}-->
  43. </span>
  44. <!--{else}-->
  45. <!--{if $option['type'] == 'calendar'}-->
  46. <script type="text/javascript" src="{$_G[setting][jspath]}calendar.js?{VERHASH}"></script>
  47. <input type="text" name="searchoption[$optionid][value]" size="15" class="px vm" value="{if is_array($_GET[searchoption][$optionid])}$_GET[searchoption][$optionid][value]{/if}" onclick="showcalendar(event, this, false)" />
  48. <!--{else}-->
  49. <input type="text" name="searchoption[$optionid][value]" size="15" class="px vm" value="{if is_array($_GET[searchoption][$optionid])}$_GET[searchoption][$optionid][value]{/if}" />
  50. <!--{/if}-->
  51. <!--{/if}-->
  52. </div>
  53. <!--{/block}-->
  54. <!--{/if}-->
  55. <!--{eval $formsearch_html .= $formsearch;}-->
  56. <!--{eval $fontsearch = '';$showoption = array();$tmpcount = 0;}-->
  57. <!--{if getstatus($option['search'], 2)}-->
  58. <!--{block fontsearch}-->
  59. <tr>
  60. <th width="8%">$option[title]:</th>
  61. <td>
  62. <ul class="cl">
  63. <li{if $_GET[''.$option[identifier]] == 'all'} class="a"{/if}><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_GET['sortid']&searchsort=1$filterurladd&$option[identifier]=all$sorturladdarray[$option[identifier]]" class="xi2">{lang unlimited}</a></li>
  64. <!--{if $option[type] == 'select'}-->
  65. <!--{loop $option['choices'] $id $value}-->
  66. <!--{if $value[foptionid] == 0}-->
  67. <li{if preg_match('/^'.$value[optionid].'\./i', $_GET[''.$option[identifier]]) || preg_match('/^'.$value[optionid].'$/i', $_GET[''.$option[identifier]])} class="a"{/if}><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_GET[sortid]&searchsort=1&$option[identifier]=$id$sorturladdarray[$option[identifier]]" class="xi2">$value[content]</a></li>
  68. <!--{/if}-->
  69. <!--{/loop}-->
  70. <!--{if !($_GET[''.$option[identifier]] == 'all' || !isset($_GET[''.$option[identifier]]))}-->
  71. <!--{loop $option['choices'] $id $value}-->
  72. <!--{if (preg_match('/^'.$value[foptionid].'\./i', $_GET[''.$option[identifier]]) || preg_match('/^'.$value[foptionid].'$/i', $_GET[''.$option[identifier]])) && ($showoption[$value[count]][$id] = $value)}-->
  73. <!--{/if}-->
  74. <!--{/loop}-->
  75. <!--{if ksort($showoption)}--><!--{/if}-->
  76. <!--{loop $showoption $optioncount $values}-->
  77. <!--{if $tmpcount != $optioncount && ($tmpcount = $optioncount)}-->
  78. </ul><ul class="subtsm cl">
  79. <!--{loop $values $id $value}-->
  80. <li{if preg_match('/^'.$value[optionid].'\./i', $_GET[''.$option[identifier]]) || preg_match('/^'.$value[optionid].'$/i', $_GET[''.$option[identifier]])} class="a"{/if}><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_GET[sortid]&searchsort=1&$option[identifier]=$id$sorturladdarray[$option[identifier]]" class="xi2">$value[content]</a></li>
  81. <!--{/loop}-->
  82. </ul><ul>
  83. <!--{/if}-->
  84. <!--{/loop}-->
  85. <!--{/if}-->
  86. <!--{else}-->
  87. <!--{loop $option['choices'] $id $value}-->
  88. <li{if $_GET[''.$option[identifier]] && !strcmp($id, $_GET[''.$option[identifier]])} class="a"{/if}><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_GET[sortid]&searchsort=1&$option[identifier]=$id$sorturladdarray[$option[identifier]]" class="xi2">$value</a></li>
  89. <!--{/loop}-->
  90. <!--{/if}-->
  91. </ul>
  92. </td>
  93. </tr>
  94. <!--{/block}-->
  95. <!--{/if}-->
  96. <!--{eval $fontsearch_html .= $fontsearch;}-->
  97. <!--{/loop}-->
  98. <!--{if $formsearch_html || $fontsearch_html}-->
  99. <div>
  100. <!--{if $fontsearch_html}-->
  101. <div class="ptn pbn mbm bbs">
  102. <table id="fontsearch" class="tsm cl">
  103. $fontsearch_html
  104. </table>
  105. </div>
  106. <!--{/if}-->
  107. <!--{if $formsearch_html}-->
  108. <form method="post" autocomplete="off" name="searhsort" id="searhsort" class="bbs bm_c pns mfm cl" action="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=sortid&sortid=$_GET[sortid]">
  109. <input type="hidden" name="formhash" value="{FORMHASH}" />
  110. <div class="ptm cl">$formsearch_html
  111. <button type="submit" class="pn pnc" name="searchsortsubmit"><em>{lang search}</em></button></div>
  112. </form>
  113. <!--{/if}-->
  114. </div>
  115. <!--{/if}-->