032
This commit is contained in:
parent
b5b52e8be0
commit
cb6806ebc6
BIN
db5.sqlite3
BIN
db5.sqlite3
Binary file not shown.
15
src/a3.nim
15
src/a3.nim
@ -261,6 +261,9 @@ import
|
|||||||
phoneError = ""
|
phoneError = ""
|
||||||
passwordError = ""
|
passwordError = ""
|
||||||
ch = ""
|
ch = ""
|
||||||
|
echo "hi"
|
||||||
|
echo ctx.urlForm
|
||||||
|
echo "bye"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
email = ctx.cookies["email"]
|
email = ctx.cookies["email"]
|
||||||
@ -453,10 +456,18 @@ import
|
|||||||
password = ""
|
password = ""
|
||||||
|
|
||||||
if email == "":
|
if email == "":
|
||||||
echo "No cookie found."
|
ctx.redirect("/login")
|
||||||
else:
|
else:
|
||||||
products = micsGetProducts(email, password)
|
products = micsGetProducts(email, password)
|
||||||
echo "Cookie found."
|
|
||||||
|
ctx &= initCookie("c_country", "")
|
||||||
|
ctx &= initCookie("c_fname", "")
|
||||||
|
ctx &= initCookie("c_lname", "")
|
||||||
|
ctx &= initCookie("c_address", "")
|
||||||
|
ctx &= initCookie("c_state_country", "")
|
||||||
|
ctx &= initCookie("c_postal_zip", "")
|
||||||
|
ctx &= initCookie("c_email_address", "")
|
||||||
|
ctx &= initCookie("c_phone", "")
|
||||||
|
|
||||||
compileTemplateFile(getScriptDir() / "a3a" / "thankyou.nimja")
|
compileTemplateFile(getScriptDir() / "a3a" / "thankyou.nimja")
|
||||||
|
|
||||||
|
@ -351,6 +351,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
document.getElementById("b3").onclick = function() {
|
||||||
|
|
||||||
|
document.cookie = "c_country="+document.getElementById("c_country").value;
|
||||||
|
document.cookie = "c_fname="+document.getElementById("c_fname").value;
|
||||||
|
document.cookie = "c_lname="+document.getElementById("c_lname").value;
|
||||||
|
document.cookie = "c_address="+document.getElementById("c_address").value;
|
||||||
|
document.cookie = "c_state_country="+document.getElementById("c_state_country").value;
|
||||||
|
document.cookie = "c_postal_zip="+document.getElementById("c_postal_zip").value;
|
||||||
|
document.cookie = "c_email_address="+document.getElementById("c_email_address").value;
|
||||||
|
document.cookie = "c_phone="+document.getElementById("c_phone").value;
|
||||||
|
if (document.getElementById("c_create_account").checked) {
|
||||||
|
document.cookie = "c_create_account="+document.getElementById("c_create_account").value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// window.location.href = '/thankyou';
|
||||||
|
}
|
||||||
|
|
||||||
function continueShopping() {
|
function continueShopping() {
|
||||||
window.location.href = '/shop';
|
window.location.href = '/shop';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user