<?php

require_once "../../AccessControl.php";

$regip=$_SERVER['HTTP_HOST'];
if (!$regip) {
  if ($HTTP_SERVER_VARS["SERVER_NAME"] !="") {
      $regip=$HTTP_SERVER_VARS["SERVER_NAME"];
  } else {
      $regip=$_SERVER['SERVER_ADDR'];
  }
}

if(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on"){
	$protocol = "https";
} else {
	$protocol = "http";
}
$fullp="{$protocol}://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];

?>

						<div class="response">

							<div class="callout-danger-template callout callout-danger" style="display:none;">								
								<h4></h4>								
							</div>

							<div class="callout-success-template callout callout-success" style="display:none;">								
								<h4></h4>								
							</div>

						</div>


			<div id="the_grid" class="">                        
                <!-- Main row -->
                <div class="row">
                    <section class="col-sm-7">

                    	<div class="box box-solid box-primary license_info" style="display:none;">
                            <div class="box-header">                                                          
                                <h3 class="box-title"><i class="fa fa-unlock">&nbsp;</i> <span>Logaholic Pro Software Subscription</span></h3>                                        
                            </div>
                            <div class="box-body">
                                
                                <div class="subscribed" style="display:none;">
                                    <p>
                                        You are subscribed to : <span class="planname"><i class="fa fa-spinner fa-spin"> </i></span>
                                    </p>

                                    <div class="billing_info">
                                        <h5>Billing info:</h5>
                                        <div><label>Name:</label><span class="billing_name"></span></div>
                                        <div><label>Email:</label><span class="billing_email"></span></div>
                                        <div><label>Address:</label><span class="billing_address"></span></div>
                                        <div><label>Payment:</label><span class="billing_cc"></span></div>
                                        <div><label>Subscription started:</label><span class="billing_started"></span></div>
                                        <div><label>End of current period:</label><span class="billing_current_period_end"></span></div>
                                        <div><label>Usage:</label><span class="billing_pageviews"></span></div>
                                    </div>
                                    <div style="text-align:center;" class="cancel-but">                                                
                                        <a href="#" onclick="ui.LicenseUpgrade()" class="btn btn-sm btn-success">Upgrade</a>
                                        <a href="#" onclick="ui.CancelPro()" class="btn btn-sm btn-danger">Cancel</a>
                                    </div>
                                </div>

                                <div style="text-align:center;" class="upgrade-but">
                                	<h4>Unlock all Logaholic features and reports in this installation</h4>
                                    <a href="#" onclick="ui.LicenseUpgrade()" class="btn btn-lg btn-success">Upgrade to Logaholic Pro</a>                                            
                                    <br><br>
                                    Start with a free 14 day trial.
                                </div>

                            </div>
                            <div class="box-footer"> </div>
                        </div>

						
                    	<div class="box box-solid box-gray getlicense" rel="_GET_LICENSE">
                            <div class="box-header">
                                <h3 class="box-title"><?php echo _GET_LOGAHOLIC_LICENSE; ?></h3>
                                
                            </div><!-- /.box-header -->

                            <div class="box-body">

								<form id="getlicenseform">

								<!-- <div class="form-group">
									<label><?php echo _FIRST_NAME;?></label>
									<input type="text" name="licname" class="form-control">
								</div> -->

								<div class="form-group">
									<label><?php echo _EMAIL_ADDRESS;?></label>
									<input type="text" name="e" class="form-control">
								</div>

								<div class="form-group">
									<label><?php echo _PASSWORD;?></label>
									<input type="password" name="pwrd" class="form-control">
								</div>								

								<input type=hidden name="regip" value="<?php echo $regip; ?>">
								<input type=hidden name="fullp" value="<?php echo $fullp; ?>">
								<input type=hidden name="version" value="<?php echo LOGAHOLIC_VERSION_NUMBER .",". LOGAHOLIC_BASE_EDITION; ?>">
																
								<button class="btn btn-success getlicensebutton"><?php echo _GET_LICENSE;?></button> &nbsp; 
								<a class="btn btn-default" target="_blank" href="<?php echo $protocol; ?>://www.logaholic.com/order/password_forgotten.php"><?php echo _FORGOT_PASSWORD; ?>?</a>

								</form>
								<br><br>
								Use this form if you have purchased a license for earlier versions of Logaholic, or if your have a Logaholic Enterprise Edition.								

 								<div style="clear:both">
                                    &nbsp;<br />&nbsp;
                                </div>

                            </div><!-- /.box-body -->
                        </div><!-- /.box -->   	
                 	</section>

					<!-- right side box -->
                    <section class="col-sm-5">                    	
						
						<div class="box box-solid box-warning licenseinfo" rel="_GET_LICENSE">
                            <div class="box-header">
                                <h3 class="box-title"><?php echo _CURRENT_LICENSE; ?></h3>
                                    
                            </div><!-- /.box-header -->

                            <div class="box-body">
                            
								<?php echo $lo->PrintInfo(); ?>						
								

 								<div style="clear:both">
                                    &nbsp;<br />&nbsp;
                                </div>

                            </div><!-- /.box-body -->
                        </div><!-- /.box -->

                    </section>
                </div>
