<!DOCTYPE html>
<html lang="en">
<?php $settings = get_setting(); ?>
<head>
    <title><?=isset($page_title) && $page_title !=""?$page_title:''; ?> | <?php echo html_escape($settings['site_name']);?></title>
</head>
<meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
 
.payment_success_area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}
.payment_success {
    background: #eee;
    padding: 30px 10px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.payment_icon {
    height: 80px;
    width: 80px;
    border: 1px solid #ddd;
    border-radius: 100%;
    background: #fff;
}

.payment_icon i {
    font-size: 37px;
    line-height: 74px;
}

.buttons a {
    padding: 6px 28px;
}

.buttons {
    margin-top: 11px;
}

.buttons a.btn_left {
    margin-right: 10px;
}
h4,h5,h6{
    padding: 0;
    margin: 0;
}
.c_green{
    color: green;
}
.c_red{
    color: red;
}
.fz-13{
  font-size: 13px;
}
.mr-25{
  margin-right: 25%;
}
</style>
<body style="background:#fafafa">
    <div class="container text-center">
        <div class="row">
            <div class="col-md-6 <?= direction()=='rtl'?"mr-25":"offset-md-3"?>">
                   <div class="payment_success_area">
                       <div class="payment_success">
                          <?php if($this->session->flashdata('error')) { ?>
                                <div class="alert alert-danger alert-dismissible" role="alert">
                                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                 <h4> <i class="icon fa fa-exclamation-circle"></i>
                                          <?= !empty(lang('alert'))?lang('alert'):"Alert";?></h4>
                                      <p><?= $this->session->flashdata('error');?></p>
                                </div>
                              <?php } ?>
                           <div class="payment_icon">
                                <?php if(isset($status) && $status==1): ?>
                                <i class="fa fa-check c_green"></i>
                               <?php else: ?>
                                 <i class="fa fa-close c_red"></i>
                               <?php endif ?>
                           </div>
                           <div class="payment_details">
                            <?php if(isset($status) && $status==1): ?>
                                <h4><?= isset($username)?$username:'';?> </h4>
                            <?php endif; ?>
                               <h5><?= isset($msg)?$msg:'';?></h5>

                               <?php if(isset($_GET['p']) && !empty($_GET['p'])): ?>
                                   <p class="pt-5 pb-5"><?= lang('payment_method'); ?>: <?= $_GET['p'];?></p>
                               <?php endif; ?>

                            <?php if(isset($status) && $status==1): ?>
                              <p class="fz-14 mt-3">Payment confirmation link has been emailed to you, follow the link in the email to continue.</p>
                           <?php endif ?>
                           </div>
                           <div class="buttons">
                            <?php if(!empty(auth('id'))): ?>
                              <a href="<?php echo base_url('dashboard'); ?>" class="btn btn-primary btn_left"><?= isset($status) && $status==1?'Continue':'Back'?></a>
                              <?php else: ?>
                               <a href="<?php echo base_url('login'); ?>" class="btn btn-success">Continue</a>
                             <?php endif ?>
                           </div>
                       </div>
                   </div> 
            </div>
        </div>
    </div>

  <?php if(!empty(auth('id'))){
      $loaction = base_url('dashboard');
    }else{
      $loaction = base_url('login');
    }
  ?>
  <script>
  // hide verify msg after 3s
    //setTimeout(function(){ window.location.href='<?=$loaction;?>';}, 3000);
</script>
</body>
</html>
