<div class="wrap theme-welcome-box">
	<div class="theme-welcome-inner">
	

	<div class="ttm-main-row ttm-dashboard">
			<div class="row ttm-dashicons">
			<h2 class="tm-headingttext">Welcome to Anomica</h2>
				<div class="col-12 col-sm-4">
					<div class="ttm-dashicon-item">
						<i class="dashicons-before dashicons-book"></i>
						<div class="content">
							<div class="title"><?php echo esc_html__('Documentation', 'tmte') ?></div>
							<div class="sub-t"><?php echo esc_html__('Click to view', 'tmte') ?></div>
						</div>
						<a href="https://anomica.themetechmount.net/documentation/" target="_blank"></a>
					</div>
				</div>
				<div class="col-12 col-sm-4">
					<div class="ttm-dashicon-item">
						<i class="dashicons-before dashicons-admin-users"></i>
						<div class="content">
							<div class="title"><?php echo esc_html__('Technical Support', 'tmte') ?></div>
							<div class="sub-t"><?php echo esc_html__('Click to contact', 'tmte') ?></div>
						</div>
						<a href="https://support.themetechmount.com/" target="_blank"></a>
					</div>
				</div>
			</div>
		</div>
		
<div class="container-fluid ttm_activation_form">
	<?php
	$notices       = get_option( 'anomica_purchasecode_notices' );
	delete_option( 'anomica_purchasecode_notices' );
	$anomicatheme_purchase_code = get_option( 'anomicatheme_purchase_code' );
	
			if (get_option( 'anomicapurchase-verify' ) == 'no' ) { ?>
			<div class="tm-admin-activate-column">
				<h3><?php esc_html_e( 'Anomica is not registered! Your product must be registered  & verify to receive Anomica Options.', 'anomica' ); ?></h3>
				<br>
				<div class="row ttm-activation-form">
					<div class="col-md-12">		
						<div class="wrap"> 
						  <form action="" method="post" id="verify_envato_purchase">
							<?php wp_nonce_field( 'purchase_code_activation', 'purchase_code_nonce' ); ?>
							<div class="row">
							  <div class="col-md-8 col-md-offset-2">
									  
								  <input class="form-control" id="input-purchase-code" type="text" name="purchase_code" value="" placeholder="Purchase code ( e.g. f5a5ufbw-f6ce-4129-9f46-737e1ac7h5a3 )">
								  
								<p><input type="submit" value="Verify Purchase" class="btn btn-success button button-primary button-large"></p>
							  </div>
							  <div class="ttm-message">You can register one license per one website.</div>
							</div>
						  </form>
						</div>
					</div>
				<div class="col-md-12">	
					<h5>Follow the steps to find the Purchase Code</h5>
					<ol>
						<li>Log into your Envato Market account.</li>
						<li>Hover the mouse on your username at the top of the screen.</li>
						<li>Click Downloads from the dropdown menu.</li>
						<li>Click License certificate &amp; purchase code (available as PDF or text file). For more information <a href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code" target="_blank">click here</a></li>
					</ol>	
				</div>
				
				</div>
			</div>
			
<?php } else {
$purchase_code_val = (!empty($anomicatheme_purchase_code)) ? $anomicatheme_purchase_code : '';
?>
	
	<div class="theme-activate-column">
		<h3 class="purchase-activated"><?php esc_html_e( 'Anomica theme is registered.', 'anomica' ); ?></h3>
		
		<form action="" method="post" id="deactivate_purchase-key">
			<div class="row">
			  <div class="col-md-8 col-md-offset-2">							  
				  <input class="form-control" id="input-purchase-code" type="text" name="purchase_code_deactive" readonly value="<?php echo esc_attr($purchase_code_val);?>">
				<p><input type="submit" value="Deactive" class="btn btn-success button button-primary button-large"></p>
			  </div>
			  <div class="ttm-message">You can register one license per one website.</div>
			</div>
		</form>
	</div>
	<?php } ?> 
			
			
<?php
if( !empty($notices) ){
    
	$notice = $notices['notice'];
	$notice_type = $notices['notice_type'];
	
	$alert_class = 'bg-light text-dark';
	
	if( $notice_type == 'warning' ){
		$alert_class = 'tm-bgwarning tm-textcolor-dark';
	}elseif( $notice_type == 'error' ){
		$alert_class = 'tm-bgdanger tm-textcolor-white';
	}elseif( $notice_type == 'success' ){
		$alert_class = 'tm-bgsuccess tm-textcolor-white';
	}
	?>
	<div id="show-result" class="<?php echo esc_attr($alert_class);?>">
		<h5 class="notice-heading"><?php echo esc_html($notice);?></h5>
	</div>
	<?php
}
?>						
		</div>
	</div>
</div>



