Commit 22f8b912 authored by Sayed Hosseini's avatar Sayed Hosseini
Browse files

add Web Applikation

parent 0b2232c3
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="NotRuf" default="default" basedir=".">
<description>Builds, tests, and runs the project NotRuf.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.
-->
</project>
<%--
Document : Administrator
Created on : 29.11.2017, 10:11:44
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Admin Page</title>
<style>
.title{
position: absolute;
top: calc(10% - 10px);
left: calc(40% - 60px);
font-family: 'Exo', sans-serif;
font-size: 35px;
font-weight: 400;
color: #4B946A;
}
.table-position{
position: absolute;
top: calc(15%);
left: calc(20%);
font-family: 'Exo', sans-serif;
font-size: 20px;
font-weight: 100;
color: #5379fa;
}
</style>
</head>
<body>
<div class="title"
<div>NotArzt Administrator Panel</div>
</div>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="index.jsp"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Home</a></li>
<li><a href="aboutus.html">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> About</a></li>
<li class="dropdown">
<a href="Administrator.jsp" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> Menu <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="Adminitrator.jsp">Main Courses</a></li>
<li><a href="contactus.html#">Bootstrap</a></li>
<li><a href="contactus.html#">Asp</a></li>
<li><a href="contactus.html#">SQl</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">PHP</li>
<li><a href="contactus.html#">MySQl</a></li>
</ul>
</li>
<li><a href="#"><span class="fa fa-envelope-o"></span> Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="signup.jsp" data-toggle="modal" data-target="#loginModal"><span class="glyphicon glyphicon-log-in"></span> patient Anmelden</a></li>
</ul>
</div>
</div>
</nav>
<div id="loginModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"> &times;</button>
<h4>Login</h4>
</div>
<div class="modal-body">
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="email">Email</label><input type="text" class="form-control input-sm" placeholder="Email" id="email" name="email">
</div>
<div class="form-group">
<label class="sr-only" for="password">Password</label>
<input type="password" class="form-control input-sm" placeholder="Password" id="password" name="password"></div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button type="submit" class="btn btn-info btn-xs">Sign in</button>
<button type="button" class="btn btn-default btn-xs" data-dismiss="modal">Cancel</button>
</form>
</div>
<div class="modal-footer">
<div style="padding:10px"></div>
</div>
</div>
</div>
</div>
<form class="table-position" method="post">
<table border="4">
<tr>
<td>Patient ID </td>
<td>Patient Name </td>
<td>Patient Nachname </td>
<td>Patient info </td>
<td>Patient Email </td>
<td>Patient status </td>
<td>Patient Address </td>
</tr>
<%
try{
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/database","root","admin");
PreparedStatement pst = connection.prepareStatement(" select * from patient ");
ResultSet rs = pst.executeQuery();
while(rs.next())
{
%>
<tr>
<td><%out.println(rs.getInt("Pat_ID")); %></td>
<td><%out.println(rs.getString("Pat_Name")); %></td>
<td><%out.println(rs.getString("Pat_LName")); %></td>
<td><%out.println(rs.getString("Pat_Info")); %></td>
<td><%out.println(rs.getString("Pat_email")); %></td>
<td><%out.println(rs.getString("Pat_speci")); %></td>
<td><%out.println(rs.getString("Pat_Address")); %></td>
<td><%rs.getInt("Pat_ID"); %></td>
<td><%rs.getString("Pat_Name"); %></td>
<td><%rs.getString("Pat_LName"); %></td>
<td><%rs.getString("Pat_Info"); %></td>
<td><%rs.getString("Pat_email"); %></td>
<td><%rs.getString("Pat_speci"); %></td>
<td><%rs.getString("Pat_Address"); %></td>
</tr>
<%
}
%>
</table>
<%
rs.close();
pst.close();
connection.close();
}
catch(Exception e){
out.println("something get Wrong "+ e);
}
%>
</form>
</body>
</html>
<%--
Document : Driver
Created on : 29.11.2017, 10:10:46
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Krankenwagen Page</title>
</head>
<body>
<h1>Hello Krankenfahrers</h1>
</body>
</html>
<%--
Document : Hospital
Created on : 29.11.2017, 10:12:53
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>rankenhaus Page</title>
</head>
<body>
<h1>Hello Krankenhaus user!</h1>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/NotRuf"/>
<%--
Document : Monitor
Created on : 29.11.2017, 10:22:59
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Willkommen in MQTT Broker</title>
<style>
.ui-resizable-se {
bottom: 17px;
}
</style>
<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
<script src="js/mqttws31.js" type="text/javascript"></script>
<script src="js/mqtt.js"></script>
</head>
<body>
<h1>NotRuf Project Monitoring Panel</h1>
<button onclick="connect()">1. Connect</button>
<button onclick="subscribe()">2. Subscribe</button>
<button onclick="publish();">3. Publish</button>
<button onclick="disconnect();">(4. Disconnect)</button>
<div id="messages"></div>
<div id="response"></div>
</body>
</html>
<%--
Document : NotArtz
Created on : 18.01.2018, 14:24:55
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NotArzt Page</title>
<style>
.title{
position: absolute;
top: calc(10% - 10px);
left: calc(40% - 60px);
font-family: 'Exo', sans-serif;
font-size: 35px;
font-weight: 400;
color: #4B946A;
}
.table-position{
position: absolute;
top: calc(15%);
left: calc(20%);
font-family: 'Exo', sans-serif;
font-size: 20px;
font-weight: 100;
color: #5379fa;
}
</style>
</head>
<body>
<div class="title"
<div>NotArzt PHP DB Panel</div>
</div>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="index.jsp"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Home</a></li>
<li><a href="messagesQuery.jsp">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> Nachrichten Bank</a></li>
<li class="dropdown">
<a href="NotArzt.jsp" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> Menu <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="Adminitrator.jsp">Main Courses</a></li>
<li><a href="contactus.html#">Bootstrap</a></li>
<li><a href="contactus.html#">Asp</a></li>
<li><a href="contactus.html#">SQl</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">PHP</li>
<li><a href="contactus.html#">MySQl</a></li>
</ul>
</li>
<li><a href="#"><span class="fa fa-envelope-o"></span> Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="index.jsp" data-toggle="modal" data-target="#loginModal"><span class="glyphicon glyphicon-log-in"></span> Abmelden</a></li>
</ul>
</div>
</div>
</nav>
<div id="loginModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"> &times;</button>
<h4>Login</h4>
</div>
<div class="modal-body">
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="email">Email</label><input type="text" class="form-control input-sm" placeholder="Email" id="email" name="email">
</div>
<div class="form-group">
<label class="sr-only" for="password">Password</label>
<input type="password" class="form-control input-sm" placeholder="Password" id="password" name="password"></div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button type="submit" class="btn btn-info btn-xs">Sign in</button>
<button type="button" class="btn btn-default btn-xs" data-dismiss="modal">Cancel</button>
</form>
</div>
<div class="modal-footer">
<div style="padding:10px"></div>
</div>
</div>
</div>
</div>
<form class="table-position" method="post">
<table border="4">
<tr>
<td>Patient ID </td>
<td>Patient Name </td>
<td>Patient Nachname </td>
<td>Patient info </td>
<td>Patient Email </td>
<td>Patient status </td>
<td>Patient Address </td>
</tr>
<%
try{
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://notruf.ddns.net/NotRufDB","root","RootPassWord");
out.println("connection succesfull");
PreparedStatement pst = connection.prepareStatement(" select * from Users ");
ResultSet rs = pst.executeQuery();
while(rs.next())
{
%>
<tr>
<td><%out.println(rs.getInt("UserID")); %></td>
<td><%out.println(rs.getString("UserName")); %></td>
<td><%out.println(rs.getString("UserPassword")); %></td>
<td><%out.println(rs.getString("UserEmail")); %></td>
<td><%out.println(rs.getString("UserLocation")); %></td>
<td><%out.println(rs.getString("UserPhone")); %></td>
<td><%out.println(rs.getString("UserStatus")); %></td>
<td><%rs.getInt("UserID"); %></td>
<td><%rs.getString("UserName"); %></td>
<td><%rs.getString("UserPassword"); %></td>
<td><%rs.getString("UserEmail"); %></td>
<td><%rs.getString("UserLocation"); %></td>
<td><%rs.getString("UserPhone"); %></td>
<td><%rs.getString("UserStatus"); %></td>
</tr>
<%
}
%>
</table>
<%
rs.close();
pst.close();
connection.close();
}
catch(Exception e){
out.println("something get Wrong "+ e);
}
%>
</form>
</body>
</html>
<%--
Document : Nurse
Created on : 29.11.2017, 10:15:30
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Krankenschwester Page</title>
</head>
<body>
<h1>Hello Krankenschwester!</h1>
</body>
</html>
<%--
Document : Patient
Created on : 29.11.2017, 10:23:59
Author : Ehsan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
.title{
position: absolute;
top: calc(10% - 10px);
left: calc(40% - 60px);
font-family: 'Exo', sans-serif;
font-size: 35px;
font-weight: 400;
color: #4B946A;
}
.query-position{
position: absolute;
top: calc(15%);
left: calc(20%);
font-family: 'Exo', sans-serif;
font-size: 20px;
font-weight: 100;
color: #5379fa;
}
.table-position{
position: absolute;
top: calc(15%);
left: calc(20%);
font-family: 'Exo', sans-serif;
font-size: 20px;
font-weight: 100;
color: #5379fa;
}