prop_item.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <php>
  5. function prop_name($id){
  6. $prop=M("Prop")->where("id =".intval($id))->getField("name");
  7. return $prop;
  8. }
  9. function is_show($show_user){
  10. return $show_user?"是":"否";
  11. }
  12. function is_type($type){
  13. if($type==1){
  14. return "屏幕上部";
  15. }
  16. if($type==2){
  17. return "屏幕中间";
  18. }
  19. if($type==3){
  20. return "屏幕底部";
  21. }
  22. return "默认位置";
  23. }
  24. </php>
  25. <script>
  26. function add_item(id){
  27. location.href = ROOT+'?m='+MODULE_NAME+'&a=add_prop_item&id='+id;
  28. }
  29. function edit_item(id){
  30. location.href = ROOT+'?m='+MODULE_NAME+'&a=edit_prop_item&id='+id;
  31. }
  32. function del_prop_item(id){
  33. if(!id)
  34. {
  35. idBox = $(".key:checked");
  36. if(idBox.length == 0)
  37. {
  38. alert("请选择需要删除的项目");
  39. return;
  40. }
  41. idArray = new Array();
  42. $.each( idBox, function(i, n){
  43. idArray.push($(n).val());
  44. });
  45. id = idArray.join(",");
  46. }
  47. if(confirm("确定要删除选中的项目吗?"))
  48. $.ajax({
  49. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=del_prop_item&id="+id,
  50. data: "ajax=1",
  51. dataType: "json",
  52. success: function(obj){
  53. $("#info").html(obj.info);
  54. if(obj.status==1)
  55. location.href=location.href;
  56. }
  57. });
  58. }
  59. </script>
  60. <div class="main">
  61. <div class="main_title">动画列表</div>
  62. <div class="blank5"></div>
  63. <div class="button_row">
  64. <input type="button" class="button" value="{%ADD}" onclick="add_item({$prop_info.id});" />
  65. <input type="button" class="button" value="{%DEL}" onclick="del_prop_item();" />
  66. </div>
  67. <div class="blank5"></div>
  68. <if condition="$prop_info['gif_gift_show_style'] eq 1">
  69. <html:list
  70. id="dataTable"
  71. style="dataTable"
  72. name="prop_animated"
  73. checkbox="true"
  74. action="true"
  75. datasource="list"
  76. show="id:{%ID}
  77. ,prop_id|prop_name:所属礼物
  78. ,url:gif动画地址
  79. ,play_count:播放次数
  80. ,delay_time:延时播放时间(毫秒)
  81. ,duration:播放时长(毫秒)
  82. ,show_user|is_show:显示用户名
  83. ,sort|get_sort=$prop_animated['id']:{%SORT}"
  84. actionlist="edit_item:编辑,del_prop_item:删除" />
  85. <else />
  86. <html:list
  87. id="dataTable"
  88. style="dataTable"
  89. name="prop_animated"
  90. checkbox="true"
  91. action="true"
  92. datasource="list"
  93. show="id:{%ID}
  94. ,prop_id|prop_name:所属礼物
  95. ,url:gif动画地址
  96. ,play_count:播放次数
  97. ,delay_time:延时播放时间(毫秒)
  98. ,duration:播放时长(毫秒)
  99. ,show_user|is_show:显示用户名
  100. ,type|is_type:使用路径
  101. ,sort|get_sort=$prop_animated['id']:{%SORT}"
  102. actionlist="edit_item:编辑,del_prop_item:删除" />
  103. </if>
  104. <div class="blank5"></div>
  105. <div class="page">{$page}</div>
  106. </div>
  107. <include file="Public:footer" />
  108. <!---->