<?php session_start();
include("./../config/config.php");  
include("./backend/validated_admin.php");  

?>

<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>Social Media - iCouponWorld | Coupons | Discounts| Promo Codes</title>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <link id="favicon" rel="icon" type="image/x-icon" href="../images/web-images/home/favicon.png">
      <meta name="robots" content="index, follow" />
      <meta name="author" content="Design Collection">
      <meta name="description" content="Build your own social network with our pannel">
      <meta name="keywords" content="Social Media, facebook, Whatsapp, linkedin and many more">
      <link rel="canonical" href="social-media.php"/>
      <!-- Viewport configuration, scaling options -->
      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
      <!-- Bootstrap CSS -->
      <link href="../css/icouponworld.css" rel="stylesheet">
      <!-- CSS Stylesheet -->
      <link href="../css/dashboard.css" rel="stylesheet">
      <!-- Font Awesome icon -->
      <link href="../fontawesome/css/fontawesome.css" rel="stylesheet" />
      <!-- Roboto font  -->
      <link rel="preconnect" href="https://fonts.googleapis.com">
      <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
      <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
       <!-- sweetalert.min.js Begin  -->
         <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
          <!-- sweetalert.min.js End  -->
      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
      <!--unique id begin -->
      <div id="s_mm">
      
         <!--scroll-top Begin-->
         <div id="scroll-top">
            <!--sidebarwrapper Begin-->
            <div id="sidebarwrapper">
               <!--Sidebarmenu Begin-->
              <?php include("./includefiles/sidebar.php"); ?>
               <!--Sidebarmenu End-->
               <!--content-wrapper Begin-->
               <div id="content-wrapper" class="d-flex flex-column dashboard-navbar">
                  <div id="maincontent">
                     <!-- Navbar Topbar Begin-->
                   <?php include("./includefiles/header.php"); ?>
                     <!-- Navbar Topbar End-->
                     <!-- Container Begin-->
                     <div class="container-fluid px-4">
                        <div class="d-sm-flex align-items-center justify-content-between mb-4">
                           <h3>
                              Social Media
                           </h3>
                        </div>
                          <?php include("./includefiles/coupon_count.php"); ?>
                          <?php
if($_SESSION["social_status"]!=''){

?>
<script> swal("Created!", "Your social media url are submitted!", "success");  </script>

<?php
unset($_SESSION["social_status"]);
}
?>
 <?php    $sql = "SELECT * FROM social_media";
   
    $myquery=$conn->query($sql);
  $mydara= $myquery->fetchAll()  ;
  
  $rows_found = $myquery->rowCount();
  foreach($mydara as $row){

   $social_url_1 = $row["social_url_1"];
   $social_url_2 = $row["social_url_2"];
   $social_url_3 = $row["social_url_3"];
   $social_url_4 = $row["social_url_4"];
   $social_1 = $row["social_1"];
   $social_2 = $row["social_2"];
   $social_3 = $row["social_3"];
   $social_4 = $row["social_4"];
}
  ?>
                        <form class="form-sign" action="./backend/social_media.php" method="post" enctype="multipart/form-data">
                           <div class="row">
                              <!--Edit Social Account Begin-->
                              <div class="col-md-12">
                                 <div class="card border-0  shadow mb-4">
                                    <div class="card-header bg-white border-bottom py-3">
                                       <h6 class="m-0 fw-bold text-inherit">Edit social account</h6>
                                    </div>
                                    <div class="card-body">
                                       <div class="row">
                                          <div class="col-md-6 mb-3">
                                             <select class="form-select form-control-sm" name="<?=SESS_MASTER?>social_1">
                                                <option value="fab fa-fw fa-facebook-f" selected="">Facebook</option>
                                             
                                                <option value="fab fa-fw fa-skype" <?php if($social_1=="fab fa-fw fa-skype"){ echo 'selected';  } ?> >Skype</option>
                                                <option value="fab fa-fw fa-twitter" <?php if($social_1=="fab fa-fw fa-twitter"){ echo 'selected';  } ?>>Twitter</option>
                                                <option value="fab fa-fw fa-instagram"  <?php if($social_1=="fab fa-fw fa-instagram"){ echo 'selected';  } ?>>Instagram</option>
                                                <option value="fab fa-fw fa-linkedin-in"  <?php if($social_1=="fab fa-fw fa-linkedin-in"){ echo 'selected';  } ?>>Linkdin</option>
                                                <option value="fab fa-fw fa-youtube" <?php if($social_1=="fab fa-fw fa-youtube"){ echo 'selected';  } ?>>Youtube</option>
                                                <option value="fab fa-fw fa-whatsapp" <?php if($social_1=="fab fa-fw fa-whatsapp"){ echo 'selected';  } ?>>Whatsapp</option>
                                                <option value="fab fa-fw fa-google-plus-g" <?php if($social_1=="fab fa-fw fa-google-plus-g"){ echo 'selected';  } ?>>Google Plus</option>
                                                <option value="fab fa-fw fa-pinterest-p" <?php if($social_1=="fab fa-fw fa-pinterest-p"){ echo 'selected';  } ?>>Pinterest</option>
                                             </select>
                                          </div>
                                          <div class="col-md-6 mb-3">
                                             <input class="form-control" type="text" name="<?=SESS_MASTER?>social_url_1" value="<?=$social_url_1?>">
                                          </div>
                                          <div class="col-md-6 mb-3">
                                             <select class="form-select form-control-sm" name="<?=SESS_MASTER?>social_2">
                                                <option value="fab fa-fw fa-instagram" selected="">Instagram</option>
                                                <option value="fab fa-fw fa-facebook-f" >Facebook</option>
                                               <option value="fab fa-fw fa-skype" <?php if($social_2=="fab fa-fw fa-skype"){ echo 'selected';  } ?> >Skype</option>
                                                <option value="fab fa-fw fa-twitter" <?php if($social_2=="fab fa-fw fa-twitter"){ echo 'selected';  } ?>>Twitter</option>
                                                <option value="fab fa-fw fa-instagram"  <?php if($social_2=="fab fa-fw fa-instagram"){ echo 'selected';  } ?>>Instagram</option>
                                                <option value="fab fa-fw fa-linkedin-in"  <?php if($social_2=="fab fa-fw fa-linkedin-in"){ echo 'selected';  } ?>>Linkdin</option>
                                                <option value="fab fa-fw fa-youtube" <?php if($social_2=="fab fa-fw fa-youtube"){ echo 'selected';  } ?>>Youtube</option>
                                                <option value="fab fa-fw fa-whatsapp" <?php if($social_2=="fab fa-fw fa-whatsapp"){ echo 'selected';  } ?>>Whatsapp</option>
                                                <option value="fab fa-fw fa-google-plus-g" <?php if($social_2=="fab fa-fw fa-google-plus-g"){ echo 'selected';  } ?>>Google Plus</option>
                                                <option value="fab fa-fw fa-pinterest-p" <?php if($social_2=="fab fa-fw fa-pinterest-p"){ echo 'selected';  } ?>>Pinterest</option>
                                             </select>
                                          </div>
                                          <div class="col-md-6 mb-3"> 
                                             <input class="form-control" name="<?=SESS_MASTER?>social_url_2" type="text" value="<?=$social_url_2?>">
                                          </div>
                                          <div class="col-md-6 mb-3">
                                             <select class="form-select form-control-sm" name="<?=SESS_MASTER?>social_3">
                                                <option value="fab fa-fw fa-twitter" selected="">Twitter</option>
                                                 <option value="fab fa-fw fa-skype" <?php if($social_3=="fab fa-fw fa-skype"){ echo 'selected';  } ?> >Skype</option>
                                                <option value="fab fa-fw fa-twitter" <?php if($social_3=="fab fa-fw fa-twitter"){ echo 'selected';  } ?>>Twitter</option>
                                                <option value="fab fa-fw fa-instagram"  <?php if($social_3=="fab fa-fw fa-instagram"){ echo 'selected';  } ?>>Instagram</option>
                                                <option value="fab fa-fw fa-linkedin-in"  <?php if($social_3=="fab fa-fw fa-linkedin-in"){ echo 'selected';  } ?>>Linkdin</option>
                                                <option value="fab fa-fw fa-youtube" <?php if($social_3=="fab fa-fw fa-youtube"){ echo 'selected';  } ?>>Youtube</option>
                                                <option value="fab fa-fw fa-whatsapp" <?php if($social_3=="fab fa-fw fa-whatsapp"){ echo 'selected';  } ?>>Whatsapp</option>
                                                <option value="fab fa-fw fa-google-plus-g" <?php if($social_3=="fab fa-fw fa-google-plus-g"){ echo 'selected';  } ?>>Google Plus</option>
                                                <option value="fab fa-fw fa-pinterest-p" <?php if($social_3=="fab fa-fw fa-pinterest-p"){ echo 'selected';  } ?>>Pinterest</option>
                                             </select>
                                          </div>
                                          <div class="col-md-6 mb-3">
                                             <input class="form-control" name="<?=SESS_MASTER?>social_url_3" type="text" value="<?=$social_url_3?>">
                                          </div>
                                          <div class="col-md-6 mb-3">
                                             <select class="form-select form-control-sm" name="<?=SESS_MASTER?>social_4">
                                                <option value="fab fa-fw fa-youtube" selected="">Youtube</option>
                                                  <option value="fab fa-fw fa-skype" <?php if($social_4=="fab fa-fw fa-skype"){ echo 'selected';  } ?> >Skype</option>
                                                <option value="fab fa-fw fa-twitter" <?php if($social_4=="fab fa-fw fa-twitter"){ echo 'selected';  } ?>>Twitter</option>
                                                <option value="fab fa-fw fa-instagram"  <?php if($social_4=="fab fa-fw fa-instagram"){ echo 'selected';  } ?>>Instagram</option>
                                                <option value="fab fa-fw fa-linkedin-in"  <?php if($social_4=="fab fa-fw fa-linkedin-in"){ echo 'selected';  } ?>>Linkdin</option>
                                                <option value="fab fa-fw fa-youtube" <?php if($social_4=="fab fa-fw fa-youtube"){ echo 'selected';  } ?>>Youtube</option>
                                                <option value="fab fa-fw fa-whatsapp" <?php if($social_4=="fab fa-fw fa-whatsapp"){ echo 'selected';  } ?>>Whatsapp</option>
                                                <option value="fab fa-fw fa-google-plus-g" <?php if($social_4=="fab fa-fw fa-google-plus-g"){ echo 'selected';  } ?>>Google Plus</option>
                                                <option value="fab fa-fw fa-pinterest-p" <?php if($social_4=="fab fa-fw fa-pinterest-p"){ echo 'selected';  } ?>>Pinterest</option>
                                             </select>
                                          </div>
                                          <div class="col-md-6 mb-3">
                                             <input class="form-control" name="<?=SESS_MASTER?>social_url_4" type="text" value="<?=$social_url_4?>">
                                          </div>
                                          <div class="col-md-12 mb-3">
                                             <button type="submit" class="btn btn-primary mt-2">Submit</button>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                           </div>
                        </form>
                     </div>
                     <!-- Container End-->
                  </div>
                  <!--Copyright Begin-->
               <?php include("./includefiles/footer.php"); ?>
                  <!--Copyright End-->
               </div>
               <!--content-wrapper End-->
            </div>
            <!--sidebarwrapper End-->
            <!--Scroll to top Begin-->
            <a class="scroll-to-top rounded" href="#scroll-top">
            <i class="fas fa-angle-up"></i>
            </a>
            <!--Scroll to top End-->
            <!-- Jquery Script -->
            <script src="../js/jquery-3.4.1.min.js"></script>
            <!-- Bootstrap Script -->
            <script src="../js/bootstrap.bundle.min.js"></script>
            <!-- dashboard-icouponworld Script -->
            <script src="../js/dashboard-icouponworld.js"></script>
         </div>
         <!--scroll-top End-->
      </div>
      <!--unique id End -->
   </body>
</html>
