stat.memberanalyze.info.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <div style="text-align:right;">
  2. <input type="hidden" id="export_type_<?php echo $output['stat_field'];?>" name="export_type" data-param='{"url":"index.php?act=stat_member&op=analyzeinfo&type=<?php echo $output['stat_field'];?>&t=<?php echo $_GET['t'];?>&exporttype=excel"}' value="excel"/>
  3. <a class="btns" href="javascript:void(0);" nc_type="export_btn" data-param='{"type":"<?php echo $output['stat_field'];?>"}'><span>导出Excel</span></a>
  4. </div>
  5. <table class="table tb-type2 nobdb">
  6. <thead>
  7. <tr class="thead">
  8. <th>序号</th>
  9. <th class="align-center">会员名称</th>
  10. <th class="align-center"><?php echo $output['caption'];?></th>
  11. </tr>
  12. <tbody id="datatable">
  13. <?php if(!empty($output['memberlist']) && is_array($output['memberlist'])){ ?>
  14. <?php foreach($output['memberlist'] as $k => $v){ ?>
  15. <tr class="hover member">
  16. <td class="w24"><?php echo $v['number'];?></td>
  17. <td class="align-center"><?php echo $v['statm_membername']; ?></td>
  18. <td class="w150 align-center"><?php echo $v[$output['stat_field']]; ?></td>
  19. </tr>
  20. <?php } ?>
  21. <?php } else {?>
  22. <tr class="no_data">
  23. <td colspan="11"><?php echo $lang['no_record']; ?></td>
  24. </tr>
  25. <?php } ?>
  26. </tbody>
  27. <?php if(!empty($output['memberlist']) && is_array($output['memberlist'])){ ?>
  28. <tfoot class="tfoot">
  29. <tr>
  30. <td colspan="3">
  31. <div class="pagination"><?php echo $output['show_page'];?></div></td>
  32. </tr>
  33. </tfoot>
  34. <?php } ?>
  35. </table>
  36. <script type="text/javascript">
  37. $(document).ready(function(){
  38. $('#list_<?php echo $output['stat_field'];?>').find('.demo').ajaxContent({
  39. event:'click', //mouseover
  40. loaderType:"img",
  41. loadingMsg:"<?php echo ADMIN_TEMPLATES_URL;?>/images/transparent.gif",
  42. target:'#list_<?php echo $output['stat_field'];?>'
  43. });
  44. //导出图表
  45. $("[nc_type='export_btn']").live('click',function(){
  46. var data = $(this).attr('data-param');
  47. if(data == undefined || data.length<=0){
  48. showDialog('参数错误');
  49. return false;
  50. }
  51. eval("data = "+data);
  52. var item = $("#export_type_"+data.type);
  53. var type = $(item).val();
  54. if(type == 'excel'){
  55. download_excel(item);
  56. }
  57. });
  58. });
  59. </script>