index.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?php
  2. for ($i = 0; $i < 4; $i++) {
  3. $items[$i] = json_decode(file_get_contents("data/item" . $i . ".txt"));
  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'}">
  50. <i class="am-header-icon am-icon-bars"></i>
  51. </a>
  52. </div>
  53. <h1 class="am-header-title" data-am-smooth-scroll="{position: 0}">
  54. <a href="#title-link" class="">
  55. 软件云集
  56. </a>
  57. </h1>
  58. <div class="am-header-right am-header-nav">
  59. <a href="/" class="">
  60. <i class="am-header-icon am-icon-home"></i>
  61. </a>
  62. </div>
  63. </header>
  64. <div id="left-link" class="am-offcanvas">
  65. <div class="am-offcanvas-bar">
  66. <div class="am-offcanvas-content">
  67. <p>
  68. 软件云集是追风逐雨博客作者自用软件的一个软件下载集合,只为自身使用方便,无盈利,无恶意.<br/>
  69. 如有侵权,请发送邮件到:shileiye@qq.com.<br/>
  70. </p>
  71. </div>
  72. </div>
  73. </div>
  74. <div data-am-widget="tabs" class="am-tabs am-tabs-default">
  75. <ul class="am-tabs-nav am-cf">
  76. <?php for ($i = 0; $i < count($items); $i++) { ?>
  77. <li class="<?php
  78. if ($i == 0) {
  79. echo 'am-active';
  80. }
  81. ?>"><a href="[data-tab-panel-<?php echo $i ?>]"><?php echo $items[$i]->title; ?></a></li>
  82. <?php } ?>
  83. </ul>
  84. <div class="am-tabs-bd">
  85. <?php for ($i = 0; $i < count($items); $i++) { ?>
  86. <div data-tab-panel-<?php echo $i ?> class="am-tab-panel <?php
  87. if ($i == 0) {
  88. echo 'am-active';
  89. }
  90. ?>">
  91. <table width="100%" class="am-table am-table-striped am-table-bordered am-table-compact am-text-nowrap" id="<?php echo $items[$i]->title; ?>">
  92. <thead>
  93. <tr>
  94. <th><span>软件名称(点击搜索)</span></th>
  95. <th><span>日期</span></th>
  96. <th><span>分类</span></th>
  97. <th>介绍</th>
  98. <th>下载</th>
  99. </tr>
  100. </thead>
  101. <tbody>
  102. <?php foreach ($items[$i]->data as $key) { ?>
  103. <tr>
  104. <td><span class="fonts"><?php echo $key->name; ?></span></td>
  105. <td class="center"><?php echo $key->times; ?></td>
  106. <td class="center"><span class="am-badge am-badge-primary am-round am-text-sm"><?php echo $key->type; ?><span</td>
  107. <td><span class="fontsbody"><?php echo $key->body; ?></span></td>
  108. <td class="center">
  109. <?php if (isset($key->url->baidu) && $key->url->baidu != '') { ?>
  110. <a href="<?php echo $key->url->baidu; ?>" class="am-btn am-btn-success am-radius am-btn-xs"><i class="am-icon-cloud-download"></i> 百度网盘</a>
  111. <?php } ?>
  112. <?php if (isset($key->url->s360) && $key->url->s360 != '') { ?>
  113. <a href="<?php echo $key->url->s360; ?>" class="am-btn am-btn-success am-radius am-btn-xs"><i class="am-icon-cloud-download"></i> 360网盘</a>
  114. <?php } ?>
  115. <?php if (isset($key->url->local) && $key->url->local != '') { ?>
  116. <a href="<?php echo $key->url->local; ?>" class="am-btn am-btn-warning am-radius am-btn-xs"><i class="am-icon-download"></i> 本地下载</a>
  117. <?php } ?>
  118. </td>
  119. </tr>
  120. <?php } ?>
  121. </tbody>
  122. </table>
  123. </div>
  124. <?php } ?>
  125. </div>
  126. </div>
  127. <!-- 页面内容结束-->
  128. <!--[if lt IE 9]>
  129. <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
  130. <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
  131. <script src="assets/js/amazeui.ie8polyfill.min.js"></script>
  132. <![endif]-->
  133. <!--[if (gte IE 9)|!(IE)]><!-->
  134. <script src="assets/js/jquery.min.js"></script>
  135. <!--<![endif]-->
  136. <script src="assets/js/amazeui.min.js"></script>
  137. <script src="assets/js/amazeui.datatables.min.js"></script>
  138. <script src="assets/js/dataTables.responsive.min.js"></script>
  139. <script>
  140. //支持中文排序
  141. jQuery.extend(jQuery.fn.dataTableExt.oSort, {
  142. "chinese-string-asc": function (s1, s2) {
  143. return s1.localeCompare(s2);
  144. },
  145. "chinese-string-desc": function (s1, s2) {
  146. return s2.localeCompare(s1);
  147. }
  148. });
  149. //表格样式
  150. var table = $('<?php
  151. for ($i = 0; $i < count($items); $i++) {
  152. echo ($i == 0) ? '#' . $items[$i]->title : ', #' . $items[$i]->title;
  153. }
  154. ?>').DataTable({
  155. responsive: true, //忘了
  156. paging: false, //不显示分页
  157. dom: 't', //显示元件
  158. searching: true, //本地搜索
  159. order: [[1, 'desc'], [2, 'asc']], //按时间和分类排序
  160. columnDefs: [
  161. {type: 'chinese-string', targets: '2'}, //第二列中文排序
  162. {targets: [0, 3, 4], orderable: false}, //034禁用排序
  163. {targets: [4], bSearchable: false} //4禁用检索
  164. ],
  165. //列筛选
  166. initComplete: function () {
  167. var api = this.api();
  168. api.columns().indexes().flatten().each(function (i) {
  169. if (i != 0 && i != 3 && i != 4) { //034不添加筛选
  170. var column = api.column(i);
  171. //var $span = $('<span class="addselect">▾</span>').appendTo($(column.header()))
  172. var wenzi = column.header().firstChild.innerHTML;
  173. var select = $('<select><option value="">全部' + wenzi + '</option></select>')
  174. .appendTo($(column.header()))
  175. .on('change click', function (evt) {
  176. evt.stopPropagation();
  177. var val = $.fn.dataTable.util.escapeRegex($(this).val());
  178. column.search(val ? '^' + val + '$' : '', true, false).draw();
  179. });
  180. column.data().unique().sort().each(function (d, j) {
  181. function delHtmlTag(str) {
  182. return str.replace(/<[^>]+>/g, "");//去掉html标签
  183. }
  184. d = delHtmlTag(d)
  185. select.append('<option value="' + d + '">' + d + '</option>')
  186. //$span.append(select)
  187. });
  188. }
  189. if (i == 0) { //添加搜索框
  190. var column = api.column(i);
  191. var wenzi = column.header().firstChild.innerHTML;
  192. var search = $('<input type="text" class="am-form-field am-radius dsearch" placeholder="' + wenzi + '"/>').appendTo($(column.header()))
  193. .on('keyup click', function (evt) {
  194. evt.stopPropagation();
  195. var val = $.fn.dataTable.util.escapeRegex($(this).val());
  196. //column.search(val ? '^' + val + '$' : '', true, false).draw();
  197. column.search(val, true, false).draw();
  198. });
  199. //column.header().append(search);
  200. }
  201. });
  202. }
  203. });
  204. /*
  205. //自定义搜索
  206. $('.dsearch').on('keyup click', function () {
  207. var tsval = $(".dsearch").val()
  208. table.search(tsval, false, false).draw();
  209. });
  210. */
  211. //标签切换
  212. $(function () {
  213. $('#download-tabs').tabs({noSwipe:0});
  214. })
  215. </script>
  216. </body>
  217. </html>