{"id":445,"date":"2025-09-12T18:15:56","date_gmt":"2025-09-12T18:15:56","guid":{"rendered":"https:\/\/breakfasthouse.sabpro.in\/?page_id=445"},"modified":"2025-09-12T18:24:02","modified_gmt":"2025-09-12T18:24:02","slug":"445-2","status":"publish","type":"page","link":"https:\/\/breakfasthouse.sabpro.in\/?page_id=445","title":{"rendered":"Register"},"content":{"rendered":"\n<div class=\"wp-block-group alignfull is-layout-flow wp-container-core-group-is-layout-f9cb6abc wp-block-group-is-layout-flow\" style=\"margin-top:0;margin-bottom:0\">\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<title>Professional Login\/Register<\/title>\n<style>\nhtml, body {\n  margin:0; padding:0; height:100%;\n  font-family: Arial,sans-serif;\n}\nbody { overflow:hidden; background:#111; color:white; }\n\n.overlay {\n  position:fixed; top:0; left:0; width:100%; height:100%;\n  background:linear-gradient(rgba(0,0,0,0.95), rgba(0,0,0,0.95));\n  z-index:9999;\n  display:flex; justify-content:center; align-items:center;\n}\n\n.container {\n  background:#222; padding:30px; border-radius:15px;\n  max-width:400px; width:90%; box-shadow:0 0 20px #ff9800;\n  text-align:center;\n}\n\nh2 { color:#ff9800; margin-bottom:20px; }\ninput { width:100%; padding:12px; margin:8px 0; border-radius:5px; border:none; }\nbutton { width:100%; padding:12px; margin-top:10px; background:#ff9800; color:black; border:none; border-radius:5px; font-weight:bold; cursor:pointer; }\nbutton:hover { background:#ffa726; }\n.switch-btn { color:#ff9800; margin-top:10px; cursor:pointer; display:block; }\n\n#profileCard { display:none; background:#333; padding:20px; border-radius:15px; margin:10px auto; text-align:center; max-width:350px; }\n.avatar { font-size:50px; margin-bottom:10px; }\n.logout-btn { background:red; color:white; margin-top:15px; width:100%; }\n.referral { background:#444; padding:10px; border-radius:10px; margin-top:15px; font-size:14px; }\n#mainContent { display:none; padding:20px; background:white; color:black; width:100%; height:100%; overflow:auto; box-sizing:border-box; }\n.share-btn { margin-top:10px; padding:10px; width:100%; background:#2196f3; color:white; border:none; border-radius:5px; cursor:pointer; }\n.share-btn:hover { background:#64b5f6; }\n\n\/* Forgot password professional style *\/\n#forgotMessage { background:#333; padding:10px; border-radius:10px; margin-top:10px; color:#ff9800; display:none; word-wrap:break-word; font-weight:bold; }\n<\/style>\n<\/head>\n<body>\n\n<!-- Overlay Login\/Register -->\n<div class=\"overlay\" id=\"authOverlay\">\n  <div class=\"container\">\n    <h2 id=\"formTitle\">Login<\/h2>\n\n    <form id=\"loginForm\">\n      <input type=\"email\" id=\"loginEmail\" placeholder=\"Email\" required>\n      <input type=\"password\" id=\"loginPassword\" placeholder=\"Password\" required>\n      <button type=\"button\" onclick=\"login()\">Login<\/button>\n      <span class=\"switch-btn\" onclick=\"showRegister()\">Don&#8217;t have account? Register<\/span>\n      <span class=\"switch-btn\" onclick=\"showForgot()\">Forgot Password?<\/span>\n    <\/form>\n\n    <form id=\"registerForm\" style=\"display:none;\">\n      <input type=\"text\" id=\"regName\" placeholder=\"Enter Name\" required>\n      <input type=\"email\" id=\"regEmail\" placeholder=\"Enter Email\" required>\n      <input type=\"password\" id=\"regPassword\" placeholder=\"Enter Password\" required>\n      <input type=\"text\" id=\"regPhone\" placeholder=\"Enter Mobile Number\" required>\n      <button type=\"button\" onclick=\"register()\">Register<\/button>\n      <span class=\"switch-btn\" onclick=\"showLogin()\">Already have account? Login<\/span>\n    <\/form>\n\n    <form id=\"forgotForm\" style=\"display:none;\">\n      <input type=\"email\" id=\"forgotEmail\" placeholder=\"Enter your Email\" required>\n      <button type=\"button\" onclick=\"forgotPassword()\">Get Password<\/button>\n      <div id=\"forgotMessage\"><\/div>\n      <span class=\"switch-btn\" onclick=\"showLogin()\">Back to Login<\/span>\n    <\/form>\n  <\/div>\n<\/div>\n\n<!-- Profile Card -->\n<div class=\"container\" id=\"profileCard\">\n  <div class=\"avatar\">\ud83d\udc64<\/div>\n  <h2 id=\"welcomeUser\">Welcome<\/h2>\n  <div id=\"userDetails\"><\/div>\n  <div class=\"referral\">\n    \ud83c\udf81 Referral Link:<br>\n    <span id=\"refLink\"><\/span><br>\n    \ud83d\udcb0 Discount: 10%\n    <button class=\"share-btn\" onclick=\"shareReferral()\">Share<\/button>\n  <\/div>\n  <button class=\"logout-btn\" onclick=\"logout()\">Logout<\/button>\n<\/div>\n\n<!-- Website Main Content -->\n<div id=\"mainContent\">\n  <h1>\ud83c\udf1f Welcome to Your Website<\/h1>\n  <p>All website content is now accessible after login\/register.<\/p>\n<\/div>\n\n<script>\nlet users = JSON.parse(localStorage.getItem(\"users\")) || [];\nlet currentUser = JSON.parse(localStorage.getItem(\"currentUser\")) || null;\n\n\/\/ Show\/Hide forms\nfunction showRegister(){ document.getElementById(\"loginForm\").style.display=\"none\"; document.getElementById(\"registerForm\").style.display=\"block\"; document.getElementById(\"forgotForm\").style.display=\"none\"; document.getElementById(\"formTitle\").innerText=\"Register\";}\nfunction showLogin(){ document.getElementById(\"loginForm\").style.display=\"block\"; document.getElementById(\"registerForm\").style.display=\"none\"; document.getElementById(\"forgotForm\").style.display=\"none\"; document.getElementById(\"formTitle\").innerText=\"Login\"; document.getElementById(\"forgotMessage\").style.display=\"none\";}\nfunction showForgot(){ document.getElementById(\"loginForm\").style.display=\"none\"; document.getElementById(\"registerForm\").style.display=\"none\"; document.getElementById(\"forgotForm\").style.display=\"block\"; document.getElementById(\"formTitle\").innerText=\"Forgot Password\"; document.getElementById(\"forgotMessage\").style.display=\"none\";}\n\n\/\/ Register\nfunction register(){\n  const name=document.getElementById(\"regName\").value;\n  const email=document.getElementById(\"regEmail\").value;\n  const password=document.getElementById(\"regPassword\").value;\n  const phone=document.getElementById(\"regPhone\").value;\n  if(!name||!email||!password||!phone){alert(\"Please fill all fields.\"); return;}\n  const userId=\"UID\"+Math.floor(100000+Math.random()*900000);\n  let newUser={name,email,password,phone,userId};\n  users.push(newUser);\n  localStorage.setItem(\"users\",JSON.stringify(users));\n  alert(\"Registered Successfully! Your UID: \"+userId);\n  showLogin();\n}\n\n\/\/ Login\nfunction login(){\n  const email=document.getElementById(\"loginEmail\").value;\n  const password=document.getElementById(\"loginPassword\").value;\n  let user=users.find(u=>u.email===email&&u.password===password);\n  if(!user){alert(\"Invalid Email or Password!\"); return;}\n  currentUser=user;\n  localStorage.setItem(\"currentUser\",JSON.stringify(user));\n  showProfile(user);\n}\n\n\/\/ Show Profile & Unlock Website\nfunction showProfile(user){\n  document.getElementById(\"authOverlay\").style.display=\"none\";\n  document.getElementById(\"profileCard\").style.display=\"block\";\n  document.getElementById(\"mainContent\").style.display=\"block\";\n  document.body.style.overflow=\"auto\"; \n  document.getElementById(\"welcomeUser\").innerText=\"Welcome, \"+user.name;\n  document.getElementById(\"userDetails\").innerHTML=`\ud83c\udd94 ID: ${user.userId}<br>\ud83d\udce7 Email: ${user.email}<br>\ud83d\udcf1 Mobile: ${user.phone}`;\n  document.getElementById(\"refLink\").innerText = window.location.href+\"?ref=\"+user.userId;\n}\n\n\/\/ Share Referral\nfunction shareReferral(){\n  if(navigator.share){\n    navigator.share({\n      title:\"Join this website & get 10% discount\",\n      text:\"Use my referral link to get 10% off: \"+window.location.href+\"?ref=\"+currentUser.userId,\n      url: window.location.href+\"?ref=\"+currentUser.userId\n    }).then(()=>console.log(\"Shared successfully\")).catch(err=>console.log(err));\n  } else { alert(\"Sharing not supported in this browser.\"); }\n}\n\n\/\/ Logout\nfunction logout(){\n  localStorage.removeItem(\"currentUser\");\n  document.getElementById(\"authOverlay\").style.display=\"flex\";\n  document.getElementById(\"profileCard\").style.display=\"none\";\n  document.getElementById(\"mainContent\").style.display=\"none\";\n  document.body.style.overflow=\"hidden\";\n  showLogin();\n}\n\n\/\/ Forgot Password (Professional Overlay)\nfunction forgotPassword(){\n  const email=document.getElementById(\"forgotEmail\").value;\n  let user=users.find(u=>u.email===email);\n  const msgBox=document.getElementById(\"forgotMessage\");\n  if(!user){ \n    msgBox.style.display=\"block\"; msgBox.style.color=\"red\"; msgBox.innerText=\"\u274c Email not found.\";\n  } else { \n    msgBox.style.display=\"block\"; msgBox.style.color=\"#ff9800\"; msgBox.innerHTML=`\ud83d\udd11 Your Password is: <b>${user.password}<\/b>`;\n  }\n}\n\n\/\/ Auto Login\nwindow.onload=()=>{\n  if(currentUser){ showProfile(currentUser); }\n  else{ document.getElementById(\"mainContent\").style.display=\"none\"; document.body.style.overflow=\"hidden\"; }\n};\n<\/script>\n<\/body>\n<\/html>\n\n\n\n<div class=\"wp-block-columns alignfull is-style-section-2 is-layout-flex wp-container-core-columns-is-layout-d9884270 wp-block-columns-is-layout-flex is-style-section-2--1\" style=\"padding-top:0;padding-bottom:0\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n\n\n<div class=\"wp-block-cover is-light\"><img decoding=\"async\" class=\"wp-block-cover__image-background\" alt=\"Close up photo of white flowers on a grey background\" src=\"https:\/\/breakfasthouse.sabpro.in\/wp-content\/themes\/twentytwentyfive\/assets\/images\/botany-flowers-closeup.webp\" data-object-fit=\"cover\"\/><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-0 has-background-dim\"><\/span><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<div style=\"height:var(--wp--preset--spacing--20)\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Professional Login\/Register Login Login Don&#8217;t have account? Register Forgot Password? Register Already have account? Login Get Password Back to Login \ud83d\udc64 Welcome \ud83c\udf81 Referral Link: \ud83d\udcb0 Discount: 10% Share Logout \ud83c\udf1f Welcome to Your Website All website content is now accessible after login\/register.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-445","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445"}],"version-history":[{"count":6,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/445\/revisions"}],"predecessor-version":[{"id":453,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/445\/revisions\/453"}],"wp:attachment":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}