<?php
// $CFG->debug = 38911; 
// $CFG->debugdisplay = true;
$ch = curl_init('https://municampus.com/api/GetAllProject');

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($api_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);

$r = json_decode($result);



?>
<!doctype html>
<html lang="en">

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- Bootstrap CSS -->
  <!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> -->
  <link rel="stylesheet" href="./style.css">
  <link rel="shortcut icon" href="../img/favicon.ico">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/4.5.6/css/ionicons-core.min.css" integrity="sha512-OmevVDECSDeo7M4G+Nvh0+VLVGS2XnEOkXWJcJ0TRom3GpGgc/ryQIgpRZw20mb5eR2U0sqsm33MaR8yD1zdsQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="../css/style_sheet.css" />
  <link href="assets/plugins/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="/campaignft/css/theme1.css">
  <script src="../js/jquery.min.js"></script>
  <script src="../js/bootstrap.min.js"></script>
  <script src="../js/validation.js"></script>
  <title>Aegis</title>


</head>




<body>
  <div id="menu"></div>
  <div style="margin-top: 80px;" class="container">
    <div class="row g-3">
      <?php
      if (count($r) > 0) {
        foreach ($r as $res) {

          $api_data = array(
            'teammember' => $res->teammember,

            // 'key'=>'djhwqdugwq676safhfghfghtyrrcc@345678&%$'
          );

          $ch = curl_init('https://municampus.com/api/GetTeamMemberData');

          curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
          curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($api_data));
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
          curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
          $result1 = curl_exec($ch);
          $r1 = json_decode($result1);

          //   $projectImg="./assets/[component_lottie_https___assets4.lottiefiles.com_private_files_lf30_cmd8kh2q.json].gif";

          // print_r($r1);
          // exit;
          if ($res->image != '' && $res->image != 0) {
            $projectImg = "https://municampus.com/images/" . $res->image;
          } else {
            $projectImg = "./assets/[component_lottie_https___assets4.lottiefiles.com_private_files_lf30_cmd8kh2q.json].gif";
          }

      ?>
          <div class="col-12 col-md-6 col-lg-4">
            <div style="margin-right: 10px;" class="card ">
              <img src="<?php echo $projectImg; ?>" class="card-img-top" alt="London">
              <div class="profiles d-flex justify-content-center">
                <?php foreach ($r1 as $res1) {
                  // $img='https://www.aegis.edu.in/no-image.jpeg';

                  if ($res1->image != '' && $res1->image != 0) {
                    $img = 'https://municampusassets.s3.ap-south-1.amazonaws.com/image/' . $res1->image;
                  } else {
                    $img = 'https://www.aegis.edu.in/no-image.jpeg';
                  }
                ?>
                  <img src="<?php echo $img; ?>" alt="">
                <?php } ?>
              </div>
              <div class="card-body">
                <h5 style="color: #A73135;" class="card-title fw-bold"><?php echo $res->project_title; ?></h5>
                <!-- <p style="color: #A73135;"><?php echo $res->project_title; ?></p> -->
                <p class="card-text"><?php echo $res->project_summary; ?></p>
                <a href="https://www.aegis.edu.in/projectDetails.php?id=<?php echo $res->project_id; ?>" style="background-color: #A73135 ; color: white;" class="btn ">View Project</a>
              </div>
            </div>
          </div>
        <?php }
      } else { ?>
        <tr>
          <td colspan="6" style="text-align:center;">
            <h3>No data found..</h3>
          </td>
        </tr>
      <?php } ?>
    </div>


  </div>
  <div id="footer"></div>

  <script type="text/javascript ">
    $(document).ready(function() {
      $.get("navbar.html ", function(data) {
        $("#menu ").html(data);
      });

      $.get("footer.html ", function(data) {
        $("#footer ").html(data);
      });
    });
  </script>


  <!-- JS Global -->
  <script src="assets/plugins/jquery/jquery-1.12.4.min.js"></script>
  <script src="assets/plugins/jquery/jquery-1.7.2.js"></script>

  <!-- JS Plugins -->
  <script src="assets/bootstrap/js/bootstrap.min.js"></script>
  <script src="assets/plugins/aos-master/dist/aos.js"></script>
  <script src="assets/plugins/smothscroll/smoothscroll.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>

</body>

</html>