index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <PHP>
  5. function image($image){
  6. if($image==''){
  7. return "<a style='height:35px;width:35px;'/>图片未上传</a>";
  8. }else{
  9. return "<img src='".$image."' style='height:35px;width:35px;'/>";
  10. }
  11. }
  12. </PHP>
  13. <script>
  14. function del_tree(id)
  15. {
  16. if(!id)
  17. {
  18. idBox = $(".key:checked");
  19. if(idBox.length == 0)
  20. {
  21. alert(LANG['DELETE_EMPTY_WARNING']);
  22. return;
  23. }
  24. idArray = new Array();
  25. $.each( idBox, function(i, n){
  26. idArray.push($(n).val());
  27. });
  28. id = idArray.join(",");
  29. }
  30. if(confirm(LANG['CONFIRM_DELETE']))
  31. $.ajax({
  32. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=del_tree&id="+id,
  33. data: "ajax=1",
  34. dataType: "json",
  35. success: function(obj){
  36. alert(obj.info);
  37. func();
  38. function func(){
  39. if(obj.status==1){
  40. location.href=location.href;
  41. }
  42. }
  43. }
  44. });
  45. }
  46. function refresh(){
  47. $(document).ready(function(){
  48. window.location.reload();
  49. });
  50. }
  51. //添加树苗
  52. function add_tree(){
  53. location.href = ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=add_tree";
  54. }
  55. //编辑树苗
  56. function edit_tree(id){
  57. location.href = ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=edit_tree&tree_id="+id;
  58. }
  59. </script>
  60. <load href='__TMPL__Common/js/jquery.bgiframe.js' />
  61. <load href='__TMPL__Common/js/jquery.weebox.js' />
  62. <load href='__TMPL__Common/js/deal.js' />
  63. <load href='__TMPL__Common/js/user.js' />
  64. <load href='__TMPL__Common/style/weebox.css' />
  65. <script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
  66. <load href='__TMPL__Common/js/calendar/calendar.css' />
  67. <load href='__TMPL__Common/js/calendar/calendar.js' />
  68. <div class="main">
  69. <div class="main_title_list"><div class="list-line-ico"></div>树苗列表<a href="/{$url_name}?m=QkTree&a=index&&">刷新</a></div>
  70. <div class="search_row">
  71. <form name="search" action="__APP__" method="get" class="clearfix">
  72. <div>树苗名称:<input type="text" class="textbox" name="title" value="{:trim($_REQUEST['title'])}" style="width:100px;" /></div>
  73. <div>钻石:<input type="text" class="textbox" name="diamonds" value="{:trim($_REQUEST['diamonds'])}" style="width:100px;" /></div>
  74. <div>创建时间:<span><input type="text" class="textbox" name="create_time_1" id="create_time_1" value="{$_REQUEST['create_time_1']}" onfocus="this.blur(); return showCalendar('create_time_1', '%Y-%m-%d', false, false, 'btn_create_time_1');" /><input type="button" class="button" id="btn_create_time_1" value="{%SELECT_TIME}" onclick="return showCalendar('create_time_1', '%Y-%m-%d', false, false, 'btn_create_time_1');" /></span> - <span><input type="text" class="textbox" name="create_time_2" id="create_time_2" value="{$_REQUEST['create_time_2']}" onfocus="this.blur(); return showCalendar('create_time_2', '%Y-%m-%d', false, false, 'btn_create_time_2');" /><input type="button" class="button" id="btn_create_time_2" value="{%SELECT_TIME}" onclick="return showCalendar('create_time_2', '%Y-%m-%d', false, false, 'btn_create_time_2');" /></span><input type="hidden" value="QkTree" name="m" /><input type="hidden" value="index" name="a" /><input type="submit" class="button" value="{%SEARCH}" /></div>
  75. </form>
  76. </div>
  77. <html:list
  78. id="dataTable"
  79. style="dataTable"
  80. name="qk_tree"
  81. checkbox="true"
  82. action="true"
  83. datasource="list"
  84. show="id:编号
  85. ,title:树苗名称
  86. ,image|image:树苗图片
  87. ,description:树苗介绍|200px
  88. ,diamonds:{%DIAMONDS}
  89. ,create_at|to_date:创建时间
  90. ,is_effect|get_is_effect=$qk_tree['id']:{%IS_EFFECT}
  91. ,sort|get_sort=$qk_tree['id']:{%SORT}"
  92. actionlist="edit_tree:{%EDIT}" />
  93. <table class="dataTable">
  94. <tbody>
  95. <td colspan="11">
  96. <input type="button" class="button button-add" value="{%ADD}" onclick="add_tree();" />
  97. </td>
  98. </tbody>
  99. </table>
  100. <div class="page">{$page}</div><!--(数值越大在app热门直播中越靠前) ,vote_number:{%TICKET}-->
  101. </div>
  102. <include file="Public:footer" />