<?php include('_header.php'); ?>

  <main class="main">

    <!-- Hero Section -->
    <section id="contact" class="hero section dark-background">

      <br/><br/><br/>

      <svg class="hero-waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28 " preserveAspectRatio="none">
        <defs>
          <path id="wave-path" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"></path>
        </defs>
        <g class="wave1">
          <use xlink:href="#wave-path" x="50" y="3"></use>
        </g>
        <g class="wave2">
          <use xlink:href="#wave-path" x="50" y="0"></use>
        </g>
        <g class="wave3">
          <use xlink:href="#wave-path" x="50" y="9"></use>
        </g>
      </svg>

    </section><!-- /Hero Section -->

	    <!-- Team Section -->
    <section id="team" class="team section">

      <!-- Section Title -->
      <div class="container section-title" data-aos="fade-up">
        <h2>LASUMA</h2>
        <p>Members</p>
      </div><!-- End Section Title -->

      <div class="container">

        <div class="row gy-4">


		<?php
		
					$query_artist  = "SELECT * FROM series ORDER BY id ASC";
					$result_artist = mysqli_query($conn,$query_artist) or die(mysqli_error($conn));
						while($data = mysqli_fetch_array($result_artist)){
							$cat_id=$data['id'];
							$name=$data['series_name'];
							print "<h2>$name</h2>";
							
							$query  = "SELECT * FROM post WHERE category = 'members' AND status='$cat_id'";
							$result = mysqli_query($conn,$query) or die(mysqli_error($conn));
								while($data1 = mysqli_fetch_array($result)){
									$member_id=$data1['id'];
									$title=$data1['title'];
									$rank=$data1['artist_id'];
									$image_name=$data1['image_name'];
									$body=$data1['body'];
									$body = str_replace("\n", '<br />', $body);	
									
									if($image_name != ""){
										$image_path="<img src=\"admin/piks/$image_name\" height='250'>";
									}else{
										$image_path="<img src=\"images/user_icon.png\"  height='250'>";
									}
									
									print '
									<div class="col-lg-4 col-md-6 d-flex align-items-stretch" data-aos="fade-up" data-aos-delay="100">
										<div class="team-member">
										  <div class="member-img">
											'.$image_path.'
											
										  </div>
										  <div class="member-info">
											<h4>'.$title.'</h4>
											<span>'.$rank.'</span>
										  </div>
										</div>
									  </div>
									';
								}	
						}						
							
		
			
		?>
          

          
		 
		 

        </div>

      </div>

    </section><!-- /Team Section -->

	


  </main>

<?php include('_footer.php'); ?>