login($form["email"], $form["password"])){ $url = $plugin->getURL("dashboard"); echo "

Welcome to 40Nuggets

Your site is now connected to 40Nuggets. It's time to convert your visitors into leads.

LET'S GET STARTED

"; }else{ $options = $plugin->get_options(); echo "

Login Failed

"; showSignupForm($form["email"],false); showLoginForm($form["email"],true); } } function associate($form){ $plugin = new Fortynuggets_Plugin(); $plugin->set_api_key($form['api_key']); echo "

Welcome to 40Nuggets

40Nuggets' snippet code is now live on your site. It's time to convert your visitors into leads.

LET'S GET STARTED

"; } function signup($form){ $plugin = new Fortynuggets_Plugin(); if ($plugin->create_client($form["email"], $form["password"], $form["name"], $form["url"])){ $url = $plugin->getURL("dashboard"); echo "

Welcome to 40Nuggets

Your site is now connected to 40Nuggets. It's time to convert your visitors into leads.

LET'S GET STARTED

"; }else{ $options = $plugin->get_options(); echo "

Oops... Something went wrong.
Let's try to set you up manually

"; showSignupForm($form["email"],true); showLoginForm($form["email"],false); } } function forms(){ $plugin = new Fortynuggets_Plugin(); $email = getEmail(); $shouldShowCreateAccount = $plugin->shouldCreateAccount(); showSignupForm($email,$shouldShowCreateAccount); showLoginForm($email,!$shouldShowCreateAccount); } function showSignupForm($email,$visible){ $hidden = !$visible ? 'style="display:none;"' : ''; ?>
class="wrap">

Create your 40Nuggets account

If you already opened an account click here to sign in.

get_options(); $hidden = !$visible ? 'style="display:none;"' : ''; ?>
class="wrap">

Sign in to 40Nuggets

If you don't have an account click here to create one.


Forgot your password?

email; } }catch(Exception $e) {} return $email; } function my_stripslashes_deep($value){ $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } ?>