Example #1
0
<?php

$register = new mk_artbees_products();
$theme_name = ucfirst(THEME_NAME);
?>

<div class="wp-register-welcome">
	<div class="register-welcome">
		<h1>Welcome to <?php 
echo $theme_name;
?>
 WordPress Theme</h1>
		<p>
			Congratulations! Now that you have installed <?php 
echo $theme_name;
?>
, there are some steps you need to take to get the most out of <?php 
echo $theme_name;
?>
 WordPress Theme.
		</p>
		<div class="welcome-step step-1">
			<h3 class="step-title"><span>Step 1.</span> Register <?php 
echo $theme_name;
?>
</h3>
			<p>Click the button below to register <?php 
echo $theme_name;
?>
 so that you can take full advantage of the theme and our support service.</p>
			<a href="<?php 
<?php

$mk_artbees_products = new mk_artbees_products();
?>
<div class="wp-install-template">
<?php 
if ($mk_artbees_products->is_verified_artbees_customer()) {
    ?>
	<div class="install-template">
		<div class="template-uploader">
			<h1>Install Templates</h1>
			<div class="uploader-box uploader" id="drag-and-drop-zone">
				<div class="uploader-box-inside">
					<i class="ic-arrow-down"></i>
					<h2>Drag your template file here</h2>
					<input type="file" id="upload-btn" name="files[]" class="upload-btn" title="Browser Your Computer" />
					<?php 
    wp_nonce_field('abb_install_template_nonce', 'abb_install_template_security');
    ?>
				</div>
			</div>
		</div>
<div id="fileList">
<!-- Files will be placed here -->
</div>
		<div class="current-template">
			<h3>Current Templates</h3>
			<?php 
    $mk_artbees_products->install_template_warnings();
    ?>
			<div class="template-list" id="template-list">
<?php

$mk_artbees_products = new mk_artbees_products();
$theme_name = ucfirst(THEME_NAME);
$apikey = get_option('artbees_api_key', '');
$is_apikey = false;
$message = $error = "";
if ($apikey != "") {
    $is_apikey = true;
}
if (isset($_POST['apikey'])) {
    if ($_POST['apikey'] == "" && $apikey != "") {
        delete_option('artbees_api_key');
        $apikey = "";
        $is_apikey = false;
        $message = 'your api key is revoked.';
    } else {
        $result = $mk_artbees_products->verify_artbees_apikey($_POST['apikey']);
        if ($result['is_verified']) {
            update_option('artbees_api_key', $_POST['apikey'], 'yes');
            $apikey = $_POST['apikey'];
            $is_apikey = true;
            $message = 'Your API key  is verified.';
        } else {
            delete_option('artbees_api_key');
            $apikey = "";
            $is_apikey = false;
            $error = 'Your API key could not be verified. ' . (isset($result['message']) ? $result['message'] : 'An error occured') . '.';
        }
    }
} else {