Skip to content
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
Binary file added hosp/CHA_Hospital.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 hosp/WebContent/1.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 hosp/WebContent/2057&v=fit512.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hosp/WebContent/ArtGalleries.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
212 changes: 212 additions & 0 deletions hosp/WebContent/DEPT.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>DEPARTMENT INFORMATION WINDOW</title>
</head>
<body background ="ArtGalleries.jpg" bgproperties="fixed">
<body>
<center><h1>DEPARTMENT INFORMATION</h1>
<form action="DEPT.jsp" method="post" name="f1" >
<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %>
<table BORDER=3><br><br><br>
<tr><td>DEPARTMENT ID<input type="text" name="t1" maxlength=10 size=20><BR>
</td>
<td><h4>DEPARTMENT DETAILS</h4>
</td>
</tr>
<tr>
<td>
<input type="submit" name="Button1" value="ADD DEPARTMENT"><br><br>
<input type="submit" name="Button1" value="SEARCH DEPARTMENT PROFILE"><br><br>
<input type="submit" name="Button1" value="DELETE DEPARTMENT PROFILE"><br><br>
<input type="submit" name="Button1" value="EDIT DEPARTMENT PROFILE"><br><br>
<%
try
{ a=request.getParameter("Button1");
if(a.equals("SEARCH DEPARTMENT PROFILE"))
{
String str1= request.getParameter("t1");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data");
Statement s= c.createStatement();
if(str1!="")
{
String sql2="select * from department where dept_id='"+str1+"'";
ResultSet r=s.executeQuery(sql2);
if(r.next())
{
j=r.getString(1);
b=r.getString(2);
d=r.getString(3);
e=r.getString(4);
f=r.getString(5);
}
else
{
%><script language="javascript">
alert("DEPARTMENT ID=<%=str1%>does not exist in database..!!!");
</script>
<%
}

}
else
{
%><script language="javascript">
alert("ENTER DEPARTMENT ID TO SEARCH..!!!");
</script>
<%
}
}
}catch(Exception e) {}
%>

</td>
<td>
DEPARTMENT NAME<input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR>
DEPARTMENT DOCTOR<input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR>
DEPARTMENT HEAD<input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR>
PHONE NO<input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR>
</td></tr>
<%
try{

a=request.getParameter("Button1");
String str1= request.getParameter("t1");
String str2= request.getParameter("t2");
String str3= request.getParameter("t3");
String str4= request.getParameter("t4");
String str5= request.getParameter("t5");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data");
Statement s= c.createStatement();
if(a.equals("ADD DEPARTMENT PROFILE"))
{

if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!="")
{
String sql="insert into department values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+")";
out.println(sql);
s.execute(sql);
%><script language="javascript">
alert("INSERT SUCESSFUL");
</script>
<%
}
else
{
%><script language="javascript">
alert("ENTER COMPLETE DETAILS..!!!");
</script>
<%
}
}
else if(a.equals("DELETE DEPARTMENT PROFILE"))
{
if(str1!="")
{
String sq="select * from department where dept_id="+str1+"";
ResultSet rs1=s.executeQuery(sq);
if(rs1.next())
{

String sql="delete from department where dept_id="+str1+"";
s.execute(sql);
%><script language="javascript">
alert("PROFILE OF DEPARTMENT WITH ID <%=str1%>DELETED");
</script>
<%
}
else
{
%><script language="javascript">
alert("INVALID DEPARTMENT ID <%=str1%>..!!!");
</script>
<%
}
}
else
{
%><script language="javascript">
alert("ENTER DEPARTMENT'S ID TO DELETE..!!!");
</script>
<%
}
}
else if(a.equals("EDIT DEPARTMENT PROFILE"))
{
if(str1!="")
{
String sq="select * from department where dept_id="+str1+"";
ResultSet rs1=s.executeQuery(sq);
if(rs1.next())
{
String sql="delete from department where dept_id="+str1+"";
s.execute(sql);
String sql1="insert into department values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+")";
s.execute(sql1);
%><script language="javascript">
alert("PROFILE OF DEPARTMENT WITH ID <%=str1%>EDITED");
</script>
<%
}
else
{
%><script language="javascript">
alert("INVALID DEPARTMENT ID <%=str1%>..!!!");
</script>
<%
}
}
else
{
%><script language="javascript">
alert("ENTER DEPARTMENT'S ID TO EDIT..!!!");
</script>
<%
}
}
}catch(Exception e) {}

%>
</table>
<h4>DEPARTMENT PROFILE TABLE</h4>
<table cellspacing=3 cellpadding=5 border="2" >

<th colspan=1 align=center>DEPT ID</th>
<th colspan=1 align=center>DEPT NAME</th>
<th colspan=1 align=center>DEPT DOCTOR</th>
<th colspan=1 align=center>DEPT HEAD</th>
<th colspan=1 align=center>DEPT PHONE</th>
<%
try
{
String str1= request.getParameter("t1");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data");
Statement s= c.createStatement();
String q="select * from department";
ResultSet rs9=s.executeQuery(q);
while(rs9.next())
{%><tr>

<%
for (int i=1; i<=5; i++)
{
out.println( "<td > " + rs9.getString (i) );

}
}%></tr><%
}catch(Exception e) {}
%>
</table>


</form>
<input type="button" name="bttn" value="HOME" onclick="location.href='home.jsp'">
</center>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions hosp/WebContent/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

10 changes: 10 additions & 0 deletions hosp/WebContent/META-INF/bill.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>
Binary file added hosp/WebContent/University_College_Hospital.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions hosp/WebContent/WEB-INF/addpat.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>
22 changes: 22 additions & 0 deletions hosp/WebContent/WEB-INF/adpat.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1>ADD PATIENT</h1>
PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR>
PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR>
PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR>
CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR>
GENDER<input type="text" name="t1" maxlength=10 size=20><BR>
DATE OF BIRTH<input type="text" name="t1" maxlength=10 size=20><BR>
DOCTOR FEE<input type="text" name="t1" maxlength=10 size=20><BR>
FATHERS NAME<input type="text" name="t1" maxlength=10 size=20><BR>
BLOOD GROUP<input type="text" name="t1" maxlength=10 size=20><BR>

</body>
</html>
19 changes: 19 additions & 0 deletions hosp/WebContent/WEB-INF/attnd.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR>
PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR>
PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR>
CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR>
GENDER<SELECT>
<option>MALE
<OPTION> FEMALE
</SELECT><BR>
</body>
</html>
12 changes: 12 additions & 0 deletions hosp/WebContent/WEB-INF/bill.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>
58 changes: 58 additions & 0 deletions hosp/WebContent/WEB-INF/dropdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
var DDSPEED = 10;
var DDTIMER = 15;

// main function to handle the mouse events //
function ddMenu(id,d){
var h = document.getElementById(id + '-ddheader');
var c = document.getElementById(id + '-ddcontent');
clearInterval(c.timer);
if(d == 1){
clearTimeout(h.timer);
if(c.maxh && c.maxh <= c.offsetHeight){return}
else if(!c.maxh){
c.style.display = 'block';
c.style.height = 'auto';
c.maxh = c.offsetHeight;
c.style.height = '0px';
}
c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
}else{
h.timer = setTimeout(function(){ddCollapse(c)},50);
}
}

// collapse the menu //
function ddCollapse(c){
c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}

// cancel the collapse if a user rolls over the dropdown //
function cancelHide(id){
var h = document.getElementById(id + '-ddheader');
var c = document.getElementById(id + '-ddcontent');
clearTimeout(h.timer);
clearInterval(c.timer);
if(c.offsetHeight < c.maxh){
c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
}
}

// incrementally expand/contract the dropdown and change the opacity //
function ddSlide(c,d){
var currh = c.offsetHeight;
var dist;
if(d == 1){
dist = (Math.round((c.maxh - currh) / DDSPEED));
}else{
dist = (Math.round(currh / DDSPEED));
}
if(dist <= 1 && d == 1){
dist = 1;
}
c.style.height = currh + (dist * d) + 'px';
c.style.opacity = currh / c.maxh;
c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
clearInterval(c.timer);
}
}
19 changes: 19 additions & 0 deletions hosp/WebContent/WEB-INF/empattnd.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR>
PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR>
PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR>
CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR>
GENDER<SELECT>
<option>MALE
<OPTION> FEMALE
</SELECT><BR>
</body>
</html>
Loading