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 "";
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 "";
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;"' : '';
?>
get_options();
$hidden = !$visible ? 'style="display:none;"' : '';
?>
email;
}
}catch(Exception $e) {}
return $email;
}
function my_stripslashes_deep($value){
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
?>