2c71bd5b8330794e2cd8ca50d2c204227500308e.file.object_around.lbi.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <?php /* Smarty version Smarty-3.1.7, created on 2016-12-20 18:12:14
  2. compiled from "D:/phpStudy/WWW_krpano100/template\default\member\object_around.lbi" */ ?>
  3. <?php /*%%SmartyHeaderCode:16464585903fe2e8480-16034436%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_valid = $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. '2c71bd5b8330794e2cd8ca50d2c204227500308e' =>
  8. array (
  9. 0 => 'D:/phpStudy/WWW_krpano100/template\\default\\member\\object_around.lbi',
  10. 1 => 1482227801,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '16464585903fe2e8480-16034436',
  15. 'function' =>
  16. array (
  17. ),
  18. 'variables' =>
  19. array (
  20. '_lang' => 0,
  21. 'total' => 0,
  22. ),
  23. 'has_nocache_code' => false,
  24. 'version' => 'Smarty-3.1.7',
  25. 'unifunc' => 'content_585903fe3b753',
  26. ),false); /*/%%SmartyHeaderCode%%*/?>
  27. <?php if ($_valid && !is_callable('content_585903fe3b753')) {function content_585903fe3b753($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate (($_smarty_tpl->tpl_vars['_lang']->value['moban'])."/library/member_paths.lbi", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
  28. <div class="container" style="margin-bottom: 20px;">
  29. <div class="main_wrap">
  30. <div class="row">
  31. <div class="col-md-3">
  32. 共 <strong style="font-size:18px;"><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
  33. </strong> 个作品
  34. </div>
  35. <div class="col-md-3">
  36. <div class="input-group date form-date" data-date="" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd">
  37. <input class="form-control" size="16" id="time_s" type="text" value="" readonly="" placeholder="开始时间" >
  38. <span class="input-group-addon"><span class="icon-remove"></span></span>
  39. <span class="input-group-addon"><span class="icon-calendar"></span></span>
  40. </div>
  41. </div>
  42. <div class="col-md-3">
  43. <div class="input-group date form-date" data-date="" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd">
  44. <input class="form-control" size="16" id="time_e" type="text" value="" readonly="" placeholder="结束时间" >
  45. <span class="input-group-addon"><span class="icon-remove"></span></span>
  46. <span class="input-group-addon"><span class="icon-calendar"></span></span>
  47. </div>
  48. </div>
  49. <div class="col-md-2">
  50. <input type="text" id="oname" class="form-control" placeholder="作品名">
  51. </div>
  52. <div class="col-md-1">
  53. <button class="btn btn-info" onclick="list_obj(1)">搜索</button>
  54. </div>
  55. </div>
  56. <div class="row" style="margin-top:30px;">
  57. <div class="col-md-12">
  58. <div class="list_wrap">
  59. <div id="list_wrap_content"></div>
  60. <div id="pager_wrap"></div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <script>
  67. var pageSize = 10;
  68. $(function(){
  69. list_obj(1,true);
  70. $(".form-date").datetimepicker({
  71. language: "zh-CN",
  72. weekStart: 1,
  73. todayBtn: 1,
  74. autoclose: 1,
  75. todayHighlight: 1,
  76. startView: 2,
  77. minView: 2,
  78. forceParse: 0,
  79. format: "yyyy-mm-dd"
  80. });
  81. })
  82. function list_obj(currentPage,reset){
  83. var obj = alert_notice("页面加载中...",'success');
  84. var oname , time_s,time_e;
  85. if(!reset){
  86. oname = $.trim($("#oname").val());
  87. time_s = $("#time_s").val();
  88. time_e = $("#time_e").val();
  89. if(time_s!=""&&time_e==""){
  90. alert_notice("请选择结束时间");
  91. return false;
  92. }
  93. if(time_s==""&&time_e!=""){
  94. alert_notice("请选择开始时间");
  95. return false;
  96. }
  97. }else{
  98. $("#oname").val("");
  99. $("#time_s").val("");
  100. $("#time_e").val("");
  101. }
  102. $("#list_wrap_content").html("");
  103. $.post("/member/object_around",{
  104. "act":"list",
  105. "pageSize":pageSize,
  106. "page":currentPage,
  107. "oname":oname,
  108. "time_s":time_s,
  109. "time_e":time_e
  110. },function(res){
  111. var res = eval("("+res+")");
  112. var h = "",data = res.list;
  113. if (data.length==0) {
  114. h='<span style="width:100px;text-align:center;margin-left:40%;margin-top:50px;font-size:16px;display:inline-block">没有结果!</span>';
  115. $("#pager_wrap").html("");
  116. }else{
  117. for (var i = 0; i <data.length; i++) {
  118. var o = data[i];
  119. h+='<div class="items">'+
  120. '<div class="item">'+
  121. '<div class="item-content">'+
  122. '<div class=pull-left><input type="checkbox" style="margin:20px 10px 0 0" name="project_checkbox" data-pid="'+o.id+'"></div>'+
  123. '<div class="pull-left">'+
  124. '<img src="'+o.thumb_path+'" width="60" height="60" class="img-rounded" >'+
  125. '</div>'+
  126. '<div class="pull-left works_intro" >'+
  127. '<a href="" class="works_name" target="_blank">'+o.name+'</a>&nbsp;&nbsp;&nbsp;&nbsp;'+
  128. '<a href="/obj.php?oid='+o.id+'" class="works_preview" target="_blank">预览</a>'+
  129. '<div class="text-muted">'+
  130. '<span>'+o.create_time+'</span>'+
  131. '&nbsp;&nbsp;'+
  132. '<span><i class="icon icon-eye-open"></i>&nbsp;'+o.view_num+'</span>'+
  133. '</div>'+
  134. '</div>'+
  135. '<div class="pull-right works_edit">'+
  136. '<span><a href="/edit/object_around?oid='+o.id+'">编辑</a></span>'+
  137. '<span><a onclick="obj_del('+o.id+')">删除</a></span>'+
  138. '</div>'+
  139. ' </div>'+
  140. ' </div>'+
  141. '</div>';
  142. }
  143. var pg = new Page('list_obj',res.pageCount,res.currentPage);
  144. $("#pager_wrap").html(pg.printHtml());
  145. }
  146. $("#list_wrap_content").html(h);
  147. pageSize = res.pageSize;
  148. obj.hide();
  149. })
  150. }
  151. function obj_del(obj_id){
  152. bootbox.confirm({
  153. message:"确定要删除该项目吗?",
  154. buttons: {
  155. confirm: {
  156. label: '确认',
  157. className: 'btn-primary'
  158. },
  159. cancel: {
  160. label: '取消',
  161. className: 'btn-default'
  162. }
  163. },
  164. title:"提示:",
  165. callback:function(result) {
  166. if(result){
  167. alert_notice("等待执行...","success",'top',5000);
  168. $.post("/member/object_around",{
  169. 'act':'delete',
  170. 'oid':obj_id
  171. },function(result){
  172. result = eval("("+result+")");
  173. if (result.status=='1') {
  174. alert_notice("操作成功","success");
  175. window.location.reload();
  176. }else{
  177. alert_notice(result.msg);
  178. }
  179. })
  180. }
  181. }
  182. });
  183. }
  184. </script><?php }} ?>