Current File : //usr/local/tomcat8/work/Catalina/autoclutchess.obaba.in/ROOT/org/apache/jsp/AddTax_jsp.java |
/*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/8.0.39
* Generated at: 2023-07-22 09:16:00 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.sql.*;
import java.sql.*;
public final class AddTax_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent,
org.apache.jasper.runtime.JspSourceImports {
ResultSet rsmaster=null;
ResultSet ra=null;
String logo=null;
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
static {
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(2);
_jspx_dependants.put("/Connection.jsp", Long.valueOf(1639226070539L));
_jspx_dependants.put("/master.jsp", Long.valueOf(1644905420997L));
}
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
static {
_jspx_imports_packages = new java.util.HashSet<>();
_jspx_imports_packages.add("java.sql");
_jspx_imports_packages.add("javax.servlet");
_jspx_imports_packages.add("javax.servlet.http");
_jspx_imports_packages.add("javax.servlet.jsp");
_jspx_imports_classes = null;
}
private volatile javax.el.ExpressionFactory _el_expressionfactory;
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public java.util.Set<java.lang.String> getPackageImports() {
return _jspx_imports_packages;
}
public java.util.Set<java.lang.String> getClassImports() {
return _jspx_imports_classes;
}
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
if (_el_expressionfactory == null) {
synchronized (this) {
if (_el_expressionfactory == null) {
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
}
}
}
return _el_expressionfactory;
}
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
if (_jsp_instancemanager == null) {
synchronized (this) {
if (_jsp_instancemanager == null) {
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
}
}
return _jsp_instancemanager;
}
public void _jspInit() {
}
public void _jspDestroy() {
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
final java.lang.String _jspx_method = request.getMethod();
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD");
return;
}
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=ISO-8859-1");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write(" ");
out.write("\n");
out.write(" \n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
out.write("<html>\n");
out.write("<head>\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n");
out.write("\n");
out.write("</head>\n");
out.write("<body>\n");
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://Localhost/obabain_auto","obabain_auto","FemZ6PmH!");
out.write("\n");
out.write("</body>\n");
out.write("</html>\n");
out.write("\r\n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n");
out.write("<title>Insert title here</title>\r\n");
out.write("\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("\r\n");
out.write(" \r\n");
out.write(" ");
out.write("\r\n");
out.write(" ");
Class.forName("com.mysql.jdbc.Driver");
Connection con1=DriverManager.getConnection("jdbc:mysql://Localhost/obabain_auto","obabain_auto","FemZ6PmH!");
String loginid=(String)session.getAttribute("logid");
String name=(String)session.getAttribute("uname");
String firstname=(String)session.getAttribute("firstname");
String type=(String)session.getAttribute("typ");
String userid=(String)session.getAttribute("userid");
Statement sl=con1.createStatement();
ResultSet rl=sl.executeQuery("select * from ip_logo where login_id="+loginid+"");
while(rl.next())
{
logo=rl.getString("name");
}
out.write("\r\n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n");
out.write(" <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"img/ico.ico\" />\r\n");
out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\">\r\n");
out.write(" <link href=\"css/estilos.css\" rel=\"stylesheet\">\r\n");
out.write(" \r\n");
out.write(" <link href=\"css/Mystyle.css\" rel=\"stylesheet\">\r\n");
out.write(" <script src=\"http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js\"></script>\r\n");
out.write(" <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js\"></script>\r\n");
out.write("<script src=\"js/jscolor.js\"></script>\r\n");
out.write(" \r\n");
out.write("<style>\r\n");
out.write("body {\r\n");
out.write(" font-family: \"Lato\", sans-serif;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* Fixed sidenav, full height */\r\n");
out.write(".sidenav {\r\n");
out.write(" \r\n");
out.write(" /* position: fixed; */\r\n");
out.write(" z-index: 1;\r\n");
out.write(" \r\n");
out.write(" left: 0;\r\n");
out.write(" background-color: white;\r\n");
out.write(" overflow-x: hidden;\r\n");
out.write(" height:170%;\r\n");
out.write(" /* padding-top: 10px; */\r\n");
out.write(" \r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* Style the sidenav links and the dropdown button */\r\n");
out.write(".sidenav a, .dropdown-btn {\r\n");
out.write(" padding: 6px 8px 6px 16px;\r\n");
out.write(" text-decoration: none;\r\n");
out.write(" font-size: 16px;\r\n");
out.write(" color: #043722;\r\n");
out.write(" display: block;\r\n");
out.write(" border: none;\r\n");
out.write(" background: none;\r\n");
out.write(" width: 100%;\r\n");
out.write(" text-align: left;\r\n");
out.write(" cursor: pointer;\r\n");
out.write(" outline: none;\r\n");
out.write(" border-bottom:1px solid #bdc0c788;\r\n");
out.write(" font-weight:bold;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* On mouse-over */\r\n");
out.write(".sidenav a:hover, .dropdown-btn:hover {\r\n");
out.write(" color: #17724D;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* Main content */\r\n");
out.write(".main {\r\n");
out.write(" margin-left: 200px; /* Same as the width of the sidenav */\r\n");
out.write(" font-size: 20px; /* Increased text to enable scrolling */\r\n");
out.write(" padding: 0px 10px;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* Add an active class to the active dropdown button */\r\n");
out.write(".active {\r\n");
out.write(" \r\n");
out.write(" color: #17724D;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */\r\n");
out.write(".dropdown-container {\r\n");
out.write(" display: none;\r\n");
out.write(" background-color: #009191;\r\n");
out.write(" padding-left: 8px;\r\n");
out.write("}\r\n");
out.write("/* Optional: Style the caret down icon */\r\n");
out.write(".fa-caret-down {\r\n");
out.write(" float: right;\r\n");
out.write(" padding-right: 8px;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("/* Some media queries for responsiveness */\r\n");
out.write("@media screen and (max-height: 450px) {\r\n");
out.write(" .sidenav {padding-top: 15px;}\r\n");
out.write(" .sidenav a {font-size: 18px;}\r\n");
out.write("}\r\n");
out.write("</style>\r\n");
out.write("<title>Insert title here</title>\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("<nav class=\"navbar navbar-default\" >\r\n");
out.write(" <div class=\"container\">\r\n");
out.write(" <div class=\"navbar-header\">\r\n");
out.write(" <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\">\r\n");
out.write(" <span class=\"sr-only\">Toggle navigation</span>\r\n");
out.write(" <span class=\"icon-bar\"></span>\r\n");
out.write(" <span class=\"icon-bar\"></span>\r\n");
out.write(" <span class=\"icon-bar\"></span>\r\n");
out.write(" </button>\r\n");
out.write(" <!-- <a class=\"navbar-brand\" href=\"#\">Admin</a> -->\r\n");
out.write(" </div>\r\n");
out.write(" <div id=\"navbar\" class=\"collapse navbar-collapse\">\r\n");
out.write(" <ul class=\"nav navbar-nav\">\r\n");
out.write(" <li><a href=\"Dashboard.jsp\">Dashboard</a></li>\r\n");
out.write(" <li><a href=\"customerNew.jsp\" >Customer</a></li>\r\n");
out.write(" <li><a href=\"supplier.jsp\" >Supplier</a></li>\r\n");
out.write(" <li><a href=\"AddProduct.jsp\" >Product</a></li>\r\n");
out.write(" <li><a href=\"POmain.jsp\" >Purchase Order</a></li>\r\n");
out.write(" <!-- <li><a href=\"SalesQuotationMain.jsp\" >Sales Quotation</a></li> -->\r\n");
out.write(" <li><a href=\"SalesInvoiceMain.jsp\"> Sales Invoice</a></li>\r\n");
out.write(" <!-- <li><a href=\"InventoryPurchase_Invoiceselection.jsp\">Add Stock</a></li> --> \r\n");
out.write(" </ul>\r\n");
out.write(" <ul class=\"nav navbar-nav navbar-right\">\r\n");
out.write(" <li><a href=\"#\">Welcome, ");
out.print(firstname );
out.write(" </a></li>\r\n");
out.write(" <li><a href=\"logout.jsp\">LogOut</a></li>\r\n");
out.write(" </ul>\r\n");
out.write(" </div><!--/.nav-collapse -->\r\n");
out.write(" </div>\r\n");
out.write(" </nav><header id=\"header\">\r\n");
out.write(" <div class=\"container\">\r\n");
out.write(" <div class=\"row\">\r\n");
out.write(" <div class=\"col-md-10\">\r\n");
out.write(" ");
Statement smaster=con1.createStatement();
ResultSet rdetails=smaster.executeQuery("select * from ip_users where login_id='"+loginid+"'");
while(rdetails.next())
{
out.write("\r\n");
out.write(" <div class=\"col-md-2\"> <img src=\"");
out.print(logo);
out.write("\"></div> <h1><marquee class=\"col-md-8\" style=\"font-family:Book Antiqua; color:linear-gradient(55deg, #0fb8ad 0%, #1fc8db 51%, #2cb5e8 85%);\" scrollamount=\"12\" scrolldelay=\"10\"><b> ");
out.print(rdetails.getString("user_company"));
out.write("</b></marquee> <small></small></h1> \r\n");
out.write(" \r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"col-md-2\">\r\n");
out.write(" <div class=\"dropdown crear\">\r\n");
out.write(" <button class=\"btn btn-info dropdown-toggle\" style=\"background:#009191\" type=\"button\" id=\"dropdownMenu1\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"true\">\r\n");
out.write(" Settings\r\n");
out.write(" <span class=\"caret\"></span>\r\n");
out.write(" </button>\r\n");
out.write(" <ul class=\"dropdown-menu\" aria-labelledby=\"dropdownMenu1\">\r\n");
out.write(" \r\n");
out.write(" <li><a href=\"SystemAdmin.jsp\">System Admin</a></li>\r\n");
out.write(" <li><a href=\"UserAdmin.jsp\">User Admin</a></li>\r\n");
out.write(" \r\n");
out.write(" </ul>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" </header>\r\n");
out.write(" <div class=\"col-xs-2\" >\r\n");
out.write("<div class=\"sidenav \" >\r\n");
out.write("<button class=\"dropdown-btn \" style=\"background-color:#009191;color:white; \"><span class=\"glyphicon glyphicon-cog\"></span>Dashboard</button>\r\n");
try{
if(name==null || name==""){
response.sendRedirect("index.html");
}
else
{
Statement stmaster=con1.createStatement();
//rsmaster=stmaster.executeQuery("select * from ip_menu_creation where menu_parent_id=0 and status=0 order by sortorder asc");
// rsmaster=stmaster.executeQuery("select * from ip_menu_creation where menu_parent_id=0 and status=0 and id in(select menu_id from ip_menu_permission where userid="+loginid+") order by sortorder asc");
if(type.equals("B"))
{
rsmaster=stmaster.executeQuery("select * from ip_menu_creation where menu_parent_id=0 and status=0 and id in(select menu_id from ip_menu_permission where userid="+loginid+") order by sortorder asc");
}
else
{
rsmaster=stmaster.executeQuery("select * from ip_menu_creation where menu_parent_id=0 and status=0 and id in(select menu_id from ip_menu_permission_user where userid="+userid+") order by sortorder asc");
}
while(rsmaster.next())
{
out.write("\r\n");
out.write(" <button class=\"dropdown-btn\" style=\"background-color:#3CB371;color:white;\"> <span class=\"glyphicon glyphicon-forward\" ></span> ");
out.print(rsmaster.getString("menu_name") );
out.write("\r\n");
out.write(" \r\n");
out.write(" </button>\r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write("<div class=\"dropdown-container\" style=\"background-color:white;\">\r\n");
out.write(" ");
Statement stmt=con1.createStatement();
//ra=stmt.executeQuery("select * from ip_menu_creation where menu_parent_id="+rsmaster.getString("id")+" and status=0 order by sortorder asc");
//ra=stmt.executeQuery("select * from ip_menu_creation where menu_parent_id="+rsmaster.getString("id")+" and status=0 and id in(select menu_id from ip_menu_permission where userid="+loginid+") order by sortorder asc");
if(type.equals("B"))
{
ra=stmt.executeQuery("select * from ip_menu_creation where menu_parent_id="+rsmaster.getString("id")+" and status=0 and id in(select menu_id from ip_menu_permission where userid="+loginid+") order by sortorder asc");
}
else
{
ra=stmt.executeQuery("select * from ip_menu_creation where menu_parent_id="+rsmaster.getString("id")+" and status=0 and id in(select menu_id from ip_menu_permission_user where userid="+userid+") order by sortorder asc");
}
while(ra.next())
{
out.write("\r\n");
out.write(" <a href=\"");
out.print(ra.getString("redirection_page") );
out.write('"');
out.write('>');
out.print(ra.getString("menu_name") );
out.write("</a>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write("</div>\r\n");
}}
}
catch(Exception el){out.print(el);}
out.write("\r\n");
out.write("\r\n");
out.write("</div>\r\n");
out.write("</div>\r\n");
out.write("</body>\r\n");
out.write("<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"></script>\r\n");
out.write(" <script src=\"js/bootstrap.min.js\"></script>\t\r\n");
out.write("<script>\r\n");
out.write("/* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content - This allows the user to have multiple dropdowns without any conflict */\r\n");
out.write("var dropdown = document.getElementsByClassName(\"dropdown-btn\");\r\n");
out.write("var i;\r\n");
out.write("\r\n");
out.write("for (i = 0; i < dropdown.length; i++) {\r\n");
out.write(" dropdown[i].addEventListener(\"click\", function() {\r\n");
out.write(" this.classList.toggle(\"active\");\r\n");
out.write(" \r\n");
out.write(" var dropdownContent = this.nextElementSibling;\r\n");
out.write(" if (dropdownContent.style.display === \"block\") {\r\n");
out.write(" dropdownContent.style.display = \"none\";\r\n");
out.write(" } else {\r\n");
out.write(" dropdownContent.style.display = \"block\";\r\n");
out.write(" }\r\n");
out.write(" return false;\r\n");
out.write(" });\r\n");
out.write("}\r\n");
out.write("</script>\r\n");
out.write("</html>");
out.write("\r\n");
out.write("<form action=\"\" method=\"post\">\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<div class=\"content\">\r\n");
out.write("<div class=\"row\">\r\n");
out.write("<div class=\"col-md-9\" style=\"width:50%;background-color:white;\">\r\n");
out.write("<div class=\"panel panel-default\" >\r\n");
out.write(" <div class=\"panel-heading main-color-bg\">\r\n");
out.write(" <h3 class=\"panel-title\">Add Tax Rate</h3>\r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" <div class=\"headerbar-item pull-right\">\r\n");
out.write(" \r\n");
out.write("<a href=\"ViewTax.jsp\" style=\"background:#204b58\" class=\"btn btn-info\">View</a>\r\n");
out.write("</div>\r\n");
out.write(" <div class=\"panel-body\">\r\n");
out.write(" Tax Rate Name\r\n");
out.write(" <input type=\"text\" name=\"trname\" class=\"trname form-control txtstylesmall\">\r\n");
out.write("\r\n");
out.write(" \r\n");
out.write("</div>\r\n");
out.write(" <div class=\"panel-body\">\r\n");
out.write(" Tax Rate Percentage\r\n");
out.write(" <input type=\"text\" name=\"trperc\" class=\"trperc form-control txtstylesmall\">\r\n");
out.write("\r\n");
out.write(" \r\n");
out.write("</div>\r\n");
out.write("<div class=\"modal-footer\" id=\"contact_submit\">\r\n");
out.write("<a style=\"background:#204b58\" class=\"btn btn-info pull-left\" onclick=\"goBack()\">Back</a>\r\n");
out.write("<a class=\"btn btn-default\" href=\"AddTax.jsp\">Reset</a>\r\n");
out.write("<input type=\"submit\" value=\"Save Changes\" class=\"save btn btn-info\" style=\"background:#204b58\">\r\n");
out.write("\r\n");
out.write("</div>\r\n");
out.write("</div>\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
try
{
Statement st=con.createStatement();
String trname=request.getParameter("trname");
String trperc=request.getParameter("trperc");
if(trname.equals("") || trperc.equals("") )
{
response.sendRedirect("AddTax.jsp");
}
else
{
int i=st.executeUpdate("insert into ip_tax_rates values(0,upper('"+trname+"'),"+trperc+","+loginid+")");
response.sendRedirect("ViewTax.jsp");
}
}
catch(Exception el){}
out.write("\r\n");
out.write("</div>\r\n");
out.write("</div>\r\n");
out.write("<script type=\"text/javascript\">\r\n");
out.write("function goBack() {\r\n");
out.write(" window.history.back();\r\n");
out.write(" \r\n");
out.write("};\r\n");
out.write("</script>\r\n");
out.write("<script>\r\n");
out.write("$(document).on(\"click\",\".save\", function(){\r\n");
out.write("\tif($(\".trname\").val()==\"\")\r\n");
out.write("\t\t{\r\n");
out.write("\t\talert(\"Please enter Tax Rate Name\");\r\n");
out.write("\t\t}\r\n");
out.write("\tif($(\".trperc\").val()==\"\")\r\n");
out.write("\t{\r\n");
out.write("\talert(\"Please enter Tax Rate Percentage\");\r\n");
out.write("\t}\r\n");
out.write("})\r\n");
out.write("</script>\r\n");
out.write("</form>\r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>");
} catch (java.lang.Throwable t) {
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
try {
if (response.isCommitted()) {
out.flush();
} else {
out.clearBuffer();
}
} catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}