<?php include("header.php");?>
<?php include("left-nev.php");?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
    Dashboard
    <small>Website Management</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="dashboard.php"><i class="fa fa-dashboard"></i> Home</a></li>
      <li>Dashboard</li>
      <li class="active">Website Management</li>
    </ol>
  </section>
  <!-- Main content -->
  <section class="content">
    <!-- Main row -->
    <div class="row">
      <!-- Left col -->
      <section class="col-lg-7 connectedSortable">
        <!-- TO DO List -->
        
        <div class="box box-info">
          <?php
          if($_SESSION["manage-website-msg"]!=""){
          ?>
          <div class="form-group has-success">
            <label class="control-label" for="inputSuccess"><i class="fa fa-check"></i> <?php echo $_SESSION["manage-website-msg"];?></label>
          </div>
          <?php
          unset($_SESSION["manage-website-msg"]);
          }
          ?>
          <div class="box-body">
            <form method="post" action="process-website-management.php" enctype="multipart/form-data">
              Website Title <span style="color:red;">*</span>
              <div class="form-group">
                <input type="text" class="form-control" name="website" value="<?php echo $resweb->website_title;?>" placeholder="Website" required>
              </div>
              Domain (mywebsite.com) <span style="color:red;">*</span>
              <div class="form-group">
                <input type="text" class="form-control" name="website_domain" value="<?php echo $resweb->website_domain;?>" placeholder="Domain like mywebsite.com" required>
              </div>
              Website Url (http://mywebsite.com) <span style="color:red;">*</span>
              <div class="form-group">
                <input type="text" class="form-control" name="website_url" value="<?php echo $resweb->website_url;?>" required placeholder="Website Url like http://mywebsite.com">
              </div>
              Website Facebook Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_facebook" value="<?php echo $resweb->website_facebook;?>" placeholder="Website Facebook Link">
              </div>
              Website Twitter Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_twitter" value="<?php echo $resweb->website_twitor;?>" placeholder="Website Twitter Link">
              </div>
              Website Google+ Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_gplus" value="<?php echo $resweb->website_gplus;?>" placeholder="Website Google+ Link">
              </div>
              Website Youtube Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_youtube" value="<?php echo $resweb->website_youtube;?>" placeholder="Website Youtube Link">
              </div>
              Website Linkedin Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_linkedin" value="<?php echo $resweb->website_linkedin;?>" placeholder="Website Linkedin Link">
              </div>
              Website Instagram Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_instagram" value="<?php echo $resweb->website_instagram;?>" placeholder="Website Instagram Link">
              </div>
              Website Pinterest Page Link
              <div class="form-group">
                <input type="text" class="form-control" name="website_printest" value="<?php echo $resweb->website_printest;?>" placeholder="Website Pinterest Link">
              </div>
              Tin No
              <div class="form-group">
                <input type="text" class="form-control" name="tin_no" value="<?php echo $resweb->tin_no;?>" placeholder="Tin Number">
              </div>
              <div class="form-group">
                <label for="exampleInputFile">Website Logo <span style="color:red;">*</span></label>
                <input type="file" name="image" id="exampleInputFile">
                <p class="help-block">Plz select website logo of transparent background.</p>
              </div>
            </div>
            <div class="box-footer">
              <button type="submit" name="Update" class="btn btn-primary">Update</button>
            </div>
          </form>
        </div>
        <!-- /.box -->
      </section>
      <!-- /.Left col -->
      <!-- right col (We are only adding the ID to make the widgets sortable)-->
      <section class="col-lg-5 connectedSortable">
        <!-- Map box -->
        <div class="box box-info">
          <div class="box-body">
            <center><img src="../upload/<?php echo $resweb->website_logo;?>" style="height:80px; width:190px;"></center>
            <form>
              <b>Website : </b><?php echo $resweb->website_title;?><br>
              <b>Domain : </b><?php echo $resweb->website_domain;?><br>
              <b>Website Url : </b><?php echo $resweb->website_url;?><br>
              <b>Tin No : </b><?php echo $resweb->tin_no;?><br>
              <a href="<?php echo $resweb->website_facebook;?>" target="_blank"><i class="fa fa-facebook-square" aria-hidden="true" title="Facebook"></i></a>&nbsp;&nbsp;&nbsp;
              <a href="<?php echo $resweb->website_twitor;?>" target="_blank"><i class="fa fa-twitter-square" aria-hidden="true" title="Twitter"></i></a>&nbsp;&nbsp;&nbsp;
              <a href="<?php echo $resweb->website_gplus;?>" target="_blank"><i class="fa fa-google-plus-square" aria-hidden="true" title="Google+"></i></a>&nbsp;&nbsp;&nbsp;
              <a href="<?php echo $resweb->website_youtube;?>" target="_blank"><i class="fa fa-youtube-square" aria-hidden="true" title="Youtube"></i></a>&nbsp;&nbsp;&nbsp;
              <a href="<?php echo $resweb->website_linkedin;?>" target="_blank"><i class="fa fa-linkedin-square" aria-hidden="true" title="Linkedin"></i></a>&nbsp;&nbsp;&nbsp;
              <a href="<?php echo $resweb->website_instagram;?>" target="_blank"><i class="fa fa-instagram" aria-hidden="true" title="Instagram"></i></a>&nbsp;&nbsp;&nbsp;
              <a href="<?php echo $resweb->website_printest;?>" target="_blank"><i class="fa fa-pinterest-square" aria-hidden="true" title="Pinterest"></i></a>
            </form>
            <?php
            if($_GET['status']=="Active")
            {
            mysqli_query($conn,"update tbl_email set pg_status='Inactive' where email_id='".$_REQUEST['id']."'");
            $_SESSION['email-msg']="Status Updated Successfully";
            echo "<script>window.location.href='manage-website.php'</script>";
            }
            if($_GET['status']=="Inactive")
            {
            mysqli_query($conn,"update tbl_email set pg_status='Active' where email_id='".$_REQUEST['id']."'");
            $_SESSION['email-msg']="Status Updated Successfully";
            echo "<script>window.location.href='manage-website.php'</script>";
            }
            $class="style='color:black;font-weight:bold'";
            ?>
          </div>
          
          <!-- /.box -->
          <!--<table style="width:100%;">
            <tr style="background-color:#00c0ef;"><td style="padding:10px;font-weight:bold"><?php
              if (!empty($_SESSION['email-msg'])) {
              echo $_SESSION['email-msg'];
              unset($_SESSION['email-msg']);
              }
              else
              {
              echo "Brandbugle Email List";
              }
            ?></td>
            <td><button type="button" class="btn btn-block btn-default"><i class="fa fa-edit"></i>Edit Emails</button></td>
          </tr>
          <?php
          $sqlmail=mysqli_query($conn,"select * from tbl_email");
          while($resmail=mysqli_fetch_array($sqlmail)){
          ?>
          <tr><td style="padding:10px;font-weight:bold"><?php echo $resmail['email'];?></td>
          <td><a href="?status=<?php echo $resmail['pg_status'];?>&id=<?php echo $resmail['email_id'];?>"
          <?php echo $class;?>><?php echo $resmail['pg_status'];?></a></td></tr>
          <?php } ?>
        </table>
        -->
      </section>
      <!-- right col -->
    </div>
    <!-- /.row (main row) -->
  </section>
  <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include("footer.php");?>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
  <!-- Create the tabs -->
  <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
    <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
    <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
  </ul>
  <!-- Tab panes -->
  <div class="tab-content">
    <!-- Home tab content -->
    <div class="tab-pane" id="control-sidebar-home-tab">
      <h3 class="control-sidebar-heading">Recent Activity</h3>
      <ul class="control-sidebar-menu">
        <li>
          <a href="javascript:void(0)">
            <i class="menu-icon fa fa-birthday-cake bg-red"></i>
            <div class="menu-info">
              <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
              <p>Will be 23 on April 24th</p>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:void(0)">
            <i class="menu-icon fa fa-user bg-yellow"></i>
            <div class="menu-info">
              <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
              <p>New phone +1(800)555-1234</p>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:void(0)">
            <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
            <div class="menu-info">
              <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
              <p>nora@example.com</p>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:void(0)">
            <i class="menu-icon fa fa-file-code-o bg-green"></i>
            <div class="menu-info">
              <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
              <p>Execution time 5 seconds</p>
            </div>
          </a>
        </li>
      </ul>
      <!-- /.control-sidebar-menu -->
      <h3 class="control-sidebar-heading">Tasks Progress</h3>
      <ul class="control-sidebar-menu">
        <li>
          <a href="javascript:void(0)">
            <h4 class="control-sidebar-subheading">
            Custom Template Design
            <span class="label label-danger pull-right">70%</span>
            </h4>
            <div class="progress progress-xxs">
              <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:void(0)">
            <h4 class="control-sidebar-subheading">
            Update Resume
            <span class="label label-success pull-right">95%</span>
            </h4>
            <div class="progress progress-xxs">
              <div class="progress-bar progress-bar-success" style="width: 95%"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:void(0)">
            <h4 class="control-sidebar-subheading">
            Laravel Integration
            <span class="label label-warning pull-right">50%</span>
            </h4>
            <div class="progress progress-xxs">
              <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:void(0)">
            <h4 class="control-sidebar-subheading">
            Back End Framework
            <span class="label label-primary pull-right">68%</span>
            </h4>
            <div class="progress progress-xxs">
              <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
            </div>
          </a>
        </li>
      </ul>
      <!-- /.control-sidebar-menu -->
    </div>
    <!-- /.tab-pane -->
    <!-- Stats tab content -->
    <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
    <!-- /.tab-pane -->
    <!-- Settings tab content -->
    <div class="tab-pane" id="control-sidebar-settings-tab">
      <form method="post">
        <h3 class="control-sidebar-heading">General Settings</h3>
        <div class="form-group">
          <label class="control-sidebar-subheading">
            Report panel usage
            <input type="checkbox" class="pull-right" checked>
          </label>
          <p>
            Some information about this general settings option
          </p>
        </div>
        <!-- /.form-group -->
        <div class="form-group">
          <label class="control-sidebar-subheading">
            Allow mail redirect
            <input type="checkbox" class="pull-right" checked>
          </label>
          <p>
            Other sets of options are available
          </p>
        </div>
        <!-- /.form-group -->
        <div class="form-group">
          <label class="control-sidebar-subheading">
            Expose author name in posts
            <input type="checkbox" class="pull-right" checked>
          </label>
          <p>
            Allow the user to show his name in blog posts
          </p>
        </div>
        <!-- /.form-group -->
        <h3 class="control-sidebar-heading">Chat Settings</h3>
        <div class="form-group">
          <label class="control-sidebar-subheading">
            Show me as online
            <input type="checkbox" class="pull-right" checked>
          </label>
        </div>
        <!-- /.form-group -->
        <div class="form-group">
          <label class="control-sidebar-subheading">
            Turn off notifications
            <input type="checkbox" class="pull-right">
          </label>
        </div>
        <!-- /.form-group -->
        <div class="form-group">
          <label class="control-sidebar-subheading">
            Delete chat history
            <a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
          </label>
        </div>
        <!-- /.form-group -->
      </form>
    </div>
    <!-- /.tab-pane -->
  </div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
</body>
</html>