PageRenderTime 58ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/Quản lý website tin tức PHP/discuznews/template/default/portal/portalcp_diy.htm

https://gitlab.com/phamngsinh/baitaplon_sinhvien
HTML | 224 lines | 182 code | 4 blank | 38 comment | 0 complexity | 637d44da5601a03fb5fc59904aa7d73b MD5 | raw file
  1. <!--{template common/header}-->
  2. <!--{if $op=='blockclass'}-->
  3. <div class="tbmu mbm" id="contentblockclass_nav" style="margin-top: -15px">
  4. <!--{eval $isfirst=1;}-->
  5. <!--{loop $_G['cache']['blockclass'] $key $value}-->
  6. <!--{if $isfirst}-->
  7. <!--{eval $isfirst=0;}-->
  8. <a href="javascript:;" id="bcnav_$key" class="a" onclick="spaceDiy.switchBlockclass('$key');return false;">$value[name]</a>
  9. <!--{else}-->
  10. <span class="pipe">|</span>
  11. <a href="javascript:;" id="bcnav_$key" onclick="spaceDiy.switchBlockclass('$key');return false;">$value[name]</a>
  12. <!--{/if}-->
  13. <!--{/loop}-->
  14. </div>
  15. <!--{eval $isfirst=1;}-->
  16. <!--{loop $_G['cache']['blockclass'] $key $value}-->
  17. <!--{if $isfirst}-->
  18. <!--{eval $isfirst=0;}-->
  19. <ul class="blocks content" id="contentblockclass_$key">
  20. <!--{else}-->
  21. <ul class="blocks content" id="contentblockclass_$key" class="hide">
  22. <!--{/if}-->
  23. <li class="module-$key">
  24. <ol>
  25. <!--{loop $value[subs] $skey $svalue}-->
  26. <li class="module-$skey"><label onmousedown="drag.createObj (event,'block','$skey');" onmouseover="className='hover';" onmouseout="this.className='';">$svalue[name]</label></li>
  27. <!--{/loop}-->
  28. </ol>
  29. </li>
  30. </ul>
  31. <!--{/loop}-->
  32. <!--{elseif $op == 'style'}-->
  33. <ul class="content" style="overflow-y: auto; height: 90px;">
  34. <!--{loop $themes $value}-->
  35. <li><a href="javascript:;" onclick="spaceDiy.changeStyle('$value[dir]');return false;"><img src="{STATICURL}$value['dir']/preview.jpg" />$value['name']</a></li>
  36. <!--{/loop}-->
  37. </ul>
  38. <!--{elseif $_GET['op'] == 'image'}-->
  39. <div id="diyimg_prev" class="z">$multi</div>
  40. <ul id="imagebody">
  41. <!--{loop $list $key $value}-->
  42. <li class="thumb"><a href="javascript:;" onclick="return false;"><img src="$value[pic]" alt="" onclick="spaceDiy.setBgImage(this);"/></a></li>
  43. <!--{/loop}-->
  44. </ul>
  45. <div id="diyimg_next" class="z">$multi</div>
  46. <!--{elseif $_GET['op'] == 'diy'}-->
  47. <dl class='diy'>
  48. <dt class="cl pns">
  49. <div class="y">
  50. <button type="button" id="uploadmsg_button" onclick="Util.toggleEle('upload');" class="pn pnc z{if empty($list)} hide{/if}"><span>{lang diy_upload_image}</span></button>
  51. <div id="upload" class="z{if $list} hide{/if}"><iframe id="uploadframe" name="uploadframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
  52. <form method="post" autocomplete="off" name="uploadpic" id="uploadpic" action="portal.php?mod=portalcp&ac=diy" enctype="multipart/form-data" target="uploadframe" onsubmit="return spaceDiy.uploadSubmit();">
  53. <input type="file" class="t_input" name="attach" size="15">
  54. <input type="hidden" name="formhash" value="{FORMHASH}" />
  55. <input type="hidden" name="topicid" value="$_GET[topicid]" />
  56. <button type="submit" name="uploadsubmit" id="btnupload" class="pn" value="true"><span>{lang diy_update_start}</span></button>
  57. </form>
  58. </div>
  59. <span id="uploadmsg" class="z"></span>
  60. </div>
  61. {lang diy_editing}:
  62. <a id="diy_tag_body" href="javascript:;" onclick="spaceDiy.setCurrentDiy('body');return false;">{lang background}</a>
  63. <span class="pipe">|</span><a id="diy_tag_blocktitle" href="javascript:;" onclick="spaceDiy.setCurrentDiy('blocktitle');return false;">{lang title_bar}</a></span>
  64. <span class="pipe">|</span><a id="diy_tag_ct" href="javascript:;" onclick="spaceDiy.setCurrentDiy('ct');return false;">{lang content_area}</a>
  65. <a style="margin-left: 40px;" id="bg_button" href="javascript:;" onclick="spaceDiy.hideBg();return false;">{lang background_image_cancel}</a>
  66. <span class="pipe">|</span><a id="recover_button" href="javascript:;" onclick="spaceDiy.recoverStyle();return false;">{lang restore_skin}</a>
  67. </dt>
  68. <dd>
  69. <div class="photo_list cl">
  70. <div id="currentimgdiv" class="z" style="width:446px;">
  71. <center><ul><li class="thumb" style="border:1px solid #ccc; padding:2px;"><img id="currentimg" alt="" src=""/></li></ul>
  72. <div class="z cur1" onclick="spaceDiy.changeBgImgDiv();">{lang diy_change}</div></center>
  73. </div>
  74. <div id="diyimages" class="z" style="width: 446px; display: none">
  75. <div id="diyimg_prev" class="z">$multi</div>
  76. <ul id="imagebody">
  77. <!--{loop $list $key $value}-->
  78. <li class="thumb"><a href="javascript:;" onclick="return false;"><img src="$value[pic]" alt="" onclick="spaceDiy.setBgImage(this);"/></a></li>
  79. <!--{/loop}-->
  80. </ul>
  81. <div id="diyimg_next" class="z">$multi</div>
  82. </div>
  83. <div class="z" style="padding-left: 7px; width: 160px; border: solid #CCC; border-width: 0 1px;">
  84. <table cellpadding="0" cellspacing="0">
  85. <tr>
  86. <td><label for="repeat_mode">{lang image_repeat_mode}:</label></td>
  87. <td>
  88. <select id="repeat_mode" name="repeat_mode" class="ps" onclick="spaceDiy.setBgRepeat(this.value);">
  89. <option value="0" selected="selected">{lang image_repeat}</option>
  90. <option value="1">{lang image_repeat_direct}</option>
  91. <option value="2">{lang image_repeat_horizontal}</option>
  92. <option value="3">{lang image_repeat_vertical}</option>
  93. </select>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>{lang image_position}:</td>
  98. <td>
  99. <table cellpadding="0" cellspacing="0" id="positiontable">
  100. <tr>
  101. <td id="bgimgposition0" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  102. <td id="bgimgposition1" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  103. <td id="bgimgposition2" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  104. </tr>
  105. <tr>
  106. <td id="bgimgposition3" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  107. <td id="bgimgposition4" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  108. <td id="bgimgposition5" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  109. </tr>
  110. <tr>
  111. <td id="bgimgposition6" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  112. <td id="bgimgposition7" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  113. <td id="bgimgposition8" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
  114. </tr>
  115. </table>
  116. </td>
  117. </tr>
  118. </table>
  119. </div>
  120. <div class="z diywin" style="padding-left: 7px; width: 160px;">
  121. <table cellpadding="0" cellspacing="0">
  122. <tr>
  123. <td>{lang background_attach_mode}:</td>
  124. <td>
  125. <label for="rabga0"><input type="radio" id="rabga0" name="attachment_mode" onclick="spaceDiy.setBgAttachment(0);" class="pr" />{lang background_attach_scroll}</label>
  126. <label for="rabga1"><input type="radio" id="rabga1" name="attachment_mode" onclick="spaceDiy.setBgAttachment(1);" class="pr" />{lang background_attach_fixed}</label>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td>{lang background_color}:</td>
  131. <td><input type="text" id="colorValue" value="" size="6" onchange="spaceDiy.setBgColor(this.value);" class="px vm" style="font-size: 12px; padding: 2px;" />
  132. <input id="cbpb" onclick="createPalette('bpb', 'colorValue', 'spaceDiy.setBgColor');" type="button" class="pn colorwd" value="" />
  133. </td>
  134. </tr>
  135. </table>
  136. </div>
  137. <div class="z diywin" style="padding-left: 7px; width: 160px;">
  138. <table cellpadding="0" cellspacing="0">
  139. <tr>
  140. <td>{lang text_color}:</td>
  141. <td><input type="text" id="textColorValue" value="" size="6" onchange="spaceDiy.setTextColor(this.value);" class="px vm" style="font-size: 12px; padding: 2px;" />
  142. <input id="ctpb" onclick="createPalette('tpb', 'textColorValue', 'spaceDiy.setTextColor');" type="button" class="pn colorwd" value="" />
  143. </td>
  144. </tr>
  145. <tr>
  146. <td>{lang link_color}:</td>
  147. <td><input type="text" id="linkColorValue" value="" size="6" onchange="spaceDiy.setLinkColor(this.value);" class="px vm" style="font-size: 12px; padding: 2px;" />
  148. <input id="clpb" onclick="createPalette('lpb', 'linkColorValue', 'spaceDiy.setLinkColor');" type="button" class="colorwd" value="" style="background: #fff;" />
  149. </td>
  150. </tr>
  151. </table>
  152. </div>
  153. </dd>
  154. </dl>
  155. <!--{elseif $op == 'import'}-->
  156. <h3 class="flb">
  157. <em id="return_$_GET[handlekey]">{lang import_frame}</em>
  158. <span>
  159. <!--{if $_G[inajax]}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_GET[handlekey]');return false;" title="{lang close}">{lang close}</a><!--{/if}-->
  160. </span>
  161. </h3>
  162. <ul class="tb cl">
  163. <li{if empty($_GET['type'])} class="a"{/if} id="li_import_upload"><a onclick="showWindow('showimport', this.getAttribute('href'));" href="portal.php?mod=portalcp&ac=diy&op=import&type=0&tpl=$_GET['tpl']">{lang diy_uploadfile}</a></li>
  164. <li{if $_GET['type'] == 1} class="a"{/if} id="li_import_system"><a onclick="showWindow('showimport', this.getAttribute('href'));" href="portal.php?mod=portalcp&ac=diy&op=import&type=1&tpl=$_GET['tpl']">{lang diy_systemfile}</a></li>
  165. </ul>
  166. <form name="frameimport" id="frameimport" enctype="multipart/form-data" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=diy&op=import" onsubmit="ajaxpost('frameimport','return_$_GET[handlekey]','','onerror',$('frameimportbutton'));">
  167. <div class="c" style="width:420px;line-height:100px; overflow-y: auto; ">
  168. <!--{if $_GET['type'] == 1}-->
  169. <!--{if $xmlarr}-->
  170. {lang import_select_file}:
  171. <select id="importfilename" name="importfilename" class="">
  172. <!--{loop $xmlarr $key $value}-->
  173. <option value="$key">$value</option>
  174. <!--{/loop}-->
  175. </select>
  176. <!--{else}-->
  177. <center>{lang import_system_file_no_exists}</center>
  178. <!--{/if}-->
  179. <!--{else}-->
  180. {lang import_text_file_from}: <input type="file" id="importfile" name="importfile" style="margin: 5px;">
  181. <!--{/if}-->
  182. </div>
  183. <div class="o pns">
  184. <input type="hidden" name="handlekey" value="$_GET['handlekey']" />
  185. <input type="hidden" name="importsubmit" value="true" />
  186. <input type="hidden" name="tpl" value="$_GET['tpl']" />
  187. <input type="hidden" name="formhash" value="{FORMHASH}" />
  188. <button type="submit" class="pn pnc" id="frameimportbutton"><strong>{lang import}</strong></button>
  189. </div>
  190. </form>
  191. <script type="text/javascript" reload="1">
  192. function succeedhandle_$_GET['handlekey'] (url, message, values) {
  193. if (values['status'] == '1') {
  194. if (values['css']) spaceDiy.initDiyStyle(values['css']);
  195. var areaArr = values['html'];
  196. var dom = document.createElement("div");
  197. for (var i in areaArr) {
  198. var html = areaArr[i].replace(/\[script/g, '<script').replace(/\[\/script\]/g, '<\/script>');
  199. var area = $(i) ? $(i) : drag.moveableArea[0];
  200. dom.innerHTML = html;
  201. var arr = [];
  202. for (var i=0, l=dom.childNodes.length; i < l; i++) {
  203. arr.push(dom.childNodes[i]);
  204. }
  205. var one = '';
  206. while(one = arr.pop()) {
  207. Util.insertBefore(one,area.firstChild);
  208. }
  209. }
  210. drag.initPosition();
  211. drag.isChange = true;
  212. drag.setClose();
  213. var blocks = values['bids'].split(',');
  214. drag.blockForceUpdateBatch(blocks);
  215. }
  216. hideWindow('$_GET['handlekey']');
  217. }
  218. </script>
  219. <!--{/if}-->
  220. <!--{template common/footer}-->