<?php
require_once plugin_dir_path( __FILE__ ) .'header/header-main.php';

if ( isset( $_POST['submit'] ) )
{
    global $wpdb;
    
    if(!empty($_POST['afe_spin_api_setting']))
    {
        update_option('afe_spin_api_setting',$_POST['afe_spin_api_setting']);
    }
    else
    {
        update_option('afe_spin_api_setting','');
    }

}

$option_spin_api = get_option( 'afe_spin_api_setting' );

?>

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <h2>API Settings</h2>
            <br/>
            <form action="#" method="post">
                <div>
                    <label for="spin_api_setting" style="font-size: 17px;">Spinner Bros API Key</label>
                    <input type="text" name="afe_spin_api_setting" class="afe_class_spin_api_setting" id="afe_id_spin_api_setting" placeholder="enter spin bros api key" value="<?php if(!empty($option_spin_api)){ echo $option_spin_api; }?>" /> 
                </div>
                <div class="wrapper article_submit_keyword">
                    <div class="container">
                        <input type="submit" name="submit" class="button btnPush settingPush btnBlueGreen" value="Save" />
                        <div class="clear"></div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>    
    