<div class="container-fluid">
	<div class="row">
  		<div class="col-md-4">
    		<div class="box-heading">
      			<h3><i class="fa fa-user"></i>&nbsp;<?= $text_your_license ?></h3>
    		</div>
            
			<?php if (empty($data['facebooklogin_license']['License']['licensedOn'])): ?>
    			<div class="licenseAlerts"></div>
    			<div class="licenseDiv"></div>
                <table class="table notLicensedTable">
                	<tr>
                    	<td colspan="2">
                            <div class="form-group">
                                <label for="moduleLicense"><?= $text_please_enter_code ?></label>
                                <input type="text" class="licenseCodeBox form-control" placeholder="License Code e.g. XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX" name="facebooklogin_license[LicenseCode]" id="moduleLicense" value="<?php echo !empty($data['facebooklogin_license']['LicenseCode']) ? $data['facebooklogin_license']['LicenseCode'] : ''?>" />
                            </div>
                            <button type="button" class="btn btn-success btnActivateLicense"><i class="icon-ok"></i> <?= $text_activate_license ?></button>
                        	<div class="pull-right"><button type="button" class="btn btn-link small-link" onclick="window.open('http://isenselabs.com/users/purchases/')"><?= $text_dont_have_license ?> &nbsp;<i class="fa fa-external-link"></i></button></div>
                  		</td>
                	</tr>
              	</table>
				<?php 
                    $hostname = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : '' ;
                    $hostname = (strstr($hostname,'http://') === false) ? 'http://'.$hostname: $hostname;
                ?>
				<script type="text/javascript">
                var domain='<?php echo base64_encode($hostname); ?>';
                var domainraw='<?php echo $hostname; ?>';
                var timenow=<?php echo time(); ?>;
                var MID = '9151';
                </script>
                <script type="text/javascript" src="//isenselabs.com/external/validate/"></script>
                <script>
                    var module_id = '<?php echo !empty($module_id) ? $module_id : "" ?>';

                    if (module_id != '') {
                        $('.btnActivateLicense').click(function() {
                            location.href = location.href.replace('&module_id=' + module_id, '');
                        });
                    }
                </script>
    		<?php endif; ?>
    
			<?php if (!empty($moduleData['LicensedOn'])): ?>
    			<input name="cHRpbWl6YXRpb24ef4fe" type="hidden" value="<?php echo base64_encode(json_encode($data['facebooklogin_license']['License'])); ?>" />
    			<input name="OaXRyb1BhY2sgLSBDb21" type="hidden" value="<?php echo $data['facebooklogin_license']['License']['licensedOn']; ?>" />
    			<table class="table licensedTable">
                    <tr>
                    	<td>License Holder</td>
                    	<td><?php echo $data['facebooklogin_license']['License']['customerName']; ?></td>
                    </tr>
                	<tr>
                		<td><?= $text_registered_domains ?></td>
                		<td>
                    		<ul class="registeredDomains">
                    			<?php foreach ($data['facebooklogin_license']['License']['licenseDomainsUsed'] as $domain): ?>
                        			<li><i class="fa fa-check"></i>&nbsp;<?php echo $domain; ?></li>
                    			<?php endforeach; ?>
                    		</ul>
                		</td>
                	</tr>
                	<tr>
                		<td>License Expires on</td>
                		<td><?php echo date("F j, Y",strtotime($data['facebooklogin_license']['License']['licenseExpireDate'])); ?></td>
                	</tr>
                	<tr>
                    	<td colspan="2" style="text-align:center;background-color:#EAF7D9;"><?= $text_valid_license ?> ( <a href="http://isenselabs.com/users/purchases" target="_blank"><?= $text_manage ?></a> )</td>
                	</tr>
				</table>
    		<?php endif; ?>
  		</div>
  
		<div class="col-md-8">
    		<div class="box-heading">
      			<h3><i class="fa fa-users"></i>&nbsp;<?= $text_get_support ?></h3>
    		</div>
    		<div class="box-contents">
            	<div class="container-fluid">
                    <div class="row">
                        <div class="col-md-4">
                            <div class="thumbnail">
                                <img alt="Community support" style="width: 300px;" src="view/image/facebooklogin/community.png">
                                <div class="caption" style="text-align:center;padding-top:0px;">
                                    <h3><?= $text_community ?></h3>
                                    <p><?= $text_community_help ?></p>
                                    <p style="padding-top: 5px;"><a href="http://isenselabs.com/forum" target="_blank" class="btn btn-lg btn-default"><?= $text_browse_forums ?></a></p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="thumbnail">
                                <img data-src="holder.js/300x200" alt="Ticket support" style="width: 300px;" src="view/image/facebooklogin/tickets.png">
                                <div class="caption" style="text-align:center;padding-top:0px;">
                                    <h3><?= $text_tickets ?></h3>
                                    <p><?= $text_tickets_help ?></p>
                                    <p style="padding-top: 5px;"><a href="http://isenselabs.com/tickets/open/<?php echo base64_encode('Support Request').'/'.base64_encode('117').'/'. base64_encode($_SERVER['SERVER_NAME']); ?>" target="_blank" class="btn btn-lg btn-default"><?= $text_open_ticket ?></a></p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="thumbnail">
                                <img alt="Pre-sale support" style="width: 300px;" src="view/image/facebooklogin/pre-sale.png">
                                <div class="caption" style="text-align:center;padding-top:0px;">
                                    <h3><?= $text_presale ?></h3>
                                    <p><?= $text_presale_help ?></p>
                                    <p style="padding-top: 5px;"><a href="https://isenselabs.com/pages/premium-services
" target="_blank" class="btn btn-lg btn-default"><?= $text_bump_sales ?></a></p>
                                </div>
                            </div>
                        </div>
                    </div>
				</div>
            </div>
		</div>
	</div>
</div>