<?php
ob_start();
session_start();
//error_reporting(0);
require_once('../include/dbconnect.php');
require 'PHPMailer/class.phpmailer.php';
require 'PHPMailer/PHPMailerAutoload.php';

	if(!isset($_SESSION['uid']))
	{
	  header("Location: login.php");
	}else{
		$uid=$_SESSION['uid'];
		
		$dt = date("Y-m-d");
		
		$sql = "select * from users where uID='$uid'"; 
		$rs_result =  $conn->query($sql); //run the query
		$no = 0;
		while($row = $rs_result->fetch_assoc()) { 
			$uid=$row['uID'];
			$fname=$row['fn'];
			$lname=$row['ln'];
			$add=$row['address'];
			$ct=$row['townCity'];
			$state=$row['state'];
			$count=$row['country'];
			$pz=$row['zip'];
			$ph=$row['pNumber'];
			$em=$row['email'];
			$dob=$row['dob'];
			$gen=$row['gender'];
			$nat=$row['nation'];
			$occ=$row['occu'];
			$acc=$row['memID'];
			$pw=$row['pass'];
			$cd=$row['cDate'];
			$llog = strtotime($row['LLogin']);
			$ll = date("jS M, Y h:ia", $llog);
			$pic=$row['picture'];
// 			$tok=$row['token'];
			$stta=$row['status'];
		}	
		 if(empty($pic)){
                $pic = "social-user.png";
            }
	}
	
	if(isset($_SESSION['token']))
	{
	  $tok = $_SESSION['token'];
	}

    $display_loader = "block";
    $caption = "";
    $display_otpform = "none";
    $display_secureform = "none";

    if(isset($_GET['action'])){
      if($_GET['action'] == "otp-verification"){
        $display_otpform = "block";
        if($_GET['type'] == "transfer"){
          $hidden = "<input type='hidden' value='transfer' name='type'>";
          
          if(!isset($_GET['continue'])){
              $_SESSION['trans_id'] = $_GET['tid'];
          }else{
              $_SESSION['trans_id'] = $_GET['continue'];
          }
        }elseif($_GET['type'] == "login"){
          $hidden = "<input type='hidden' value='login' name='type'>";
        }
      }elseif($_GET['action'] == "checkpoint"){ 
        $display_secureform = "block";
        
        $st = "select * from trans where tid='".$_SESSION['trans_id']."'"; 
        $r_t =  $conn->query($st); //run the query
        while($row = $r_t->fetch_assoc()) { 
            $pac=$row['pAccno'];
            $_stepp=$row['step'];
        }
        
        $st_step = "select * from t_steps where user='".$uid."' and status='1' order by id asc limit $_stepp,1";
        $r_tstep =  mysqli_query($conn,$st_step); //run the query
        while($row = $r_tstep->fetch_assoc()) { 
            $_thisstepp=$row['step'];
            $_thiscode=$row['code'];
        }
        
        $st_steps = "select * from t_steps where user='".$uid."' and status='1'";
        $r_tsteps =  mysqli_query($conn,$st_steps); //run the query
        $count_t_steps = mysqli_num_rows($r_tsteps);
        if($_stepp == $count_t_steps){
            echo "<script>window.location='processing.php?request=transaction-complete';</script>";      
        }
        
        if(isset($_GET['continue'])){
            $_SESSION['trans_id'] = $_GET['continue'];
            echo "<script>window.location='processing.php?action=checkpoint';</script>";
        }
      }
      $display_loader = "none";
    }

    if(isset($_GET['request'])){
        $request = $_GET['request'];

        if($request == "signin"){
            
          $name = $fname." ".$lname;
          $email = $em;
          
          $mail = new PHPMailer;
                            
          $mail->isSMTP();
          $mail->SMTPDebug = 0; 
          $mail->Host = "mail.newageunb.com";
          $mail->SMTPAuth = true;
          $mail->SMTPSecure = true;
          $mail->Port = 465; 
          
          $mail->Username = 'no-reply@newageunb.com';
          $mail->Password = 'fe-XB;AYE-$Y';
          
          
          $mail->From = 'no-reply@newageunb.com';
          $mail->FromName = 'Newage Union Bank';
          $mail->addAddress($email,$name);
          
          $mail->IsHTML(true);
          $mail->WordWrap = 60;
          $body = "
              <div style='padding: 20px; background-color: #ffffff; border: 1px solid #fc671c; min-height: 300px;'>
                <img src='https://newageunb.com/images/newage.png' style='width: 200px;' alt='Newage Union Bank'>
                <h3 style='border-bottom: 1px solid #fc671c; padding: 10px; color: #fc671c;'>2-Factor Authentication Code</h3>
                <p style='color: #666;'>Dear $name,</p>
                <p style='color: #666;'>To complete your login, please enter the 6-digit authentication code below:</p>
                <h1 style='font-size: 24px; color: #fc671c; margin-bottom: 20px;'>$tok</h1>
                <p style='color: #666; margin-bottom: 20px;'>This code is valid for 5 minutes.</p>
                <p style='color: #666; margin-bottom: 20px; font-size: 14px;'><strong>Important Security Note:</strong></p>
                <p style='color: #666; margin-bottom: 20px; font-size: 12px;'>Do not share this code with anyone to avoid unauthorized access to your account, which may result in loss of funds.</p>
                <p style='color: #666; margin-bottom: 20px; font-size: 12px;'>If you did not initiate this login request, please contact our customer support immediately.</p>
                <hr>
                <p style='text-align: center; color: #999; font-size: 10px;'>
                  THIS IS AN AUTOMATED RESPONSE. <b>**DO NOT RESPOND TO THIS EMAIL**</b>
                </p>
                <p style='text-align: center; color: #999; font-size: 10px;'>
                  Best regards,<br>
                  Newage Union Bank
                </p>
                <p style='text-align: center; color: #999; font-size: 10px;'>
                  <a href='mailto:customercare@newageunb.com' style='color: #fc671c;'>customercare@newageunb.com</a> | 
                  <a href='https://newageunb.com/' style='color: #fc671c;'>Newage Union Bank</a>
                </p>
              </div>
            ";

            
          $mail->Subject = 'OTP Verification';
          $mail->Body    = $body;
          $mail->isHTML(true);
          if(!$mail->send()){
             $redirect_url = "<meta http-equiv='refresh' content='6; url=login.php?logout=true' >";
          }else{		
            $redirect_url = "<meta http-equiv='refresh' content='5; url=processing.php?action=otp-verification&type=login' >";
          }

          $name=$email=NULL;
          $caption = "Processing authentication...";
        }elseif($request == "incorrect_pin"){
            $redirect_url = "<meta http-equiv='refresh' content='6; url=login.php?signout=true' >";
            $caption = "Verification token duration expired! Logging out...";
        }elseif($request == "dashboard"){
            $redirect_url = "<meta http-equiv='refresh' content='8; url=index.php' >";
            $caption = "Hello ".$fname."! Initializing your dashboard...";
        }elseif($request == "logout"){
            $redirect_url = "<meta http-equiv='refresh' content='5; url=login.php?signout=true' >";
            $caption = "Goodbye ".$fname."! Signin out of your dashboard...";
        }elseif($request == "fund_transfer"){										
            if(isset($_GET['continue'])){
                $this_trans = $_GET['continue']; 
            }else{
                $this_trans = $_GET['tid']; 
            }
            
            $st = "select * from trans where tid='".$this_trans."'"; 
            $r_t =  $conn->query($st); //run the query
            while($row = $r_t->fetch_assoc()) { 
				// $tmid=$row['memID'];
				// $tdate=$row['tDate'];
				$pyee=$row['pAccno'];
				// $narr=$row['narration'];
				// $ammt=$row['amount'];
				// $tSt=$row['status'];
				// $ttype = $row['type'];
            }
            
            $name = $fname." ".$lname;
            $email = $em;
            
            $mail = new PHPMailer;
                            
            $mail->isSMTP();
            $mail->SMTPDebug = 0; 
            $mail->Host = "mail.newageunb.com";
            $mail->SMTPAuth = true;
            $mail->SMTPSecure = true;
            $mail->Port = 465; 
            
            $mail->Username = 'no-reply@newageunb.com';
            $mail->Password = 'fe-XB;AYE-$Y';
            
            
            $mail->From = 'no-reply@newageunb.com';
            $mail->FromName = 'Newage Union Bank';
            $mail->addAddress($email,$name);
            
            $mail->IsHTML(true);
            $mail->WordWrap = 50;
             $body = "
              <table width='100%' border='0' cellpadding='0' cellspacing='0' style='background-color: #ffffff; padding: 20px;'>
                <tr>
                  <td align='center'>
                    <table width='600' border='0' cellpadding='0' cellspacing='0' style='background-color: #ffffff; padding: 20px; border: 1px solid #fc671c;'>
                      <tr>
                        <td align='left'>
                          <img src='https://newageunb.com/images/newage.png' style='width: 200px;' alt='Newage Union Bank'>
                        </td>
                      </tr>
                      <tr>
                        <td align='left'>
                          <h2 style='font-family: Arial, sans-serif; font-size: 18px; color: #fc671c; margin-bottom: 10px;'>Dear $name,</h2>
                          <p style='font-family: Arial, sans-serif; font-size: 14px; color: #666; margin-bottom: 20px;'>Your One-Time Password (OTP) is:</p>
                          <h1 style='font-family: Arial, sans-serif; font-size: 24px; color: #fc671c; margin-bottom: 20px;'>$tok</h1>
                          <p style='font-family: Arial, sans-serif; font-size: 14px; color: #666; margin-bottom: 20px;'>Please enter this OTP to complete your transaction.</p>
                        </td>
                      </tr>
                      <tr>
                        <td align='left' style='border-top: 1px solid #fc671c; padding-top: 10px;'>
                          <p style='font-family: Arial, sans-serif; font-size: 12px; color: #999;'>Best regards,</p>
                          <p style='font-family: Arial, sans-serif; font-size: 12px; color: #999;'>NAU Bank BANK</p>
                          <p style='font-family: Arial, sans-serif; font-size: 12px; color: #999;'><a href='mailto:customercare@newageunb.com' style='color: #fc671c;'>customercare@newageunb.com</a> | <a href='(link unavailable)' style='color: #fc671c;'>(link unavailable)</a></p>
                        </td>
                      </tr>
                      <tr>
                        <td align='center' style='font-family: Arial, sans-serif; font-size: 12px; color: #999; padding-top: 10px; background-color: #F7F7F7;'>
                          THIS IS AN AUTOMATED RESPONSE. <b>**DO NOT RESPOND TO THIS EMAIL**</b>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
            ";

            
            $mail->Subject = 'OTP Verification';
            $mail->Body    = $body;
            $mail->isHTML(true);
            if(!$mail->send()){
             $redirect_url = "<meta http-equiv='refresh' content='6; url=send-money.php?account=".$pyee."' >";
            }else{		
            $redirect_url = "<meta http-equiv='refresh' content='8; url=processing.php?action=otp-verification&type=transfer&tid=".$this_trans."' >";
            }
            
            $name=$email=NULL;
            $caption = "Processing Transaction. Please wait...";         
        }elseif($request == "security-check"){	
            $redirect_url = "<meta http-equiv='refresh' content='8; url=processing.php?action=checkpoint' >";  
            $caption = "Transaction in progress...";         
        }elseif($request == "transaction-complete"){     
            
          $st = "select * from trans where tid='".$_SESSION['trans_id']."'"; 
          $r_t =  $conn->query($st); //run the query
          while($row = $r_t->fetch_assoc()) { 
              $pac=$row['pAccno'];
              $ammt=$row['amount'];
          }
          $str = "select * from account where memID='".$acc."' and aNum='$pac'"; 
          $tr_r =  $conn->query($str); //run the query
          while($row = $tr_r->fetch_assoc()) { 
              $acidt=$row['id'];
              $abt=$row['aBal'];
          }
          
          $newB = $abt - $ammt;

            $ubl="update account set aBal='".$newB."' where id='".$acidt."'";
            $uSt=mysqli_query($conn,$ubl);

            $ul="update trans set status='complete' where tid='".$_SESSION['trans_id']."'";						
            $ut=mysqli_query($conn,$ul);

          $name = $fname." ".$lname;
          $email = $em;
          
          $mail = new PHPMailer;
                            
          $mail->isSMTP();
          $mail->SMTPDebug = 0; 
          $mail->Host = "mail.newageunb.com";
          $mail->SMTPAuth = true;
          $mail->SMTPSecure = true;
          $mail->Port = 465; 
          
          $mail->Username = 'no-reply@newageunb.com';
          $mail->Password = 'fe-XB;AYE-$Y';
          
          
          $mail->From = 'no-reply@newageunb.com';
          $mail->FromName = 'Newage Union Bank';
          $mail->addAddress($email,$name);
          
          $mail->IsHTML(true);
          $mail->WordWrap = 50;
             $body="<div style=\"padding:10px;background-color:#f5f5f5;border:1px solid #ccc;min-height:300px;\">";
             $body.="<h3 style=\"border-bottom:1px solid #ccc;padding:10px;\">Dear ".$name.", </h3><p>You have a transaction alert on your account.</p>
              <p>
                 <strong>Date/Time: </strong> ".date("jS M, Y h:ia",strtotime("".$_SESSION['dt'].""))."<br>
                 <strong>Transaction Amount: </strong> ".number_format($ammt, 2)." DR<br>
                 <strong>Account Balance: </strong> ".number_format($newB, 2)." CR
              </p>
              --
              <br>
              <img src='https://www.newageunb.com/portal/images/newage.png' style='width: 200px;' alt='NAU Bank BANK'><br>
               
              Email: customercare@newageunb.com <br>
              Website: <a href='https://newageunb.com/'>www.newageunb.com</a> <hr>
              <p style='text-align: center;'>THIS IS AN AUTOMATED RESPONSE. <b>**DO NOT RESPOND TO THIS EMAIL**</b></p>
             </div>
          ";
          
          $mail->Subject = 'Transaction Alert';
          $mail->Body = $body;
          
          $mail->isHTML(true);
      
          if(!$mail->send()){
            echo "<script>alert('Transaction Error! Try again later.')</script>";
             $redirect_url = "<meta http-equiv='refresh' content='3; url=transactions.php' >";
          }else{	
            unset($_SESSION['dt']);	
            $redirect_url = "<meta http-equiv='refresh' content='8; url=send-money-success.php' >";  
          }

          $name=$email=NULL;
          $caption = "Completing transaction...";
        }
    }

    if( isset($_POST['clog']) ){
        $token=$_POST['tok'];
        $type=$_POST['type'];

        if($token == $tok){   
                
                if($type == "login"){
                    $redir_link = "processing.php?request=dashboard";
                }elseif($type == "transfer"){
                    $redir_link = "processing.php?request=security-check";
                }
    
                echo "<script>window.location='".$redir_link."';</script>";
        }else{
            if($type == "login"){
                $error = "<span style='color: indianred;'>Incorrect pin! Try again.<br> Session will be cancelled in 15 seconds...</span>";
                echo "<meta http-equiv='refresh' content='15; url=processing.php?request=incorrect_pin' >";
            }elseif($type == "transfer"){
                $error = "<span style='color: indianred;'>Incorrect pin! Try again.<br> Session will be cancelled in 20 seconds...</span>";
                echo "<meta http-equiv='refresh' content='20; url=transactions.php' >";
            }
            
        }   
      }

    if(isset($_POST['verify_token'])){
        $ct = $_POST['trf_tok'];    
        $ctken = $_POST['cor_tok'];    
        $cstep = $_POST['c_step'];    
            
        if($ct == $ctken) {
            $next_step = $cstep + 1;
            $ubal="update trans set step='".$next_step."' where tid='".$_SESSION['trans_id']."'";						
            $uSet=mysqli_query($conn,$ubal);
            
            echo "<script>window.location='processing.php?action=checkpoint';</script>";
        }else{
            $error = "<span style='color: indianred;'>Incorrect token! Try again or contact customer care to request code.</span>";
        }
    }
?>

<!DOCTYPE html>
<?php echo $redirect_url; ?>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">
<link href="images/favicon.png" rel="icon" />
<title>User Dashboard - Newage Union Bank</title>
<meta name="author" content="">

<!-- Web Fonts
============================================= -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap">

<!-- Stylesheet
============================================= -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="vendor/font-awesome/css/all.min.css" />
<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
<!-- Colors Css -->



</head>
<body>

<style>
    
    /* Header Styling */
    #header {
        background-color: #23233f;
        color: #fff;
        padding: 10px 0;
        border-bottom: 1px solid #333;
    }

</style>

<div id="loader" style="display: <?php echo $display_loader; ?>;">
  <div data-loader="dual-ring"></div>
  <div id="loader_text"><?php echo $caption; ?></div>
</div>

<!-- Document Wrapper   
============================================= -->
<div id="main-wrapper"> 
  <!-- Header
  ============================================= -->
  <header id="header">
    <div class="container">
      <div class="header-row">
        <div class="header-column justify-content-start"> 
          <!-- Logo
          ============================= -->
          <div class="logo me-3"> <a class="d-flex"><img src="images/newage.png" style="width: 200px;" alt="Newage Union Bank" /></a> </div>
          <!-- Logo end --> 
          <!-- Collapse Button
          ============================== -->
          <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#header-nav"> <span></span> <span></span> <span></span> </button>
          <!-- Collapse Button end --> 
          
          <!-- Primary Navigation
          ============================== -->
          <?php
              if(isset($_GET['request']) || isset($_GET['action'])){
                  echo "";
              }else{
          ?>
          <nav style="background-color:#23233f;" class="primary-menu navbar navbar-expand-lg">
            <div id="header-nav" class="collapse navbar-collapse">
              <ul class="navbar-nav me-auto">
                <li class="<?php echo $link_status1; ?>"><a href="index.php">Dashboard</a></li>
                <li class="<?php echo $link_status2; ?>"><a href="transactions.php">View Transactions</a></li>
                <li class="<?php echo $link_status3; ?>"><a href="send-money.php">Transfer Funds</a></li>
                 <li><a class="dropdown-item" href="settings-payment-methods.php"><i class="fas fa-credit-card"> </i>Payment Methods</a></li>
              </ul>
            </div>
          </nav>
          <?php
              }
          ?>
          <!-- Primary Navigation end --> 
        </div>
        <div class="header-column justify-content-end"> 
          <!-- My Profile
          ============================== -->
          <nav class="login-signup navbar navbar-expand">
            <ul class="navbar-nav">
              <li class="dropdown profile ms-2"> <a class="px-0 dropdown-toggle" href="#"><img class="rounded-circle" src="../userPic/<?php echo $pic; ?>" style="width: 50px;" alt=""></a>
                <ul class="dropdown-menu">
                  <li class="text-center text-3 py-2">Hi, <?php echo $fname." ".$lname; ?></li>
                  <li class="dropdown-divider mx-n3"></li> 
                  <?php
                      if(isset($_GET['request']) || isset($_GET['action'])){
                          echo "";
                      }else{
                  ?>
                  <li><a class="dropdown-item" href="settings-profile.php"><i class="fas fa-user"></i>My Profile</a></li>
                  <li><a class="dropdown-item" href="settings-security.php"><i class="fas fa-shield-alt"></i>Security</a></li>
                  <li><a class="dropdown-item" href="settings-payment-methods.php"><i class="fas fa-credit-card"></i>Payment Methods</a></li>
                  <li><a class="dropdown-item" href="settings-notifications.php"><i class="fas fa-bell"></i>Notifications</a></li>
                  <li class="dropdown-divider mx-n3"></li>
                  <li><a class="dropdown-item" href="help.php"><i class="fas fa-life-ring"></i>Need Help?</a></li>
                  <?php
                      }
                  ?>
                       <li class=""><a href="deposit.php"><i class="fas fa-credit-card"></i>Make Deposit</a></li>
                  <li><a class="dropdown-item" href="processing.php?request=logout"><i class="fas fa-sign-out-alt"></i>Sign Out</a></li>
                </ul>
              </li>
            </ul>
          </nav>
          <!-- My Profile end --> 
        </div>
      </div>
    </div>
  </header>
  <!-- Header End -->
  
  <!-- Content
  ============================================= -->
   <div id="content" class="py-4" style="min-height: 600px;">
    <div class="container">

     <!--SINGLE FORM-->
      <div class="row" style="display: <?php echo $display_otpform; ?>;">
        <div class="col-md-9 col-lg-7 col-xl-6 mx-auto">
          <div class="bg-white shadow-sm rounded p-3 pt-sm-4 pb-sm-5 px-sm-5 mb-4" style="margin-top: 130px;">
            <h3 class="text-5 fw-400 mb-3 mb-sm-4">Verification Token</h3>
            <p><?php echo $error; ?></p>
            <hr class="mx-n3 mx-sm-n5 mb-4">
            <!-- Send Money Form
            ============================ -->
            <form id="form-send-money" method="post">
              <div class="mb-3">
                <label for="emailID" class="form-label">OTP Code</label>
                <input type="text" maxlength="6" name="tok" class="form-control" id="emailID" required placeholder="Enter OTP code sent to your email address.">
                <?php echo $hidden; ?>
              </div>
              <div class="d-grid"><button name="clog" type="submit" class="btn btn-primary">Continue</button></div>
            </form>
            <!-- Send Money Form end -->
            
            <!-- Note about checking spam folder -->
            <p class="mt-3 text-muted" style="font-size: 14px;">If you haven't received the OTP code in your inbox, please check your spam or junk folder. If you still can't find it, <a href="mailto:customerservice@citizfund.com">contact customer support</a> for assistance.</p>
            
          </div>
        </div>
      </div>
      <!--END SINGLE FORM-->
      
      <!--CHECKPOINT 1-->
      <div class="row" style="display: <?php echo $display_secureform; ?>;">
        <div class="col-md-9 col-lg-7 col-xl-6 mx-auto">
          <div class="bg-white shadow-sm rounded p-3 pt-sm-4 pb-sm-5 px-sm-5 mb-4" style="margin-top: 130px;">
            <h3 class="text-5 fw-400 mb-3 mb-sm-4">
                <?php
                    echo "Enter ".$_thisstepp." token";
                ?>
            </h3>
            <p><?php echo $error; ?></p>
            <p>
                <?php 
                    echo "
                            To Proceed, enter your ".$_thisstepp." token. If you do not have a token, promptly contact our customer care via email on <a href='mailto:customerservice@newageunb.com'>customerservice@newageunb.com</a> or the livechat below and follow their instructions to get your token and complete your transaction.
                    ";
                ?>
            </p>
            <hr class="mx-n3 mx-sm-n5 mb-4">
            <!-- Send Money Form
            ============================ -->
            <form id="form-send-money" method="post">
              <div class="mb-3">
                <input type="text" maxlength="6" name="trf_tok" class="form-control" required placeholder="Enter token here...">
                <input type="hidden" name="cor_tok" value="<?php echo $_thiscode; ?>">
                <input type="hidden" name="c_step" value="<?php echo $_stepp; ?>">
              </div>
              <div class="d-grid"><button name="verify_token" type="submit" class="btn btn-primary">Continue</button></div>
            </form>
            <!-- Send Money Form end --> 
          </div>
        </div>
      </div>
      <!--END CHECKPOINT 1-->


    </div>
  </div>
  <!-- Content end --> 
  
  <!-- Footer
  ============================================= -->
  <?php include("includes/footer.php"); ?>
  <!-- Footer end --> 
  
</div>
<!-- Document Wrapper end --> 

<!-- Back to Top
============================================= --> 
<a id="back-to-top" data-bs-toggle="tooltip" title="Back to Top" href="javascript:void(0)"><i class="fa fa-chevron-up"></i></a> 

<!-- Styles Switcher -->

<!-- Styles Switcher End --> 

<!-- Script --> 
<!-- Smartsupp Live Chat script -->
<!-- Smartsupp Live Chat script -->
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = '28bf529905701ee28207d99d49cd6e736a87a742';
window.smartsupp||(function(d) {
  var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
  s=d.getElementsByTagName('script')[0];c=d.createElement('script');
  c.type='text/javascript';c.charset='utf-8';c.async=true;
  c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
</script><!-- Smartsupp Live Chat script -->
<!-- Style Switcher --> 
<script src="js/switcher.min.js"></script> 
<script src="js/theme.js"></script>
</body>
</html>