collection_invite.htm 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!--{template common/header}-->
  2. <h3 class="flb">
  3. <em>{lang collection_invite}</em>
  4. <span><a href="javascript:;" onclick="hideWindow('$_GET['handlekey']');" class="flbc" title="{lang close}">{lang close}</a></span>
  5. </h3>
  6. <form action="forum.php?mod=collection&action=edit&op=invite&ctid={$ctid}" method="post">
  7. <div class="c">
  8. <table cellspacing="0" cellpadding="0" class="tfm pmform mtm">
  9. <tr>
  10. <th><label for="username">{lang collection_username}</label></th>
  11. <td>
  12. <div class="cl">
  13. <div class="un_selector px z cl" onclick="$('username').focus();">
  14. <input type="text" name="username" id="username" autocomplete="off" />
  15. </div>
  16. <a href="javascript:;" id="showSelectBox" class="z mtn xi2 showmenu" onclick="showMenu({'showid':this.id, 'duration':3, 'pos':'34!'});fs.showPMFriend('showSelectBox_menu','selectorBox', this);" title="{lang collection_selectfriend}">{lang collection_selectfriend}</a>
  17. </div>
  18. <style type="text/css">
  19. .pmform{}.pmform .px{width:308px;}
  20. .pmform .tedt{width:316px;}
  21. .un_selector{height:auto;cursor:text;overflow:hidden;}
  22. .un_selector input{width:95px;height:19px;border-width:0;outline:none;}
  23. .ie6 .un_selector input,.ie7 .un_selector input{height:17px;}
  24. .un_selector #subject{width:308px;}
  25. .un_selector span{float:left;margin:1px 2px 1px 0;width:100px;height:19px;line-height:19px;background:#F7F6ED url(static/image/common/un_selector.png) no-repeat 0 0;color:#369;overflow:hidden;}
  26. .un_selector em{padding-left:5px;width:80px;}
  27. .un_selector .x{float:right;width:15px;height:19px;background:url(static/image/common/un_selector.png) no-repeat 100% -19px;text-indent:-9999px;overflow:hidden;}
  28. .un_selector .x:hover{background-position:100% -38px;}a.appendmb,a.appendmb span{height:25px;line-height:25px !important;}.pmfrndl{position:absolute;margin-top:3px;padding:4px;width:120px;border:solid #DDD;border-width:0 1px 1px;background:#FFF;}.ie6 .pmfrndl,.ie7 .pmfrndl{margin-top:4px;}.pmfrndl li{display:inline;}.pmfrndl a{display:block;padding:4px 2px;color:#369;}.pmfrndl a:hover{text-decoration:none;}.pmfrndl a.a{background:#E5EDF2;}#showSelectBox_menu{padding:10px;width:300px;white-space:nowrap;}#selBox{margin:0 -10px 10px;padding-left:10px;height:110px;border:solid #CDCDCD;border-width:1px 0;overflow-y:auto;}.unfold,.fold{float:right;padding-left:10px;background:url(.static/image/common/arrwd.gif) no-repeat 0 50%;cursor:pointer;outline:none;}
  29. .fold{background-image:url(static/image/common/arrow_top.gif);}
  30. </style>
  31. <script type="text/javascript">
  32. var random='{TIMESTAMP}';
  33. var page = 1;
  34. var gid = -1;
  35. var showNum = 0;
  36. var haveFriend = true;
  37. function getUser(pageId, gid) {
  38. page = parseInt(pageId);
  39. gid = isUndefined(gid) ? -1 : parseInt(gid);
  40. var x = new Ajax();
  41. x.get('home.php?mod=spacecp&ac=friend&op=getinviteuser&inajax=1&page='+ page + '&gid=' + gid + '&' + Math.random(), function(s) {
  42. var data = eval('('+s+')');
  43. var singlenum = parseInt(data['singlenum']);
  44. var maxfriendnum = parseInt(data['maxfriendnum']);
  45. fs.addDataSource(data, clearlist);
  46. haveFriend = singlenum && singlenum == 20 ? true : false;
  47. if(singlenum && fs.allNumber < 20 && fs.allNumber < maxfriendnum && maxfriendnum > 20 && haveFriend) {
  48. page++;
  49. getUser(page);
  50. }
  51. });
  52. }
  53. function selector() {
  54. var parameter = {'searchId':'username', 'showId':'friends', 'formId':'', 'showType':3, 'handleKey':'fs', 'selBox':'selectorBox', 'selBoxMenu':'showSelectBox_menu', 'maxSelectNumber':'20', 'selectTabId':'selectNum', 'unSelectTabId':'unSelectTab', 'maxSelectTabId':'remainNum'};
  55. fs = new friendSelector(parameter);
  56. var listObj = $('selBox');
  57. listObj.onscroll = function() {
  58. clearlist = 0;
  59. if(this.scrollTop >= this.scrollHeight/5) {
  60. page++;
  61. gid = isUndefined(gid) ? -1 : parseInt(gid);
  62. if(haveFriend) {
  63. getUser(page, gid);
  64. }
  65. }
  66. }
  67. getUser(page);
  68. }
  69. selector();
  70. </script>
  71. </td>
  72. </tr>
  73. </table>
  74. </div>
  75. <div class="o pns">
  76. <span class="z">{lang collection_max_invite}</span>
  77. <input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
  78. <button type="submit" value="submit" name="submitaddthread" class="pn pnc"><span>{lang invite}</span></button>
  79. </div>
  80. </form>
  81. <!--{template common/footer}-->