diff --git a/Akshya-1710991067-G-01.rar b/Akshya-1710991067-G-01.rar new file mode 100644 index 0000000..78b580a Binary files /dev/null and b/Akshya-1710991067-G-01.rar differ diff --git a/online library System/onlinelibrary/SRI.BAT b/online library System/onlinelibrary/SRI.BAT new file mode 100644 index 0000000..9816349 --- /dev/null +++ b/online library System/onlinelibrary/SRI.BAT @@ -0,0 +1,3 @@ +copy *.class c:\javaserver1.0\servlets +copy *.html c:\javaserver1.0\public_html +copy *.gif c:\javaserver1.0\public_html diff --git a/online library System/onlinelibrary/addbooks.class b/online library System/onlinelibrary/addbooks.class new file mode 100644 index 0000000..ac47a89 Binary files /dev/null and b/online library System/onlinelibrary/addbooks.class differ diff --git a/online library System/onlinelibrary/addbooks.html b/online library System/onlinelibrary/addbooks.html new file mode 100644 index 0000000..02ac95c --- /dev/null +++ b/online library System/onlinelibrary/addbooks.html @@ -0,0 +1,25 @@ + + + +

Stock Maintenance

+

+

+

+

+Book Name +      Book Code +

+        Author +Date Of Arrival +

+          Price +            Rack No +

+No Of Books +    Subject Code +

+

+
+ + + diff --git a/online library System/onlinelibrary/addbooks.java b/online library System/onlinelibrary/addbooks.java new file mode 100644 index 0000000..69de12f --- /dev/null +++ b/online library System/onlinelibrary/addbooks.java @@ -0,0 +1,42 @@ +import java.sql.*; +import javax.servlet.*; + +public class addbooks extends GenericServlet +{ + Connection con; + + public void init(ServletConfig sc) + { + try + { + super.init(sc); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + con = DriverManager.getConnection("jdbc:odbc:sri","gscl","granada"); + } + catch(Exception e){e.printStackTrace();} + } + + public void service(ServletRequest req,ServletResponse res) + { + try + { + Statement st = con.createStatement(); + String str1 = req.getParameter("bn"); + String str2 = req.getParameter("bc"); + String str3 = req.getParameter("aut"); + String str4 = req.getParameter("doa"); + String str5 = req.getParameter("pr"); + String str6 = req.getParameter("rn"); + String str7 = req.getParameter("nob"); + String str8 = req.getParameter("sc"); + ServletOutputStream sos = res.getOutputStream(); + int k = st.executeUpdate("insert into addbooks values('"+str1+"','"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str6+"','"+str7+"','"+str8+"')"); + if(k>0) + sos.println("books are added successfully"); + else + sos.println("books are not added"); + } + catch(Exception ex){ex.printStackTrace();} + } +} + diff --git a/online library System/onlinelibrary/addmembers.class b/online library System/onlinelibrary/addmembers.class new file mode 100644 index 0000000..10bb61e Binary files /dev/null and b/online library System/onlinelibrary/addmembers.class differ diff --git a/online library System/onlinelibrary/addmembers.html b/online library System/onlinelibrary/addmembers.html new file mode 100644 index 0000000..c02da08 --- /dev/null +++ b/online library System/onlinelibrary/addmembers.html @@ -0,0 +1,27 @@ + + + +

MEMBERSHIP

+

+

+

+

+IdNo +Name +

+Address +Date Of Issue +

+Date Of Expiry +Status of Ms +

+Type of Ms +Amount +

+

+
+ + + + + diff --git a/online library System/onlinelibrary/addmembers.java b/online library System/onlinelibrary/addmembers.java new file mode 100644 index 0000000..26c2ac7 --- /dev/null +++ b/online library System/onlinelibrary/addmembers.java @@ -0,0 +1,44 @@ +import java.sql.*; +import javax.servlet.*; + +public class addmembers extends GenericServlet +{ + Connection con; + + public void init(ServletConfig sc) + { + try + { + super.init(sc); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + con = DriverManager.getConnection("jdbc:odbc:sri","gscl","granada"); + } + catch(Exception e){e.printStackTrace();} + } + + public void service(ServletRequest req,ServletResponse res) + { + try + { + Statement st = con.createStatement(); + String s1 = req.getParameter("idno"); + String s2 = req.getParameter("mname"); + String s3 = req.getParameter("maddress"); + String s4 = req.getParameter("doi"); + String s5 = req.getParameter("doe"); + String s6 = req.getParameter("som"); + String s7 = req.getParameter("tom"); + String s8 = req.getParameter("amt"); + ServletOutputStream sos = res.getOutputStream(); + int i = st.executeUpdate("insert into members values('"+s1+"','"+s2+"','"+s3+"','"+s4+"','"+s5+"','"+s6+"','"+s7+"','"+s8+"')"); + if(i>0) + sos.println("data is successfully added"); + else + sos.println("data is not added"); + } + catch(Exception e){e.printStackTrace();} + } +} + + + diff --git a/online library System/onlinelibrary/books.class b/online library System/onlinelibrary/books.class new file mode 100644 index 0000000..b869abb Binary files /dev/null and b/online library System/onlinelibrary/books.class differ diff --git a/online library System/onlinelibrary/books.java b/online library System/onlinelibrary/books.java new file mode 100644 index 0000000..01e4a58 --- /dev/null +++ b/online library System/onlinelibrary/books.java @@ -0,0 +1,45 @@ +import javax.servlet.*; +import java.sql.*; + +public class books extends GenericServlet +{ + Connection con; + ResultSet rs; + Statement st ; + + public void init(ServletConfig sc) + { + try + { + super.init(sc); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + con = DriverManager.getConnection("jdbc:odbc:sri","gscl","granada"); + } + catch(Exception e){e.printStackTrace();} + } + + public void service(ServletRequest req,ServletResponse res) + { + try + { + st=con.createStatement(); + rs = st.executeQuery("select * from addbooks"); + ServletOutputStream sos = res.getOutputStream(); + sos.println("Currently existing books are"); + if(rs.next()) + sos.println(""); + while(rs.next()) + { + sos.println(""); + } + sos.println("
BNAMEBCODEAUTHORDATEOFARRPRICERACKNONOOFBOOKSSUBJCODE
"+rs.getString(1)+""+rs.getString(2)+""+rs.getString(3)+""+rs.getString(4)+""+rs.getString(5)+""+rs.getString(6)+""+rs.getString(7)+""+rs.getString(8)+"
"); + st.close(); + rs.close(); + } + catch(Exception ex){ex.printStackTrace();} + } +} + + + + diff --git a/online library System/onlinelibrary/homepage.html b/online library System/onlinelibrary/homepage.html new file mode 100644 index 0000000..4419bc8 --- /dev/null +++ b/online library System/onlinelibrary/homepage.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/online library System/onlinelibrary/lending.class b/online library System/onlinelibrary/lending.class new file mode 100644 index 0000000..2e77185 Binary files /dev/null and b/online library System/onlinelibrary/lending.class differ diff --git a/online library System/onlinelibrary/lending.html b/online library System/onlinelibrary/lending.html new file mode 100644 index 0000000..3e25ff0 --- /dev/null +++ b/online library System/onlinelibrary/lending.html @@ -0,0 +1,21 @@ + + + +

ISSUE OF BOOKS

+
+

+

+

+Id No +Book Name +

+Date Of Issue +Date Of Expiry +

+

+
+ + + + + diff --git a/online library System/onlinelibrary/lending.java b/online library System/onlinelibrary/lending.java new file mode 100644 index 0000000..a012b59 --- /dev/null +++ b/online library System/onlinelibrary/lending.java @@ -0,0 +1,38 @@ +import java.sql.*; +import javax.servlet.*; + +public class lending extends GenericServlet +{ + Connection con; + + public void init(ServletConfig sc) + { + try + { + super.init(sc); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + con = DriverManager.getConnection("jdbc:odbc:sri","gscl","granada"); + } + catch(Exception e){e.printStackTrace();} + } + + public void service(ServletRequest req,ServletResponse res) + { + try + { + Statement st = con.createStatement(); + String st1 = req.getParameter("lin"); + String st2 = req.getParameter("lbn"); + String st3 = req.getParameter("ldoi"); + String st4 = req.getParameter("ldoe"); + int j =st.executeUpdate("insert into issue values('"+st1+"','"+st2+"','"+st3+"','"+st4+"')"); + ServletOutputStream sos = res.getOutputStream(); + if(j>0) + sos.println("

The data is added successfully

"); + else + sos.println("

The data is not added

"); + } + catch(Exception ex){ex.printStackTrace();} + } +} + diff --git a/online library System/onlinelibrary/members.class b/online library System/onlinelibrary/members.class new file mode 100644 index 0000000..0f9a377 Binary files /dev/null and b/online library System/onlinelibrary/members.class differ diff --git a/online library System/onlinelibrary/members.java b/online library System/onlinelibrary/members.java new file mode 100644 index 0000000..9cf9a61 --- /dev/null +++ b/online library System/onlinelibrary/members.java @@ -0,0 +1,45 @@ +import javax.servlet.*; +import java.sql.*; + +public class members extends GenericServlet +{ + Connection con; + ResultSet rs; + Statement st ; + + public void init(ServletConfig sc) + { + try + { + super.init(sc); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + con = DriverManager.getConnection("jdbc:odbc:sri","gscl","granada"); + } + catch(Exception e){e.printStackTrace();} + } + + public void service(ServletRequest req,ServletResponse res) + { + try + { + st=con.createStatement(); + rs = st.executeQuery("select * from members"); + ServletOutputStream sos = res.getOutputStream(); + sos.println("Currently existing members are"); + if(rs.next()) + sos.println(""); + while(rs.next()) + { + sos.println(""); + } + sos.println("
MIDMNAMEMADDRMDOIMDOEMSTATUSMTYPEAMOUNT
"+rs.getString(1)+""+rs.getString(2)+""+rs.getString(3)+""+rs.getString(4)+""+rs.getString(5)+""+rs.getString(6)+""+rs.getString(7)+""+rs.getString(8)+"
"); + st.close(); + rs.close(); + } + catch(Exception ex){ex.printStackTrace();} + } +} + + + + diff --git a/online library System/onlinelibrary/options.html b/online library System/onlinelibrary/options.html new file mode 100644 index 0000000..2e453b0 --- /dev/null +++ b/online library System/onlinelibrary/options.html @@ -0,0 +1,23 @@ + + + + +

+MEMBERS +

+ ADD MEMBERS +

+BOOKS +

+ ADD BOOKS +

+ LENDING +

+ RETURNING +

+ REPORTS + + + + + diff --git a/online library System/onlinelibrary/reports.html b/online library System/onlinelibrary/reports.html new file mode 100644 index 0000000..3ed3156 --- /dev/null +++ b/online library System/onlinelibrary/reports.html @@ -0,0 +1,23 @@ + + + +

REPORT

+
+

+

+

+Id no +Name +
+
+
+
+
+
+              +                +            +

+ + + diff --git a/online library System/onlinelibrary/returning.class b/online library System/onlinelibrary/returning.class new file mode 100644 index 0000000..965a620 Binary files /dev/null and b/online library System/onlinelibrary/returning.class differ diff --git a/online library System/onlinelibrary/returning.html b/online library System/onlinelibrary/returning.html new file mode 100644 index 0000000..2ac80da --- /dev/null +++ b/online library System/onlinelibrary/returning.html @@ -0,0 +1,21 @@ + + + +

RETURN OF BOOKS

+
+

+

+

+Id No +Book Name +

+Date Of Issue +Date Of Expiry +

+

+ + + + + + diff --git a/online library System/onlinelibrary/returning.java b/online library System/onlinelibrary/returning.java new file mode 100644 index 0000000..812319a --- /dev/null +++ b/online library System/onlinelibrary/returning.java @@ -0,0 +1,40 @@ +import java.sql.*; +import javax.servlet.*; + +public class returning extends GenericServlet +{ + Connection con; + + public void init(ServletConfig sc) + { + try + { + super.init(sc); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + con = DriverManager.getConnection("jdbc:odbc:sri","gscl","granada"); + } + catch(Exception e){e.printStackTrace();} + } + + public void service(ServletRequest req,ServletResponse res) + { + try + { + Statement st = con.createStatement(); + String st1 = req.getParameter("rin"); + String st2 = req.getParameter("bn"); + String st3 = req.getParameter("doi"); + String st4 = req.getParameter("doe"); + int j =st.executeUpdate("delete from issue where idno ='"+st1+"' and bookname ='"+st2+"'"); + ServletOutputStream sos = res.getOutputStream(); + if(j>0) + sos.println("

The book is deleted

"); + else + sos.println("

The book is not deleted

"); + } + catch(Exception ex){ex.printStackTrace();} + } +} + + + diff --git a/online library System/onlinelibrary/title.html b/online library System/onlinelibrary/title.html new file mode 100644 index 0000000..70e8e01 --- /dev/null +++ b/online library System/onlinelibrary/title.html @@ -0,0 +1,8 @@ + + +

ONLINE LIBRARY

+

+

+

SYSTEM

+ +