logs.html 4.8 KB

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