-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,20 +15,19 @@ | |
url="//api.madmimi.com/audience_lists/01-Actionplanr Web Beta Invite/[email protected]&api_key=xxx&[email protected]&callback=?" | ||
></polymer-jsonp> --> | ||
|
||
<firebase-element id="add_firebase" on-data-change="{{dataChange}}" data="{{betaInvite}}" location="https://beta-invite.firebaseio.com" keys="{{keys}}" log></firebase-element> | ||
<!-- <firebase-element id="add_firebase" on-data-change="{{dataChange}}" data="{{betaInvite}}" location="https://beta-invite.firebaseio.com/requests" keys="{{keys}}" log></firebase-element> --> | ||
|
||
<core-ajax id="add_madmimi_request" | ||
url="//actionplanr.com/beta-signup/app/madmimi.php?email={{email}}" | ||
url="//actionplanr.com/beta-signup/app/madmimi.php?email={{email}}&create_at={{timestamp}}" | ||
handleAs="text" | ||
on-core-response="{{ajaxResponse}}" | ||
></core-ajax> | ||
on-core-response="{{ajaxResponse}}"></core-ajax> | ||
|
||
<link rel="stylesheet" href="beta-form.css"> | ||
|
||
<div id="container_div" vertical layout center> | ||
<h3 id="title">Actionplanr Beta coming soon by invitation only. <br>Get yours:</h3> | ||
<div id="form_div" horizontal layout center> | ||
<paper-input id="email_input" label="Input Email" type="email" value="[email protected]" | ||
<paper-input id="email_input" label="Input Email" type="email" | ||
validate="^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$" error=" " | ||
required></paper-input><br> | ||
<paper-fab icon="check" class="fab-success green" on-click="{{saveData}}" style="background: #D0F5A9;" ></paper-fab> | ||
|
@@ -58,14 +57,10 @@ <h2 id="success_h2">Thank you for requesting <br>a beta invite!</h2> | |
|
||
ready: function() { | ||
this.status = 'blank'; // blank, add, loaded, changed, added, saved, cancelled | ||
this.email = "[email protected]"; | ||
this.email = ""; | ||
this.timestamp = new Date(); | ||
}, | ||
|
||
// responseChanged: function(oldValue) { | ||
// console.log(this.response); | ||
// }, | ||
|
||
|
||
ajaxResponse: function(event, response) { | ||
console.log("ajaxResponse: ", response); | ||
}, | ||
|
@@ -82,15 +77,20 @@ <h2 id="success_h2">Thank you for requesting <br>a beta invite!</h2> | |
this.email = ""; | ||
} else { | ||
this.email = email; | ||
//this.$.add_madmimi_request_jsonp.go(); | ||
this.timestamp = new Date(); | ||
this.$.add_madmimi_request.go(); | ||
|
||
new Firebase('https://beta-invite.firebaseio.com/requests').push({ | ||
email: email, | ||
create_at: timestamp.toLocaleString(), | ||
create_at_full: timestamp.toString() | ||
}); | ||
|
||
console.log('saveData email: ' + this.$.email_input.value, timestamp.toLocaleString()); | ||
this.status = 'saved'; | ||
this.$.form_div.hidden = true; | ||
this.$.title.hidden = true; | ||
this.$.success.hidden = false; | ||
//this.addEntry(email); | ||
this.$.base.commitProperty(email); | ||
|
||
} | ||
}, | ||
|
@@ -100,11 +100,6 @@ <h2 id="success_h2">Thank you for requesting <br>a beta invite!</h2> | |
//this.$.section_title.value = "SECTION TITLE TEST" | ||
}, | ||
|
||
addEntry: function(value) { | ||
this.$.base.push({email: value}); | ||
this.$.email_input.value = ""; | ||
} | ||
|
||
}); | ||
|
||
})(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<?php | ||
$username = "[email protected]"; | ||
$api_key = "appkey value"; | ||
$email = $_GET['email'];; | ||
$email = $_GET['email']; | ||
$create_at = $_GET['create_at']; | ||
$listname = "Madmimi List Name"; | ||
$ch = curl_init('https://madmimi.com/audience_lists/'.$listname.'/add'); | ||
curl_setopt($ch, CURLOPT_POST, TRUE); | ||
curl_setopt($ch, CURLOPT_POSTFIELDS,"username=".$username."&api_key=".$api_key."&email=".$email); | ||
curl_setopt($ch, CURLOPT_POSTFIELDS,"username=".$username."&api_key=".$api_key."&email=".$email."&create_at=".$create_at); | ||
$response = curl_exec($ch); | ||
echo "Added: ", $email; | ||
?> |