function NextendFB_Options_Page()
        {
            $domain = get_option('siteurl');
            $domain = str_replace(array('http://', 'https://'), array('', ''), $domain);
            $domain = str_replace('www.', '', $domain);
            $a = explode("/", $domain);
            $domain = $a[0];
            ?>

	<div class="wrap">
	<div id="newfb-options">
	<div id="newfb-title"><h2>Nextend Facebook Connect Settings</h2></div>
	<?php 
            global $newfb_status;
            if ($newfb_status == 'update_success') {
                $message = __('Configuration updated', 'nextend-facebook-connect') . "<br />";
            } else {
                if ($newfb_status == 'update_failed') {
                    $message = __('Error while saving options', 'nextend-facebook-connect') . "<br />";
                } else {
                    $message = '';
                }
            }
            if ($message != "") {
                ?>
		<div class="updated"><strong><p><?php 
                echo $message;
                ?>
</p></strong></div><?php 
            }
            ?>
  
  <?php 
            if (!function_exists('curl_init')) {
                ?>
    <div class="error"><strong><p>Facebook needs the CURL PHP extension. Contact your server adminsitrator!</p></strong></div>
  <?php 
            } else {
                $version = curl_version();
                $ssl_supported = $version['features'] & CURL_VERSION_SSL;
                if (!$ssl_supported) {
                    ?>
      <div class="error"><strong><p>Protocol https not supported or disabled in libcurl. Contact your server adminsitrator!</p></strong></div>
    <?php 
                }
            }
            if (!function_exists('json_decode')) {
                ?>
      <div class="error"><strong><p>Facebook needs the JSON PHP extension. Contact your server adminsitrator!</p></strong></div>
    <?php 
            }
            ?>
  
	<div id="newfb-desc">
	<p><?php 
            _e('This plugins helps you create Facebook login and register buttons. The login and register process only takes one click and you can fully customize the buttons with images and other assets.', 'nextend-facebook-connect');
            ?>
</p>
	<h3><?php 
            _e('Setup', 'nextend-facebook-connect');
            ?>
</h3>
  <p>
  <?php 
            _e('<ol><li><a href="https://developers.facebook.com/apps/" target="_blank">Create a facebook app!</a></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Don\'t choose from the listed options, but click on <b>advanced setup</b> in the bottom.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Choose an <b>app name</b>, and a <b>category</b>, then click on <b>Create App ID</b>.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Pass the security check.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Go to the <b>Settings</b> of the application.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Click on <b>+ Add Platform</b>, and choose <b>Website</b>.</li>', 'nextend-facebook-connect');
            ?>
      
  <?php 
            _e('<li>Give your website\'s address at the <b>Site URL</b> field with: <b>' . get_option('siteurl') . '</b></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Give a <b>Contact Email</b> and click on <b>Save Changes</b>.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Go to <b>Status & Review</b>, and change the availability for the general public to <b>YES</b>.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Go back to the <b>Settings</b>, and copy the <b>App ID</b>, and <b>APP Secret</b>, which you have to copy and paste below.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li><b>Save changes!</b></li></ol>', 'nextend-facebook-connect');
            ?>
  
  
  </p>
  <h3><?php 
            _e('Usage', 'nextend-facebook-connect');
            ?>
</h3>
  <h4><?php 
            _e('Simple link', 'nextend-facebook-connect');
            ?>
</h4>
	<p><?php 
            _e('&lt;a href="' . new_fb_login_url() . '&redirect=' . get_option('siteurl') . '" onclick="window.location = \'' . new_fb_login_url() . '&redirect=\'+window.location.href; return false;"&gt;Click here to login or register with Facebook&lt;/a&gt;', 'nextend-facebook-connect');
            ?>
</p>
	
  <h4><?php 
            _e('Image button', 'nextend-facebook-connect');
            ?>
</h4>
	<p><?php 
            _e('&lt;a href="' . new_fb_login_url() . '&redirect=' . get_option('siteurl') . '" onclick="window.location = \'' . new_fb_login_url() . '&redirect=\'+window.location.href; return false;"&gt; &lt;img src="HereComeTheImage" /&gt; &lt;/a&gt;', 'nextend-facebook-connect');
            ?>
</p>
  
  <h3><?php 
            _e('Note', 'nextend-facebook-connect');
            ?>
</h3>
  <p><?php 
            _e('If the Facebook user\'s email address already used by another member of your site, the facebook profile will be automatically linked to the existing profile!', 'nextend-facebook-connect');
            ?>
</p>
  
  </div>

	<!--right-->
	<div class="postbox-container" style="float:right;width:30%;">
	<div class="metabox-holder">
	<div class="meta-box-sortables">

	<!--about-->
	<div id="newfb-about" class="postbox">
	<h3 class="hndle"><?php 
            _e('About this plugin', 'nextend-facebook-connect');
            ?>
</h3>
	<div class="inside"><ul>
  
  <li><a href="http://www.nextendweb.com/social-connect-plugins-for-wordpress.html" target="_blank"><?php 
            _e('Check the related <b>blog post</b>!', 'nextend-facebook-connect');
            ?>
</a></li>
	<li><br></li>
	<li><a href="http://wordpress.org/extend/plugins/nextend-facebook-connect/" target="_blank"><?php 
            _e('Nextend Facebook Connect', 'nextend-facebook-connect');
            ?>
</a></li>
	<li><br></li>
  <li><a href="http://profiles.wordpress.org/nextendweb" target="_blank"><?php 
            _e('Nextend  plugins at WordPress.org', 'nextend-facebook-connect');
            ?>
</a></li>
	</ul></div>
	</div>
	<!--about end-->

	<!--others-->
	<!--others end-->

	</div></div></div>
	<!--right end-->

	<!--left-->
	<div class="postbox-container" style="float:left;width: 69%;">
	<div class="metabox-holder">
	<div class="meta-box-sortabless">

	<!--setting-->
	<div id="newfb-setting" class="postbox">
	<h3 class="hndle"><?php 
            _e('Settings', 'nextend-facebook-connect');
            ?>
</h3>
	<?php 
            $nextend_fb_connect = maybe_unserialize(get_option('nextend_fb_connect'));
            ?>

	<form method="post" action="<?php 
            echo get_bloginfo("wpurl");
            ?>
/wp-admin/options-general.php?page=nextend-facebook-connect">
	<input type="hidden" name="newfb_update_options" value="Y">

	<table class="form-table">
		<tr>
		<th scope="row"><?php 
            _e('Facebook App ID:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
		<input type="text" name="fb_appid" value="<?php 
            echo esc_html($nextend_fb_connect['fb_appid']);
            ?>
" />
		</td>
		</tr>  
      
		<tr>
		<th scope="row"><?php 
            _e('Facebook App Secret:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
		<input type="text" name="fb_secret" value="<?php 
            echo esc_html($nextend_fb_connect['fb_secret']);
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('New user prefix:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
    <?php 
            if (!isset($nextend_fb_connect['fb_user_prefix'])) {
                $nextend_fb_connect['fb_user_prefix'] = 'Facebook - ';
            }
            ?>
		<input type="text" name="fb_user_prefix" value="<?php 
            echo esc_html($nextend_fb_connect['fb_user_prefix']);
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('Fixed redirect url for login:'******'nextend-facebook-connect');
            ?>
</th>
		<td>
    <?php 
            if (!isset($nextend_fb_connect['fb_redirect'])) {
                $nextend_fb_connect['fb_redirect'] = 'auto';
            }
            ?>
		<input type="text" name="fb_redirect" value="<?php 
            echo esc_html($nextend_fb_connect['fb_redirect']);
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('Fixed redirect url for register:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
    <?php 
            if (!isset($nextend_fb_connect['fb_redirect_reg'])) {
                $nextend_fb_connect['fb_redirect_reg'] = 'auto';
            }
            ?>
		<input type="text" name="fb_redirect_reg" value="<?php 
            echo esc_html($nextend_fb_connect['fb_redirect_reg']);
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('Load button stylesheet:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_load_style'])) {
                $nextend_fb_connect['fb_load_style'] = 1;
            }
            ?>
		<input name="fb_load_style" id="fb_load_style_yes" value="1" type="radio" <?php 
            if (isset($nextend_fb_connect['fb_load_style']) && $nextend_fb_connect['fb_load_style']) {
                ?>
 checked <?php 
            }
            ?>
> Yes  &nbsp;&nbsp;&nbsp;&nbsp;
    <input name="fb_load_style" id="fb_load_style_no" value="0" type="radio" <?php 
            if (isset($nextend_fb_connect['fb_load_style']) && $nextend_fb_connect['fb_load_style'] == 0) {
                ?>
 checked <?php 
            }
            ?>
> No		
		</td>
		</tr>
    
    <tr>
		<th scope="row"><?php 
            _e('Login button:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_login_button'])) {
                $nextend_fb_connect['fb_login_button'] = '<div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">CONNECT WITH</div></div></div>';
            }
            ?>
		  <textarea cols="83" rows="3" name="fb_login_button"><?php 
            echo esc_html($nextend_fb_connect['fb_login_button']);
            ?>
</textarea>
		</td>
		</tr>
    
    <tr>
		<th scope="row"><?php 
            _e('Link account button:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_link_button'])) {
                $nextend_fb_connect['fb_link_button'] = '<div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">LINK ACCOUNT TO</div></div></div>';
            }
            ?>
		  <textarea cols="83" rows="3" name="fb_link_button"><?php 
            echo esc_html($nextend_fb_connect['fb_link_button']);
            ?>
</textarea>
		</td>
		</tr>
    
    <tr>
		<th scope="row"><?php 
            _e('Unlink account button:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_unlink_button'])) {
                $nextend_fb_connect['fb_unlink_button'] = '<div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">UNLINK ACCOUNT</div></div></div>';
            }
            ?>
		  <textarea cols="83" rows="3" name="fb_unlink_button"><?php 
            echo esc_html($nextend_fb_connect['fb_unlink_button']);
            ?>
</textarea>
		</td>
		</tr>
    <tr>
		<th scope="row"></th>
		<td>
    <a href="http://www.nextendweb.com/social-connect-button-generator" target="_blank"><img style="margin-left: -4px;" src="<?php 
            echo plugins_url('generatorbanner.png', __FILE__);
            ?>
" /></a>
    </td>
		</tr>
	</table>

	<p class="submit">
	<input style="margin-left: 10%;" type="submit" name="Submit" value="<?php 
            _e('Save Changes', 'nextend-facebook-connect');
            ?>
" />
	</p>
	</form>
	</div>
	<!--setting end-->

	<!--others-->
	<!--others end-->

	</div></div></div>
	<!--left end-->

	</div>
	</div>
	<?php 
        }
Example #2
0
echo esc_url(wc_lostpassword_url());
?>
"><?php 
_e('Lost your password?', 'yit');
?>
</a>
			</p>

            <?php 
if (defined('NEW_FB_LOGIN') && NEW_FB_LOGIN == 1 && function_exists('new_fb_sign_button')) {
    ?>
                <div class="fb-connect login-page">

                    <div class="btn-fb-login">
                        <a class="btn-flat" href="<?php 
    echo new_fb_login_url();
    ?>
&redirect=<?php 
    echo site_url();
    ?>
/" onclick="window.location = '<?php 
    echo home_url();
    ?>
/wp-login.php?loginFacebook=1&redirect=<?php 
    echo site_url();
    ?>
/'; return false;"><?php 
    echo do_shortcode('[icon icon_size="16" color="inherit" icon_type="theme-icon" icon_theme="facebook"]');
    ?>
Login  with  Facebook</a>
                    </div>
function new_fb_redirect()
{
    $redirect = get_site_transient(nextend_uniqid() . '_fb_r');
    if (!$redirect || $redirect == '' || $redirect == new_fb_login_url()) {
        if (isset($_GET['redirect'])) {
            $redirect = $_GET['redirect'];
        } else {
            $redirect = site_url();
        }
    }
    $redirect = wp_sanitize_redirect($redirect);
    $redirect = wp_validate_redirect($redirect, site_url());
    header('LOCATION: ' . $redirect);
    delete_site_transient(nextend_uniqid() . '_fb_r');
    exit;
}
Example #4
0
            <div style="left:-999em; position:absolute;"><label for="trap">Anti-spam</label><input type="text" name="email_2" id="trap" tabindex="-1" /></div>
            <?php do_action( 'woocommerce_register_form' ); ?>
            <?php do_action( 'register_form' ); ?>

            <p class="form-row">
                <?php wp_nonce_field( 'woocommerce-register', 'register') ?>
                <input type="submit" class="button" name="register" value="<?php _e( 'Register', 'yit' ); ?>" />
            </p>

            <?php do_action( 'woocommerce_register_form_end' ); ?>

        </form>

    </div>

</div>
<?php if( defined('NEW_FB_LOGIN') && NEW_FB_LOGIN == 1 && function_exists('new_fb_sign_button') ): ?>
    <div class="fb-connect">
        <h3> <?php _e('or login with facebook', 'yit') ?></h3>
        <div class="btn-fb-login">
            <a href="<?php echo new_fb_login_url() ?>&redirect=<?php echo site_url() ?>/" onclick="window.location = '<?php bloginfo('url') ?>/wp-login.php?loginFacebook=1&redirect=<?php echo site_url() ?>/'; return false;">Connect  with  Facebook</a>
        </div>
    </div>
<?php endif; ?>

<?php endif; ?>

<?php do_action('woocommerce_after_customer_login_form'); ?>


function new_fb_link_button()
{
    global $new_fb_settings;
    return '<a href="' . new_fb_login_url() . '&redirect=' . site_url() . $GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'] . '">' . $new_fb_settings['fb_link_button'] . '</a><br />';
}
function new_fb_unlink_button()
{
    global $new_fb_settings;
    return '<a href="' . new_fb_login_url() . '&action=unlink&redirect=' . new_fb_curPageURL() . '">' . $new_fb_settings['fb_unlink_button'] . '</a><br />';
}
Example #7
0
</p>

<?php 
do_action('woocommerce_before_my_account');
?>

<?php 
woocommerce_get_template('myaccount/my-downloads.php');
?>

<?php 
woocommerce_get_template('myaccount/my-orders.php', array('order_count' => $order_count));
?>

<?php 
woocommerce_get_template('myaccount/my-address.php');
?>

<?php 
if (defined('NEW_FB_LOGIN') && NEW_FB_LOGIN == 1 && function_exists('new_fb_is_user_connected') && new_fb_is_user_connected() && function_exists('new_fb_unlink_button')) {
    ?>
    <div class="facebook-unlink"> <?php 
    echo '<a href="' . new_fb_login_url() . '&action=unlink&redirect=' . new_fb_curPageURL() . '">' . __('Unlink Account', 'yit') . '</a>';
    ?>
</div>
<?php 
}
?>

<?php 
do_action('woocommerce_after_my_account');
Example #8
0
<?php if( rcp_is_active() ) :
	echo "<legend>Mes packs VOD</legend>";
		if (can_access($post_id = 7293)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-premium/' class='not-btn more-link' > Pack premium </a ><br />";
		elseif (can_access($post_id = 7292)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-poids-de-corps/' class='not-btn more-link' > Pack poids du corps </a ><br />";
		elseif (can_access($post_id = 6762)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-haut-du-corps/' class='not-btn more-link' > Pack haut du corps </a ><br />";
		elseif (can_access($post_id = 6760)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-bas-du-corps/' class='not-btn more-link' > Pack bas du corps </a ><br />";
		elseif (can_access($post_id = 5701)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-abdos-et-gainage/' class='not-btn more-link' > Pack abdos et gainage </a ><br />";
		elseif (can_access($post_id = 7225)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-special-bras/' class='not-btn more-link' > Pack spécial bras </a ><br />";
		elseif (can_access($post_id = 7294)) :
			echo "<a href = 'http://www.davidcosta.fr/categorie/vod/pack-strong-is-the-new-sexy/' class='not-btn more-link' > Pack strong is the new sexy </a ><br />";
		else :
		endif;
	endif;
;?>



<?php wc_get_template( 'myaccount/my-address.php' ); ?>


<?php if( defined('NEW_FB_LOGIN') && NEW_FB_LOGIN == 1 && function_exists('new_fb_is_user_connected') && new_fb_is_user_connected() && function_exists('new_fb_unlink_button')): ?>
    <div class="facebook-unlink"> <?php echo '<a href="' . new_fb_login_url() . '&action=unlink&redirect=' . new_fb_curPageURL() . '">'.__('Unlink Account', 'yit').'</a>'; ?></div>
<?php endif; ?>

<?php do_action( 'woocommerce_after_my_account' ); ?>
        function widget($args, $instance)
        {
            extract($args);
            $show_logged_out = isset($instance['show_logged_out']) ? $instance['show_logged_out'] : 'yes';
            $show_logged_out_submenu = isset($instance['show_logged_out_submenu']) ? $instance['show_logged_out_submenu'] : 'yes';
            $title_logged_out = isset($instance['title_logged_out']) ? $instance['title_logged_out'] : '';
            $show_logged_in = isset($instance['show_logged_in']) ? $instance['show_logged_in'] : 'yes';
            $nav_menu = isset($instance['nav_menu']) ? wp_get_nav_menu_object($instance['nav_menu']) : '';
            $logged_in = false;
            if (is_user_logged_in() && $show_logged_in == 'yes') {
                $logged_in = true;
                global $current_user;
                get_currentuserinfo();
                $user_name = yit_get_welcome_user_name($current_user);
                ?>
                <!-- START LOGGED IN NAVIGATION -->
                <div id="welcome-menu" class="nav dropdown">
                    <ul>
                    <li class="menu-item dropdown"><a href="#"><span class="welcome_username"><?php 
                echo apply_filters('yit_welcome_login_label', __('Welcome, ', 'yit')) . apply_filters('yit_welcome_username', $user_name);
                ?>
</span> </a>
                    <?php 
                include_once YIT_THEME_ASSETS_PATH . '/lib/Walker_Nav_Menu_Div.php';
                $nav_args = array('menu' => $nav_menu, 'container' => 'div', 'container_class' => 'submenu', 'menu_class' => 'sub-menu clearfix', 'depth' => 1, 'walker' => new YIT_Walker_Nav_Menu_Div());
                wp_nav_menu($nav_args);
                ?>
</li>
                        </ul>

                </div>
                <!-- END LOGGED IN  NAVIGATION -->

            <?php 
            } elseif ($show_logged_out == 'yes') {
                $enabled_registration = get_option('woocommerce_enable_myaccount_registration');
                $enabled_registration_class = $enabled_registration === 'yes' ? 'with_registration' : '';
                $profile_link = is_shop_installed() ? get_permalink(wc_get_page_id('myaccount')) : wp_login_url();
                if (function_exists('icl_translate')) {
                    $title_logged_out = icl_translate('Widgets', 'widget_woocommerce_login_title_logged_out' . sanitize_title($title_logged_out), $title_logged_out);
                }
                ?>
                <div id="welcome-menu-login" class="nav">
                    <ul id="menu-welcome-login">
                        <li class="menu-item login-menu">
                            <a href="<?php 
                echo esc_url($profile_link);
                ?>
"><?php 
                echo $title_logged_out;
                ?>
<span class="sf-sub-indicator"> +</span></a>

                            <?php 
                if ($show_logged_out_submenu == 'yes') {
                    ?>

                            <div class="submenu clearfix" style="display: none;">
                                <div class="clearfix login-box <?php 
                    echo $enabled_registration_class;
                    ?>
">
                                    <div id="customer_login">
                                    <div class="customer-login-box customer-login-box1">
                                        <h4><?php 
                    _e('Login', 'yit');
                    ?>
</h4>
                                            <form method="post" class="login">
                                                <?php 
                    do_action('woocommerce_login_form_start');
                    ?>
                                                <div class="form-group">
                                                    <label for="username"><?php 
                    _e('Username or email address', 'yit');
                    ?>
 <span class="required">*</span></label>
                                                    <input type="text" class="form-control" name="username" id="username" value="<?php 
                    if (!empty($_POST['username'])) {
                        echo esc_attr($_POST['username']);
                    }
                    ?>
"/>
                                                </div>
                                                <div class="form-group">
                                                    <label for="password"><?php 
                    _e('Password', 'yit');
                    ?>
 <span class="required">*</span></label>
                                                    <input class="form-control" type="password" name="password" id="password" />
                                                </div>
                                                <?php 
                    do_action('woocommerce_login_form');
                    ?>
                                                <div class="form-group">
                                                    <?php 
                    wp_nonce_field('woocommerce-login');
                    ?>
                                                    <input type="submit" class="button button-login" name="login" value="<?php 
                    _e('Login', 'yit');
                    ?>
" />
                                                    <p class="lost_password">
                                                        <a href="<?php 
                    echo esc_url(wp_lostpassword_url());
                    ?>
"><?php 
                    _e('Lost password?', 'yit');
                    ?>
</a>
                                                    </p>
                                                   <!-- <label for="rememberme" class="inline">
                                                        <input name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php 
                    _e('Remember me', 'yit');
                    ?>
                                                    </label> -->
                                                </div>
                                                <div class="form-group">
                                                    <?php 
                    if (defined('NEW_FB_LOGIN') && NEW_FB_LOGIN == 1 && function_exists('new_fb_sign_button')) {
                        ?>
                                                        <div class="fb-connect">

                                                            <div class="btn-fb-login">
                                                                <a href="<?php 
                        echo new_fb_login_url();
                        ?>
&redirect=<?php 
                        echo site_url();
                        ?>
/" onclick="window.location = '<?php 
                        echo home_url();
                        ?>
/wp-login.php?loginFacebook=1&redirect=<?php 
                        echo site_url();
                        ?>
/'; return false;"><?php 
                        echo do_shortcode('[icon icon_size="16" color="inherit" icon_type="theme-icon" icon_theme="facebook"]');
                        ?>
Login  with  Facebook</a>
                                                            </div>
                                                        </div>
                                                    <?php 
                    }
                    ?>
                                                </div>

												<?php 
                    do_action('woocommerce_login_form_end');
                    ?>

                                            </form>
                                    </div>
                                        <?php 
                    if ($enabled_registration === 'yes') {
                        ?>


                                        <div class="customer-login-box customer-login-box2">

                                            <?php 
                        if (function_exists('wc_print_notices') && (!is_woocommerce() && !is_account_page() && !is_lost_password_page())) {
                            ?>
                                                <?php 
                            wc_print_notices();
                            ?>
                                            <?php 
                        }
                        ?>

                                            <h4><?php 
                        _e('First time here? Create your account', 'yit');
                        ?>
</h4>

                                            <form method="post" class="register" id="login-form">
                                                <?php 
                        do_action('woocommerce_register_form_start');
                        ?>
                                                <?php 
                        if (get_option('woocommerce_registration_generate_username') === 'no') {
                            ?>
                                                    <div class="form-group">
                                                        <label for="reg_username"><?php 
                            _e('Username', 'yit');
                            ?>
 <span class="required">*</span></label>
                                                        <input type="text" class="form-control" name="username" id="reg_username" value="<?php 
                            if (!empty($_POST['username'])) {
                                esc_attr($_POST['username']);
                            }
                            ?>
" />
                                                    </div>
                                                <?php 
                        }
                        ?>

                                                <div class="form-group">
                                                    <label for="reg_email"><?php 
                        _e('Email address', 'yit');
                        ?>
 <span class="required">*</span></label>
                                                    <input type="email" class="form-control" name="email" id="reg_email" value="<?php 
                        if (!empty($_POST['email'])) {
                            esc_attr($_POST['email']);
                        }
                        ?>
" />
                                                </div>

                                                <div class="form-group">
                                                    <?php 
                        if ('no' === get_option('woocommerce_registration_generate_password')) {
                            ?>

                                                        <p class="form-row form-row-wide">
                                                            <label for="reg_password"><?php 
                            _e('Password', 'yit');
                            ?>
 <span class="required">*</span></label>
                                                            <input type="password" class="form-control" name="password" id="reg_password"  />
                                                        </p>

                                                    <?php 
                        }
                        ?>


                                                </div>


                                                <!-- Spam Trap -->
                                                <div style="<?php 
                        echo is_rtl() ? 'right:-999em' : 'left:-999em';
                        ?>
; position:absolute;"><label for="trap"><?php 
                        _e('Anti-spam', 'yit');
                        ?>
</label><input type="text" name="email_2" id="trap" tabindex="-1" /></div>

                                                <?php 
                        class_exists('YITH_Vendors_Frontend_Premium') && remove_action('woocommerce_register_form', array(YITH_Vendors()->frontend, 'register_form'));
                        ?>
                                                <?php 
                        do_action('woocommerce_register_form');
                        ?>
                                                <?php 
                        do_action('register_form');
                        ?>
                                                <?php 
                        class_exists('YITH_Vendors_Frontend_Premium') && add_action('woocommerce_register_form', array(YITH_Vendors()->frontend, 'register_form'));
                        ?>

                                                <div class="form-group">
                                                    <?php 
                        wp_nonce_field('woocommerce-register');
                        ?>
                                                    <input type="submit" class="button button-register" name="register" value="<?php 
                        _e('Register &#xffeb;', 'yit');
                        ?>
" />
                                                </div>

                                                <?php 
                        do_action('woocommerce_register_form_end');
                        ?>

                                            </form>

                                        </div>

                                    </div>
                                <?php 
                    }
                    ?>
                                </div>

                            </div>

                            <?php 
                }
                ?>

                        </li>
                    </ul>
                </div>
            <?php 
            }
        }
        function NextendFB_Options_Page()
        {
            $domain = get_option('siteurl');
            $domain = str_replace(array('http://', 'https://'), array('', ''), $domain);
            $domain = str_replace('www.', '', $domain);
            $a = explode("/", $domain);
            $domain = $a[0];
            ?>

	<div class="wrap">
	<div id="newfb-options">
	<div id="newfb-title"><h2>Nextend Facebook Connect Settings</h2></div>
	<?php 
            global $newfb_status;
            if ($newfb_status == 'update_success') {
                $message = __('Configuration updated', 'nextend-facebook-connect') . "<br />";
            } else {
                if ($newfb_status == 'update_failed') {
                    $message = __('Error while saving options', 'nextend-facebook-connect') . "<br />";
                } else {
                    $message = '';
                }
            }
            if ($message != "") {
                ?>
		<div class="updated"><strong><p><?php 
                echo $message;
                ?>
</p></strong></div><?php 
            }
            ?>
	<div id="newfb-desc">
	<p><?php 
            _e('This plugins helps you create Facebook login and register buttons. The login and register process only takes one click and you can fully customize the buttons with images and other assets.', 'nextend-facebook-connect');
            ?>
</p>
	<h3><?php 
            _e('Setup', 'nextend-facebook-connect');
            ?>
</h3>
  <p>
  <?php 
            _e('<ol><li><a href="https://developers.facebook.com/apps/?action=create" target="_blank">Create a facebook app!</a></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Choose an App Name, it can be anything you like</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Click on <b>Continue</b></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Go to the newly created <b>App settings page</b> and click <b>Edit Settings</b></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Fill out <b>App Domains</b> field with: <b>' . $domain . '</b></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Click on <b>Website with Facebook Login</b> tab abd fill out <b>Site URL</b> field with: <b>' . get_option('siteurl') . '</b></li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li>Click on <b>Save changes</b> and the top of the page contains the <b>App Id</b> and <b>App secret</b> which you have to copy and past below.</li>', 'nextend-facebook-connect');
            ?>
  <?php 
            _e('<li><b>Save changes!</b></li></ol>', 'nextend-facebook-connect');
            ?>
  
  
  </p>
  <h3><?php 
            _e('Usage', 'nextend-facebook-connect');
            ?>
</h3>
  <h4><?php 
            _e('Simple link', 'nextend-facebook-connect');
            ?>
</h4>
	<p><?php 
            _e('&lt;a href="' . new_fb_login_url() . '&redirect=' . get_option('siteurl') . '" onclick="window.location = \'' . new_fb_login_url() . '&redirect=\'+window.location.href; return false;"&gt;Click here to login or register with Facebook&lt;/a&gt;', 'nextend-facebook-connect');
            ?>
</p>
	
  <h4><?php 
            _e('Image button', 'nextend-facebook-connect');
            ?>
</h4>
	<p><?php 
            _e('&lt;a href="' . new_fb_login_url() . '&redirect=' . get_option('siteurl') . '" onclick="window.location = \'' . new_fb_login_url() . '&redirect=\'+window.location.href; return false;"&gt; &lt;img src="HereComeTheImage" /&gt; &lt;/a&gt;', 'nextend-facebook-connect');
            ?>
</p>
  
  <h3><?php 
            _e('Note', 'nextend-facebook-connect');
            ?>
</h3>
  <p><?php 
            _e('If the Facebook user\'s email address already used by another member of your site, the facebook profile will be automatically linked to the existing profile!', 'nextend-facebook-connect');
            ?>
</p>
  
  </div>

	<!--right-->
	<div class="postbox-container" style="float:right;width:30%;">
	<div class="metabox-holder">
	<div class="meta-box-sortables">

	<!--about-->
	<div id="newfb-about" class="postbox">
	<h3 class="hndle"><?php 
            _e('About this plugin', 'nextend-facebook-connect');
            ?>
</h3>
	<div class="inside"><ul>
  
  <li><a href="http://www.nextendweb.com/social-connect-plugins-for-wordpress.html" target="_blank"><?php 
            _e('Check the realted <b>blog post</b>!', 'nextend-facebook-connect');
            ?>
</a></li>
	<li><br></li>
	<li><a href="http://wordpress.org/extend/plugins/nextend-facebook-connect/" target="_blank"><?php 
            _e('Nextend Facebook Connect', 'nextend-facebook-connect');
            ?>
</a></li>
	<li><br></li>
  <li><a href="http://profiles.wordpress.org/nextendweb" target="_blank"><?php 
            _e('Nextend  plugins at WordPress.org', 'nextend-facebook-connect');
            ?>
</a></li>
	</ul></div>
	</div>
	<!--about end-->

	<!--others-->
	<!--others end-->

	</div></div></div>
	<!--right end-->

	<!--left-->
	<div class="postbox-container" style="float:left;width: 69%;">
	<div class="metabox-holder">
	<div class="meta-box-sortabless">

	<!--setting-->
	<div id="newfb-setting" class="postbox">
	<h3 class="hndle"><?php 
            _e('Settings', 'nextend-facebook-connect');
            ?>
</h3>
	<?php 
            $nextend_fb_connect = maybe_unserialize(get_option('nextend_fb_connect'));
            ?>

	<form method="post" action="<?php 
            echo get_bloginfo("wpurl");
            ?>
/wp-admin/options-general.php?page=nextend-facebook-connect">
	<input type="hidden" name="newfb_update_options" value="Y">

	<table class="form-table">
		<tr>
		<th scope="row"><?php 
            _e('Facebook App ID:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
		<input type="text" name="fb_appid" value="<?php 
            echo $nextend_fb_connect['fb_appid'];
            ?>
" />
		</td>
		</tr>  
      
		<tr>
		<th scope="row"><?php 
            _e('Facebook App Secret:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
		<input type="text" name="fb_secret" value="<?php 
            echo $nextend_fb_connect['fb_secret'];
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('New user prefix:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
    <?php 
            if (!isset($nextend_fb_connect['fb_user_prefix'])) {
                $nextend_fb_connect['fb_user_prefix'] = 'Facebook - ';
            }
            ?>
		<input type="text" name="fb_user_prefix" value="<?php 
            echo $nextend_fb_connect['fb_user_prefix'];
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('Fixed redirect url for login:'******'nextend-facebook-connect');
            ?>
</th>
		<td>
    <?php 
            if (!isset($nextend_fb_connect['fb_redirect'])) {
                $nextend_fb_connect['fb_redirect'] = 'auto';
            }
            ?>
		<input type="text" name="fb_redirect" value="<?php 
            echo $nextend_fb_connect['fb_redirect'];
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('Fixed redirect url for register:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
    <?php 
            if (!isset($nextend_fb_connect['fb_redirect_reg'])) {
                $nextend_fb_connect['fb_redirect_reg'] = 'auto';
            }
            ?>
		<input type="text" name="fb_redirect_reg" value="<?php 
            echo $nextend_fb_connect['fb_redirect_reg'];
            ?>
" />
		</td>
		</tr>

		<tr>
		<th scope="row"><?php 
            _e('Load button stylesheet:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_load_style'])) {
                $nextend_fb_connect['fb_load_style'] = 1;
            }
            ?>
		<input name="fb_load_style" id="fb_load_style_yes" value="1" type="radio" <?php 
            if (isset($nextend_fb_connect['fb_load_style']) && $nextend_fb_connect['fb_load_style']) {
                ?>
 checked <?php 
            }
            ?>
> Yes  &nbsp;&nbsp;&nbsp;&nbsp;
    <input name="fb_load_style" id="fb_load_style_no" value="0" type="radio" <?php 
            if (isset($nextend_fb_connect['fb_load_style']) && $nextend_fb_connect['fb_load_style'] == 0) {
                ?>
 checked <?php 
            }
            ?>
> No		
		</td>
		</tr>
    
    <tr>
		<th scope="row"><?php 
            _e('Login button:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_login_button'])) {
                $nextend_fb_connect['fb_login_button'] = '<div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">CONNECT WITH</div></div></div>';
            }
            ?>
		  <textarea cols="83" rows="3" name="fb_login_button"><?php 
            echo $nextend_fb_connect['fb_login_button'];
            ?>
</textarea>
		</td>
		</tr>
    
    <tr>
		<th scope="row"><?php 
            _e('Link account button:', 'nextend-facebook-connect');
            ?>
</th>
		<td>
      <?php 
            if (!isset($nextend_fb_connect['fb_link_button'])) {
                $nextend_fb_connect['fb_link_button'] = '<div class="new-fb-btn new-fb-1 new-fb-default-anim"><div class="new-fb-1-1"><div class="new-fb-1-1-1">LINK ACCOUNT TO</div></div></div>';
            }
            ?>
		  <textarea cols="83" rows="3" name="fb_link_button"><?php 
            echo $nextend_fb_connect['fb_link_button'];
            ?>
</textarea>
		</td>
		</tr>
    <tr>
		<th scope="row"></th>
		<td>
    <a href="http://www.nextendweb.com/social-connect-button-generator" target="_blank"><img style="margin-left: -4px;" src="<?php 
            echo plugins_url('generatorbanner.png', __FILE__);
            ?>
" /></a>
    </td>
		</tr>
	</table>

	<p class="submit">
	<input style="margin-left: 10%;" type="submit" name="Submit" value="<?php 
            _e('Save Changes', 'nextend-facebook-connect');
            ?>
" />
	</p>
	</form>
	</div>
	<!--setting end-->

	<!--others-->
	<!--others end-->

	</div></div></div>
	<!--left end-->

	</div>
	</div>
	<?php 
        }