{"id":286,"date":"2025-08-22T19:02:05","date_gmt":"2025-08-22T19:02:05","guid":{"rendered":"https:\/\/happycamelsafari.sabpro.in\/?page_id=286"},"modified":"2025-08-22T19:35:42","modified_gmt":"2025-08-22T19:35:42","slug":"register","status":"publish","type":"page","link":"https:\/\/happycamelsafari.sabpro.in\/?page_id=286","title":{"rendered":"register"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Secure Website Lock<\/title>\n  <style>\n    body {margin:0; font-family: Arial, sans-serif;}\n    #lockScreen {\n      position:fixed; top:0; left:0; width:100%; height:100%;\n      background:#f9f9f9; display:flex; justify-content:center; align-items:center;\n      z-index:9999;\n    }\n    .container {\n      background:#fff; padding:30px; border-radius:15px;\n      box-shadow:0 4px 20px rgba(0,0,0,0.2); width:380px;\n    }\n    h1 {text-align:center; margin-bottom:10px; font-size:22px; color:#333;}\n    p.subtext {text-align:center; font-size:14px; margin-bottom:20px; color:#666; line-height:1.5;}\n    h2 {text-align:center; margin-bottom:20px;}\n    .tabs {display:flex; justify-content:space-around; margin-bottom:20px;}\n    .tab {cursor:pointer; padding:10px 20px; border-radius:8px; background:#eee;}\n    .tab.active {background:#111; color:#fff;}\n    .form {display:none;}\n    .form.active {display:block;}\n    label {display:block; margin:10px 0 5px;}\n    input {width:100%; padding:10px; border:1px solid #ccc; border-radius:6px;}\n    button {margin-top:15px; width:100%; padding:12px; border:none;\n            background:#111; color:#fff; font-weight:bold; border-radius:6px; cursor:pointer;}\n    .forgot {margin-top:10px; text-align:right;}\n    .forgot a {font-size:13px; color:#0073e6; cursor:pointer; text-decoration:none;}\n    .forgot a:hover {text-decoration:underline;}\n    .msg {margin-bottom:10px; padding:10px; border-radius:5px; font-size:14px;}\n    .msg.error {background:#ffecec; color:#a40000;}\n    .msg.success {background:#ecffef; color:#005c1f;}\n    .logout-btn {background:#c00; margin-top:20px;}\n  <\/style>\n<\/head>\n<body>\n\n  <!-- \ud83d\udd12 Locked Screen -->\n  <div id=\"lockScreen\">\n    <div class=\"container\">\n      <!-- \ud83d\udc47 Welcome Heading & Instruction -->\n      <h1>Welcome to Happy Safari<\/h1>\n      <p class=\"subtext\">\n        To view Happy Safari, please <b>Register<\/b> first.<br>\n        If already registered, please <b>Login<\/b>.<br>\n        If unable to login, <b>Reset your Password<\/b> and try again.\n      <\/p>\n\n      <div class=\"tabs\">\n        <div class=\"tab active\" data-tab=\"login\">Login<\/div>\n        <div class=\"tab\" data-tab=\"register\">Register<\/div>\n      <\/div>\n      <div id=\"message\"><\/div>\n\n      <!-- Login Form -->\n      <form class=\"form active\" id=\"loginForm\">\n        <label>Email<\/label>\n        <input type=\"email\" id=\"loginEmail\" required>\n        <label>Password<\/label>\n        <input type=\"password\" id=\"loginPass\" required>\n        <button type=\"submit\">Login<\/button>\n        <div class=\"forgot\"><a id=\"forgotLink\">Forgot Password?<\/a><\/div>\n      <\/form>\n\n      <!-- Register Form -->\n      <form class=\"form\" id=\"registerForm\">\n        <label>Full Name<\/label>\n        <input type=\"text\" id=\"regName\" required>\n        <label>Email<\/label>\n        <input type=\"email\" id=\"regEmail\" required>\n        <label>Password<\/label>\n        <input type=\"password\" id=\"regPass\" required>\n        <button type=\"submit\">Register<\/button>\n      <\/form>\n\n      <!-- Forgot Password Form -->\n      <form class=\"form\" id=\"forgotForm\">\n        <label>Enter your registered Email<\/label>\n        <input type=\"email\" id=\"forgotEmail\" required>\n        <label>New Password<\/label>\n        <input type=\"password\" id=\"forgotNewPass\" required>\n        <button type=\"submit\">Reset Password<\/button>\n      <\/form>\n    <\/div>\n  <\/div>\n\n  <!-- \ud83c\udf10 Actual Website Content -->\n  <div id=\"siteContent\" style=\"display:none;\">\n    <h1 style=\"text-align:center; margin-top:50px;\">\ud83c\udf89 Welcome to Happy Camel Safari<\/h1>\n    <p style=\"text-align:center;\">\u0905\u092c \u0906\u092a \u092a\u0942\u0930\u0940 \u0935\u0947\u092c\u0938\u093e\u0907\u091f \u0926\u0947\u0916 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902\u0964<\/p>\n    <div style=\"text-align:center;\">\n      <button class=\"logout-btn\" id=\"logoutBtn\">Logout<\/button>\n    <\/div>\n  <\/div>\n\n  <script>\n    const tabs=document.querySelectorAll('.tab');\n    const forms={login:document.getElementById('loginForm'),register:document.getElementById('registerForm'),forgot:document.getElementById('forgotForm')};\n    const message=document.getElementById('message');\n    const lockScreen=document.getElementById('lockScreen');\n    const siteContent=document.getElementById('siteContent');\n    const logoutBtn=document.getElementById('logoutBtn');\n\n    function showMessage(type,text){ message.innerHTML=`<div class=\\\"msg ${type}\\\">${text}<\/div>`; }\n\n    tabs.forEach(tab=>{\n      tab.addEventListener('click',()=>{\n        tabs.forEach(t=>t.classList.remove('active'));\n        tab.classList.add('active');\n        Object.keys(forms).forEach(k=>forms[k].classList.remove('active'));\n        forms[tab.dataset.tab].classList.add('active');\n      });\n    });\n\n    document.getElementById('registerForm').addEventListener('submit',e=>{\n      e.preventDefault();\n      const email=document.getElementById('regEmail').value;\n      const pass=document.getElementById('regPass').value;\n      const name=document.getElementById('regName').value;\n      localStorage.setItem('hcsUser',JSON.stringify({email,pass,name}));\n      showMessage('success','Registration successful! Please login.');\n      tabs[0].click();\n    });\n\n    document.getElementById('loginForm').addEventListener('submit',e=>{\n      e.preventDefault();\n      const email=document.getElementById('loginEmail').value;\n      const pass=document.getElementById('loginPass').value;\n      const user=JSON.parse(localStorage.getItem('hcsUser')||'{}');\n      if(email===user.email && pass===user.pass){\n        localStorage.setItem('hcsLoggedIn','true');\n        unlockSite();\n      } else {\n        showMessage('error','Incorrect email or password.');\n      }\n    });\n\n    document.getElementById('forgotLink').addEventListener('click',()=>{\n      Object.keys(forms).forEach(k=>forms[k].classList.remove('active'));\n      forms.forgot.classList.add('active');\n    });\n\n    document.getElementById('forgotForm').addEventListener('submit',e=>{\n      e.preventDefault();\n      const email=document.getElementById('forgotEmail').value;\n      const newPass=document.getElementById('forgotNewPass').value;\n      const user=JSON.parse(localStorage.getItem('hcsUser')||'{}');\n      if(email===user.email){\n        localStorage.setItem('hcsUser',JSON.stringify({email,pass:newPass,name:user.name}));\n        showMessage('success','Password reset successful! Please login again.');\n        tabs[0].click();\n      } else {\n        showMessage('error','This email is not registered.');\n      }\n    });\n\n    function unlockSite(){\n      lockScreen.style.display='none';\n      siteContent.style.display='block';\n    }\n\n    window.addEventListener('load',()=>{\n      const loggedIn=localStorage.getItem('hcsLoggedIn');\n      const user=JSON.parse(localStorage.getItem('hcsUser')||'{}');\n      if(loggedIn && user.email){ unlockSite(); }\n    });\n\n    logoutBtn.addEventListener('click',()=>{\n      localStorage.removeItem('hcsLoggedIn');\n      lockScreen.style.display='flex';\n      siteContent.style.display='none';\n      tabs[0].click();\n    });\n  <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Secure Website Lock Welcome to Happy Safari To view Happy Safari, please Register first. If already registered, please Login. If unable to login, Reset your Password and try again. Login Register Email Password Login Forgot Password? Full Name Email Password Register Enter your registered Email New Password Reset Password \ud83c\udf89 Welcome to Happy Camel Safari [&hellip;]<\/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-286","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=286"}],"version-history":[{"count":6,"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/286\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/286\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/happycamelsafari.sabpro.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}