人人商城

logs.html 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. {template 'common/header'}
  2. <div class="we7-page-title">查看日志</div>
  3. <ul class="we7-page-tab">
  4. <li{if $do == 'wechat' || $do == 'detail'} class="active"{/if}><a href="{php echo url('system/logs/wechat');}">微信日志</a></li>
  5. <li{if $do == 'system'} class="active"{/if}><a href="{php echo url('system/logs/system');}">系统日志</a></li>
  6. <li{if $do == 'database'} class="active"{/if}><a href="{php echo url('system/logs/database');}">数据库日志</a></li>
  7. <li{if $do == 'sms'} class="active"{/if}><a href="{php echo url('system/logs/sms');}">短信发送日志</a></li>
  8. </ul>
  9. <div class="clearfix">
  10. <!--<h5 class="page-header">日志信息</h5>-->
  11. <!-- 筛选功能 -->
  12. {if ($do != 'wechat')}
  13. <form action="./index.php" method="get" class="we7-form form-inline" role="form">
  14. <input type="hidden" name="c" value="system">
  15. <input type="hidden" name="a" value="logs">
  16. <input type="hidden" name="do" value="{$do}">
  17. <div class="form-group">
  18. <div class="col-sm-8 we7-padding-none">
  19. {php echo tpl_form_field_daterange('time', array('starttime'=>$_GPC['time']['start'],'endtime'=>$_GPC['time']['end']));}
  20. </div>
  21. {if $do != 'sms'}
  22. <div class="col-sm-1 we7-padding-left">
  23. <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
  24. </div>
  25. {/if}
  26. </div>
  27. {if $do == 'sms'}
  28. <div class="form-group we7-margin-left">
  29. <div class="input-group">
  30. <input type="text" class="form-control" name="mobile" value="{$_GPC['mobile']}" placeholder="请输入手机号">
  31. <div class="input-group-btn">
  32. <button class="btn btn-default"><i class="fa fa-search"></i></button>
  33. </div>
  34. </div>
  35. </div>
  36. {/if}
  37. </form>
  38. {/if}
  39. <!-- 微信日志 -->
  40. {if ($do == 'wechat')}
  41. <form action="./index.php" method="get" class="we7-form" role="form">
  42. <input type="hidden" name="c" value="system">
  43. <input type="hidden" name="a" value="logs">
  44. <input type="hidden" name="do" value="{$do}">
  45. <div class="form-group">
  46. <div class="col-sm-4 form-controls">
  47. <select name="searchtime" class="form-control">
  48. {loop $tree $row}
  49. <option value="{$row}" {if $_GPC['searchtime'] == $row}selected{/if}>{$row}</option>
  50. {/loop}
  51. </select>
  52. </div>
  53. <div class="col-sm-1 we7-padding-left">
  54. <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
  55. </div>
  56. </div>
  57. </form>
  58. <pre>
  59. {if $contents}
  60. {$contents}
  61. {else}
  62. 暂无
  63. {/if}
  64. </pre>
  65. <!-- <div class="table-responsive">
  66. <table class="table table-hover">
  67. <thead class="navbar-inner">
  68. <tr>
  69. <th style="width:350px;">日志类型</th>
  70. <th>日志文件</th>
  71. <th>记录时间</th>
  72. <th></th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. {loop $list $item}
  77. <tr>
  78. <td><a href="#">{$item['type']}</a></td>
  79. <td><a href="#">{$item['filename']}</a></td>
  80. <td>{$item['createtime']}</td>
  81. <td>
  82. <a href="{php echo url('system/logs/detail', array('more' => $item['filename']))}" title="查看详情" class="btn btn-default btn-sm">查看详情</a>
  83. </td>
  84. </tr>
  85. {/loop}
  86. </tbody>
  87. </table>
  88. </div> -->
  89. {/if}
  90. <!-- 系统日志 -->
  91. {if ($do == 'system')}
  92. <table class="table we7-table table-hover">
  93. <tr>
  94. <th style="width:150px;">日志类型</th>
  95. <th style="width:150px;">页面执行时间</th>
  96. <th style="width:150px;">页面URL</th>
  97. <th style="width:200px;">日志记录时间</th>
  98. </tr>
  99. {loop $list $item}
  100. <tr>
  101. <td>{$item['type']}</td>
  102. <td>{$item['runtime']}</td>
  103. <td>
  104. <a href="{$item['runurl']}" target="_blank">{$item['runurl']}</a>
  105. </td>
  106. <td>{$item['createtime']}</td>
  107. </tr>
  108. {/loop}
  109. </table>
  110. <div class="text-right">
  111. {$pager}
  112. </div>
  113. {/if}
  114. <!-- 数据据日志 -->
  115. {if ($do == 'database')}
  116. <table class="table we7-table table-hover">
  117. <tr>
  118. <th style="width:150px;">日志类型</th>
  119. <th style="width:150px;">SQL执行时间</th>
  120. <th style="width:150px;">SQL语句</th>
  121. <th style="width:200px;">日志记录时间</th>
  122. </tr>
  123. {loop $list $item}
  124. <tr>
  125. <td>{$item['type']}</td>
  126. <td>{$item['runtime']}</td>
  127. <td>{$item['runsql']}</td>
  128. <td>{$item['createtime']}</td>
  129. </tr>
  130. {/loop}
  131. </table>
  132. <div class="text-right">
  133. {$pager}
  134. </div>
  135. {/if}
  136. {if $do == 'sms'}
  137. <table class="table we7-table table-hover site-list">
  138. <tr>
  139. <th style="width:150px;">接收手机</th>
  140. <th style="width:150px;">发送内容</th>
  141. <th style="width:150px;">错误报告</th>
  142. <th style="width:200px;">发送时间</th>
  143. </tr>
  144. {loop $list $item}
  145. <tr>
  146. <td>{$item['mobile']}</td>
  147. <td>{$item['content']}</td>
  148. <td>{$item['result']}</td>
  149. <td>{php echo date('Y-m-d H:i:s', $item['createtime'])}</td>
  150. </tr>
  151. {/loop}
  152. </table>
  153. <div class="text-right">
  154. {$pager}
  155. </div>
  156. {/if}
  157. </div>
  158. {template 'common/footer'}