index.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <?php
  2. for ($i = 0; $i < 2; $i++) {
  3. $items[$i] = json_decode(file_get_contents("data/item" . $i . ".json"));
  4. }
  5. ?>
  6. <!doctype html>
  7. <html class="no-js">
  8. <head>
  9. <meta charset="utf-8">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11. <meta http-equiv="Content-Language" content="zh-CN" />
  12. <meta name="keywords" content="破解软件,绿色软件,汉化软件,注册机,KEY">
  13. <meta name="description" content="软件云集是追风逐雨博客作者自用软件的一个软件下载集合,只为自身使用方便,无盈利,无恶意,如有侵权,请发送邮件到:shileiye@qq.com.">
  14. <meta name="viewport" content="width=device-width, initial-scale=1">
  15. <title>软件云集 - 追风逐雨</title>
  16. <!-- Set render engine for 360 browser -->
  17. <meta name="renderer" content="webkit">
  18. <!-- No Baidu Siteapp-->
  19. <meta http-equiv="Cache-Control" content="no-siteapp"/>
  20. <link rel="icon" type="image/png" href="assets/i/favicon.png">
  21. <!-- Add to homescreen for Chrome on Android -->
  22. <meta name="mobile-web-app-capable" content="yes">
  23. <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">
  24. <!-- Add to homescreen for Safari on iOS -->
  25. <meta name="apple-mobile-web-app-capable" content="yes">
  26. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  27. <meta name="apple-mobile-web-app-title" content="软件云集"/>
  28. <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
  29. <!-- Tile icon for Win8 (144x144 + tile color) -->
  30. <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  31. <meta name="msapplication-TileColor" content="#0e90d2">
  32. <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
  33. <!--
  34. <link rel="canonical" href="http://www.example.com/">
  35. -->
  36. <link rel="stylesheet" href="assets/css/amazeui.min.css">
  37. <link rel="stylesheet" href="assets/css/app.css">
  38. <link rel="stylesheet" href="assets/css/amazeui.datatables.min.css">
  39. </head>
  40. <body>
  41. <!--[if lte IE 9]>
  42. <p class="browsehappy">你正在使用<strong>过时</strong>的浏览器,Amaze UI 暂不支持。 请 <a
  43. href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  44. 以获得更好的体验!</p>
  45. <![endif]-->
  46. <!-- 页面内容开始-->
  47. <header data-am-widget="header" class="am-header am-header-default" data-am-sticky>
  48. <div class="am-header-left am-header-nav">
  49. <a href="#left-link" class="" data-am-offcanvas="{target: '#left-link', effect: 'push'}"><i class="am-header-icon am-icon-bars"></i></a>
  50. </div>
  51. <h1 class="am-header-title" data-am-smooth-scroll="{position: 0}">
  52. <a href="#title-link" class="">软件云集</a>
  53. </h1>
  54. <div class="am-header-right am-header-nav">
  55. <a href="/" class=""><i class="am-header-icon am-icon-home"></i></a>
  56. </div>
  57. </header>
  58. <div id="left-link" class="am-offcanvas">
  59. <div class="am-offcanvas-bar">
  60. <div class="am-offcanvas-content">
  61. <p>
  62. 软件云集是追风逐雨博客作者自用软件的一个软件下载集合,只为自身使用方便,无盈利,无恶意.<br/>
  63. 如有侵权,请发送邮件到:shileiye(a)qq.com.<br/>
  64. </p>
  65. </div>
  66. </div>
  67. </div>
  68. <div data-am-widget="tabs" class="am-tabs am-tabs-default">
  69. <ul class="am-tabs-nav am-cf">
  70. <?php for ($i = 0; $i < count($items); $i++) { ?>
  71. <li class="<?php if ($i == 0) echo 'am-active'; ?>"><a href="[data-tab-panel-<?php echo $i ?>]"><?php echo $items[$i]->title; ?></a></li>
  72. <?php } ?>
  73. </ul>
  74. <div class="am-tabs-bd">
  75. <?php for ($i = 0; $i < count($items); $i++) { ?>
  76. <div data-tab-panel-<?php echo $i ?> class="am-tab-panel <?php if ($i == 0) echo 'am-active'; ?>">
  77. <table width="100%" class="am-table am-table-striped am-table-bordered am-table-compact am-text-nowrap" id="<?php echo $items[$i]->title; ?>">
  78. <thead>
  79. <tr>
  80. <th><span>软件名称</span></th>
  81. <th><span>日期</span></th>
  82. <th><span>分类</span></th>
  83. <th><span>简介</span></th>
  84. <th>下载</th>
  85. </tr>
  86. </thead>
  87. <tbody>
  88. <?php foreach ($items[$i]->data as $key) { ?>
  89. <tr>
  90. <td><span class="fonts"><?php echo $key->name; ?></span></td>
  91. <td class="center"><?php echo $key->times; ?></td>
  92. <td class="center"><span class="am-badge am-badge-primary am-round am-text-sm"><?php echo $key->type; ?><span</td>
  93. <td><span class="fontsbody"><?php echo $key->body; ?></span></td>
  94. <td class="center">
  95. <?php if (isset($key->url->baidu) && $key->url->baidu != '') { ?>
  96. <a href="<?php echo $key->url->baidu; ?>" class="am-btn am-btn-success am-radius am-btn-xs" target="_blank"><i class="am-icon-cloud-download"></i> 百度网盘</a>
  97. <?php } ?>
  98. <?php if (isset($key->url->s360) && $key->url->s360 != '') { ?>
  99. <a href="<?php echo $key->url->s360; ?>" class="am-btn am-btn-success am-radius am-btn-xs" target="_blank"><i class="am-icon-cloud-download"></i> 360网盘</a>
  100. <?php } ?>
  101. <?php if (isset($key->url->local) && $key->url->local != '') { ?>
  102. <a href="<?php echo $key->url->local; ?>" class="am-btn am-btn-warning am-radius am-btn-xs" target="_blank"><i class="am-icon-download"></i> 本地下载</a>
  103. <?php } ?>
  104. </td>
  105. </tr>
  106. <?php } ?>
  107. </tbody>
  108. </table>
  109. </div>
  110. <?php } ?>
  111. </div>
  112. </div>
  113. <!-- 页面内容结束-->
  114. <!--[if lt IE 9]>
  115. <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
  116. <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
  117. <script src="assets/js/amazeui.ie8polyfill.min.js"></script>
  118. <![endif]-->
  119. <!--[if (gte IE 9)|!(IE)]><!-->
  120. <script src="assets/js/jquery.min.js"></script>
  121. <!--<![endif]-->
  122. <script src="assets/js/amazeui.min.js"></script>
  123. <script src="assets/js/amazeui.datatables.min.js"></script>
  124. <script src="assets/js/dataTables.responsive.min.js"></script>
  125. <script>
  126. //支持中文排序
  127. jQuery.extend(jQuery.fn.dataTableExt.oSort, {
  128. "chinese-string-asc": function (s1, s2) {
  129. return s1.localeCompare(s2);
  130. },
  131. "chinese-string-desc": function (s1, s2) {
  132. return s2.localeCompare(s1);
  133. }
  134. });
  135. //表格样式
  136. var table = $('<?php for ($i = 0; $i < count($items); $i++) echo ($i == 0) ? '#' . $items[$i]->title : ', #' . $items[$i]->title; ?>').DataTable({
  137. responsive: true, //忘了
  138. paging: false, //不显示分页
  139. dom: 't', //显示元件
  140. searching: true, //本地搜索
  141. order: [[1, 'desc'], [0, 'asc']], //按时间和名称排序
  142. columnDefs: [
  143. {type: 'chinese-string', targets: [0, 2]}, //第二列中文排序
  144. {targets: [3, 4], orderable: false}, //034禁用排序
  145. {targets: [4], bSearchable: false} //4禁用检索
  146. ],
  147. //列筛选
  148. initComplete: function(){
  149. var api = this.api();
  150. api.columns().indexes().flatten().each(function(i) {
  151. if (i != 0 && i != 3 && i != 4) { //034不添加筛选
  152. var column = api.column(i);
  153. //var $span = $('<span class="addselect">▾</span>').appendTo($(column.header()))
  154. var wenzi = column.header().firstChild.innerHTML;
  155. var select = $('<select><option value="">全部' + wenzi + '</option></select>')
  156. .appendTo($(column.header()))
  157. .on('change click', function (evt) {
  158. evt.stopPropagation();
  159. var val = $.fn.dataTable.util.escapeRegex($(this).val());
  160. column.search(val, true, false).draw(); //列搜索
  161. });
  162. column.data().unique().sort().each(function(d, j) {
  163. function delHtmlTag(str) {
  164. return str.replace(/<[^>]+>/g, "");//去掉html标签
  165. }
  166. d = delHtmlTag(d)
  167. select.append('<option value="' + d + '">' + d + '</option>')
  168. //$span.append(select)
  169. });
  170. }
  171. if (i == 0 || i == 3) { //添加搜索框
  172. var column = api.column(i);
  173. var wenzi = column.header().firstChild.innerHTML;
  174. var search = $('<input type="text" class="am-form-field am-radius dsearch" placeholder="' + wenzi + '"/>').appendTo($(column.header()))
  175. .on('input click', function (evt) {
  176. evt.stopPropagation();
  177. var val = $.fn.dataTable.util.escapeRegex($(this).val());
  178. //column.search(val ? '^' + val + '$' : '', true, false).draw();
  179. column.search(val, true, false).draw();
  180. });
  181. //column.header().append(search);
  182. }
  183. });
  184. }
  185. });
  186. /*
  187. //自定义搜索
  188. $('.dsearch').on('keyup click', function () {
  189. var tsval = $(".dsearch").val()
  190. table.search(tsval, false, false).draw();
  191. });
  192. */
  193. //标签切换
  194. $(function () {
  195. $('#download-tabs').tabs({noSwipe: 0});
  196. })
  197. </script>
  198. </body>
  199. </html>