<?php
if( is_null($themoney_website) && $themoney_registered != null ) { ?>
    <div id="setting-error-settings_updated" class="updated settings-error notice">
        <p><?php _e('<strong>Attention</strong>, vous devez renseigner un identifiant valide pour pouvoir afficher des emplacements sur votre site.','themoneytizer');?></p>
    </div>
<?php } ?>
<div>
    <div style="width:60%;float:left;">
        <h2><?php _e('Votre site est déjà inscrit sur notre plateforme ?','themoneytizer');?></h2>
        <p> <?php _e('Rentrez son id WordPress','themoneytizer');?></p>

        <form id="token_form" method="post" action="options.php">
			<?php @settings_fields('themoneytizer_settings_group_four'); ?>

            <input type="hidden" name="themoney_is_registered"  value="4">
            <input type="hidden" name="wplang" id="wplang" value="<?php echo get_option('WPLANG'); ?>">

            <table>
                <tr>
                    <td><label for="themoneytizer_setting_siteid"><?php _e('Moneytizer ID*:','themoneytizer');?></label></td>
                    <td><input type="text" class="width_money" name="themoneytizer_setting_siteid" id="themoneytizer_setting_siteid"  value="<?php echo get_option('themoneytizer_setting_siteid'); ?>"></td>

                    <td><input type="submit"  id="submit" name="submit" class="bouton_money" value="<?php _e('Enregistrer','themoneytizer');?>"></td>
                </tr>
            </table>
        </form>

        <div>
            <h5 style="font-size: 1em;"><?php _e('Où trouver mon identifiant ?','themoneytizer');?></h5>

            <p><?php _e('Votre identifiant est affiché sur la page dédiée à votre site de votre espace éditeur personnel. Pour y accéder, rendez-vous sur votre <a href="http://www.themoneytizer.com/manager/main" target="_blank">Moneybox</a>','themoneytizer');?></p>

            <p><?php _e('<i>Information</i> : votre identifiant est une suite de lettres et chiffres par exemple "<i>3b2b79d0667e6e43ee962fc3ff6349f6</i>".','themoneytizer');?></p>
        </div>
    </div>

    <div style="width:40%;float:right;">
		<?php _e('<iframe style="margin: 3%;" src="https://player.vimeo.com/video/171747567" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" frameborder="0" height="220" width="400"></iframe>','themoneytizer');?>
    </div>
</div>

<div style="width:100%;">
    <h2><?php _e('Vous êtes inscrit mais ce site n\'est pas enregistré ? Connectez vous.','themoneytizer'); ?></h2>
    <form id="connexion_form" method="post" action="options.php">
		<?php @settings_fields('themoneytizer_settings_group_six'); ?>

        <input type="hidden" name="themoney_is_registered"  value="3">
        <input type="hidden" name="wplang" id="wplang" value="<?php echo get_option('WPLANG'); ?>">

        <table>
            <tr>
                <td><label for="themoneytizer_setting_mail_connexion"><?php _e('Email :','themoneytizer');?></label></td>
                <td><input type="email" class="width_money" name="themoneytizer_setting_mail_connexion" id="themoneytizer_setting_mail_connexion"></td>
            </tr>

            <tr>
                <td><label for="themoneytizer_setting_password_connexion"><?php _e('Mot de passe :','themoneytizer');?></label></td>
                <td><input type="password" class="width_money" name="themoneytizer_setting_password_connexion" id="themoneytizer_setting_password_connexion"></td>
            </tr>

            <tr>
                <td><input type="submit"  id="submit_connexion" name="submit_connexion" class="bouton_money" value="<?php _e('Connexion','themoneytizer');?>"></td>
            </tr>
        </table>
    </form>

    <hr>

    <form  id="reg_form" method="post" action="options.php">
		<?php @settings_fields('themoneytizer_settings_group'); ?>
        <input type="hidden" name="themoney_is_registered"  value="2">
        <h2><?php _e('Vous n\'êtes pas encore inscrit chez The Moneytizer ?','themoneytizer');?></h2>
        <p><?php _e("The Moneytizer est une régie publicitaire spécialisée dans la monetisation des petits et moyens sites. Inscrivez-vous ici, c'est gratuit et sans engagement !",'themoneytizer');?></p>

        <br>

        <div id="bloc_type_structure">
            <div class="type_structure">
                <input name="type_structure_money" id="type_personne" type="radio" value="1" <?php echo get_option('type_structure_money') == 1 ? 'checked' : ''; ?> /><br>
                <label for="type_personne"><?php _e("Une personne",'themoneytizer');?></label>
            </div>

            <div class="type_structure">
                <input name="type_structure_money" id="type_auto_entrepreneur" type="radio" value="2" <?php echo get_option('type_structure_money') == 2 ? 'checked' : ''; ?> /><br>
                <label for="type_auto_entrepreneur"><?php _e("Auto-entrepreneur",'themoneytizer');?></label>
            </div>

            <div class="type_structure">
                <input name="type_structure_money" id="type_association" type="radio" value="3" <?php echo get_option('type_structure_money') == 3 ? 'checked' : ''; ?> /><br>
                <label for="type_association"><?php _e("Une association",'themoneytizer');?></label>
            </div>

            <div class="type_structure">
                <input name="type_structure_money" id="type_entreprise" type="radio" value="4" <?php echo get_option('type_structure_money') == 4 ? 'checked' : ''; ?> /><br>
                <label for="type_entreprise"><?php _e("Une entreprise",'themoneytizer');?></label>
            </div>
            <div style="clear: both;"></div>
        </div>
        <br>

        <table>
            <tr>
                <td><label for="nom_money"><?php _e('Nom*:','themoneytizer');?></label></td>
                <td><input type="text" name="nom_money" id="nom_money" class="width_money" value="<?php echo get_option('nom_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="prenom_money"><?php _e('Prénom*:','themoneytizer');?></label></td>
                <td><input type="text" name="prenom_money" id="prenom_money" class="width_money" value="<?php echo get_option('prenom_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="mail_money"><?php _e('Email*:','themoneytizer');?></label></td>
                <td><input type="email" name="mail_money" id="mail_money" class="width_money" value="<?php echo get_option('mail_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="tel_money"><?php _e('Téléphone*:','themoneytizer');?></label></td>
                <td><input type="text" name="tel_money" id="tel_money" class="width_money" value="<?php echo get_option('tel_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="currency_money"><?php _e('Devise*:','themoneytizer');?></label></td>
                <td>
                    <select id="currency_money" name="currency_money" class="width_money">
                        <option value="€">€</option>
                        <option value="$">$</option>
                    </select>
                </td>
            </tr>

            <tr>
                <td><label for="password_money"><?php _e('Mot de passe*:','themoneytizer');?></label></td>
                <td><input type="password" name="password_money" id="password_money" class="width_money" value="<?php echo get_option('password_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="c_password_money"><?php _e('Confirmation mot de passe*:','themoneytizer');?></label></td>
                <td><input type="password" name="c_password_money" id="c_password_money" class="width_money" value="<?php echo get_option('password_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="adresse_money"><?php _e('Adresse*:','themoneytizer');?></label></td>
                <td><input type="text" name="adresse_money" id="adresse_money" class="width_money" value="<?php echo get_option('adresse_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="ville_money"><?php _e('Ville*:','themoneytizer');?></label></td>
                <td><input type="text" name="ville_money" id="ville_money" class="width_money" value="<?php echo get_option('ville_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="cp_money"><?php _e('Code postal*:','themoneytizer');?></label></td>
                <td><input type="text" name="cp_money" id="cp_money" class="width_money" value="<?php echo get_option('cp_money'); ?>"></td>
            </tr>

            <tr>
                <td><label for="country_money"><?php _e('Pays*:','themoneytizer');?></label></td>
                <td>
                    <select id="country_money" name="country_money" class="width_money">
                        <option value=""></option>
						<?php include 'themoneytizer-country-list.php'; ?>
                    </select>
                </td>
            </tr>

            <tr>
                <td><label for="raison_ajout_money"><?php _e('Comment nous avez-vous connu ?*:','themoneytizer');?></label></td>
                <td>
                    <select id="raison_ajout_money" name="raison_ajout_money" class="width_money">
	                    <?php include 'themoneytizer_heared_about_list.php'; ?>
                    </select>
                </td>
            </tr>

            <tr id="bloc_raison_ajout_money" style="display: none">
                <td><td>
                    <input id="raison_ajout_autre_money" name="raison_ajout_autre_money" class="width_money"
                           placeholder="<?php _e('Veuillez préciser le motif:','themoneytizer');?>">
                </td>
            </tr>

            <tr>
                <td><label for="parrainage_money"><?php _e('Code parrain / url parrain','themoneytizer');?></label></td>
                <td><input type="text" name="parrainage_money" id="parrainage_money" class="width_money" value="<?php echo get_option('parrainage_money'); ?>"></td>
            </tr>
        </table>
        <input type="submit"  id="submit_reg" name="submit_reg" class="bouton_money" value="<?php _e('Suivant','themoneytizer');?>">
    </form>
</div>
