component-list.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?php
  2. session_start();
  3. if (!isset($_SESSION['loggedin'])) {
  4. header('Location: pages-signin.html');
  5. exit;
  6. }
  7. ?>
  8. <!doctype html>
  9. <html class="fixed">
  10. <head>
  11. <?php include("bim-support-header.html"); ?>
  12. <script src="./script/js/global.js"></script>
  13. <script type="application/javascript">
  14. var rvtName = [];
  15. var categoryTable = [];
  16. var year = [];
  17. var type = "";
  18. var userName = '<?php echo $_SESSION['name']; ?>';
  19. var searchURL = window.location.search;
  20. searchURL = searchURL.substring(1, searchURL.length);
  21. type = searchURL.split("&")[0].split("=")[1];
  22. if (type === undefined) {
  23. window.location.href = "?type=CA";
  24. }
  25. pageHeader = "元件庫";
  26. </script>
  27. </head>
  28. <body>
  29. <canvas id="c"></canvas>
  30. <section class="body">
  31. <!-- start: header -->
  32. <header-menu></header-menu>
  33. <!-- end: header -->
  34. <div class="inner-wrapper">
  35. <!-- start: sidebar -->
  36. <side-bar></side-bar>
  37. <!-- end: sidebar -->
  38. <section role="main" class="content-body">
  39. <header class="page-header">
  40. <h2>{{pageHeader}}</h2>
  41. </header>
  42. <!-- start: page -->
  43. <section class="content-with-menu content-with-menu-has-toolbar media-gallery">
  44. <div class="content-with-menu-container">
  45. <inner-menu>
  46. <template v-slot:inner-upload>
  47. <upload-component></upload-component>
  48. <hr class="separator" />
  49. </template>
  50. <template v-slot:inner-equipment>
  51. <equipment-list></equipment-list>
  52. </template>
  53. </inner-menu>
  54. <div class="inner-body mg-main">
  55. <div class="inner-toolbar">
  56. <ul>
  57. <search-bar></search-bar>
  58. <filter-bar></filter-bar>
  59. </ul>
  60. </div>
  61. <filter-content></filter-content>
  62. <div class="row mg-files" data-sort-destination data-sort-id="media-gallery" id="content">
  63. </div>
  64. </div>
  65. </div>
  66. </section>
  67. <!-- end: page -->
  68. </section>
  69. </div>
  70. </section>
  71. <script>
  72. /*Vue */
  73. vm.mount('.body');
  74. </script>
  75. <?php include("bim-support-body.html"); ?>
  76. <script type="application/javascript">
  77. $(function() {
  78. $.ajax({
  79. url: "./script/php/equipment_group.php",
  80. type: "GET",
  81. data: {
  82. type: type
  83. },
  84. contentType: "application/json",
  85. dataType: "json"
  86. }).done(function(data) {
  87. year = data['year'];
  88. rvtName = data['rvtName'];
  89. categoryTable = data['categoryTable'];
  90. for (var i = 0; i < data["categoryList"].length; i++) {
  91. $("#filters").append('<li><a class="button" data-filter=".' + i + '">' + data['categoryList'][i] + '</a></li>');
  92. }
  93. initThreeJS();
  94. $grid = $("#content").isotope({
  95. itemSelector: ".isotope-item",
  96. layoutMode: 'fitRows'
  97. })
  98. }).error(function(error) {
  99. console.log(error);
  100. });
  101. $.ajax({
  102. url: "./script/php/equipment_revitVersion.php",
  103. type: "GET",
  104. data: {
  105. type: type
  106. },
  107. contentType: "application/json",
  108. dataType: "json"
  109. }).done(function(data) {
  110. for (var i = 0; i < data.length; i++) {
  111. $("#revitVersion").append('<label><input type="checkbox" value=".' + data[i] + '" /> ' + data[i] + '</label> ');
  112. }
  113. }).error(function(error) {
  114. console.log(error);
  115. });
  116. });
  117. </script>
  118. <script src="script/js/3Dpic.js" type="module">
  119. </script>
  120. </body>
  121. </html>