c144dd4336d2bb23e65e0d6ea695d97b57259849.file.plugin.lbi.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?php /* Smarty version Smarty-3.1.7, created on 2016-12-20 18:01:14
  2. compiled from "D:/phpStudy/WWW_krpano100/vradmin/template\lib\plugin.lbi" */ ?>
  3. <?php /*%%SmartyHeaderCode:243135859016a222075-27029083%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_valid = $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. 'c144dd4336d2bb23e65e0d6ea695d97b57259849' =>
  8. array (
  9. 0 => 'D:/phpStudy/WWW_krpano100/vradmin/template\\lib\\plugin.lbi',
  10. 1 => 1482227802,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '243135859016a222075-27029083',
  15. 'function' =>
  16. array (
  17. ),
  18. 'variables' =>
  19. array (
  20. 'pid' => 0,
  21. 'plugins' => 0,
  22. 'v' => 0,
  23. '_lang' => 0,
  24. 'k' => 0,
  25. 'plugin' => 0,
  26. ),
  27. 'has_nocache_code' => false,
  28. 'version' => 'Smarty-3.1.7',
  29. 'unifunc' => 'content_5859016a421c6',
  30. ),false); /*/%%SmartyHeaderCode%%*/?>
  31. <?php if ($_valid && !is_callable('content_5859016a421c6')) {function content_5859016a421c6($_smarty_tpl) {?><div id="idTabs">
  32. <?php if (empty($_smarty_tpl->tpl_vars['pid']->value)){?>
  33. <ul class="tab">
  34. <li><a href="javascript:;" class="selected">管理插件</a></li>
  35. <li><a href="http://www.krpano100.com/plugin.php" target="_blank">获取更多插件</a></li>
  36. </ul>
  37. <table class="tableBasic" border="0" cellpadding="8" cellspacing="0" width="100%;">
  38. <tr>
  39. <th width="200">插件名称</th>
  40. <th>插件描述</th>
  41. <th width="100">是否启用</th>
  42. <th width="200">操作</th>
  43. </tr>
  44. <?php $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
  45. $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
  46. $_from = $_smarty_tpl->tpl_vars['plugins']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  47. foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
  48. $_smarty_tpl->tpl_vars['v']->_loop = true;
  49. $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
  50. ?>
  51. <tr>
  52. <td width="200"><?php echo $_smarty_tpl->tpl_vars['v']->value['plugin_name'];?>
  53. </td>
  54. <td><?php echo $_smarty_tpl->tpl_vars['v']->value['brief'];?>
  55. </td>
  56. <td><img src="/static/images/ico/<?php if ($_smarty_tpl->tpl_vars['v']->value['enable']==1){?>yes.gif<?php }else{ ?>no.gif<?php }?>"/></td>
  57. <td width="200"><a href="/<?php echo $_smarty_tpl->tpl_vars['_lang']->value['admin_path'];?>
  58. /?m=plugin&pid=<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
  59. ">编辑</a></td>
  60. </tr>
  61. <?php } ?>
  62. </table>
  63. <?php }else{ ?>
  64. <form action="/<?php echo $_smarty_tpl->tpl_vars['_lang']->value['admin_path'];?>
  65. /?m=plugin" id="plugin_form" method="post" enctype="multipart/form-data">
  66. <table class="tableBasic" border="0" cellpadding="4" cellspacing="0" width="100%">
  67. <tr>
  68. <th width="120"><i class="require-red">*</i> 插件名称</th>
  69. <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['plugin_name'];?>
  70. </td>
  71. </tr>
  72. <tr>
  73. <th><i class="require-red">*</i> 描  述</th>
  74. <td>
  75. <textarea name="brief" cols="40" rows="5" class="textArea" placeholder="关于插件的功能,使用说明等"><?php echo $_smarty_tpl->tpl_vars['plugin']->value['brief'];?>
  76. </textarea>
  77. </td>
  78. </tr>
  79. <?php if ($_smarty_tpl->tpl_vars['pid']->value=='custom_logo'){?>
  80. <tr>
  81. <th align="right">默认logo</th>
  82. <td>
  83. <link rel="stylesheet" href="/static/kindeditor/themes/default/default.css" />
  84. <script src="/static/kindeditor/kindeditor-min.js"></script>
  85. <script>
  86. KindEditor.ready(function(K) {
  87. var uploadbutton = K.uploadbutton({
  88. button : K('#uploadButton')[0],
  89. fieldName : 'imgFile',
  90. url : '/<?php echo $_smarty_tpl->tpl_vars['_lang']->value['admin_path'];?>
  91. /?m=system&act=custom_logo',
  92. afterUpload : function(data) {
  93. if (data.error === 0) {
  94. $("#custom_logo").attr('src','/plugin/custom_logo/images/custom_logo.png?v'+(new Date().getTime()));
  95. } else {
  96. alert(data.message);
  97. }
  98. },
  99. afterError : function(str) {
  100. alert('自定义错误信息: ' + str);
  101. }
  102. });
  103. uploadbutton.fileBox.change(function(e) {
  104. uploadbutton.submit();
  105. });
  106. });
  107. </script>
  108. <img src="/plugin/custom_logo/images/custom_logo.png" id="custom_logo" height="100px"/>
  109. <div class="clear" style="height:5px"></div>
  110. <input type="button" id="uploadButton" value="上传图片" />
  111. </td>
  112. </tr>
  113. <?php }?>
  114. <?php if ($_smarty_tpl->tpl_vars['pid']->value=='shade_sky_floor'){?>
  115. <tr>
  116. <th align="right">默认补天补地图标</th>
  117. <td>
  118. <link rel="stylesheet" href="/static/kindeditor/themes/default/default.css" />
  119. <script src="/static/kindeditor/kindeditor-min.js"></script>
  120. <script>
  121. KindEditor.ready(function(K) {
  122. var uploadbutton = K.uploadbutton({
  123. button : K('#uploadButton')[0],
  124. fieldName : 'imgFile',
  125. url : '/<?php echo $_smarty_tpl->tpl_vars['_lang']->value['admin_path'];?>
  126. /?m=system&act=shade_sky_floor',
  127. afterUpload : function(data) {
  128. if (data.error === 0) {
  129. $("#shade_sky_floor").attr('src','/plugin/shade_sky_floor/images/shade_sky_floor.png?v'+(new Date().getTime()));
  130. } else {
  131. alert(data.message);
  132. }
  133. },
  134. afterError : function(str) {
  135. alert('自定义错误信息: ' + str);
  136. }
  137. });
  138. uploadbutton.fileBox.change(function(e) {
  139. uploadbutton.submit();
  140. });
  141. });
  142. </script>
  143. <img src="/plugin/shade_sky_floor/images/shade_sky_floor.png" id="shade_sky_floor" height="100px"/>
  144. <div class="clear" style="height:5px"></div>
  145. <input type="button" id="uploadButton" value="上传图片" />
  146. </td>
  147. </tr>
  148. <?php }?>
  149. <?php if ($_smarty_tpl->tpl_vars['plugin']->value['edit_container']=='option_group'){?>
  150. <tr>
  151. <th><i class="require-red">*</i> 默认值</th>
  152. <td>
  153. <label><input type="radio" name="default" value="1" <?php if ($_smarty_tpl->tpl_vars['plugin']->value['default']==1){?>checked<?php }?>> on</label> 
  154. <label><input type="radio" name="default" value="0" <?php if (isset($_smarty_tpl->tpl_vars['plugin']->value['default'])&&$_smarty_tpl->tpl_vars['plugin']->value['default']==0){?>checked<?php }?>> off</label>
  155. </td>
  156. </tr>
  157. <?php }?>
  158. <tr>
  159. <th><i class="require-red">*</i> 是否启用</th>
  160. <td>
  161. <label><input type="radio" name="enable" value="1" <?php if ($_smarty_tpl->tpl_vars['plugin']->value['enable']==1){?>checked<?php }?>> 是</label> 
  162. <label><input type="radio" name="enable" value="0" <?php if ($_smarty_tpl->tpl_vars['plugin']->value['enable']==0){?>checked<?php }?>> 否</label>
  163. </td>
  164. </tr>
  165. <tr>
  166. <th></th>
  167. <td>
  168. <div id="wrong_text" class="warning" style="display:none"></div>
  169. <div class="clear"></div>
  170. <input type="hidden" name="pid" value="<?php echo $_smarty_tpl->tpl_vars['pid']->value;?>
  171. ">
  172. <input type="button" class="btn" value="提交" id="sub_btn" onclick="javascript:ajaxFormSubmit('plugin_form','提交');">
  173. <input class="btn" onClick="history.go(-1)" value="返回" type="button">
  174. </td>
  175. </tr>
  176. </table>
  177. </form>
  178. <?php }?>
  179. </div> <?php }} ?>