Академический Документы
Профессиональный Документы
Культура Документы
Figure 7.3.11
51
Return Book Form
Figure 7.3.12
52
Employee Home Form
Figure 7.3.12
53
Mail Information Form
Figure 7.3.13
54
Employee Library Form
Figure 7.3.14
55
Chat Form
Figure 7.3.15
56
Employee Leave Details Form
Figure 7.3.16
57
General Service Form
Figure 7.3.17
58
Message Post Form
Figure 7.3.18
59
View Message Form
Figure 7.3.19
60
CHAPTER 8
CONCLUSION AND FURTHER SCOPE
This particular software, which has been designed and developed for
WINFOCOM SOLUTIONS (P) LTD can be used in various branches. The individual
modules can be used in different application areas. So we can conclude by saying that
this software can be used as a bundle of modules or either individual modules to cater to
the needs of the perspective organization.
This site was developed in such a way that any further modifications needed can
be done easily. It is user-friendly and all technical complexities are hidden.
Future enhancements can be done further in case of the Chatting Module where a
Private Chat can be included.
61
APPENDICES
Authentication.Java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
62
String tusername=null;
String tpassword=null;
while(rs.next()){
tusername=(rs.getString(1)).trim();
out.println(tusername);
tpassword=(rs.getString(2)).trim();
out.println(tpassword);
}
if((fusername.equals(tusername))&&(fpassword.equals(tpassword))){
if(fusername.equals("admin")){
res.sendRedirect("/christo/AdminHome.html");
}
else{
res.sendRedirect("/christo/EmployeeHome.html");
}
}
else{
//out.println("U R not a valid person");
res.sendRedirect("/christo/index.jsp?
message=Invalid User");
}
}
catch(Exception e)
{
out.println(e.getMessage());
63
}
}
}
Admin.Java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:intranet_test","sa","");
Statement st=con.createStatement();
64
ResultSet rs=st.executeQuery("select userid,password from employee where
userid='"+fusername+"'");
String tusername=null;
String tpassword=null;
while(rs.next())
{
tusername=(rs.getString(1)).trim();
out.println(tusername);
tpassword=(rs.getString(2)).trim();
out.println(tpassword);
}
if((fusername.equals(tusername))&&(fpassword.equals(tpassword))){
if(fusername.equals("admin")){
res.sendRedirect("/christo/AdminHome.html");
}
else
{
res.sendRedirect("/christo/EmployeeHome.html");
}
}
else{
//out.println("U R not a valid person");
res.sendRedirect("/christo/index.jsp?message=Invalid User");
}
}
catch(Exception e)
{
out.println(e.getMessage());
65
}
}
}
Chat.Java
import java.io.*;
import java.util.*;
import java.net.*;
66
catch (Exception e)
{
e.printStackTrace();
}
}
try
{
while (true)
{
String str = in.readLine();
//System.out.println(str);
67
{
BroadcastClientHandler t = (BroadcastClientHandler) iter.next();
t.sendMessage (str);
}
} // end while
// incoming.close();
// this client is no longer active
// server.activeClients.remove(this);
}
catch (IOException e)
{
//e.printStackTrace();
}
} // end if
}
}
public class server //BroadcastEchoServer
{
static protected Set activeClients = new HashSet();
68
System.out.println("To Stop Server Press Ctrl+c ......");
while (true)
{
Socket s = ss.accept();
BroadcastClientHandler newClient =
new BroadcastClientHandler (s,i++);
activeClients.add(newClient);
newClient.start();
}
}
catch (Exception e)
{
//e.printStackTrace();
}
}
}
69
BIBILIOGRAPHY
BOOKS
WEBSITES
70