<?php 
ob_start();
session_start();


include('header2.php');
?>  
<?php

if($_POST['email'])
{

$domainid = $json['frontend']['id'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$pass = $_POST['pass'];
$customerid = $_POST['customerid'];

// print_r($_POST);exit;

$handle = curl_init();
$url = "https://app.softsites.org/site/register.php";
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt($handle, CURLOPT_POSTFIELDS, 'webid='.$domainid.'&fname='.$fname.'&lname='.$lname.'&email='.$email.'&phone='.$phone.'&pass='.$pass.'&customerid='.$customerid.'');
$output = curl_exec($handle);
curl_close($handle);

$jsonpost = json_decode($output, true);

header('Location: login.php?mode=success');

}

?>	
        
		
		
		<!-- ================================== Account Page Start =========================== -->
        <section class="account d-flex">
         <img src="assets/images/thumbs/account-img.png" alt="" class="account__img">
         <div class="account__left d-md-flex d-none flx-align section-bg position-relative z-index-1 overflow-hidden">
            <img src="assets/images/shapes/pattern-curve-seven.png" alt="" class="position-absolute end-0 top-0 z-index--1 h-100">
            <div class="account-thumb">
               <img src="assets/images/thumbs/banner-img.png" alt="">
               <div class="statistics animation bg-main text-center">
                  <h5 class="statistics__amount text-white">50k</h5>
                  <span class="statistics__text text-white font-14">Customers</span>
               </div>
            </div>
         </div>
         <div class="account__right padding-t-120 flx-align">
            <div class="dark-light-mode">
               <!-- Light Dark Mode -->
               <div class="theme-switch-wrapper position-relative">
                  <label class="theme-switch" for="checkbox">
                  <input type="checkbox" class="d-none" id="checkbox">
                  <span class="slider text-black header-right__button white-version">
                  <img src="assets/images/icons/sun.svg" alt="">
                  </span>
                  <span class="slider text-black header-right__button dark-version">
                  <img src="assets/images/icons/moon.svg" alt="">
                  </span>
                  </label>
               </div>
            </div>
            <div class="account-content">
               <a href="index.php" class="logo mb-64">  
               <img src="<?php if($json['frontend']['webimg'] != ''){echo $json['frontend']['webimg'];}else{ echo 'https://app.softsites.org/assets/img/icons/logo.png';}?>" alt="" class="white-version">
               <img src="<?php if($json['frontend']['webimg'] != ''){echo $json['frontend']['webimg'];}else{ echo 'https://app.softsites.org/assets/img/icons/logo.png';}?>" alt="" class="dark-version">
               </a>
               <h4 class="account-content__title mb-48 text-capitalize">Create A Free Account</h4>
               <form action="" method="POST" >
                  <div class="row gy-4">
                     <div class="col-12">
                        <label for="name" class="form-label mb-2 font-18 font-heading fw-600">First Name</label>
                        <div class="position-relative">
                           <input type="text" name="fname" class="common-input common-input--bg common-input--withIcon" id="name" placeholder="Your first name">
                           <span class="input-icon"><img src="assets/images/icons/user-icon.svg" alt=""></span>
                        </div>
                     </div>
                     <div class="col-12">
                        <label for="name" class="form-label mb-2 font-18 font-heading fw-600">Last Name</label>
                        <div class="position-relative">
                           <input type="text" name="lname" class="common-input common-input--bg common-input--withIcon" id="name" placeholder="Your last name">
                           <span class="input-icon"><img src="assets/images/icons/user-icon.svg" alt=""></span>
                        </div>
                     </div>
                     <div class="col-12">
                        <label for="name" class="form-label mb-2 font-18 font-heading fw-600">Phone Number</label>
                        <div class="position-relative">
                           <input type="text" name="phone" class="common-input common-input--bg common-input--withIcon" id="name" placeholder="Your phone number">
                           <span class="input-icon"><img src="assets/images/icons/user-icon.svg" alt=""></span>
                        </div>
                     </div>
                     <div class="col-12">
                        <label for="email" class="form-label mb-2 font-18 font-heading fw-600">Email</label>
                        <div class="position-relative">
                           <input type="email" name="email" class="common-input common-input--bg common-input--withIcon" id="email" placeholder="infoname@mail.com">
                           <span class="input-icon"><img src="assets/images/icons/envelope-icon.svg" alt=""></span>
                        </div>
                     </div>
                     <div class="col-12">
                        <label for="your-password" class="form-label mb-2 font-18 font-heading fw-600">Password</label>
                        <div class="position-relative">
                           <input type="password" name="pass" class="common-input common-input--bg common-input--withIcon" id="your-password" placeholder="password">
                           <span class="input-icon toggle-password cursor-pointer" id="#your-password"><img src="assets/images/icons/lock-icon.svg" alt=""></span>
                        </div>
                     </div>
                     <div class="col-12">
                        <div class="common-check my-2">
                           <input class="form-check-input" type="checkbox" name="checkbox" id="agree">
                           <label class="form-check-label mb-0 fw-400 font-16 text-body" for="agree">I agree to the terms & conditions</label>
                        </div>
                     </div>
                     <input type="hidden" placeholder="" name="customerid" value="<?php echo $json['frontend']['uid'];?>" />
                     <div class="col-12">
                        <button type="submit" class="btn btn-main btn-lg w-100 pill"> Create An Account</button>
                     </div>
                     
                     <div class="col-sm-12 mb-0">
                        <div class="have-account">
                           <p class="text font-14">Already a member? <a class="link text-main text-decoration-underline  fw-500" href="login.php">Login</a></p>
                        </div>
                     </div>
                  </div>
               </form>
            </div>
         </div>
      </section>
        <!-- ================================== Account Page End =========================== -->

<?php include('footer2.php');?>  