<?php $this->xinclude('partials/header'); ?>

<?php if($this->requestType == 'post'): ?>

<?php if($this->link_data->is_adsense): ?>

<?php endif; ?>
<br/>

<div class="alert alert-success view-success">
  <h1><i class="fa fa-unlock-alt" aria-hidden="true"></i>
  &nbsp;Links Unlocked Now. </h1>
</div>

<div class="view-links">
    <div class="row">
        <h1 class="register-title"><?php echo ucwords($this->link_data->title); ?></h1>
<?php if($this->link_data->is_adsense): ?>
<?php endif; ?>
        <div class="col-sm-8 col-sm-offset-2 well view-well">
            <?php

            $links = unserialize($this->link_data->content);
            
            foreach ($links as $k) {
                
              echo '<a href="'.$k.'" rel="nofollow" target="_blank">'.$k.'</a>';
            } 

            ?>
        </div>

    </div>
           <center></center>
</div>
<br/>

<?php else: ?>

<div class="alert alert-success view-success">
  <h1><i class="fa fa-unlock-alt" aria-hidden="true"></i>
  &nbsp;Links Unlocked Now. </h1>
</div>

<div class="view-links">
    Your unlocked links is here below. You can download and also can copy them or distributed through emails, forums and social networking websites.
    <div class="row">
        <h1 class="register-title"><?php echo ucwords($this->link_data->title); ?></h1>
        
<?php if($this->link_data->is_adsense): ?>
<?php endif; ?>
<center> 

<br/>
</center>
        <div class="col-sm-8 col-sm-offset-2 well view-well">
              <?php

            $links = unserialize($this->link_data->content);
            
            foreach ($links as $k) {
                
              echo '<a href="'.$k.'" rel="nofollow" target="_blank">'.$k.'</a>';
            } 

            ?>
        </div>

    </div>
           <center></center>
</div>

<div class="view-options row">
    <div class="col-sm-3 view-option-box">
       <i class="label label-default">Created By</i>
       <?php $user = ($this->link_data->username)? $this->link_data->username : 'anonymouse'; ?>
       <em class="page-views"><?php echo ucwords($user); ?></em> 
    </div>
    <div class="col-sm-3 view-option-box">
       <i class="label label-default">Created On</i>
       <em class="page-views"><?php echo date('d M Y', strtotime($this->link_data->created)); ?></em> 
    </div>
    <div class="col-sm-3 view-option-box">
       <i class="label label-default">Views</i>
       <em class="page-views"><?php echo number_format($this->link_data->views); ?></em> 
    </div>
    <div class="col-sm-2 view-option-box view-options-save">
       <a href="/save/<?php echo $this->link_data->uid; ?>">
       <i class="fa fa-save" aria-hidden="true"></i>
       Save it</a>
    </div>
</div>
<br/>
<div class="view-options row">
    Uptolink is a Free Link Protector service to avoid any links from being indexed by spiders and eventually being listed on search engines. We allows you to set a time limit for the amount of time a link is valid as well as limit the number of times someone can use that link.
    </div>

<!--<div class="alert view-warning">
  <h1> Uptolink Download Your Links </h1>
  <h4>Your private link sharing partner </h4>
</div>-->

<!--<?php if(System\Session::exists('error')): ?>
<div class="home-error-wrap">
  <div class="alert btn-danger">
    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
    <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>&nbsp;&nbsp;<?php echo System\Session::flash('error'); ?>
  </div>
</div>
<?php endif; ?>

<div class="view-captcha">
    <br/>
    <p align="center">Uptolink provides one of the finest Link Protecting services in the world. Uptolink helps you protect your links from inconvenient people or automated robots with security such as Captcha and password. We will convert your links to direct links that will act as autoforwarders to your original links.  </p>
    <br/>

<?php if($this->link_data->is_adsense): ?>    
<center>

</center>
<?php endif; ?>
<form method="post" action="">
<?php echo \Volnix\CSRF\CSRF::getHiddenInputString(); ?>

<?php if($this->isPassword): ?>
 <hr/>
  <div class="row">
    <div class="form-group">
        <label class="control-label col-sm-3" for="key">Enter Decrypt Key:</label>
        <div class="col-sm-6"> 
          <input type="password" name="password" class="form-control" id="key" placeholder="password here">
        </div>
    </div>
 </div>
<?php endif; ?>

<?php /*if(!$this->isLoggedIn): ?>
 <hr/>
 <div class="row captcha-box">
    <div class="col-sm-6 col-sm-offset-3 well"> 
        <div class="g-recaptcha" data-sitekey="<?php echo System\Config::google('key'); ?>"></div>
    </div>
 </div>
<?php endif; */ ?>

</div>

<div class="submit-captcha row">
    <div class="col-sm-3 col-sm-offset-4"> 
        <button type="submit" class="btn btn-primary btn-block">
            <i class="fa fa-lock" aria-hidden="true"></i>
            &nbsp;Unlock Links
        </button>
    </div>
</div>

</form>
<br/>
<div class="view-captcha">

<br/>
<p>Uptolink is the easiest and most common way to protected links. Just go to our home page of our site, input your links in the text area (box) and press the "Protect your links" button. This will generate a results page where several outputs will be listed, such as generated protected links, direct links and remove links. </p>
<br/>
</div>
<br/>
<div class="view-captcha">    
<?php if($this->link_data->is_adsense): ?>    
<center>
    
</center>
-->
<?php endif; ?>
</div>
<?php endif; ?>



<?php $this->xinclude('partials/footer'); ?>