kura2yamato

jawaban 001

Oct 25th, 2020
754
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include 'conn.php';
  3. $conn = getConn();
  4.   if ($conn->connect_errno > 0) {
  5.       die ('Unable to connect to database [' . $conn->connect_error . ']');
  6.     }  
  7.     $sql = "SELECT nama_service,id_service,group_concat(nama_subservice) nama_sub
  8. FROM services
  9. left join subservice on subservice.id_service = services.id_service
  10. group by id_service,nama_service";
  11. $result = $conn->query($sql);
  12.     if (!$result) {
  13.         die ('There was an error running query[' . $conn->error . ']');
  14.     }
  15.  
  16.  
  17.  
  18. ?>
  19.  
  20. <meta charset="utf-8">
  21.   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  22.   <title>Groedu &mdash; Konsultan Manajemen Pajak</title>
  23.   <link rel="stylesheet" href="css/style.css">
  24.  
  25.  
  26.   <div class="js-animsition animsition" id="site-wrap" data-animsition-in-class="fade-in" data-animsition-out-class="fade-out">
  27.  
  28.  
  29.     <header class="templateux-navbar" role="banner">
  30.  
  31.       <div class="container"  data-aos="fade-down">
  32.         <div class="row">
  33.  
  34.           <div class="col-3 templateux-logo">
  35.              <a href="index.php"><img  src="images/Logo Digital Marketing.png" alt="Image" class="img-fluid"> </a>
  36.             <!-- <a href="index.html" class="animsition-link">Groedu</a> -->
  37.           </div>
  38.           <nav class="col-20 site-nav">
  39.             <button class="d-block d-md-none hamburger hamburger--spin templateux-toggle templateux-toggle-light ml-auto templateux-toggle-menu" data-toggle="collapse" data-target="#mobile-menu" aria-controls="mobile-menu" aria-expanded="false" aria-label="Toggle navigation">
  40.               <span class="hamburger-box">
  41.                 <span class="hamburger-inner"></span>
  42.               </span>
  43.             </button> <!-- .templateux-toggle -->
  44.  
  45.             <ul class="sf-menu templateux-menu d-none d-md-block">
  46.               <li class="active">
  47.                 <a href="index.php" class="animsition-link">Home</a>
  48.               </li>
  49.               <li><a href="about.php" class="animsition-link">About</a></li>
  50.               <li>
  51.                 <a href="services.php" class="animsition-link">Our Services</a>
  52.                 <ul>
  53.                 <?php
  54.                 $rows = $result->num_rows;
  55.                 while ($item = $result->fetch_array()) {
  56.                   $service = $item['nama_service'];
  57.                   $subservice = explode(",",$item['nama_sub']);
  58.                   echo '<li><a href="#">'.$service.'</a>
  59.                      <ul>';
  60.                   echo '<li><a href="#">'.implode("</a><li><a href="#">',$subservice).'</a></li>';
  61.                  echo '    </ul>
  62.                    </li> ';
  63.                  
  64.                 }
  65.                
  66.                 ?>
  67.                  </ul>
  68.               </li>
  69.               <li><a href="blog.php" class="animsition-link">Special Offers</a></li>
  70.               <li><a href="testimonials.php" class="animsition-link">Testimonials</a></li>
  71.               <li><a href="contact.php" class="animsition-link">Contact</a></li>
  72.               <li><a href="blog.php" class="animsition-link">Articles</a></li>
  73.             </ul> <!-- .templateux-menu -->
  74.  
  75.           </nav> <!-- .site-nav -->
  76.          
  77.  
  78.         </div> <!-- .row -->
  79.       </div> <!-- .container -->
  80.  
  81.     </header> <!-- .templateux-navba -->
  82.     </div> <!-- .js-animsition -->
  83.     </div> <!-- .templateux-cover -->
  84.    
RAW Paste Data