Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions team#1 - 4/Frontend/auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
}

const Login = () => {

// alert('hello stop me');
const requestOptions = {
method: 'POST',
credentials: 'include',
headers: {'Content-Type': 'application/json',
'X-CSRFTOKEN': getCookie('csrftoken'),},
body: JSON.stringify({
email: document.getElementById("email").value,
password: document.getElementById("password").value,
}),
};
console.log(requestOptions);
fetch(`http://api.pand.ml:3000/api/v1/login`, requestOptions)
.then((response) => response.json())
.then((data) => {
console.log(data);
console.log('sd');
if (data.error_code) {
alert('something got wrong');
}
if (data.goto) {
// location.replace(data.goto);
// return;
console.log('change page')
// window.open(data.goto, '_self');
}
// window.open('/', '_self');

});
}

logout=()=>{
console.log("working");
fetch(`http://api.pand.ml:3000/api/v1/logout`, {
method: 'GET',
credentials: 'include'})
.then((response) => response.json())
.then((data) => {
if(data.goto!==undefined)
{
location.replace(data.goto);
}
console.log(data);
location.replace("/");
});
}
74 changes: 74 additions & 0 deletions team#1 - 4/Frontend/back.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
}
let data;
resp='true';
logfunc=()=>{
console.log("hello");
//here we will be recieving response form the server in temp
const get_user_info = () => {
fetch(`http://api.pand.ml:3000/api/v1/me`, {
method: 'GET',
credentials: 'include'})
.then((response) => response.json())
.then((data) => {
process_user_info(data);
});
}
const process_user_info = (data) => {
console.log(data);
// let msg = data.msg;
let user = data.name;
let loggedin = data.loggedin;
let error = data.error;
if (error) {
alert(error);
return
}
// document.getElementById('Username').innerText = username;
// document.getElementById('valid').innerText = msg;
// document.getElementById('loggedin').innerText = loggedin;
// console.log(data.loggedin);
console.log(data.loggedin);

if(data.logged_in==true){
document.getElementById("helloo").innerHTML=`<div class="wboxuser"><h1>Hello: ${data.name}</h1></div>`;
document.getElementById("user_logout").innerHTML=` <button onclick="logout()">Logout</button>`

if(data.profile_image_link==null)
document.getElementById("perinfo").innerHTML= `<img src="sampleprofile.jpg" alt="" srcset="" > <p class="textpinfo">Hello: ${data.username}</p>`
else
document.getElementById("perinfo").innerHTML=`<img src="${data.profile_image_link}" alt="" srcset="" width="40px"> <p class="textpinfo">Hello: ${data.username}</p>`;
console.log("testtrue");
}
else {
document.getElementById("patient_auth").innerHTML=
` <div class="pregister">
<a href = "pregister.html"><button>Regitser</button></a>
</div>
<div class="plogin">
<a href="dlogin.html"><button>Login</button></a>
</div>`;

document.getElementById("doctor_auth").innerHTML=
` <div class="wbox1">
<p>Doctors Only..</p>
<div class="docwrap">
<div class="dregister">
<a href="dregister.html"><button>Regitser</button></a>
</div>
<div class="dlogin">
<a href="dlogin.html"><button>Login</button></a>
</div>
</div>
</div>`

console.log("testfalse");

}
}

get_user_info()
}
Binary file added team#1 - 4/Frontend/bak.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions team#1 - 4/Frontend/dlogin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="register.css">
<title>Login Doctor</title>
</head>
<body>
<div class="wrapper">
<section class = "input_section">
<h4>Login here</h4>
<br>
<input type="text" id="email" placeholder="Email here">
<input type="password" id="password" placeholder="password here">
<button onclick="Login()">Login</button>
</section>
</div>
</body>
<script src="auth.js"></script>
</html>
52 changes: 52 additions & 0 deletions team#1 - 4/Frontend/dregister.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="register.css">
<title>Register</title>
</head>
<body>
<div class="wrapper">
<section class = "input_section">
<h4>Register here</h4>
<br>
<input type="text" id="name" placeholder="Name here">
<textarea name="specialization" id="specialization" cols="20" rows="3" placeholder="Specialisation here"></textarea>
<input type="text" id="email" placeholder="Email here">
<div id="locat">

</div>
<button onclick="getLocation()">Click here to get Location</button>
<input type="text" id="ph" placeholder="Phone number here">
<input type="text" id="Adhar" placeholder="Adhar number here">
<input type="password" id="password" placeholder="password here">
<input type="password" id="confirm" placeholder="confirm password">
<div id="reg">

</div>

</section>
</div>

</body>
<script>
var x = document.getElementById("locat");
var y = document.getElementById("reg")
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}

function showPosition(position) {
x.innerHTML = `<input type="text" id = "latitude" value = "${position.coords.latitude}">
<input type="text" id = "longitude" value = "${position.coords.longitude}">`
y.innerHTML="<button id='CheckD()' >Register</button>"
}
</script>
<script src="dregister.js"></script>
</html>
52 changes: 52 additions & 0 deletions team#1 - 4/Frontend/dregister.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
}
CheckD=()=>{
var p1 = document.getElementById("password").value;
var p2 = document.getElementById("confirm").value;
if(p1===p2)
{
DRegister();
}
else
alert("Password Not matches");
}

const DRegister = () => {

// alert('hello stop me');
const requestOptions = {
method: 'POST',
credentials: 'include',
headers: {'Content-Type': 'application/json',
'X-CSRFTOKEN': getCookie('csrftoken'),},
body: JSON.stringify({
name: document.getElementById("name").value,
email: document.getElementById("email").value,
latitude: document.getElementById("latitude").value,
longitude: document.getElementById("longitude").value,
ph: document.getElementById("ph").value,
aadhaar_number: document.getElementById("Adhar").value,
password: document.getElementById("password").value,
}),
};
console.log(requestOptions);
fetch(`http://api.pand.ml:3000/api/v1/doc-register`, requestOptions)
.then((response) => response.json())
.then((data) => {
console.log(data);
console.log('sd');
if (data.error_code) {
alert('something got wrong');
}
if (data.goto) {
location.replace(data.goto);
return;
console.log('change page')
// window.open(data.goto, '_self');
}
// window.open('/', '_self');
});
}
1 change: 1 addition & 0 deletions team#1 - 4/Frontend/gooogle doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://docs.google.com/document/d/1UPuxvJYGTUW8pYSgHwiaG2S7J8VX-p5IuFF99FPW2XY/edit
Binary file added team#1 - 4/Frontend/graphic/bak1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/bak9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added team#1 - 4/Frontend/graphic/elem 20.png
Binary file added team#1 - 4/Frontend/graphic/elem 21.png
Binary file added team#1 - 4/Frontend/graphic/elem 22.png
Binary file added team#1 - 4/Frontend/graphic/elem 23.png
Binary file added team#1 - 4/Frontend/graphic/elem 24.png
Binary file added team#1 - 4/Frontend/graphic/elem 29.png
Binary file added team#1 - 4/Frontend/graphic/elem 3.png
Binary file added team#1 - 4/Frontend/graphic/elem 30.png
Binary file added team#1 - 4/Frontend/graphic/elem 4.png
Binary file added team#1 - 4/Frontend/graphic/elem 5.png
Binary file added team#1 - 4/Frontend/graphic/elem 6.png
Binary file added team#1 - 4/Frontend/graphic/elem 7.png
Binary file added team#1 - 4/Frontend/graphic/elem 8.png
Binary file added team#1 - 4/Frontend/graphic/elem 9.png
Binary file added team#1 - 4/Frontend/graphic/h1.jpg
Binary file added team#1 - 4/Frontend/graphic/h2.jpg
Binary file added team#1 - 4/Frontend/graphic/h3.jpg
Binary file added team#1 - 4/Frontend/graphic/h4.jpg
Binary file added team#1 - 4/Frontend/graphic/h5.png
Binary file added team#1 - 4/Frontend/graphic/h6.jpg
Binary file added team#1 - 4/Frontend/graphic/h7.jpg
Binary file added team#1 - 4/Frontend/graphic/homebak.jpg
Binary file added team#1 - 4/Frontend/graphic/homebak2.jpg
Binary file added team#1 - 4/Frontend/graphic/homebak3.jpg
Binary file added team#1 - 4/Frontend/graphic/homebak4.jpg
Binary file added team#1 - 4/Frontend/graphic/homebak5.jpg
Binary file added team#1 - 4/Frontend/graphic/lin.gif
Binary file added team#1 - 4/Frontend/graphic/nbak1.png
Binary file added team#1 - 4/Frontend/graphic/nbak2.jpg
Binary file added team#1 - 4/Frontend/graphic/nbak3.jpg
Binary file added team#1 - 4/Frontend/graphic/nbak4.png
Binary file added team#1 - 4/Frontend/graphic/nbak5.jpg
Binary file added team#1 - 4/Frontend/graphic/nbak6.jpg
Binary file added team#1 - 4/Frontend/graphic/sec2.jpg
Binary file added team#1 - 4/Frontend/graphic/sec3.jpg
Binary file added team#1 - 4/Frontend/graphic/svg1.jpg
Binary file added team#1 - 4/Frontend/graphic/svg2.jpg
Binary file added team#1 - 4/Frontend/graphic/svg5.jpg
Binary file added team#1 - 4/Frontend/graphic/svg6.jpg
Binary file added team#1 - 4/Frontend/graphic/svg7.jpg
Binary file added team#1 - 4/Frontend/graphic/svg8.jpg
Binary file added team#1 - 4/Frontend/graphic/svg9.jpg
Binary file added team#1 - 4/Frontend/graphic/textures.jpg
Binary file added team#1 - 4/Frontend/graphic/yel2.jpg
Binary file added team#1 - 4/Frontend/graphic/yel3.jpg
111 changes: 111 additions & 0 deletions team#1 - 4/Frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Merienda:wght@400;700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cookie&family=Merienda:wght@400;700&display=swap" rel="stylesheet">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>E-Chikitsa</title>
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
<link rel="stylesheet" href="ping.css">
<link rel="stylesheet" href="responsive.css">
<link rel="stylesheet" href="responsivemobile.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

</head>


<body onload="logfunc()">
<div class="abovenav">

<div class="headingcontainer">
<h1 class="heading">E-Chikitsa</h1>
<h4 class="heading2"></h4>
</div>

</div>
<nav>
<ul>
<li><a class="current" href="">Home</a></li>
<li><a class="noncurrent" href="">About</a></li>
</ul>
</nav>
<main>
<div class="welcomeimg"></div>
<section class = "sec1">
<section class = "patient" id="patient_auth">
<!-- <div class="pregister">
<a href = "pregister.html"><button>Regitser</button></a>
</div>
<div class="plogin">
<a href="dlogin.html"><button>Login</button></a>
</div> -->
</section>
<div id="user_logout" class="patient">
<!-- <button onclick="logout()">Logout</button> -->
</div>
<div id="helloo">
<div class="wboxuser"><h1>Hello: ${data.username}</h1></div>
</div>
<div class="wbox">
<h1>Welcome To<br>....</h1>
</div>
<div class="wrapp">
<ul>
<a href="https://www.google.com/"><li class="facebook"><i class="fa fa-facebook fa-2x" aria-hidden="true"></i></li></a>
<li class="twitter"><i class="fa fa-twitter fa-2x" aria-hidden="true"></i></li>
<li class="instagram"><i class="fa fa-instagram fa-2x" aria-hidden="true"></i></li>
<li class="google"><i class="fa fa-google fa-2x" aria-hidden="true"></i></li>
<li class="whatsapp"><i class="fa fa-whatsapp fa-2x" aria-hidden="true"></i></li>
</ul>
<section class = "doctor" id="doctor_auth">
<!-- <div class="wbox1">
<p>Doctors Only..</p>
<div class="docwrap">
<div class="dregister">
<a href="dregister.html"><button>Regitser</button></a>
</div>
<div class="dlogin">
<a href="dlogin.html"><button>Login</button></a>
</div>
</div>
</div> -->
</section>
</div>
</section>
</main>
</body>
<footer>
<div class="socialbtn">
<div><a href="https://www.google.com/"><i class="fa fa-github">&nbsp|</i></div></a>
<div><i class="fa fa-linkedin">&nbsp|</i></div>
<div><i class="fa fa-instagram">&nbsp|</i></div>
<div><i class="fa fa-youtube"></i></div>
</div>
<section class = "footer_content">
<ul>
<li>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Obcaecati, dolore.</li>
<li>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Obcaecati, dolore.</li>

</ul>
</section>
</footer>
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script src="back.js"></script>
<script>
AOS.init({
offset:180,
duration:800,
});
</script>
</html>
Loading