commit
ce794d22b3
2124 changed files with 117304 additions and 0 deletions
-
14.classpath
-
31.project
-
12.settings/.jsdtscope
-
3.settings/org.eclipse.core.resources.prefs
-
15.settings/org.eclipse.jdt.core.prefs
-
14.settings/org.eclipse.wst.common.component
-
9.settings/org.eclipse.wst.common.project.facet.core.xml
-
1.settings/org.eclipse.wst.jsdt.ui.superType.container
-
1.settings/org.eclipse.wst.jsdt.ui.superType.name
-
BINbuild/classes/cocmis_new/tempServlet/tempServlet.class
-
49src/main/java/cocmis_new/tempServlet/tempServlet.java
-
19src/main/webapp/DBCon.jsp
-
19src/main/webapp/DBCon_cityexp.jsp
-
18src/main/webapp/DBCon_coc.jsp
-
18src/main/webapp/DBCon_erp.jsp
-
2src/main/webapp/DB_Table.txt
-
BINsrc/main/webapp/Doc/CDMP Zone-1.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-10.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-11.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-12.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-13.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-14.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-15.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-2.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-3.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-4.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-5.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-6.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-7.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-8.pdf
-
BINsrc/main/webapp/Doc/CDMP Zone-9.pdf
-
3src/main/webapp/META-INF/MANIFEST.MF
-
BINsrc/main/webapp/VANAVIL-DB-Avvaiyar.TTF
-
BINsrc/main/webapp/WEB-INF/classes/ARIALUNI.TTF
-
20src/main/webapp/WEB-INF/classes/DBConnection.xml
-
20src/main/webapp/WEB-INF/classes/DBConnection_ora.xml
-
20src/main/webapp/WEB-INF/classes/DBConnection_ora_1.xml
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMis.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMis.class09-Agu-2011
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMis.class_18-Nov-2011
-
612src/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMis.java
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMisDoc.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMisDoc.class09-Agu-2011
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMisDoc.class_18-Nov-2011
-
66src/main/webapp/WEB-INF/classes/com/corp/cocmis/CocMisDoc.java
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/common/DBConnection.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/common/DBConnection11.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/common/DBConnectionTrade_ora.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/common/DBConnection_local_ora.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/common/DBConnection_ora.class
-
BINsrc/main/webapp/WEB-INF/classes/com/corp/qrcode_new.class
-
BINsrc/main/webapp/WEB-INF/lib/commons-beanutils-1.5.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-beanutils-1.7.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-codec-1.3.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-codec-1.7-sources.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-collections-2.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-dbcp-1.2.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-digester-1.7.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-httpclient-3.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-io-1.3.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-javaflow-20060411.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-logging-1.0.2.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-logging-api-1.0.2.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-math-1.0.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-pool-1.3.jar
-
BINsrc/main/webapp/WEB-INF/lib/commons-vfs-1.0.jar
-
BINsrc/main/webapp/WEB-INF/lib/core-3.3.0.jar
-
BINsrc/main/webapp/WEB-INF/lib/itext-1.3.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/jasperreports-3.0.0.jar
-
BINsrc/main/webapp/WEB-INF/lib/jasperreports-extensions-1.3.1.jar
-
BINsrc/main/webapp/WEB-INF/lib/jasperreports-flash-2.0.5.jar
-
BINsrc/main/webapp/WEB-INF/lib/json-rpc-1.0.jar
-
BINsrc/main/webapp/WEB-INF/lib/ojdbc14.jar
-
BINsrc/main/webapp/WEB-INF/lib/poi-3.6-20091214.jar
-
BINsrc/main/webapp/WEB-INF/lib/qrgen-1.0.jar
-
BINsrc/main/webapp/WEB-INF/lib/zxing-core-1.7.jar
-
BINsrc/main/webapp/WEB-INF/lib/zxing-j2se-1.7.jar
-
BINsrc/main/webapp/WEB-INF/lib/zxing.jar
-
12src/main/webapp/WEB-INF/web.xml
-
177src/main/webapp/change_password.jsp
-
19src/main/webapp/cocDBCon.jsp
-
15src/main/webapp/com_soon.jsp
-
105src/main/webapp/common.js
-
145src/main/webapp/css.js
-
65src/main/webapp/css/main.css
-
BINsrc/main/webapp/emblem.gif
-
3src/main/webapp/frametest.htm
-
279src/main/webapp/grev_repl_sve.jsp
-
10src/main/webapp/grv_DBCon.jsp
-
114src/main/webapp/grv_ack_det.jsp
-
114src/main/webapp/grv_ack_det_mail.jsp
-
238src/main/webapp/grv_ack_prn.jsp
-
132src/main/webapp/grv_comp_det.jsp
-
226src/main/webapp/grv_dt.jsp
-
117src/main/webapp/grv_rpt_sel.jsp
-
142src/main/webapp/grv_sum_comp_type.jsp
-
204src/main/webapp/grv_upd.jsp
-
183src/main/webapp/grv_upd_prn.jsp
-
59src/main/webapp/home.jsp
@ -0,0 +1,14 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<classpath> |
||||
|
<classpathentry kind="src" path="src/main/java"/> |
||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> |
||||
|
<attributes> |
||||
|
<attribute name="module" value="true"/> |
||||
|
</attributes> |
||||
|
</classpathentry> |
||||
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> |
||||
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> |
||||
|
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ojdbc14.jar"/> |
||||
|
<classpathentry kind="lib" path="C:/Users/Bimal Kalsa/Downloads/javax.servlet-api-3.1.0.jar"/> |
||||
|
<classpathentry kind="output" path="build/classes"/> |
||||
|
</classpath> |
||||
@ -0,0 +1,31 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<projectDescription> |
||||
|
<name>cocmis_new</name> |
||||
|
<comment></comment> |
||||
|
<projects> |
||||
|
</projects> |
||||
|
<buildSpec> |
||||
|
<buildCommand> |
||||
|
<name>org.eclipse.jdt.core.javabuilder</name> |
||||
|
<arguments> |
||||
|
</arguments> |
||||
|
</buildCommand> |
||||
|
<buildCommand> |
||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name> |
||||
|
<arguments> |
||||
|
</arguments> |
||||
|
</buildCommand> |
||||
|
<buildCommand> |
||||
|
<name>org.eclipse.wst.validation.validationbuilder</name> |
||||
|
<arguments> |
||||
|
</arguments> |
||||
|
</buildCommand> |
||||
|
</buildSpec> |
||||
|
<natures> |
||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> |
||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> |
||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> |
||||
|
<nature>org.eclipse.jdt.core.javanature</nature> |
||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> |
||||
|
</natures> |
||||
|
</projectDescription> |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<classpath> |
||||
|
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="src/main/webapp"/> |
||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> |
||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> |
||||
|
<attributes> |
||||
|
<attribute name="hide" value="true"/> |
||||
|
</attributes> |
||||
|
</classpathentry> |
||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> |
||||
|
<classpathentry kind="output" path=""/> |
||||
|
</classpath> |
||||
@ -0,0 +1,3 @@ |
|||||
|
eclipse.preferences.version=1 |
||||
|
encoding//src/main/webapp/pgr/grev_rep_list.jsp=UTF-8 |
||||
|
encoding/<project>=UTF-8 |
||||
@ -0,0 +1,15 @@ |
|||||
|
eclipse.preferences.version=1 |
||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
||||
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate |
||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 |
||||
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
||||
|
org.eclipse.jdt.core.compiler.compliance=1.8 |
||||
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
||||
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate |
||||
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled |
||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning |
||||
|
org.eclipse.jdt.core.compiler.release=disabled |
||||
|
org.eclipse.jdt.core.compiler.source=1.8 |
||||
@ -0,0 +1,14 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> |
||||
|
|
||||
|
<wb-module deploy-name="cocmis_new"> |
||||
|
|
||||
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> |
||||
|
|
||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> |
||||
|
|
||||
|
<property name="java-output-path" value="/cocmis_new/build/classes"/> |
||||
|
<property name="context-root" value="cocmis_new"/> |
||||
|
|
||||
|
</wb-module> |
||||
|
|
||||
|
</project-modules> |
||||
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<faceted-project> |
||||
|
<fixed facet="jst.web"/> |
||||
|
<fixed facet="java"/> |
||||
|
<fixed facet="wst.jsdt.web"/> |
||||
|
<installed facet="wst.jsdt.web" version="1.0"/> |
||||
|
<installed facet="java" version="1.8"/> |
||||
|
<installed facet="jst.web" version="3.0"/> |
||||
|
</faceted-project> |
||||
@ -0,0 +1 @@ |
|||||
|
org.eclipse.wst.jsdt.launching.baseBrowserLibrary |
||||
@ -0,0 +1 @@ |
|||||
|
Window |
||||
@ -0,0 +1,49 @@ |
|||||
|
package cocmis_new.tempServlet; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
import javax.servlet.ServletException; |
||||
|
import javax.servlet.annotation.WebServlet; |
||||
|
import javax.servlet.http.HttpServlet; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
|
||||
|
/** |
||||
|
* Servlet implementation class JavaFileView |
||||
|
*/ |
||||
|
@WebServlet("/JavaFileView") |
||||
|
public class tempServlet extends HttpServlet { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* @see HttpServlet#HttpServlet() |
||||
|
*/ |
||||
|
public tempServlet() { |
||||
|
super(); |
||||
|
// TODO Auto-generated constructor stub |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse |
||||
|
* response) |
||||
|
*/ |
||||
|
@Override |
||||
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) |
||||
|
throws ServletException, IOException { |
||||
|
// TODO Auto-generated method stub |
||||
|
// response.getWriter().append("Served at: ").append(request.getContextPath()); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse |
||||
|
* response) |
||||
|
*/ |
||||
|
@Override |
||||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) |
||||
|
throws ServletException, IOException { |
||||
|
// TODO Auto-generated method stub |
||||
|
// doGet(request, response); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
<%-- <%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"FAS","FAS"); |
||||
|
System.out.println(l_sUrl +" BIRTHTEST" +" BIRTHTEST"); |
||||
|
|
||||
|
%> --%> |
||||
|
|
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@localhost:1521:xe"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"fas","fas"); |
||||
|
%> |
||||
@ -0,0 +1,19 @@ |
|||||
|
<%-- <%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sCityExpUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sCityExpDriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sCityExpDriver); |
||||
|
Connection ConCityExp = DriverManager.getConnection(l_sCityExpUrl,"city_exp","city_exp"); |
||||
|
System.out.println(ConCityExp); |
||||
|
%> |
||||
|
--%> |
||||
|
|
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@localhost:1521:xe"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"fas","fas"); |
||||
|
%> |
||||
@ -0,0 +1,18 @@ |
|||||
|
<%-- <%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"coc","coc"); |
||||
|
System.out.println(Con); |
||||
|
%> --%> |
||||
|
|
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@localhost:1521:xe"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"fas","fas"); |
||||
|
%> |
||||
@ -0,0 +1,18 @@ |
|||||
|
<%-- <%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl_erp = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sdriver_erp = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver_erp); |
||||
|
Connection ErpCon = DriverManager.getConnection(l_sUrl_erp,"erp","erp"); |
||||
|
System.out.println(ErpCon); |
||||
|
%> --%> |
||||
|
|
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@localhost:1521:xe"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"fas","fas"); |
||||
|
%> |
||||
@ -0,0 +1,2 @@ |
|||||
|
create table tbl_reports rpt_id number(3,0),rpt_desc varchar2(150),dep_id varchar2(4) |
||||
|
create table tbl_user_rpt_permission user_id varchar2(3),rpt_id number(3,0) |
||||
@ -0,0 +1,3 @@ |
|||||
|
Manifest-Version: 1.0 |
||||
|
Class-Path: |
||||
|
|
||||
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- |
||||
|
This DBConnection.xml is used to have a configuaration variables |
||||
|
Author: Arockia Doss A |
||||
|
--> |
||||
|
<!-- =================================================================== --> |
||||
|
<!-- set global properties for this variables --> |
||||
|
<!-- =================================================================== --> |
||||
|
|
||||
|
<database |
||||
|
username="postgres" |
||||
|
password="postgres" |
||||
|
dbdriver="org.postgresql.Driver" |
||||
|
dbconnection="jdbc:postgresql://localhost:5432/chennaicorp?autoReconnect=true" |
||||
|
profile="CORP"> |
||||
|
</database> |
||||
|
|
||||
|
<!-- =================================================================== --> |
||||
|
<!-- END XML FILE --> |
||||
|
<!-- =================================================================== --> |
||||
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- |
||||
|
This DBConnection.xml is used to have a configuaration variables |
||||
|
Author: Arockia Doss A |
||||
|
--> |
||||
|
<!-- =================================================================== --> |
||||
|
<!-- set global properties for this variables --> |
||||
|
<!-- =================================================================== --> |
||||
|
|
||||
|
<database |
||||
|
username="TESTUSER" |
||||
|
password="TEST" |
||||
|
dbdriver="oracle.jdbc.driver.OracleDriver" |
||||
|
dbconnection="jdbc:oracle:thin:@10.1.0.10:1521:chncorp" |
||||
|
profile="corp"> |
||||
|
</database> |
||||
|
|
||||
|
<!-- =================================================================== --> |
||||
|
<!-- END XML FILE --> |
||||
|
<!-- =================================================================== --> |
||||
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- |
||||
|
This DBConnection.xml is used to have a configuaration variables |
||||
|
Author: Arockia Doss A |
||||
|
--> |
||||
|
<!-- =================================================================== --> |
||||
|
<!-- set global properties for this variables --> |
||||
|
<!-- =================================================================== --> |
||||
|
|
||||
|
<database |
||||
|
username="coc" |
||||
|
password="coc" |
||||
|
dbdriver="oracle.jdbc.driver.OracleDriver" |
||||
|
dbconnection="jdbc:oracle:thin:@10.1.0.14:1521:chncorp" |
||||
|
profile="corp"> |
||||
|
</database> |
||||
|
|
||||
|
<!-- =================================================================== --> |
||||
|
<!-- END XML FILE --> |
||||
|
<!-- =================================================================== --> |
||||
@ -0,0 +1,612 @@ |
|||||
|
|
||||
|
package com.corp.cocmis; |
||||
|
|
||||
|
/** |
||||
|
*@author : valan Nevis.M |
||||
|
*@Date : 01-12-2010 |
||||
|
Modification History |
||||
|
Name : Vijay MP |
||||
|
Date : 30-Dec-2010 |
||||
|
Issue : Add project description to insert & update functions |
||||
|
*/ |
||||
|
|
||||
|
import java.*; |
||||
|
import java.io.*; |
||||
|
import java.text.*; |
||||
|
import java.util.*; |
||||
|
import java.sql.*; |
||||
|
import com.corp.cocmis.*; |
||||
|
import com.corp.cocmis.CocMisDoc; |
||||
|
|
||||
|
public class CocMis |
||||
|
{ |
||||
|
Connection Con = null; |
||||
|
// ID |
||||
|
int iID = 0; // 0-Testing 1- Server |
||||
|
public CocMis() throws Exception |
||||
|
{ |
||||
|
String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Con = DriverManager.getConnection(l_sUrl,"coc_mis","coc_mis"); |
||||
|
|
||||
|
System.out.println(" MIS DB Con :"+ Con); |
||||
|
} |
||||
|
|
||||
|
public void setDBConnection(Connection pCon) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
if ( Con != null ) Con.close(); |
||||
|
if ( pCon != null ) Con = pCon; |
||||
|
} |
||||
|
catch(Exception e) |
||||
|
{ |
||||
|
System.out.println("Error : setDBConnection "+ e); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public long write(CocMisDoc doc,int p_iID) |
||||
|
{ |
||||
|
iID = p_iID; |
||||
|
|
||||
|
System.out.println(" Insert Start project_mast "); |
||||
|
long lProjectID = 0; |
||||
|
|
||||
|
ResultSet rs = null; |
||||
|
Statement stmt = null; |
||||
|
|
||||
|
try { |
||||
|
|
||||
|
//String sQry = "select max(proj_id) from project_mast"; |
||||
|
/*String sQry = "select seq_project_id "; |
||||
|
System.out.println(sQry); |
||||
|
Statement stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
if ( rs.next() ) |
||||
|
lProjectID = rs.getLong(1); |
||||
|
if ( rs != null ) { rs.close(); } |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
|
||||
|
lProjectID++; |
||||
|
System.out.println(" Read Nominee project_mast ID :"+ lProjectID); */ |
||||
|
|
||||
|
String sQry = ""; |
||||
|
//System.out.println(sQry); |
||||
|
//if ( p_iID != 0 ) |
||||
|
{ |
||||
|
sQry = "select seq_project_id.nextval from dual"; |
||||
|
System.out.println(sQry); |
||||
|
stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
if ( rs.next() ) |
||||
|
{ |
||||
|
doc.sProjectID = rs.getString(1); |
||||
|
//lProjectID = Long.parseLong(doc.sProjectID); |
||||
|
} |
||||
|
if ( rs != null ) { rs.close(); } |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
System.out.println("lProjectID : "+ doc.sProjectID +" : "+ lProjectID); |
||||
|
} |
||||
|
|
||||
|
StringBuffer sqlString = new StringBuffer("insert into project_mast("); |
||||
|
sqlString.append("proj_id,exe_dept,zone,div_cd,proj_desc,area_id,loc_id,st_id,"); |
||||
|
sqlString.append("est_amt,est_no,adm_dt,source_id,tender_dt,"); |
||||
|
sqlString.append("fin_dt,work_order_dt,tender_Value,agr_dt,"); |
||||
|
sqlString.append("pd_contract,work_id,remarks,CR_NO,WORK_COMPLETED,WORK_CANCELLED,"); |
||||
|
sqlString.append("NEW_ZONE,NEW_DIV_CD"); |
||||
|
sqlString.append(") values ("); |
||||
|
|
||||
|
sqlString.append("'"+ doc.sProjectID +"',"); |
||||
|
//sqlString.append("coc_mis.seq_project_id.nextval@elcot,"); |
||||
|
//sqlString.append("'1',"); |
||||
|
sqlString.append("'"+ doc.sDepID + "',"); |
||||
|
sqlString.append(doc.iZone + ","); |
||||
|
sqlString.append(doc.iDivision + ","); |
||||
|
sqlString.append("'"+ doc.sProjectDes + "',"); |
||||
|
|
||||
|
sqlString.append(doc.iAreaID + ","); |
||||
|
sqlString.append(doc.iLocationID + ","); |
||||
|
sqlString.append(doc.iStreetID + ","); |
||||
|
|
||||
|
if( doc.sEstimateAmt.equals("") ) doc.sEstimateAmt = "0"; |
||||
|
sqlString.append(doc.sEstimateAmt + ","); |
||||
|
//sqlString.append(doc.dEstimateAmt + ","); |
||||
|
sqlString.append("'"+ doc.sEstimateNo + "',"); |
||||
|
|
||||
|
if( !doc.sADMDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sADMDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sADMDate + "',"); |
||||
|
|
||||
|
sqlString.append("'',"); |
||||
|
//sqlString.append("'"+ doc.sSouFundID + "',"); |
||||
|
|
||||
|
if( !doc.sTenderDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sTenderDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sTenderDate + "',"); |
||||
|
|
||||
|
if( !doc.sTenderFinDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sTenderFinDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sTenderFinDate + "',"); |
||||
|
|
||||
|
if( !doc.sWorkOrderDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sWorkOrderDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sWorkOrderDate + "',"); |
||||
|
|
||||
|
if( doc.sTenderAmt.equals("") ) doc.sTenderAmt = "0"; |
||||
|
sqlString.append( doc.sTenderAmt + ","); |
||||
|
//sqlString.append( doc.dTenderAmt + ","); |
||||
|
|
||||
|
if( !doc.sAgreeDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sAgreeDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sAgreeDate + "',"); |
||||
|
|
||||
|
/*if( !doc.sConPrdDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sConPrdDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sConPrdDate + "',");*/ |
||||
|
sqlString.append(doc.iConPrd + ","); |
||||
|
|
||||
|
sqlString.append( "'"+ doc.sNatWrkID + "',"); |
||||
|
|
||||
|
/* |
||||
|
// |
||||
|
sqlString.append("'"+ doc.sNatStatusWrkID + "',"); |
||||
|
if( !doc.sNatStatusWrkDate.equals("") ) |
||||
|
sqlString.append("to_date('"+ doc.sNatStatusWrkDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("'"+ doc.sNatStatusWrkDate + "',");*/ |
||||
|
|
||||
|
sqlString.append("'"+ doc.sRemarks + "',"); |
||||
|
|
||||
|
sqlString.append("'"+ doc.sCrNo + "',"); |
||||
|
sqlString.append("'"+ doc.sWorkCompleted + "',"); |
||||
|
sqlString.append("'"+ doc.sWorkCancelled+"',"); |
||||
|
|
||||
|
sqlString.append( doc.iNewZone + "," ); |
||||
|
sqlString.append( doc.iNewDivision ); |
||||
|
sqlString.append(")"); |
||||
|
|
||||
|
System.out.println(sqlString.toString()); |
||||
|
|
||||
|
sQry = sqlString.toString(); |
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Insert(project_mast) "+ sQry); |
||||
|
//conn.insertSQL1(sqlString.toString()) ; |
||||
|
stmt = Con.createStatement(); |
||||
|
stmt.executeUpdate(sQry); |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
|
||||
|
StringBuffer sqlString1 = new StringBuffer("insert into project_status("); |
||||
|
sqlString1.append("proj_id,status_id,status_dt,remarks"); |
||||
|
sqlString1.append(") values ("); |
||||
|
|
||||
|
sqlString1.append("'"+ doc.sProjectID + "',"); |
||||
|
sqlString1.append("'"+ doc.sNatStatusWrkID + "',"); |
||||
|
|
||||
|
if( !doc.sNatStatusWrkDate.equals("") ) |
||||
|
sqlString1.append("to_date('"+ doc.sNatStatusWrkDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString1.append("'"+ doc.sNatStatusWrkDate + "',"); |
||||
|
|
||||
|
sqlString1.append("'"+ doc.sRemarks + "')"); |
||||
|
System.out.println(sqlString1.toString()); |
||||
|
//conn.insertSQL1(sqlString1.toString()) ; |
||||
|
|
||||
|
sQry = sqlString1.toString(); |
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Insert(project_status) "+ sQry); |
||||
|
stmt = Con.createStatement(); |
||||
|
stmt.executeUpdate(sQry); |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
// Insert Source of Fund |
||||
|
insertSFund(doc); |
||||
|
} |
||||
|
catch(Exception e) |
||||
|
{ |
||||
|
System.out.println("Error : Store into project_mast"+ e); return 0; |
||||
|
} |
||||
|
|
||||
|
System.out.println("Success : project_mast"); |
||||
|
|
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
public void insertSFund(CocMisDoc doc) |
||||
|
{ |
||||
|
if ( doc.sSouFundID == null || doc.sSouFundID.equals("") ) return; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
String[] saSFund = doc.sSouFundID.split(","); |
||||
|
for(int i=0; i<saSFund.length; i++) |
||||
|
{ |
||||
|
StringBuffer sqlString1 = new StringBuffer("insert into project_source("); |
||||
|
sqlString1.append("proj_id,source_id"); |
||||
|
sqlString1.append(") values ("); |
||||
|
|
||||
|
sqlString1.append("'"+ doc.sProjectID + "',"); |
||||
|
sqlString1.append("'"+ saSFund[i] + "')"); |
||||
|
System.out.println(sqlString1.toString()); |
||||
|
|
||||
|
String sQry = sqlString1.toString(); |
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Insert(project_source) "+ sQry); |
||||
|
Statement stmt = Con.createStatement(); |
||||
|
stmt.executeUpdate(sQry); |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
} |
||||
|
} |
||||
|
catch(Exception e) |
||||
|
{ |
||||
|
System.out.println("Error : Store into project_SFund"+ e); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public long update(String sProjectID,CocMisDoc doc,int p_iID) |
||||
|
{ |
||||
|
iID = p_iID; |
||||
|
if ( sProjectID.equals("") ) return 0; |
||||
|
if ( Long.parseLong(sProjectID) <=0 ) return 0; |
||||
|
|
||||
|
System.out.println(" Update Start project_mast CocMisid : "+ sProjectID); |
||||
|
|
||||
|
try { |
||||
|
StringBuffer sqlString = new StringBuffer("update project_mast "); |
||||
|
sqlString.append("set "); |
||||
|
|
||||
|
sqlString.append("exe_dept='"+ doc.sDepID + "',"); |
||||
|
sqlString.append("zone="+ doc.iZone + ","); |
||||
|
sqlString.append("div_cd="+ doc.iDivision + ","); |
||||
|
sqlString.append("proj_desc='"+ doc.sProjectDes + "',"); |
||||
|
sqlString.append("area_id="+ doc.iAreaID + ","); |
||||
|
sqlString.append("loc_id="+ doc.iLocationID + ","); |
||||
|
sqlString.append("st_id="+ doc.iStreetID + ","); |
||||
|
if( doc.sEstimateAmt.equals("") ) doc.sEstimateAmt = "0"; |
||||
|
sqlString.append("est_amt="+ doc.sEstimateAmt + ","); |
||||
|
//sqlString.append("est_amt="+ doc.dEstimateAmt + ","); |
||||
|
sqlString.append("est_no='"+ doc.sEstimateNo + "',"); |
||||
|
|
||||
|
if( !doc.sADMDate.equals("") ) |
||||
|
sqlString.append("adm_dt=to_date('"+ doc.sADMDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("adm_dt='"+ doc.sADMDate + "',"); |
||||
|
|
||||
|
//sqlString.append("source_id='"+ doc.sSouFundID + "',"); |
||||
|
|
||||
|
if( !doc.sTenderDate.equals("") ) |
||||
|
sqlString.append("tender_dt=to_date('"+ doc.sTenderDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("tender_dt='"+ doc.sTenderDate + "',"); |
||||
|
|
||||
|
if( !doc.sTenderFinDate.equals("") ) |
||||
|
sqlString.append("fin_dt=to_date('"+ doc.sTenderFinDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("fin_dt='"+ doc.sTenderFinDate + "',"); |
||||
|
|
||||
|
if( !doc.sWorkOrderDate.equals("") ) |
||||
|
sqlString.append("work_order_dt=to_date('"+ doc.sWorkOrderDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("work_order_dt='"+ doc.sWorkOrderDate + "',"); |
||||
|
|
||||
|
|
||||
|
sqlString.append("tender_Value="+ doc.sTenderAmt + ","); |
||||
|
//sqlString.append("tender_Value="+ doc.dTenderAmt + ","); |
||||
|
|
||||
|
if( !doc.sAgreeDate.equals("") ) |
||||
|
sqlString.append("agr_dt=to_date('"+ doc.sAgreeDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("agr_dt='"+ doc.sAgreeDate + "',"); |
||||
|
|
||||
|
/*if( !doc.sConPrdDate.equals("") ) |
||||
|
sqlString.append("pd_contract=to_date('"+ doc.sConPrdDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("pd_contract='"+ doc.sConPrdDate + "',");*/ |
||||
|
|
||||
|
sqlString.append("pd_contract="+ doc.iConPrd + ","); |
||||
|
sqlString.append("work_id='"+ doc.sNatWrkID + "',"); |
||||
|
|
||||
|
/* |
||||
|
sqlString.append("='"+ doc.sNatStatusWrkID + "',"); |
||||
|
if( !doc.sNatStatusWrkDate.equals("") ) |
||||
|
sqlString.append("=to_date('"+ doc.sNatStatusWrkDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString.append("='"+ doc.sNatStatusWrkDate + "',");*/ |
||||
|
|
||||
|
sqlString.append("remarks='"+ doc.sRemarks + "',"); |
||||
|
sqlString.append("CR_NO='"+ doc.sCrNo + "',"); |
||||
|
sqlString.append("WORK_COMPLETED='"+ doc.sWorkCompleted + "',"); |
||||
|
sqlString.append("WORK_CANCELLED='"+ doc.sWorkCancelled + "', "); |
||||
|
|
||||
|
sqlString.append("NEW_ZONE="+ doc.iNewZone + ","); |
||||
|
sqlString.append("NEW_DIV_CD="+ doc.iNewDivision ); |
||||
|
|
||||
|
sqlString.append(" where proj_id='" + sProjectID +"'"); |
||||
|
System.out.println(sqlString.toString()); |
||||
|
|
||||
|
String sQry = sqlString.toString(); |
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Update(project_mast) "+ sQry); |
||||
|
|
||||
|
Statement stmt = Con.createStatement(); |
||||
|
stmt.executeUpdate(sQry); |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
//Con.executeUpdate(sqlString.toString()); |
||||
|
|
||||
|
StringBuffer sqlString1 = new StringBuffer("insert into project_status("); |
||||
|
sqlString1.append("proj_id,status_id,status_dt,remarks"); |
||||
|
sqlString1.append(") values ("); |
||||
|
|
||||
|
sqlString1.append("'"+ sProjectID + "',"); |
||||
|
sqlString1.append("'"+ doc.sNatStatusWrkID + "',"); |
||||
|
|
||||
|
if( !doc.sNatStatusWrkDate.equals("") ) |
||||
|
sqlString1.append("to_date('"+ doc.sNatStatusWrkDate + "','dd/mm/yyyy'),"); |
||||
|
else |
||||
|
sqlString1.append("'"+ doc.sNatStatusWrkDate + "',"); |
||||
|
|
||||
|
sqlString1.append("'"+ doc.sRemarks + "')"); |
||||
|
System.out.println(sqlString1.toString()); |
||||
|
|
||||
|
sQry = sqlString1.toString(); |
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Update(project_status) "+ sQry); |
||||
|
|
||||
|
//conn.insertSQL1(sqlString1.toString()) ; |
||||
|
stmt = Con.createStatement(); |
||||
|
stmt.executeUpdate(sQry); |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
|
||||
|
// Update Source of Fund |
||||
|
doc.sProjectID = sProjectID; |
||||
|
sQry = "delete from project_source where proj_id='" + doc.sProjectID +"'"; |
||||
|
|
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Delete(project_source) "+ sQry); |
||||
|
|
||||
|
stmt = Con.createStatement(); |
||||
|
stmt.executeUpdate(sQry); |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
System.out.println("COCMIS : Update(project_source) "+ sQry); |
||||
|
insertSFund(doc); |
||||
|
|
||||
|
} |
||||
|
catch(Exception e) |
||||
|
{ |
||||
|
System.out.println("Error : Update into project_mast"+ e); return 0; |
||||
|
} |
||||
|
|
||||
|
System.out.println("Success : Update into project_mast"); |
||||
|
|
||||
|
return Long.parseLong(sProjectID); |
||||
|
} |
||||
|
|
||||
|
public boolean delete(long lProjectID) |
||||
|
{ |
||||
|
/*System.out.println(" Delete Start project_mast proj_id : "+ lProjectID); |
||||
|
|
||||
|
DBConnection_ora conn = new DBConnection_ora(); |
||||
|
try { |
||||
|
StringBuffer sqlString = new StringBuffer("delete from project_mast"); |
||||
|
sqlString.append(" where proj_id=" + lProjectID ); |
||||
|
System.out.println(sqlString.toString()); |
||||
|
conn.deleteSQL(sqlString.toString()); |
||||
|
} |
||||
|
catch(Exception e) |
||||
|
{ |
||||
|
if ( conn != null ) { conn.close(); } |
||||
|
System.out.println("Error : Delete project_mast"+ e); return false; |
||||
|
} |
||||
|
|
||||
|
if ( conn != null ) { conn.close(); } |
||||
|
|
||||
|
System.out.println("Success : project_mast");*/ |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
public CocMisDoc read(String sProjectID,int p_iID) |
||||
|
{ |
||||
|
iID = p_iID; |
||||
|
System.out.println(" Read Start project_mast proj_id : "+ sProjectID); |
||||
|
|
||||
|
CocMisDoc doc=new CocMisDoc(); |
||||
|
|
||||
|
if ( sProjectID.equals("") ) return doc; |
||||
|
|
||||
|
ResultSet rs = null; |
||||
|
|
||||
|
try { |
||||
|
String sQry = ""; |
||||
|
|
||||
|
//sQry = "select * from project_mast where proj_id="+ lProjectID; |
||||
|
sQry = "select proj_id,exe_dept,zone,div_cd,proj_desc,area_id,loc_id,st_id,"; |
||||
|
sQry += "est_amt,est_no,to_char(adm_dt,'dd/mm/yyyy') adm_dt,source_id,to_char(tender_dt,'dd/mm/yyyy') tender_dt,"; |
||||
|
sQry += "to_char(fin_dt,'dd/mm/yyyy') fin_dt,to_char(work_order_dt,'dd/mm/yyyy') work_order_dt,"; |
||||
|
sQry += "tender_Value,to_char(agr_dt,'dd/mm/yyyy') agr_dt,"; |
||||
|
sQry += "pd_contract,work_id,remarks,CR_NO,nvl(WORK_COMPLETED,'0')WORK_COMPLETED,nvl(WORK_CANCELLED ,'0') WORK_CANCELLED,NEW_ZONE,NEW_DIV_CD "; |
||||
|
sQry += " from project_mast where proj_id='"+ sProjectID +"'"; |
||||
|
|
||||
|
System.out.println(sQry); |
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Read(project_mast) "+ sQry); |
||||
|
|
||||
|
Statement stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
if ( rs.next() ) |
||||
|
{ |
||||
|
|
||||
|
System.out.println("Read 0"); |
||||
|
doc.sProjectID = rs.getString("proj_id"); |
||||
|
doc.sDepID = rs.getString("exe_dept"); |
||||
|
System.out.println("Read 1"); |
||||
|
doc.iZone = rs.getInt("zone"); |
||||
|
System.out.println ("doc.iZone value = "+rs.getInt("zone")); |
||||
|
|
||||
|
doc.iDivision = rs.getInt("div_cd"); |
||||
|
doc.sProjectDes = rs.getString("proj_desc"); |
||||
|
if( doc.sProjectDes == null || doc.sProjectDes.equals("null")) doc.sProjectDes = ""; |
||||
|
System.out.println("Read 1.1"); |
||||
|
doc.iAreaID = rs.getInt("area_id"); |
||||
|
doc.iLocationID = rs.getInt("loc_id"); |
||||
|
doc.iStreetID = rs.getInt("st_id"); |
||||
|
|
||||
|
doc.sEstimateAmt = rs.getString("est_amt"); |
||||
|
//doc.dEstimateAmt = rs.getDouble("est_amt"); |
||||
|
doc.sEstimateNo = rs.getString("est_no"); |
||||
|
if( doc.sEstimateNo == null || doc.sEstimateNo.equals("null")) doc.sEstimateNo = ""; |
||||
|
|
||||
|
doc.sADMDate = rs.getString("adm_dt"); |
||||
|
if( doc.sADMDate == null || doc.sADMDate.equals("null")) doc.sADMDate = ""; |
||||
|
System.out.println("Read 2"); |
||||
|
//doc.sSouFundID = rs.getString("source_id"); |
||||
|
//if( doc.sSouFundID == null || doc.sSouFundID.equals("null")) doc.sSouFundID = ""; |
||||
|
|
||||
|
doc.sTenderDate = rs.getString("tender_dt"); |
||||
|
if( doc.sTenderDate == null || doc.sTenderDate.equals("null")) doc.sTenderDate = ""; |
||||
|
doc.sTenderFinDate = rs.getString("fin_dt"); |
||||
|
if( doc.sTenderFinDate == null || doc.sTenderFinDate.equals("null")) doc.sTenderFinDate = ""; |
||||
|
doc.sWorkOrderDate = rs.getString("work_order_dt"); |
||||
|
if( doc.sWorkOrderDate == null || doc.sWorkOrderDate.equals("null")) doc.sWorkOrderDate = ""; |
||||
|
|
||||
|
doc.dTenderAmt = rs.getDouble("tender_Value"); |
||||
|
//doc.sTenderAmt = rs.getString("tender_Value"); |
||||
|
|
||||
|
|
||||
|
|
||||
|
doc.sAgreeDate = rs.getString("agr_dt"); |
||||
|
if( doc.sAgreeDate == null || doc.sAgreeDate.equals("null")) doc.sAgreeDate = ""; |
||||
|
doc.iConPrd = rs.getInt("pd_contract"); |
||||
|
System.out.println("Read 3"); |
||||
|
doc.sNatWrkID = rs.getString("work_id"); |
||||
|
if( doc.sNatWrkID == null || doc.sNatWrkID.equals("null")) doc.sNatWrkID = ""; |
||||
|
|
||||
|
/* |
||||
|
// |
||||
|
doc.sNatStatusWrkID = rs.getString(""); |
||||
|
doc.sNatStatusWrkDate = rs.getString(""); |
||||
|
*/ |
||||
|
doc.sRemarks = rs.getString("remarks"); |
||||
|
|
||||
|
|
||||
|
doc.sCrNo = rs.getDouble("CR_NO"); |
||||
|
doc.sWorkCompleted = rs.getString("WORK_COMPLETED"); |
||||
|
doc.sWorkCancelled = rs.getString("WORK_CANCELLED"); |
||||
|
|
||||
|
doc.iNewZone = rs.getInt("NEW_ZONE"); |
||||
|
doc.iNewDivision = rs.getInt("NEW_DIV_CD"); |
||||
|
|
||||
|
if( doc.sRemarks == null || doc.sRemarks.equals("null")) doc.sRemarks = ""; |
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ System.out.println("Error : not found!"+ sProjectID); } |
||||
|
|
||||
|
if ( rs != null ) { rs.close(); } |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
|
||||
|
if ( !doc.sProjectID.equals("") ) |
||||
|
{ |
||||
|
//sQry = "SELECT MAX(STATUS_DT) FROM project_status WHERE PROJ_ID="+ doc.lProjectID; |
||||
|
sQry = "SELECT STATUS_ID,to_char(status_dt,'dd/mm/yyyy') status_dt from project_status WHERE STATUS_DT=(SELECT MAX(STATUS_DT) FROM project_status X WHERE X.PROJ_ID='"+ doc.sProjectID+ "')"; |
||||
|
System.out.println(sQry); |
||||
|
|
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Read(project_status) "+ sQry); |
||||
|
|
||||
|
stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
//rs = conn.selectSQL(sQry); |
||||
|
if ( rs.next() ) |
||||
|
{ |
||||
|
doc.sNatStatusWrkDate = rs.getString("status_dt"); |
||||
|
doc.sNatStatusWrkID = rs.getString("STATUS_ID"); |
||||
|
|
||||
|
System.out.println("COCMIS : Read(STATUS_ID) "+ doc.sNatStatusWrkID ); |
||||
|
} |
||||
|
if ( rs != null ) { rs.close(); } |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
|
||||
|
// Read Source of Fund |
||||
|
sQry = "SELECT * from project_source WHERE PROJ_ID='"+ doc.sProjectID+ "'"; |
||||
|
System.out.println(sQry); |
||||
|
|
||||
|
if ( iID == 1 ) |
||||
|
{ |
||||
|
sQry = sQry.replace("coc_mis.",""); |
||||
|
sQry = sQry.replace("@elcot",""); |
||||
|
} |
||||
|
System.out.println("COCMIS : Read(project_source) "+ sQry); |
||||
|
|
||||
|
stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
while ( rs.next() ) |
||||
|
{ |
||||
|
if ( !doc.sSouFundID.equals("") ) doc.sSouFundID += ","; |
||||
|
doc.sSouFundID += rs.getString("source_id"); |
||||
|
} |
||||
|
if ( rs != null ) { rs.close(); } |
||||
|
if ( stmt != null ) { stmt.close(); } |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
catch(Exception e) |
||||
|
{ |
||||
|
System.out.println("Error : Read project_mast"+ e); return doc; |
||||
|
} |
||||
|
|
||||
|
System.out.println("Success : Read project_mast"); |
||||
|
|
||||
|
return doc; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String getComboValue(String p_sQry) |
||||
|
{ |
||||
|
String sCBValues = ""; |
||||
|
return sCBValues; |
||||
|
} |
||||
|
|
||||
|
public String getFieldValue(String p_sQry) |
||||
|
{ |
||||
|
String sFValues = ""; |
||||
|
return sFValues; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
|
||||
|
|
||||
|
package com.corp.cocmis; |
||||
|
|
||||
|
/** |
||||
|
*@author : valan Nevis.M |
||||
|
*@Date : 02-12-2010 |
||||
|
*/ |
||||
|
|
||||
|
import java.*; |
||||
|
import java.io.*; |
||||
|
import java.text.*; |
||||
|
import java.util.*; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.corp.cocmis.*; |
||||
|
|
||||
|
public class CocMisDoc |
||||
|
{ |
||||
|
public String sProjectID = ""; |
||||
|
public int iZone = -1; |
||||
|
public int iDivision = -1; |
||||
|
public String sProjectDes = ""; |
||||
|
public String sDepID = ""; |
||||
|
|
||||
|
public int iAreaID = -1; |
||||
|
public int iLocationID = -1; |
||||
|
public int iStreetID = -1; |
||||
|
|
||||
|
public double dEstimateAmt = -1; |
||||
|
public String sEstimateAmt = ""; |
||||
|
public String sEstimateNo = ""; |
||||
|
|
||||
|
public String sADMDate = ""; |
||||
|
|
||||
|
public String sSouFundID = ""; |
||||
|
|
||||
|
public String sTenderDate = ""; |
||||
|
public String sTenderFinDate = ""; |
||||
|
public String sWorkOrderDate = ""; |
||||
|
|
||||
|
public double dTenderAmt = 0; |
||||
|
public String sTenderAmt = ""; |
||||
|
|
||||
|
public String sAgreeDate = ""; |
||||
|
public int iConPrd = 0; |
||||
|
|
||||
|
public String sNatWrkID = "-1"; |
||||
|
public String sNatStatusWrkID = "-1"; |
||||
|
|
||||
|
public String sNatStatusWrkDate = ""; |
||||
|
public String sRemarks = ""; |
||||
|
public double sCrNo=0; |
||||
|
public String sWorkCompleted="0"; |
||||
|
public String sWorkCancelled="0"; |
||||
|
|
||||
|
public int iNewZone = 0; |
||||
|
public int iNewDivision = 0; |
||||
|
|
||||
|
public int iNewAreaID = 0; |
||||
|
public int iNewLocationID = 0; |
||||
|
public int iNewStreetID = 0; |
||||
|
|
||||
|
public double test_id=0; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> |
||||
|
<display-name>cocmis_new</display-name> |
||||
|
<welcome-file-list> |
||||
|
<welcome-file>index.html</welcome-file> |
||||
|
<welcome-file>index.jsp</welcome-file> |
||||
|
<welcome-file>index.htm</welcome-file> |
||||
|
<welcome-file>default.html</welcome-file> |
||||
|
<welcome-file>default.jsp</welcome-file> |
||||
|
<welcome-file>default.htm</welcome-file> |
||||
|
</welcome-file-list> |
||||
|
</web-app> |
||||
@ -0,0 +1,177 @@ |
|||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" |
||||
|
%> |
||||
|
|
||||
|
<%@include file="DBCon.jsp"%> |
||||
|
|
||||
|
<% |
||||
|
String sUserCode = (String)session.getAttribute("COCMISUserCode"); |
||||
|
String sErrMsg = ""; |
||||
|
|
||||
|
String sPassword=" "; |
||||
|
String old_password=" "; |
||||
|
String sUrl= " "; |
||||
|
String sql=" "; |
||||
|
String login_password=(String)session.getAttribute("COCMISPassword"); |
||||
|
|
||||
|
System.out.println ("sUserCode "+sUserCode); |
||||
|
|
||||
|
if ( sUserCode == null || sUserCode.equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if ( request.getParameter("txt_oldpassword") != null ) |
||||
|
old_password =(String) request.getParameter("txt_oldpassword"); |
||||
|
if ( request.getParameter("txt_password") != null ) |
||||
|
sPassword =(String) request.getParameter("txt_password"); |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
|
||||
|
//sql="Select 1 from user_mast where USER_ID='"+ sUserCode +"' and USER_PWD='"+ old_password +"' "; |
||||
|
sql="Select 1 from MIS_USER_MAST where USER_CODE='"+ sUserCode +"' and USER_PWD='"+ old_password +"'"; |
||||
|
System.out.println (sql); |
||||
|
Statement stmt = Con.createStatement(); |
||||
|
ResultSet rs = stmt.executeQuery(sql); |
||||
|
if (rs.next()) |
||||
|
{ |
||||
|
//sql= "update user_mast set USER_PWD='"+ sPassword +"' where USER_ID='"+ sUserCode +"' and pwd='"+ old_password +"' "; |
||||
|
sql= "update MIS_USER_MAST set USER_PWD='"+ sPassword +"' where USER_CODE='"+ sUserCode +"' and USER_PWD='"+ old_password +"'"; |
||||
|
System.out.println (sql); |
||||
|
session.setAttribute("COCMISPassword",sPassword); |
||||
|
stmt.executeUpdate(sql); |
||||
|
sErrMsg ="Sucessfully Password changed"; |
||||
|
//sUrl="main.jsp"; |
||||
|
//response.sendRedirect(sUrl); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
sErrMsg = "Invalid Old password "; |
||||
|
} |
||||
|
|
||||
|
rs.close(); |
||||
|
stmt.close(); |
||||
|
Con.close(); |
||||
|
|
||||
|
}catch(Exception ex){System.out.println("Error : Conn"+ex.getMessage()); |
||||
|
Con.close(); |
||||
|
} |
||||
|
|
||||
|
Con.close(); |
||||
|
%> |
||||
|
|
||||
|
<head> |
||||
|
<title>Chennai Corporation</title> |
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
function Trim(p_sValue) |
||||
|
{ |
||||
|
if(!p_sValue || typeof p_sValue != 'string') |
||||
|
return ""; |
||||
|
|
||||
|
return p_sValue.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' '); |
||||
|
} |
||||
|
|
||||
|
function Home_Page() |
||||
|
{ |
||||
|
window.location="./home.jsp"; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
function Validate() |
||||
|
{ |
||||
|
var sctrlval = ""; |
||||
|
sctrlval = Trim(document.getElementById('txt_uname').value); |
||||
|
if ( Number(sctrlval.length) == 0 ) |
||||
|
{ |
||||
|
alert(" 'User Name' is Required"); |
||||
|
document.getElementById('txt_uname').focus(); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
sctrlval = Trim(document.getElementById('txt_password').value); |
||||
|
if ( Number(sctrlval.length) == 0 ) |
||||
|
{ |
||||
|
alert(" 'Password' is Required"); |
||||
|
document.getElementById('txt_password').focus(); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
||||
|
<link href="./css/main.css" rel="stylesheet" type="text/css"> |
||||
|
</head> |
||||
|
|
||||
|
<!-- body start //--> |
||||
|
|
||||
|
<body> |
||||
|
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
|
<tr> |
||||
|
<td align="center" valign="top"> |
||||
|
<table width="750" border="0" cellpadding="4" cellspacing="1"> |
||||
|
<tr> |
||||
|
<td align="center" valign="top" class="h1"><br><br></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="center" valign="top"><br><br> |
||||
|
<form id="frm_ellogin" name="frm_ellogin" method="post" action="./change_password.jsp" > |
||||
|
<table width="70%" align="center" cellpadding="0" cellspacing="0" border="0"> |
||||
|
<tr> |
||||
|
<td align="center" class="main_head">Change Password </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="center"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="center"><b style="color:#FF0000" ><%if (old_password.equals(" ")==false) {out.print(sErrMsg);}%> </b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="center" valign="top"> |
||||
|
<table width="100%" style="border: 1px solid #CCCCCC; color:#666666" border="0" cellpadding="4" cellspacing="1"> |
||||
|
<tr> |
||||
|
<td align="right"> </td> <td> </td> </tr> |
||||
|
<tr> |
||||
|
<td align="right">Old Password : </td> |
||||
|
<td><input type="text" id="txt_oldpassword" name="txt_oldpassword" tabindex="1" size="20" class="bgListTextArea" /></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="right">New Password : </td> |
||||
|
<td><input type="password" id="txt_password" name="txt_password" tabindex="2" size="20" class="bgListTextArea" /></td> |
||||
|
</tr> |
||||
|
<tr><td colspan="2" > </td></tr> |
||||
|
<tr> |
||||
|
<td align="center" colspan="2" > |
||||
|
<input type='submit' style="background-color:#3B5998; color:#E7E4EF" value=' OK ' tabindex="3" onlcick="validate();" /> |
||||
|
<input type='Button' style="background-color:#3B5998; color:#E7E4EF" value='BACK' tabindex="4" onClick="Home_Page()" /> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</td></tr> |
||||
|
</table> |
||||
|
</form> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="center" valign="top"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td align="center" valign="top"> </td> |
||||
|
</tr> |
||||
|
</table></td> |
||||
|
</tr> |
||||
|
</table></td> |
||||
|
</tr> |
||||
|
</table></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</body> |
||||
|
<!-- body end //--> |
||||
|
</html> |
||||
@ -0,0 +1,19 @@ |
|||||
|
<%-- <%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"coc","coc"); |
||||
|
System.out.println(Con); |
||||
|
%> --%> |
||||
|
|
||||
|
|
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@localhost:1521:xe"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"fas","fas"); |
||||
|
%> |
||||
@ -0,0 +1,15 @@ |
|||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<head> |
||||
|
<title>Chennai Corporation - MIS </title> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
||||
|
<style type="text/css"> |
||||
|
</style> |
||||
|
|
||||
|
</head> |
||||
|
<body><CENTER> |
||||
|
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style=" background-image:url('image/Picture1.jpg');"> |
||||
|
<tr><td width="100%" style="color:#2C4365" align="center" ><h1>Comming Soon... </h1> |
||||
|
</td></tr></table></CENTER> |
||||
|
</body></html> |
||||
@ -0,0 +1,105 @@ |
|||||
|
/** |
||||
|
* addEvent written by Dean Edwards, 2005 |
||||
|
* with input from Tino Zijdel |
||||
|
* |
||||
|
* http://dean.edwards.name/weblog/2005/10/add-event/
|
||||
|
**/ |
||||
|
function addEvent(element, type, handler) { |
||||
|
// assign each event handler a unique ID
|
||||
|
if (!handler.$$guid) handler.$$guid = addEvent.guid++; |
||||
|
// create a hash table of event types for the element
|
||||
|
if (!element.events) element.events = {}; |
||||
|
// create a hash table of event handlers for each element/event pair
|
||||
|
var handlers = element.events[type]; |
||||
|
if (!handlers) { |
||||
|
handlers = element.events[type] = {}; |
||||
|
// store the existing event handler (if there is one)
|
||||
|
if (element["on" + type]) { |
||||
|
handlers[0] = element["on" + type]; |
||||
|
} |
||||
|
} |
||||
|
// store the event handler in the hash table
|
||||
|
handlers[handler.$$guid] = handler; |
||||
|
// assign a global event handler to do all the work
|
||||
|
element["on" + type] = handleEvent; |
||||
|
}; |
||||
|
// a counter used to create unique IDs
|
||||
|
addEvent.guid = 1; |
||||
|
|
||||
|
function removeEvent(element, type, handler) { |
||||
|
// delete the event handler from the hash table
|
||||
|
if (element.events && element.events[type]) { |
||||
|
delete element.events[type][handler.$$guid]; |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
function handleEvent(event) { |
||||
|
var returnValue = true; |
||||
|
// grab the event object (IE uses a global event object)
|
||||
|
event = event || fixEvent(window.event); |
||||
|
// get a reference to the hash table of event handlers
|
||||
|
var handlers = this.events[event.type]; |
||||
|
// execute each event handler
|
||||
|
for (var i in handlers) { |
||||
|
this.$$handleEvent = handlers[i]; |
||||
|
if (this.$$handleEvent(event) === false) { |
||||
|
returnValue = false; |
||||
|
} |
||||
|
} |
||||
|
return returnValue; |
||||
|
}; |
||||
|
|
||||
|
function fixEvent(event) { |
||||
|
// add W3C standard event methods
|
||||
|
event.preventDefault = fixEvent.preventDefault; |
||||
|
event.stopPropagation = fixEvent.stopPropagation; |
||||
|
return event; |
||||
|
}; |
||||
|
fixEvent.preventDefault = function() { |
||||
|
this.returnValue = false; |
||||
|
}; |
||||
|
fixEvent.stopPropagation = function() { |
||||
|
this.cancelBubble = true; |
||||
|
}; |
||||
|
|
||||
|
// end from Dean Edwards
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Creates an Element for insertion into the DOM tree. |
||||
|
* From http://simon.incutio.com/archive/2003/06/15/javascriptWithXML
|
||||
|
* |
||||
|
* @param element the element type to be created. |
||||
|
* e.g. ul (no angle brackets) |
||||
|
**/ |
||||
|
function createElement(element) { |
||||
|
if (typeof document.createElementNS != 'undefined') { |
||||
|
return document.createElementNS('http://www.w3.org/1999/xhtml', element); |
||||
|
} |
||||
|
if (typeof document.createElement != 'undefined') { |
||||
|
return document.createElement(element); |
||||
|
} |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* "targ" is the element which caused this function to be called |
||||
|
* from http://www.quirksmode.org/js/events_properties.html
|
||||
|
**/ |
||||
|
function getEventTarget(e) { |
||||
|
var targ; |
||||
|
if (!e) { |
||||
|
e = window.event; |
||||
|
} |
||||
|
if (e.target) { |
||||
|
targ = e.target; |
||||
|
} else if (e.srcElement) { |
||||
|
targ = e.srcElement; |
||||
|
} |
||||
|
if (targ.nodeType == 3) { // defeat Safari bug
|
||||
|
targ = targ.parentNode; |
||||
|
} |
||||
|
|
||||
|
return targ; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,145 @@ |
|||||
|
/** |
||||
|
* Written by Neil Crosby. |
||||
|
* http://www.workingwith.me.uk/
|
||||
|
* |
||||
|
* Use this wherever you want, but please keep this comment at the top of this file. |
||||
|
* |
||||
|
* Copyright (c) 2006 Neil Crosby |
||||
|
* |
||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
* of this software and associated documentation files (the "Software"), to deal |
||||
|
* in the Software without restriction, including without limitation the rights |
||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
* copies of the Software, and to permit persons to whom the Software is |
||||
|
* furnished to do so, subject to the following conditions: |
||||
|
* |
||||
|
* The above copyright notice and this permission notice shall be included in |
||||
|
* all copies or substantial portions of the Software. |
||||
|
* |
||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
|
* SOFTWARE. |
||||
|
**/ |
||||
|
var css = { |
||||
|
/** |
||||
|
* Returns an array containing references to all elements |
||||
|
* of a given tag type within a certain node which have a given class |
||||
|
* |
||||
|
* @param node the node to start from |
||||
|
* (e.g. document, |
||||
|
* getElementById('whateverStartpointYouWant') |
||||
|
* ) |
||||
|
* @param searchClass the class we're wanting |
||||
|
* (e.g. 'some_class') |
||||
|
* @param tag the tag that the found elements are allowed to be |
||||
|
* (e.g. '*', 'div', 'li') |
||||
|
**/ |
||||
|
getElementsByClass : function(node, searchClass, tag) { |
||||
|
var classElements = new Array(); |
||||
|
var els = node.getElementsByTagName(tag); |
||||
|
var elsLen = els.length; |
||||
|
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); |
||||
|
|
||||
|
|
||||
|
for (var i = 0, j = 0; i < elsLen; i++) { |
||||
|
if (this.elementHasClass(els[i], searchClass) ) { |
||||
|
classElements[j] = els[i]; |
||||
|
j++; |
||||
|
} |
||||
|
} |
||||
|
return classElements; |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* PRIVATE. Returns an array containing all the classes applied to this |
||||
|
* element. |
||||
|
* |
||||
|
* Used internally by elementHasClass(), addClassToElement() and |
||||
|
* removeClassFromElement(). |
||||
|
**/ |
||||
|
privateGetClassArray: function(el) { |
||||
|
return el.className.split(' '); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* PRIVATE. Creates a string from an array of class names which can be used |
||||
|
* by the className function. |
||||
|
* |
||||
|
* Used internally by addClassToElement(). |
||||
|
**/ |
||||
|
privateCreateClassString: function(classArray) { |
||||
|
return classArray.join(' '); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* Returns true if the given element has been assigned the given class. |
||||
|
**/ |
||||
|
elementHasClass: function(el, classString) { |
||||
|
if (!el) { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
var regex = new RegExp('\\b'+classString+'\\b'); |
||||
|
if (el.className.match(regex)) { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* Adds classString to the classes assigned to the element with id equal to |
||||
|
* idString. |
||||
|
**/ |
||||
|
addClassToId: function(idString, classString) { |
||||
|
this.addClassToElement(document.getElementById(idString), classString); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* Adds classString to the classes assigned to the given element. |
||||
|
* If the element already has the class which was to be added, then |
||||
|
* it is not added again. |
||||
|
**/ |
||||
|
addClassToElement: function(el, classString) { |
||||
|
var classArray = this.privateGetClassArray(el); |
||||
|
|
||||
|
if (this.elementHasClass(el, classString)) { |
||||
|
return; // already has element so don't need to add it
|
||||
|
} |
||||
|
|
||||
|
classArray.push(classString); |
||||
|
|
||||
|
el.className = this.privateCreateClassString(classArray); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* Removes the given classString from the list of classes assigned to the |
||||
|
* element with id equal to idString |
||||
|
**/ |
||||
|
removeClassFromId: function(idString, classString) { |
||||
|
this.removeClassFromElement(document.getElementById(idString), classString); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* Removes the given classString from the list of classes assigned to the |
||||
|
* given element. If the element has the same class assigned to it twice, |
||||
|
* then only the first instance of that class is removed. |
||||
|
**/ |
||||
|
removeClassFromElement: function(el, classString) { |
||||
|
var classArray = this.privateGetClassArray(el); |
||||
|
|
||||
|
for (x in classArray) { |
||||
|
if (classString == classArray[x]) { |
||||
|
classArray[x] = ''; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
el.className = this.privateCreateClassString(classArray); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,65 @@ |
|||||
|
body { |
||||
|
font-family:Times New Roman, Times, serif, Tahoma, Arial, Verdana, sans-serif; |
||||
|
font-size:14px; |
||||
|
font-weight:bold; |
||||
|
padding:0px; |
||||
|
margin:0px; |
||||
|
color:#000000; |
||||
|
} |
||||
|
|
||||
|
a |
||||
|
{ |
||||
|
font-family:Arial; |
||||
|
text-decoration: none; |
||||
|
font-size:16px; |
||||
|
font-weight:bold; |
||||
|
color:#000000; |
||||
|
} |
||||
|
|
||||
|
a:hover |
||||
|
{ |
||||
|
font-family:Arial; |
||||
|
text-decoration:underline; |
||||
|
font-size:16px; |
||||
|
font-weight:bold; |
||||
|
} |
||||
|
|
||||
|
.main_head { |
||||
|
font-weight:bold; |
||||
|
font-size:24px; |
||||
|
} |
||||
|
|
||||
|
.sub_head { |
||||
|
font-weight:bold; |
||||
|
font-size:18px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.bottomleftborder |
||||
|
{ |
||||
|
border-bottom:1px solid black; |
||||
|
border-left:1px solid black; |
||||
|
} |
||||
|
|
||||
|
.bottomborder |
||||
|
{ |
||||
|
border-bottom:1px solid black; |
||||
|
} |
||||
|
|
||||
|
.mandatory |
||||
|
{ |
||||
|
font: bold 20px arial; |
||||
|
color:#ff0000; |
||||
|
} |
||||
|
.h2 |
||||
|
{ |
||||
|
align: center; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
table#header th {border-right:solid 1px #000} |
||||
|
table#header th#right-border {border-right:none; text-align:center;} |
||||
|
table#tbl-content td {border-bottom:solid 1px #bbb;border-right:solid 1px #bbb;} |
||||
|
table#tbl-content tr#bottom td {border-bottom:none;} |
||||
|
After Width: 74 | Height: 112 | Size: 4.9 KiB |
@ -0,0 +1,3 @@ |
|||||
|
<style>iframe{width:100%; height:100%; border:none}</style> |
||||
|
<iframe src="http://10.6.1.157:8090/gcc_attendance/entry"></iframe> |
||||
|
<script>iFrameResize({log:true})</script> |
||||
@ -0,0 +1,279 @@ |
|||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%@page import="org.apache.commons.fileupload.disk.DiskFileItemFactory"%> |
||||
|
<%@page import="org.apache.commons.fileupload.FileItem"%> |
||||
|
<%@page import="org.apache.commons.fileupload.servlet.ServletFileUpload"%> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
||||
|
<%@ include file="DBCon.jsp"%> |
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
|
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Statement stm1=Con.createStatement(); |
||||
|
Statement stm2=Con.createStatement(); |
||||
|
Statement stm3=Con.createStatement(); |
||||
|
Statement stm4=Con.createStatement(); |
||||
|
|
||||
|
Statement stm11=Con.createStatement(); |
||||
|
Statement stm12=Con.createStatement(); |
||||
|
Statement stm13=Con.createStatement(); |
||||
|
ResultSet rs1,rs2,rs3,rs4; |
||||
|
String qry=""; |
||||
|
|
||||
|
|
||||
|
/* File Upload Starts*/ |
||||
|
CallableStatement cst; |
||||
|
|
||||
|
boolean isMultipart = ServletFileUpload.isMultipartContent(request); |
||||
|
String stag_id="0",stag_qry="Select may_pet_fle_ID.NEXTVAL stg_id from dual"; |
||||
|
Statement stmt=Con.createStatement(); |
||||
|
ResultSet rs=stmt.executeQuery(stag_qry); |
||||
|
if (rs.next()) |
||||
|
{ |
||||
|
stag_id=rs.getString("stg_id"); |
||||
|
System.out.print("stag id is :" + stag_id ); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
String filePath = "/home1/apache7/webapps/cocmis_new/mayor_pet/RepDoc/"; |
||||
|
//String filePath = "f:/"; |
||||
|
int maxFileSize = 50 * 1024; |
||||
|
int maxMemSize = 4 * 1024; |
||||
|
File file ; |
||||
|
java.util.HashMap hs=new java.util.HashMap(); |
||||
|
|
||||
|
try { |
||||
|
|
||||
|
DiskFileItemFactory factory = new DiskFileItemFactory(); |
||||
|
factory.setSizeThreshold(maxMemSize); |
||||
|
factory.setRepository(new File("/home1/apache7/webapps/cocmis_new/mayor_pet/RepDoc/Temp/")); |
||||
|
//factory.setRepository(new File("f:/")); |
||||
|
List<FileItem> items = new ServletFileUpload(factory).parseRequest(request); |
||||
|
Iterator i = items.iterator(); |
||||
|
while ( i.hasNext () ) |
||||
|
{ |
||||
|
FileItem fi = (FileItem)i.next(); |
||||
|
String fieldname = fi.getFieldName(); |
||||
|
String fieldvalue = fi.getString(); |
||||
|
|
||||
|
if (fi.isFormField()) |
||||
|
{ |
||||
|
System.out.println("field name is : " +fieldname); |
||||
|
hs.put(fieldname, fieldvalue); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
System.out.println("Enter file values....."); |
||||
|
String fieldName = fi.getFieldName(); |
||||
|
String fileName = fi.getName(); |
||||
|
String contentType = fi.getContentType(); |
||||
|
boolean isInMemory = fi.isInMemory(); |
||||
|
long sizeInBytes = fi.getSize(); |
||||
|
|
||||
|
|
||||
|
if ( ((sizeInBytes/1024)/1024) >=4) { |
||||
|
stmt.close();Con.close(); |
||||
|
%> |
||||
|
<script> |
||||
|
alert("File should be<= 4mb fILE sIZE <%=sizeInBytes%> = <%= ((sizeInBytes/1024)/1024) %>"); |
||||
|
</script> |
||||
|
<% |
||||
|
|
||||
|
return ; } |
||||
|
|
||||
|
if(sizeInBytes != 0) |
||||
|
{ |
||||
|
String currentfilename = ""; |
||||
|
String UpldFile=" "; |
||||
|
if( fileName.lastIndexOf("\\") >= 0 ) { |
||||
|
currentfilename = filePath + "/"+stag_id+"_"+fileName.substring( fileName.lastIndexOf("\\")); |
||||
|
file = new File( currentfilename ) ; |
||||
|
System.out.println("Hello file path : " +currentfilename); |
||||
|
UpldFile=stag_id+"_"+fileName; |
||||
|
} else { |
||||
|
currentfilename = filePath + "/"+stag_id+"_"+fileName.substring(fileName.lastIndexOf("\\")+1); |
||||
|
file = new File( currentfilename ) ; |
||||
|
System.out.println("Hello file path : " +currentfilename); |
||||
|
UpldFile=stag_id+"_"+fileName; |
||||
|
} |
||||
|
|
||||
|
fi.write( file ) ; |
||||
|
hs.put(fieldname, UpldFile); |
||||
|
System.out.println("Uploaded Filename: " + fileName + "<br>"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} catch(Exception e) { System.out.println("Error "+e); } |
||||
|
/* File Upload Ends */ |
||||
|
|
||||
|
String uc = (String) hs.get ("uc"); |
||||
|
|
||||
|
String pet_id = (String) hs.get ("pet_id"); |
||||
|
String pet_nm = (String) hs.get ("pet_nm"); |
||||
|
String pet_add1 = (String) hs.get ("pet_add1"); |
||||
|
String pet_add2 = (String) hs.get ("pet_add2"); |
||||
|
String pet_add3 = (String) hs.get ("pet_add3"); |
||||
|
String pet_pin = (String) hs.get ("pet_pin"); |
||||
|
String pet_det = (String) hs.get ("pet_det"); |
||||
|
String off_nm = (String) hs.get ("off_nm"); |
||||
|
String reply_dt = (String) hs.get ("reply_dt"); |
||||
|
String reply = (String) hs.get ("reply"); |
||||
|
String reply_fl = (String) hs.get ("reply_fl"); |
||||
|
String tr_zone = (String) hs.get ("tr_zone"); |
||||
|
String tr_off_nm = (String) hs.get ("tr_off_nm"); |
||||
|
|
||||
|
String svfl = (String) hs.get ("svfl"); |
||||
|
String sEmail = (String) hs.get ("email"); |
||||
|
String sFle= (String) hs.get ("fle"); |
||||
|
|
||||
|
String RecordStatus=""; |
||||
|
String pet_id_cond=" "; |
||||
|
int cnt =0; |
||||
|
String offid =""; |
||||
|
String offnm =""; |
||||
|
String zn =""; |
||||
|
String un =""; |
||||
|
String petid =""; |
||||
|
String petnm =""; |
||||
|
String petadd1 =""; |
||||
|
String petadd2 =""; |
||||
|
String petadd3 =""; |
||||
|
String petpin =""; |
||||
|
String petdet =""; |
||||
|
String clsfl =""; |
||||
|
String troffid =""; |
||||
|
String troffnm =""; |
||||
|
String fle=""; |
||||
|
String HQ_DEPT_ID=""; |
||||
|
|
||||
|
if ( uc ==null) uc=""; |
||||
|
|
||||
|
if ( pet_id ==null) pet_id =""; |
||||
|
if ( pet_nm ==null)pet_nm =""; |
||||
|
if ( pet_add1 ==null)pet_add1 =""; |
||||
|
if ( pet_add2 ==null)pet_add2 =""; |
||||
|
if ( pet_add3 ==null)pet_add3 =""; |
||||
|
if ( pet_pin ==null)pet_pin =""; |
||||
|
if ( pet_det ==null)pet_det =""; |
||||
|
if ( off_nm ==null)off_nm =""; |
||||
|
if ( reply_dt ==null)reply_dt =""; |
||||
|
if ( reply ==null)reply =""; |
||||
|
if ( reply_fl ==null)reply_fl =""; |
||||
|
if ( tr_zone ==null)tr_zone =""; |
||||
|
if ( tr_off_nm ==null)tr_off_nm =""; |
||||
|
if ( svfl ==null)svfl =""; |
||||
|
if ( sEmail ==null)sEmail =""; |
||||
|
|
||||
|
|
||||
|
if (pet_id.startsWith("O") || pet_id.startsWith("M") || pet_id.indexOf("/")>0) |
||||
|
{ |
||||
|
pet_id_cond="'"+pet_id+"'"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
pet_id_cond=" lpad(trim('"+pet_id+"'),8,0) "; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
if ( svfl.equals("T")) |
||||
|
{ |
||||
|
System.out.println ("\n 1 "); |
||||
|
if (reply_fl.equals("T")) |
||||
|
{ |
||||
|
System.out.println ("\n 2 "); |
||||
|
if ( tr_zone.equals("00")) |
||||
|
{ |
||||
|
System.out.println ("\n 3 "); |
||||
|
|
||||
|
troffid="999"; |
||||
|
troffnm=tr_off_nm; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
System.out.println ("\n 4 "); |
||||
|
|
||||
|
rs4=stm4.executeQuery("select off_id from off_mast where trim(off_nm)=trim('"+tr_off_nm.replace("'","''")+"')"); |
||||
|
if (rs4.next()) |
||||
|
{ |
||||
|
System.out.println ("\n 5 "); |
||||
|
|
||||
|
troffid =rs4.getString("off_id"); |
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
System.out.println ("\n 6"); |
||||
|
|
||||
|
troffnm=null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (reply_dt.length()<5) |
||||
|
{ |
||||
|
rs4=stm4.executeQuery("select to_char(sysdate,'dd/mm/rrrr') from dual"); |
||||
|
if (rs4.next()) |
||||
|
{ |
||||
|
reply_dt=rs4.getString(1); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
System.out.println ("\n 7 reply_fl " +reply_fl ); |
||||
|
System.out.println ("\n 7 reply_dt " +reply_dt ); |
||||
|
|
||||
|
|
||||
|
System.out.println ("insert into mayor_reply values("+pet_id_cond+",to_date('"+reply_dt+"','dd/mm/yyyy'),'"+reply+"','"+reply_fl+"','"+tr_zone+"',null,null,'"+troffid+"','"+troffnm+"','"+sFle+"')"); |
||||
|
stm11.executeQuery("insert into mayor_reply values("+pet_id_cond+",to_date('"+reply_dt+"','dd/mm/yyyy'),'"+reply+"','"+reply_fl+"','"+tr_zone+"',null,null,'"+troffid+"','"+troffnm+"','"+sFle+"')"); |
||||
|
|
||||
|
if (reply_fl.equals("T")) |
||||
|
{ |
||||
|
System.out.println ("\n 8 " +sEmail); |
||||
|
if (sEmail.equals("Y")) |
||||
|
{ |
||||
|
System.out.println(" 8.1 insert into grev_trans_MAIL select pet_id,zone,unit,div_cd,off_id,off_nm from mayor_petition_mail where pet_id="+pet_id_cond+""); |
||||
|
|
||||
|
stm12.executeQuery(" insert into grev_trans_MAIL select pet_id,zone,unit,div_cd,off_id,off_nm from mayor_petition_mail where pet_id="+pet_id_cond+""); |
||||
|
|
||||
|
System.out.println(" 8. 2 update mayor_petition_mail set zone=lpad('"+tr_zone+"',2,0),off_id=lpad('"+troffid+"',3,0),off_nm='"+troffnm+"', cls_fl='"+reply_fl +"' where pet_id="+pet_id_cond); |
||||
|
stm13.executeQuery("update mayor_petition_mail set zone=lpad('"+tr_zone+"',2,0),off_id=lpad('"+troffid+"',3,0),off_nm='"+troffnm+"', cls_fl='"+reply_fl +"', where pet_id="+pet_id_cond); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
stm12.executeQuery(" insert into grev_trans select pet_id,zone,unit,div_cd,off_id,off_nm from mayor_petition where pet_id="+pet_id_cond+""); |
||||
|
|
||||
|
stm13.executeQuery("update mayor_petition set zone=lpad('"+tr_zone+"',2,0),off_id=lpad('"+troffid+"',3,0),off_nm='"+troffnm+"', cls_fl='"+reply_fl +"' where pet_id="+pet_id_cond+""); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
System.out.println ("9"); |
||||
|
if (sEmail.equals("Y")) |
||||
|
{ |
||||
|
System.out.println ("update mayor_petition_mail set cls_fl='"+ reply_fl +"' where pet_id="+pet_id_cond+""); |
||||
|
stm13.executeQuery("update mayor_petition_mail set cls_fl='"+ reply_fl +"' where pet_id="+pet_id_cond+""); |
||||
|
|
||||
|
System.out.println ("insert into mayor_reply_MAIL values("+pet_id_cond+",to_date('"+reply_dt+"','dd/mm/yyyy'),'"+reply+"','"+reply_fl+"','"+tr_zone+"',null,null,'"+troffid+"','"+troffnm+"','"+sFle+"')"); |
||||
|
stm11.executeQuery("insert into mayor_reply_MAIL values("+pet_id_cond+",to_date('"+reply_dt+"','dd/mm/yyyy'),'"+reply+"','"+reply_fl+"','"+tr_zone+"',null,null,'"+troffid+"','"+troffnm+"')"); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
System.out.println ("update mayor_petition set cls_fl='"+ reply_fl +"' where pet_id="+pet_id_cond+""); |
||||
|
stm13.executeQuery("update mayor_petition set cls_fl='"+ reply_fl +"' where pet_id="+pet_id_cond+""); |
||||
|
} |
||||
|
} |
||||
|
%> |
||||
|
<script> |
||||
|
alert("Record Successfully Saved !!!"); |
||||
|
window.location.href="../pgr/grv_sum.jsp"; |
||||
|
alert("Tes"); |
||||
|
</script> |
||||
|
<% } %> |
||||
|
|
||||
@ -0,0 +1,10 @@ |
|||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
|
||||
|
<% |
||||
|
String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_sdriver); |
||||
|
Connection Con = DriverManager.getConnection(l_sUrl,"FAS","FAS"); |
||||
|
System.out.println(l_sUrl +" FAS" +" FAS"); |
||||
|
|
||||
|
%> |
||||
@ -0,0 +1,114 @@ |
|||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%@ include file="DBCon.jsp"%> |
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
|
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
Statement stm=Con.createStatement(); |
||||
|
ResultSet rs1,rs2; |
||||
|
String opt=request.getParameter("opt"); |
||||
|
String pet_dt=request.getParameter("pet_dt"); |
||||
|
String pet_id=request.getParameter("pet_id"); |
||||
|
|
||||
|
if (opt==null) |
||||
|
{ |
||||
|
opt=" "; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (pet_dt==null) |
||||
|
{ |
||||
|
pet_dt=" "; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (pet_id==null) |
||||
|
{ |
||||
|
pet_id=" -1"; |
||||
|
} |
||||
|
|
||||
|
%> |
||||
|
|
||||
|
|
||||
|
<html> |
||||
|
|
||||
|
<head> |
||||
|
<meta http-equiv="Content-Language" content="en-us"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 4.0"> |
||||
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
||||
|
<title>Mayor Grievance Acknowledgement - Reprint</title> |
||||
|
</head> |
||||
|
|
||||
|
<body > |
||||
|
<P> </P> |
||||
|
<p style="text-indent: 0; word-spacing: 0; line-height: 100%; margin: 10"><b><font face="divya" size="4">பெருநகர சென்னை மாநகராட்சி</font></b></p> |
||||
|
<br> |
||||
|
<p style="text-indent: 0; word-spacing: 0; line-height: 100%; margin: 10"><font size="2"></font>மாண்புமிகு மேயர் அவர்களிடம் அளிக்கப்பட்ட மக்கள் குறை தீர்க்கும் மனுவின் விவரம்</p> |
||||
|
<hr size="3" color="#660033" style="background-color: #EEDAB5;margin:10"> |
||||
|
|
||||
|
|
||||
|
<div align="left" style="width: 867; height: 122;margin:10;"> |
||||
|
<table border="1" cellpadding="10" cellspacing="0" width="634" height="70"> |
||||
|
<tr> |
||||
|
<td><b><font ><font face="divya" size="3">வ.எண்.</font></font></b></td> |
||||
|
<td height="26"><b><font ><font face="divya" size="3">மனு எண்</font></font></b></td> |
||||
|
<td height="26" ><b><font face="divya" size="3">மனுதாரரின் பெயர்</font></b></td> |
||||
|
</tr> |
||||
|
|
||||
|
<% |
||||
|
if (opt.equals("D")) |
||||
|
{ |
||||
|
//out.println ("select pet_id,pet_nm from mayor_petition where to_char(pet_dt,'dd/mm/yyyy')='"+pet_dt.replace("-","/")+"'"); |
||||
|
rs1=stm.executeQuery( "select pet_id,pet_nm from mayor_petition where to_char(pet_dt,'dd/mm/yyyy')='"+pet_dt.replace("-","/")+"'") ; |
||||
|
int row=0; |
||||
|
while (rs1.next()) |
||||
|
{ |
||||
|
%> |
||||
|
<tr> |
||||
|
<td height="21"><%=(++row)%> </td> |
||||
|
<td width="177" height="21"><a href="mayor_grev_ack.jsp?uc=01&pet_id=<%=rs1.getString("pet_id")%>"><font ><b><%=rs1.getString("pet_id")%> </b></font></a></td> |
||||
|
<td width="328" height="21"><font face=""><b><%=rs1.getString("pet_nm")%></b></font> </td> |
||||
|
</tr> |
||||
|
<% |
||||
|
} |
||||
|
} |
||||
|
if (opt.equals("I")) |
||||
|
{ |
||||
|
|
||||
|
rs2=stm.executeQuery(" select pet_id,pet_nm from mayor_petition where pet_id='"+pet_id+"'"); |
||||
|
int row=0; |
||||
|
while (rs2.next()) |
||||
|
{ |
||||
|
%> |
||||
|
<tr> |
||||
|
<td height="21"><%=(++row)%> </td> |
||||
|
<td width="177" height="21"><a href=mayor_grev_ack.jsp?uc=01&pet_id=<%=rs2.getString("pet_id")%>> |
||||
|
<font face=""><b><%=rs2.getString("pet_id")%></b></font> </a></td> |
||||
|
<td width="328" height="21"><font face=""><b><%=rs2.getString("pet_nm")%></b></font> </td> |
||||
|
</tr> |
||||
|
<% |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
%> |
||||
|
</table> |
||||
|
<div align="left" style="margin:10"> |
||||
|
<table border="0" width="100" height="28"> |
||||
|
<tr> |
||||
|
<td width="100" height="28"><font color="#996633" face="divya"><input type="button" value="வெளியே" name="bck" onClick="history.back()" |
||||
|
style="font-family: divya; font-size: 12pt; font-style: italic; font-weight: bold"></font></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,114 @@ |
|||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%@ include file="DBCon.jsp"%> |
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
|
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
Statement stm=Con.createStatement(); |
||||
|
ResultSet rs1,rs2; |
||||
|
String opt=request.getParameter("opt"); |
||||
|
String pet_dt=request.getParameter("pet_dt"); |
||||
|
String pet_id=request.getParameter("pet_id"); |
||||
|
|
||||
|
if (opt==null) |
||||
|
{ |
||||
|
opt=" "; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (pet_dt==null) |
||||
|
{ |
||||
|
pet_dt=" "; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (pet_id==null) |
||||
|
{ |
||||
|
pet_id=" -1"; |
||||
|
} |
||||
|
|
||||
|
%> |
||||
|
|
||||
|
|
||||
|
<html> |
||||
|
|
||||
|
<head> |
||||
|
<meta http-equiv="Content-Language" content="en-us"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 4.0"> |
||||
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
||||
|
<title>Mayor Grievance Acknowledgement - Reprint</title> |
||||
|
</head> |
||||
|
|
||||
|
<body > |
||||
|
<P> </P> |
||||
|
<p style="text-indent: 0; word-spacing: 0; line-height: 100%; margin: 0"><b><font face="divya" size="4">பெருநகர சென்னை மாநகராட்சி</font></b></p><br> |
||||
|
<p style="text-indent: 0; word-spacing: 0; line-height: 100%; margin: 0"><font size="2"></font>மாண்புமிகு மேயர் அவர்களிடம் அளிக்கப்பட்ட மக்கள் குறை தீர்க்கும் மனுவின் விவரம்</p> |
||||
|
<p style="text-indent: 0; word-spacing: 0; line-height: 100%; margin: 0"> </p> |
||||
|
<hr size="3" color="#660033" style="background-color: #EEDAB5"> |
||||
|
|
||||
|
<p style="text-indent: 0; word-spacing: 0; line-height: 100%; margin: 0"> </p> |
||||
|
<div align="left" style="width: 867; height: 122"> |
||||
|
<table border="1" cellpadding="10" cellspacing="0" width="634" height="59"> |
||||
|
<tr> |
||||
|
<td width="61"><b><font ><font face="divya" size="3">வ.எண்.</font></font></b></td> |
||||
|
<td width="161" height="26"><b><font ><font face="divya" size="3">மனு எண்</font></font></b></td> |
||||
|
<td width="344" height="26" ><b><font face="divya" size="3">மனுதாரரின் பெயர்</font></b></td> |
||||
|
</tr> |
||||
|
|
||||
|
<% |
||||
|
if (opt.equals("D")) |
||||
|
{ |
||||
|
//out.println ("select pet_id,pet_nm from mayor_petition_mail where to_char(pet_dt,'dd/mm/yyyy')='"+pet_dt.replace("-","/")+"'"); |
||||
|
rs1=stm.executeQuery( "select pet_id,pet_nm from mayor_petition_mail where to_char(pet_dt,'dd/mm/yyyy')='"+pet_dt.replace("-","/")+"'") ; |
||||
|
while (rs1.next()) |
||||
|
{ |
||||
|
%> |
||||
|
<tr> |
||||
|
<td width="61"> </td> |
||||
|
<td width="161" height="21"><a href="mayor_mail_grev_ack.jsp?uc=01&pet_id=<%=rs1.getString("pet_id")%>"><b><%=rs1.getString("pet_id")%> </b></font></td> |
||||
|
<td width="344" height="21"><font face="VANAVIL-DB-Avvaiyar"><b><%=rs1.getString("pet_nm")%></b></font> </td> |
||||
|
</tr> |
||||
|
<% |
||||
|
} |
||||
|
} |
||||
|
if (opt.equals("I")) |
||||
|
{ |
||||
|
|
||||
|
rs2=stm.executeQuery(" select pet_id,pet_nm from mayor_petition where pet_id='"+pet_id+"'"); |
||||
|
int row=0; |
||||
|
while (rs2.next()) |
||||
|
{ |
||||
|
%> |
||||
|
<tr> |
||||
|
<td width="61"> </td> |
||||
|
<td width="161" height="21"><%=(++row)%> </td> |
||||
|
<td width="161" height="21"><a href=mayor_grev_ack.jsp?uc=01&pet_id=<%=rs2.getString("pet_id")%>> |
||||
|
<font face="VANAVIL-DB-Avvaiyar"><b><%=rs2.getString("pet_id")%></b></font> </a></td> |
||||
|
<td width="344" height="21"><font face="VANAVIL-DB-Avvaiyar"><b><%=rs2.getString("pet_nm")%></b></font> </td> |
||||
|
</tr> |
||||
|
<% |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
%> |
||||
|
</table> |
||||
|
<div align="left"> |
||||
|
<table border="0" width="100" height="28"> |
||||
|
<tr> |
||||
|
<td width="100" height="28"><font color="#996633" face="divya"><input type="button" value="வெளியே" name="bck" onClick="history.back()" |
||||
|
style="font-family: divya; font-size: 12pt; font-style: italic; font-weight: bold"></font></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,238 @@ |
|||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
String opt=request.getParameter("opt" ); |
||||
|
if (opt==null) |
||||
|
{ |
||||
|
opt=" "; |
||||
|
} |
||||
|
String sEmail=""; |
||||
|
|
||||
|
%> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
am = "This operation is not Valid!!!"; |
||||
|
bV = parseInt(navigator.appVersion) |
||||
|
bNS = navigator.appName=="Netscape" |
||||
|
bIE = navigator.appName=="Microsoft Internet Explorer" |
||||
|
function nrc(e) { |
||||
|
if (bNS && e.which > 1){ |
||||
|
alert(am) |
||||
|
return false |
||||
|
} else if (bIE && (event.button >1)) { |
||||
|
alert(am) |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
document.onmousedown = nrc; |
||||
|
if (document.layers) window.captureEvents(Event.MOUSEDOWN); |
||||
|
if (bNS && bV<5) window.onmousedown = nrc; |
||||
|
</script> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
|
||||
|
//function for suppressing form submission |
||||
|
function noEnter(e){ |
||||
|
var characterCode |
||||
|
if(e && e.which){ |
||||
|
e = e |
||||
|
characterCode = e.which |
||||
|
} |
||||
|
else{ |
||||
|
e = event |
||||
|
characterCode = e.keyCode |
||||
|
} |
||||
|
if(characterCode == 13){ |
||||
|
return false; |
||||
|
} |
||||
|
else{ |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function dateformat(s) |
||||
|
{ |
||||
|
var a; |
||||
|
a=s.split("/"); |
||||
|
d=a[1]+"/"+a[0]+"/"+a[2]; |
||||
|
return d; |
||||
|
} |
||||
|
|
||||
|
function ch_dat(field) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function validate() |
||||
|
{ |
||||
|
if (document.grvdt.pet_dt.value=="" ) |
||||
|
{ |
||||
|
alert("Please enter Petition Date"); |
||||
|
document.grvdt.pet_dt.focus(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// If here, then all fields are entered. So,submit form |
||||
|
// document.grvdt.submit(); |
||||
|
var frm=document.grvdt; |
||||
|
if (frm.emailID[1].checked) |
||||
|
{ |
||||
|
window.location.href="grv_ack_det.jsp?opt=D&pet_dt="+document.grvdt.pet_dt.value; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
window.location.href="grv_ack_det_mail.jsp?opt=D&pet_dt="+document.grvdt.pet_dt.value; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function ext() |
||||
|
{ |
||||
|
window.location.href("http://10.1.0.15:7778/pls/fas/mayor_grev_det"); |
||||
|
} |
||||
|
function fn_getdatails(val) |
||||
|
{ |
||||
|
var frm=document.grvid; |
||||
|
if (val.length>3) |
||||
|
{ |
||||
|
if (frm.emailID[0].checked) |
||||
|
{ |
||||
|
window.location.href="mayor_mail_grev_ack.jsp?pet_id="+val; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
window.location.href="mayor_grev_ack.jsp?pet_id="+val; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<html> |
||||
|
|
||||
|
<head> |
||||
|
<meta http-equiv="Content-Language" content="en-us"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 6.0"> |
||||
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
||||
|
<title>Corporation of Chennai</title> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
|
||||
|
|
||||
|
<br><br> |
||||
|
<form method="POST" action="grv_ack_prn.jsp" name="dt"> |
||||
|
<div align="center"> |
||||
|
<center>அத்தாட்சி மறுபதிப்பு |
||||
|
<table border="1" width="65%" cellpadding="10" cellspacing="0" > |
||||
|
|
||||
|
<tr> |
||||
|
<td width="15%"><font face="divya" size="2"> வகை</font></td> |
||||
|
<td width="36%"> |
||||
|
<p align="left"><font SIZE="2" ><input type="radio" value="D" name="opt" <% if (opt.equals("D")) {%> checked="checked" <%}%> onblur=dt.submit()> |
||||
|
மனுநாள் </font> </p> |
||||
|
</td> |
||||
|
<td width="49%"> |
||||
|
<p align="left"><font SIZE="2"><input type="radio" value="I" name="opt" <% if (opt.equals("I")) {%> checked="checked" <%}%> onblur=dt.submit()> |
||||
|
மனு எண்</font></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</center> |
||||
|
</div> |
||||
|
</form> |
||||
|
<br><br> |
||||
|
<% |
||||
|
if (opt.equals("D")) |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="grv_ack_det.jsp?opt=<%=opt%>" name="grvdt"> |
||||
|
<input type="hidden" name="pet_id" value="" > |
||||
|
<table align="center" width="846" bordercolorlight="#660033" bordercolordark="#660033"> |
||||
|
<td width="838"> |
||||
|
<div align="center"> |
||||
|
<center> |
||||
|
<table cellpadding="10" cellspacing="0" BORDER=1 width="714" height="111" > |
||||
|
<tr> |
||||
|
<td width="334" height="25"><font SIZE="2" > இணையதள வாயிலாக பெறப்பட்ட மனுக்கள்</font></td> |
||||
|
<td height="25" colspan="2"><span ><font SIZE="2" > |
||||
|
<input type="radio" value="Y" name="emailID" id="emailID" tabindex="1"> |
||||
|
ஆம் </font></span><font SIZE="2" > |
||||
|
<input type="radio" value="N" name="emailID" id="emailID" tabindex="1"> |
||||
|
இல்லை |
||||
|
</font></td> |
||||
|
|
||||
|
</tr> <tr> |
||||
|
<td width="334" height="29"><b><font face="divya">மனு நாள்</font></b></td> |
||||
|
<td width="334" height="29"><input type="text" name="pet_dt" onKeyPress="return noEnter(event)" onBlur="ch_dat(this)" size="10"> |
||||
|
<b><font face="Garamond" >(DD-MM-YYYY)</font></b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="6" colspan="2"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="45" colspan="2"> |
||||
|
<p align="center"><input type="button" value="விவரம்" name="det" onClick="validate();" style=" font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"> |
||||
|
<input type="button" value="வெளியே" name="Exit" onClick="ext();" style=" display:none;font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</center> |
||||
|
</div> |
||||
|
</table> |
||||
|
</form> |
||||
|
<% |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="grv_ack_det.jsp?opt=<%=opt%>" name="grvid"> |
||||
|
<input type="hidden" name="pet_dt" value="" > |
||||
|
|
||||
|
<table align="center" width="714" bordercolorlight="#660033" bordercolordark="#660033"> |
||||
|
<td width="606"> |
||||
|
<div align="center"> |
||||
|
<center> |
||||
|
<table cellpadding="10" cellspacing="0" BORDER=1 width="714" height="96" > |
||||
|
<tr> |
||||
|
<td width="341" height="25"><font SIZE="2" > இணையதள |
||||
|
வாயிலாக |
||||
|
பெறப்பட்ட |
||||
|
மனுக்கள்</font></td> |
||||
|
<td height="25" colspan="2"><span ><font SIZE="2" > |
||||
|
<input type="radio" value="Y" name="emailID" id="emailID" tabindex="1"> |
||||
|
ஆம்</font></span> |
||||
|
<font SIZE="2" > |
||||
|
<input type="radio" value="N" name="emailID" id="emailID" tabindex="1"> |
||||
|
இல்லை</font></span></td> |
||||
|
|
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td width="341" height="29"><b><font face="divya">மனு எண்</font></b></td> |
||||
|
<td width="327" height="29"><input type="text" name="pet_id" onBlur="fn_getdatails(this.value)" size="5"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="6" colspan="2" align="center"> <input type="button" value="விவரம்" name="det" onClick="fn_getdatails(pet_id.value)" style=" font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="45" colspan="2"> |
||||
|
<p align="center"> <input type="button" value="வெளியே" name="Exit" onClick="ext();" style=" display:none; font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"> |
||||
|
</p> </td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</center> |
||||
|
|
||||
|
</div> |
||||
|
</table> |
||||
|
</form> |
||||
|
<% |
||||
|
} |
||||
|
%> |
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,132 @@ |
|||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%-- <%@include file="grv_DBCon.jsp"%> --%> |
||||
|
<%@include file="DBCon.jsp"%> |
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
<script language="javascript" src="popcalendar.js"></script> |
||||
|
|
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
/* Start Create Log */ |
||||
|
String l_log_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_log_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_log_sdriver); |
||||
|
Connection logCon = DriverManager.getConnection(l_log_sUrl,"coc_mis","coc_mis"); |
||||
|
Statement logstmt = logCon.createStatement(); |
||||
|
String sQry = "insert into tbl_mis_log(MODULENAME,FILENAME,USERID) values('Mayor Complaints Pendency Report','grv_sum.jsp','"+ (String) session.getAttribute("COCMISUserCode") +"')"; |
||||
|
logstmt.executeUpdate(sQry); |
||||
|
if ( logstmt != null ) { logstmt.close(); } |
||||
|
if ( logCon != null ) { logCon.close(); } |
||||
|
/* End Create Log */ |
||||
|
|
||||
|
Calendar calendar = Calendar.getInstance(); |
||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
||||
|
String sToDate = ""; |
||||
|
try { |
||||
|
sToDate = dateFormat.format(calendar.getTime()); |
||||
|
} catch (Exception e) { e.printStackTrace(); } |
||||
|
|
||||
|
int iDirectMail = 1; // 1 -Mail, 2-Direct |
||||
|
int iMayorMail = 1; // 1 -Mail, 2-Direct |
||||
|
int iRptID = 0; // 0-Pendency Report, 1-Mp, 2-MLA, 3-Member, 4-soc_fl, 5-Public, 6-Official |
||||
|
String sTableName = "mayor_petition"; |
||||
|
String pet_dt=request.getParameter("pet_dt" ); |
||||
|
String petto_dt=request.getParameter("petto_dt" ); |
||||
|
String cmp_typ=request.getParameter("cmp_typ" ); |
||||
|
String sHead=""; |
||||
|
|
||||
|
|
||||
|
Statement stm1=Con.createStatement(); |
||||
|
|
||||
|
if (pet_dt == null || pet_dt.equals("") ) pet_dt = sToDate; |
||||
|
if (petto_dt == null || petto_dt.equals("") ) petto_dt = pet_dt; |
||||
|
sQry=" "+ |
||||
|
" SELECT pet_id,pet_nm,pet_add1||pet_add2||pet_add3||pet_pin pet_addr,pet_Det,b.COMP_TYPE FROM mayor_petition_mail a, MAYOR_COMP_TYPE b "+ |
||||
|
" where b.comp_id=a.comp_type and a.comp_type is not null and trunc(pet_dt) between to_date('"+pet_dt+"','dd-mm-rrrr') and to_date('"+petto_dt+"','dd-mm-rrrr') and "+ |
||||
|
" b.comp_id='"+cmp_typ+"'"+ |
||||
|
" union all "+ |
||||
|
" SELECT pet_id,pet_nm,pet_add1||pet_add2||pet_add3||pet_pin pet_addr,pet_Det,b.COMP_TYPE FROM mayor_petition a, MAYOR_COMP_TYPE b "+ |
||||
|
" where b.comp_id=a.comp_type and a.comp_type is not null and trunc(pet_dt) between to_date('"+pet_dt+"','dd-mm-rrrr') and to_date('"+petto_dt+"','dd-mm-rrrr') AND "+ |
||||
|
" b.comp_id='"+cmp_typ+"'"+ |
||||
|
" "+ |
||||
|
" "; |
||||
|
System.out.println("sQry "+sQry); |
||||
|
ResultSet rs=stm1.executeQuery(sQry); |
||||
|
|
||||
|
|
||||
|
%> |
||||
|
|
||||
|
<head> |
||||
|
<title>Corporation of Chennai</title> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
|
||||
|
<table border="1" cellpadding="5" cellspacing="0" width="83%" style="margin-left:10px;margin-top:10px;"> |
||||
|
<tr style=""> |
||||
|
<td height="29" colspan="6" align="center" >மாண்புமிகு மேயர் அவர்களிடம் அளிக்கப்பட்ட மனுவின் புகார் வகை விவரம்</td> |
||||
|
</tr> |
||||
|
<tr style="background:#000066;color:#FFFFFF;"> |
||||
|
<td width="101" height="29">வ.எண்</td> |
||||
|
<td width="131">மனு எண்</td> |
||||
|
<td width="150">பெயர்</td> |
||||
|
<td width="234">முகவரி</td> |
||||
|
<td width="171">மனுவின் விவரம்</td> |
||||
|
<td width="249" height="29" align="center">மனுவின் வகை</td> |
||||
|
</tr> |
||||
|
<% |
||||
|
String sTable=""; |
||||
|
int slno=0; |
||||
|
|
||||
|
while (rs.next()) |
||||
|
{ |
||||
|
sTable+="<tr>"+ |
||||
|
"<td>"+(++slno)+"</td>"+ |
||||
|
"<td>"+rs.getString("pet_id")+"</td>"+ |
||||
|
"<td>"+rs.getString("pet_nm")+"</td>"+ |
||||
|
"<td>"+rs.getString("pet_addr")+"</td>"+ |
||||
|
"<td>"+rs.getString("pet_Det")+"</td>"+ |
||||
|
"<td>"+rs.getString("COMP_TYPE")+"</td>"+ |
||||
|
"</tr>"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
logCon.close(); |
||||
|
|
||||
|
%> |
||||
|
<%=sTable%> |
||||
|
</table> |
||||
|
|
||||
|
|
||||
|
<script> |
||||
|
function fn_print() |
||||
|
{ |
||||
|
alert("TEST"); |
||||
|
//windows.location.href="./rpt_grv_sum_print.jsp"; |
||||
|
window.location.href = 'http://www.google.com'; |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<script> |
||||
|
function fn_isMayor() |
||||
|
{ |
||||
|
if ( frmGrvSum.rd_isMayor[0].checked) |
||||
|
{ |
||||
|
|
||||
|
document.getElementById("DivMayor").innerHTML="மாண்புமிகு மேயர் அவர்களிடம் அளிக்கப்பட்ட மக்கள் குறை தீர்க்கும் மனுவின் விவரம்"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
document.getElementById("DivMayor").innerHTML="சிறப்பு அதிகாரி அவர்களிடம் அளிக்கப்பட்ட மனுவின் விவரம்"; |
||||
|
} |
||||
|
} |
||||
|
fn_isMayor(); |
||||
|
</script> |
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
|
|
||||
@ -0,0 +1,226 @@ |
|||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%@include file="DBCon.jsp"%> |
||||
|
|
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
<script language="javascript" src="../popcalendar.js"></script> |
||||
|
|
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
String uc =request.getParameter("uc"); |
||||
|
String mthod =request.getParameter("mthod"); |
||||
|
Statement stm1=Con.createStatement(); |
||||
|
ResultSet rs1=stm1.executeQuery("SELECT DISTINCT TO_CHAR(pet_dt ,'RRRR') YR FROM mayor_petition order by 1 desc "); |
||||
|
String year="<Option value=0> Select </option>"; |
||||
|
while (rs1.next()) |
||||
|
{ |
||||
|
year+="<Option value="+rs1.getString("yr")+"> "+rs1.getString("yr")+"</option>"; |
||||
|
} |
||||
|
%> |
||||
|
|
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
am = "This operation is not Valid!!!"; |
||||
|
bV = parseInt(navigator.appVersion) |
||||
|
bNS = navigator.appName=="Netscape" |
||||
|
bIE = navigator.appName=="Microsoft Internet Explorer" |
||||
|
function nrc(e) { |
||||
|
if (bNS && e.which > 1){ |
||||
|
alert(am) |
||||
|
return false |
||||
|
} else if (bIE && (event.button >1)) { |
||||
|
alert(am) |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
document.onmousedown = nrc; |
||||
|
if (document.layers) window.captureEvents(Event.MOUSEDOWN); |
||||
|
if (bNS && bV<5) window.onmousedown = nrc; |
||||
|
</script> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
|
||||
|
//function for suppressing form submission |
||||
|
function noEnter(e){ |
||||
|
var characterCode |
||||
|
if(e && e.which){ |
||||
|
e = e |
||||
|
characterCode = e.which |
||||
|
} |
||||
|
else{ |
||||
|
e = event |
||||
|
characterCode = e.keyCode |
||||
|
} |
||||
|
if(characterCode == 13){ |
||||
|
return false; |
||||
|
} |
||||
|
else{ |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function dateformat(s) |
||||
|
{ |
||||
|
var a; |
||||
|
a=s.split("/"); |
||||
|
d=a[1]+"/"+a[0]+"/"+a[2]; |
||||
|
return d; |
||||
|
} |
||||
|
|
||||
|
function ch_dat(field) |
||||
|
{ |
||||
|
var checkstr = "0123456789"; |
||||
|
var DateField = field; |
||||
|
var Datevalue = ""; |
||||
|
var DateTemp = ""; |
||||
|
var seperator = "/"; |
||||
|
var day; |
||||
|
var month; |
||||
|
var year; |
||||
|
var leap = 0; |
||||
|
var err = 0; |
||||
|
var i; |
||||
|
err = 0; |
||||
|
DateValue = DateField.value; |
||||
|
/* Delete all chars except 0..9 */ |
||||
|
for (i = 0; i < DateValue.length; i++) { |
||||
|
if (checkstr.indexOf(DateValue.substr(i,1)) >= 0) { |
||||
|
DateTemp = DateTemp + DateValue.substr(i,1); |
||||
|
} |
||||
|
} |
||||
|
DateValue = DateTemp; |
||||
|
/* Always change date to 8 digits - string*/ |
||||
|
/* if year is entered as 2-digit / always assume 20xx */ |
||||
|
if (DateValue.length == 6) { |
||||
|
DateValue = DateValue.substr(0,4) + '20' + DateValue.substr(4,2); } |
||||
|
if (DateValue.length != 8) { |
||||
|
err = 19;} |
||||
|
/* year is wrong if year = 0000 */ |
||||
|
year = DateValue.substr(4,4); |
||||
|
if (year == 0) { |
||||
|
err = 20; |
||||
|
} |
||||
|
/* Validation of month*/ |
||||
|
month = DateValue.substr(2,2); |
||||
|
if ((month < 1) || (month > 12)) { |
||||
|
err = 21; |
||||
|
} |
||||
|
/* Validation of day*/ |
||||
|
day = DateValue.substr(0,2); |
||||
|
if (day < 1) { |
||||
|
err = 22; |
||||
|
} |
||||
|
/* Validation leap-year / february / day */ |
||||
|
if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0)) { |
||||
|
leap = 1; |
||||
|
} |
||||
|
if ((month == 2) && (leap == 1) && (day > 29)) { |
||||
|
err = 23; |
||||
|
} |
||||
|
if ((month == 2) && (leap != 1) && (day > 28)) { |
||||
|
err = 24; |
||||
|
} |
||||
|
/* Validation of other months */ |
||||
|
if ((day > 31) && ((month == "01") || (month == "03") || (month == "05") || (month == "07") || (month == "08") || (month == "10") || (month == "12"))) { |
||||
|
err = 25; |
||||
|
} |
||||
|
if ((day > 30) && ((month == "04") || (month == "06") || (month == "09") || (month == "11"))) { |
||||
|
err = 26; |
||||
|
} |
||||
|
/* if 00 ist entered, no error, deleting the entry */ |
||||
|
if ((day == 0) && (month == 0) && (year == 00)) { |
||||
|
err = 0; day = ""; month = ""; year = ""; seperator = ""; |
||||
|
} |
||||
|
/* if no error, write the completed date to Input-Field (e.g. 13.12.2001) */ |
||||
|
if (err == 0) { |
||||
|
DateField.value = day + seperator + month + seperator + year; |
||||
|
} |
||||
|
|
||||
|
else { |
||||
|
alert("INVALID DATE !! PLEASE ENTER DATE IN DD/MM/YYYY FORM"); |
||||
|
DateField.select(); |
||||
|
DateField.focus(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function validate() |
||||
|
{ |
||||
|
if (document.form2.pet_dt.value=="" ) |
||||
|
{ |
||||
|
alert("Please enter Collection Date"); |
||||
|
document.form2.pet_dt.focus(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// If here, then all fields are entered. So,submit form |
||||
|
document.form2.submit(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function ext() |
||||
|
{ |
||||
|
window.location.href("http://10.1.0.15:7778/pls/fas/mayor_grev_det"); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<html> |
||||
|
|
||||
|
<head> |
||||
|
<meta http-equiv="Content-Language" content="en-us"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 6.0"> |
||||
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
||||
|
<title>Corporation of Chennai</title> |
||||
|
</head> |
||||
|
|
||||
|
<body > |
||||
|
<% if (mthod.equals("D")) |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="mayor_grev_rep1.jsp" name="form2"> |
||||
|
<% } else if (mthod.equals("O")) |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="mayor_grev_rep.jsp" name="form2"> |
||||
|
<% }else if (mthod.equals("S")) |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="grv_sum.jsp" name="form2"> |
||||
|
<%}%> |
||||
|
<p> </p> |
||||
|
|
||||
|
<table align="center" width="509" > |
||||
|
<td width="485"> |
||||
|
<div align="center"> |
||||
|
<center> |
||||
|
<table border="1" width="423" height="88" cellspacing="0" cellpadding="10"> |
||||
|
<tr> |
||||
|
<td width="98" height="29"><font face="divya" size="4" >kD |
||||
|
ehs;</font></td> |
||||
|
<td width="279" height="29"><input type="text" name="pet_dt" onKeyPress="return noEnter(event)" onBlur="ch_dat(this)" size="10"> |
||||
|
<img src='../image/calendar_img.gif' border='0' align='absmiddle' alt='Select Date' onclick='popUpCalendar(form2.pet_dt,form2.pet_dt, "dd/mm/yyyy");' style='cursor: hand;' > |
||||
|
|
||||
|
<b><font face="Garamond" >(DD-MM-YYYY)</font></b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="6" colspan="2"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="45" colspan="2"> |
||||
|
<p align="center"><input type="button" value="tptuk;" name="det" onClick="validate();" style=" font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"> |
||||
|
<input type="button" value="btspna" name="Exit" onClick="ext();" style=" font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</center> |
||||
|
</div> |
||||
|
</table> |
||||
|
</form> |
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,117 @@ |
|||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<%@ page language="java" import ="java.io.*" %> |
||||
|
|
||||
|
<head> |
||||
|
<title>Chennai Corporation</title> |
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
String sQry = ""; |
||||
|
int iDepRptCount = 0; |
||||
|
int iUserLevel = Integer.parseInt((String)session.getAttribute("COCMISUserLevel")); |
||||
|
String sUserCode = (String)session.getAttribute("COCMISUserCode"); |
||||
|
String sDepID = (String)session.getAttribute("COCMISUserDep"); |
||||
|
boolean bShowReport = false; |
||||
|
|
||||
|
/*int[] iaRptID = new int[100]; |
||||
|
for(int i=0; i<100; i++) iaRptID[i]=0; |
||||
|
|
||||
|
/* |
||||
|
ResultSet rs = null; |
||||
|
Statement stmt = null; |
||||
|
sQry = "select count(dep_id) rptcount from tbl_reports where dep_id='"+ sDepID +"'"; |
||||
|
System.out.println(sQry); |
||||
|
stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
if (rs.next()) |
||||
|
{ |
||||
|
iDepRptCount = rs.getInt("rptcount"); |
||||
|
} |
||||
|
rs.close(); |
||||
|
stmt.close(); |
||||
|
System.out.println("RptCount : "+ iDepRptCount);*//* |
||||
|
|
||||
|
//if ( iDepRptCount != 0 ) |
||||
|
{ |
||||
|
sQry = "select * from tbl_user_rpt_permission where user_id='"+ sUserCode +"' order by rpt_id"; |
||||
|
System.out.println(sQry); |
||||
|
stmt = Con.createStatement(); |
||||
|
rs = stmt.executeQuery(sQry); |
||||
|
while (rs.next()) |
||||
|
{ |
||||
|
int iRptID = rs.getInt("rpt_id"); |
||||
|
System.out.println("iRptID : "+ iRptID); |
||||
|
iaRptID[(iRptID-1)] = 1; |
||||
|
if ( iRptID >=1 && iRptID <=22 ) bShowReport = true; |
||||
|
if ( iRptID == 27 || iRptID == 28 ) bShowReport = true; |
||||
|
} |
||||
|
rs.close(); |
||||
|
stmt.close(); |
||||
|
System.out.println("iRptID : "+ iaRptID[(20)]); |
||||
|
}*/ |
||||
|
%> |
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
function fnSubmit() |
||||
|
{ |
||||
|
//alert(document.getElementById("rd_rpttype").value); |
||||
|
//var url = "grv_sum.jsp?RptID="+document.getElementById("rd_rpttype").value; |
||||
|
var url = "grv_sum.jsp"; |
||||
|
//alert(url); |
||||
|
document.frm_ellogin.action = url; |
||||
|
document.frm_ellogin.submit(); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
||||
|
<style type="text/css"> |
||||
|
<!-- |
||||
|
.style1 {color: #FF9900} |
||||
|
--> |
||||
|
</style> |
||||
|
|
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
</head> |
||||
|
|
||||
|
<!-- body start //--> |
||||
|
|
||||
|
<body> |
||||
|
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="background-image:url('../image/Picture1.jpg');"> |
||||
|
<tr><td align="left" valign="top" height="26"><span> <a href="./grv_menu.jsp"><b><font face="divya" size="4" >btspna</font></b></a></span></td></tr> |
||||
|
<tr><td height="26" align="center" valign="top" > </td></tr> |
||||
|
<tr><td height="26" align="center" valign="top" ><font face="divya" size="5" >tzf;fj;jpw;Fhpa nkah; mth;fsplk; mspf;fg;gl;;l kf;fs; Fiw jPh;f;Fk; kDtpd; tptuk; </font></td></tr> |
||||
|
<tr> |
||||
|
<td valign="top" > |
||||
|
<table width="100%" border="0" cellpadding="4" cellspacing="1"> |
||||
|
<tr><td align="center" valign="top"> |
||||
|
<form id="frm_ellogin" name="frm_ellogin" method="post" > |
||||
|
<table width="60%" align="center" cellpadding="5" cellspacing="5" border="0"> |
||||
|
<tr> |
||||
|
<td ><input type="radio" id="RptID" name="RptID" value="1" checked="checked" > <b>நாடாளுமன்ற உறுப்பினர்கள் அளித்த மனு</b></td> |
||||
|
</tr> |
||||
|
<tr><td ><input type="radio" name="RptID" value="2"> <b>சட்டமன்ற உறுப்பினர்கள் அளித்த மனு</b></td> |
||||
|
</tr> |
||||
|
<tr><td ><input type="radio" name="RptID" value="3"> <b>மாமன்ற உறுப்பினர்கள் அளித்த மனு</b></td> |
||||
|
</tr> |
||||
|
<tr><td ><input type="radio" name="RptID" value="4"> <b>பொது நலச்சங்கங்கள் அளித்த மனு</b></a></td> |
||||
|
</tr> |
||||
|
<tr><td ><input type="radio" name="RptID" value="5"> <b>பொது மக்கள் அளித்த மனு</b></a></td> |
||||
|
</tr> |
||||
|
<tr><td ><input type="radio" name="RptID" value="6"> <b>சென்னை மாநகராட்சி அலுவலர்கள் அளித்த மனு</b></td> |
||||
|
</tr> |
||||
|
<tr><td align="center" ><input type="button" value="tåtuk}" name="Search" onClick="fnSubmit();" style="color: #0000FF; font-family: divya; font-size: 12pt; font-style: italic; font-weight: bold"></td></tr> |
||||
|
</table> |
||||
|
</form> |
||||
|
</td></tr></table> |
||||
|
</tr></table> |
||||
|
</body> |
||||
|
<!-- body end //--> |
||||
|
</html> |
||||
|
|
||||
|
|
||||
@ -0,0 +1,142 @@ |
|||||
|
|
||||
|
|
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%@include file="grv_DBCon.jsp"%> |
||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
<script language="javascript" src="popcalendar.js"></script> |
||||
|
|
||||
|
<% |
||||
|
|
||||
|
|
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
/* Create Log */ |
||||
|
String l_log_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp"; |
||||
|
String l_log_sdriver = "oracle.jdbc.driver.OracleDriver"; |
||||
|
Class.forName(l_log_sdriver); |
||||
|
Connection logCon = DriverManager.getConnection(l_log_sUrl,"coc_mis","coc_mis"); |
||||
|
Statement logstmt = logCon.createStatement(); |
||||
|
String sQry = "insert into tbl_mis_log(MODULENAME,FILENAME,USERID) values('Mayor Complaints Pendency Report','grv_sum.jsp','"+ (String) session.getAttribute("COCMISUserCode") +"')"; |
||||
|
logstmt.executeUpdate(sQry); |
||||
|
if ( logstmt != null ) { logstmt.close(); } |
||||
|
if ( logCon != null ) { logCon.close(); } |
||||
|
/* End Create Log */ |
||||
|
|
||||
|
Calendar calendar = Calendar.getInstance(); |
||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); |
||||
|
String sToDate = ""; |
||||
|
try { |
||||
|
sToDate = dateFormat.format(calendar.getTime()); |
||||
|
} catch (Exception e) { e.printStackTrace(); } |
||||
|
|
||||
|
int iDirectMail = 1; // 1 -Mail, 2-Direct |
||||
|
int iMayorMail = 1; // 1 -Mail, 2-Direct |
||||
|
int iRptID = 0; // 0-Pendency Report, 1-Mp, 2-MLA, 3-Member, 4-soc_fl, 5-Public, 6-Official |
||||
|
String sTableName = "mayor_petition"; |
||||
|
String pet_dt=request.getParameter("pet_dt" ); |
||||
|
String petto_dt=request.getParameter("petto_dt" ); |
||||
|
String sHead=""; |
||||
|
|
||||
|
|
||||
|
Statement stm1=Con.createStatement(); |
||||
|
|
||||
|
if (pet_dt == null || pet_dt.equals("") ) pet_dt = sToDate; |
||||
|
if (petto_dt == null || petto_dt.equals("") ) petto_dt = pet_dt; |
||||
|
sQry=" select count(*) tot, comp_type,wm_concat(distinct comp_id ) comp_id from( "+ |
||||
|
" SELECT b.comp_type,b.comp_id FROM mayor_petition_mail a, MAYOR_COMP_TYPE b "+ |
||||
|
" where b.comp_id=a.comp_type and a.comp_type is not null and trunc(pet_dt) between to_date('"+pet_dt+"','dd-mm-rrrr') and to_date('"+petto_dt+"','dd-mm-rrrr') "+ |
||||
|
" union all "+ |
||||
|
" SELECT b.comp_type,b.comp_id FROM mayor_petition a, MAYOR_COMP_TYPE b "+ |
||||
|
" where b.comp_id=a.comp_type and a.comp_type is not null and trunc(pet_dt) between to_date('"+pet_dt+"','dd-mm-rrrr') and to_date('"+petto_dt+"','dd-mm-rrrr') "+ |
||||
|
" ) "+ |
||||
|
" group by comp_type "; |
||||
|
System.out.println("sQry "+sQry); |
||||
|
ResultSet rs=stm1.executeQuery(sQry); |
||||
|
|
||||
|
|
||||
|
%> |
||||
|
|
||||
|
<head> |
||||
|
<title>Corporation of Chennai</title> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<center> |
||||
|
|
||||
|
<form id="frmGrvSum" name="frmGrvSum" method="post" action="grv_sum_comp_type.jsp" > |
||||
|
<input type="hidden" name="RptID" id="RptID" value="<%=iRptID%>" /> |
||||
|
|
||||
|
|
||||
|
<table border="1" cellpadding="5" cellspacing="0" width="59%"> |
||||
|
<tr> |
||||
|
<td colspan="3"> |
||||
|
<table border="0" cellspacing="2" cellpadding="2" width="99%"> |
||||
|
<td align="left" > |
||||
|
|
||||
|
<input id="pet_dt" name="pet_dt" size="12" onKeyPress="return noEnter(event)" type="text" value='<%=pet_dt%>' onBlur="ch_dat(this)" ><img src='../../cocmis_new/image/calendar_img.gif' border='0' align='absmiddle' alt='Select Date' onclick='popUpCalendar(this, frmGrvSum.pet_dt, "dd/mm/yyyy");' style='cursor: hand;' > <font face="divya" > Kjyä </font><input id="petto_dt" name="petto_dt" size="12" onKeyPress="return noEnter(event)" type="text" value='<%=petto_dt%>' onBlur="ch_dat(this)" ><img src='../../cocmis_new/image/calendar_img.gif' border='0' align='absmiddle' alt='Select Date' onclick='popUpCalendar(this, frmGrvSum.petto_dt, "dd/mm/yyyy");' style='cursor: hand;' > |
||||
|
|
||||
|
<input type="submit" value="njL" name="Search" style="color: #0000FF; font-family: divya; font-size: 12pt; font-style: italic; font-weight: bold"> |
||||
|
|
||||
|
|
||||
|
<span id="result_box" lang="ta"></span> </td> |
||||
|
</table> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr style="background:#000066;color:#FFFFFF;"> |
||||
|
<td width="53" height="29">வ.எண்</td> |
||||
|
<td width="401">புகார் வகை </td> |
||||
|
<td width="289" height="29" align="center">மொத்தம்</td> |
||||
|
</tr> |
||||
|
<% |
||||
|
String sTable=""; |
||||
|
int slno=0; |
||||
|
|
||||
|
while (rs.next()) |
||||
|
{ |
||||
|
sTable+="<tr>"+ |
||||
|
"<td>"+(++slno)+"</td>"+ |
||||
|
"<td>"+rs.getString("comp_type")+"</td>"+ |
||||
|
"<td><a href='grv_comp_det.jsp?pet_dt="+pet_dt+"&petto_dt="+petto_dt+"&cmp_typ="+rs.getString("comp_id")+"'>"+rs.getString("Tot")+"</A></td></tr>"; |
||||
|
} |
||||
|
|
||||
|
logCon.close(); |
||||
|
|
||||
|
%> |
||||
|
<%=sTable%> |
||||
|
</table> |
||||
|
|
||||
|
|
||||
|
<script> |
||||
|
function fn_print() |
||||
|
{ |
||||
|
alert("TEST"); |
||||
|
//windows.location.href="./rpt_grv_sum_print.jsp"; |
||||
|
window.location.href = 'http://www.google.com'; |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<script> |
||||
|
function fn_isMayor() |
||||
|
{ |
||||
|
if ( frmGrvSum.rd_isMayor[0].checked) |
||||
|
{ |
||||
|
|
||||
|
document.getElementById("DivMayor").innerHTML="மாண்புமிகு மேயர் அவர்களிடம் அளிக்கப்பட்ட மக்கள் குறை தீர்க்கும் மனுவின் விவரம்"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
document.getElementById("DivMayor").innerHTML="சிறப்பு அதிகாரி அவர்களிடம் அளிக்கப்பட்ட மனுவின் விவரம்"; |
||||
|
} |
||||
|
} |
||||
|
fn_isMayor(); |
||||
|
</script> |
||||
|
</form> |
||||
|
</center> |
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
|
|
||||
@ -0,0 +1,204 @@ |
|||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
String opt=request.getParameter("opt" ); |
||||
|
if (opt==null) |
||||
|
{ |
||||
|
opt=" "; |
||||
|
} |
||||
|
String sEmail=""; |
||||
|
|
||||
|
%> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
am = "This operation is not Valid!!!"; |
||||
|
bV = parseInt(navigator.appVersion) |
||||
|
bNS = navigator.appName=="Netscape" |
||||
|
bIE = navigator.appName=="Microsoft Internet Explorer" |
||||
|
function nrc(e) { |
||||
|
if (bNS && e.which > 1){ |
||||
|
alert(am) |
||||
|
return false |
||||
|
} else if (bIE && (event.button >1)) { |
||||
|
alert(am) |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
document.onmousedown = nrc; |
||||
|
if (document.layers) window.captureEvents(Event.MOUSEDOWN); |
||||
|
if (bNS && bV<5) window.onmousedown = nrc; |
||||
|
</script> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
|
||||
|
//function for suppressing form submission |
||||
|
function noEnter(e){ |
||||
|
var characterCode |
||||
|
if(e && e.which){ |
||||
|
e = e |
||||
|
characterCode = e.which |
||||
|
} |
||||
|
else{ |
||||
|
e = event |
||||
|
characterCode = e.keyCode |
||||
|
} |
||||
|
if(characterCode == 13){ |
||||
|
return false; |
||||
|
} |
||||
|
else{ |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function dateformat(s) |
||||
|
{ |
||||
|
var a; |
||||
|
a=s.split("/"); |
||||
|
d=a[1]+"/"+a[0]+"/"+a[2]; |
||||
|
return d; |
||||
|
} |
||||
|
|
||||
|
function ch_dat(field) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function validate() |
||||
|
{ |
||||
|
if (document.grvdt.pet_dt.value=="" ) |
||||
|
{ |
||||
|
alert("Please enter Petition Date"); |
||||
|
document.grvdt.pet_dt.focus(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// If here, then all fields are entered. So,submit form |
||||
|
// document.grvdt.submit(); |
||||
|
var frm=document.grvdt; |
||||
|
if (frm.emailID[1].checked) |
||||
|
{ |
||||
|
window.location.href="grv_ack_det.jsp?opt=D&pet_dt="+document.grvdt.pet_dt.value; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
window.location.href="grv_ack_det_mail.jsp?opt=D&pet_dt="+document.grvdt.pet_dt.value; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function ext() |
||||
|
{ |
||||
|
window.location.href("http://10.1.0.15:7778/pls/fas/mayor_grev_det"); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<html> |
||||
|
|
||||
|
<head> |
||||
|
<meta http-equiv="Content-Language" content="en-us"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 6.0"> |
||||
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
||||
|
<title>Corporation of Chennai</title> |
||||
|
</head> |
||||
|
|
||||
|
<body > |
||||
|
<form method="POST" name="grvid"> |
||||
|
<input type="hidden" name="pet_dt" value="" > |
||||
|
|
||||
|
<table align="center" width="789" bordercolorlight="#660033" bordercolordark="#660033"> |
||||
|
<td width="781"> |
||||
|
<div align="center"> |
||||
|
<center> |
||||
|
திருத்தம் |
||||
|
செய்தல் |
||||
|
<table cellpadding="5" cellspacing="0" BORDER=1 width="796" height="96" > |
||||
|
<TR> |
||||
|
<TD COLSPAN=3> |
||||
|
<TABLE width="764" cellpadding="5" > |
||||
|
<TR> |
||||
|
<td height="25" COLSPAN="4"> இணையதள வாயிலாக பெறப்பட்ட மனுக்கள்</td> |
||||
|
<TD width="69"><font SIZE="2" > |
||||
|
<input type="radio" value="Y" name="emailID" id="emailID" tabindex="1"> |
||||
|
ஆம் </font></TD> |
||||
|
<TD width="285"> |
||||
|
<font SIZE="2" > |
||||
|
<input type="radio" value="N" name="emailID" id="emailID" tabindex="1"> |
||||
|
இல்லை </font></td> |
||||
|
</TR> |
||||
|
</TABLE> |
||||
|
</TD> |
||||
|
</TR> |
||||
|
|
||||
|
<tr> |
||||
|
<td width="117" ><b><font face="divya">மனு எண்</font></b></td> |
||||
|
<td width="633" ><input type="text" name="pet_id" id="pet_id" onBlur="fn_getdatails(this.value)" size="50"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td width="117" ><b><font face="divya">மனு நாள்</font></b></td> |
||||
|
<td width="633" ><input type="text" name="pet_dt" id="pet_dt" onBlur="fn_getdatailsDate(this.value)" size="50"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="6" colspan="2"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="45" colspan="2"> |
||||
|
<p align="center"> <input type="button" value="விவரம்" name="Exit" onClick="ext();" style=" font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"> |
||||
|
</p> </td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</center> |
||||
|
|
||||
|
</div> |
||||
|
</table> |
||||
|
</form> |
||||
|
|
||||
|
<script> |
||||
|
function fn_getdatails(val) |
||||
|
{ |
||||
|
if (val.length>3) |
||||
|
{ |
||||
|
|
||||
|
var frm=document.grvid; |
||||
|
var url="" |
||||
|
if (frm.emailID[0].checked) |
||||
|
{ |
||||
|
url="mayor_grev_upd.jsp?EMAIL=Y&pet_id="+val; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
url="mayor_grev_upd.jsp?EMAIL=N&pet_id="+val; |
||||
|
} |
||||
|
window.location.href=url; |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
function fn_getdatailsDate(val) |
||||
|
{ |
||||
|
var frm=document.grvid; |
||||
|
if (val.length==10) |
||||
|
{ |
||||
|
if (frm.emailID[0].checked) |
||||
|
{ |
||||
|
window.location.href="mayor_grev_ack_det.jsp?EMAIL=Y&DATE="+val; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
window.location.href="mayor_grev_ack_det.jsp?EMAIL=N&DATE="+val; |
||||
|
} |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,183 @@ |
|||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css"> |
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("../login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
String opt=request.getParameter("opt" ); |
||||
|
if (opt==null) |
||||
|
{ |
||||
|
opt=" "; |
||||
|
} |
||||
|
String sEmail=""; |
||||
|
|
||||
|
%> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
am = "This operation is not Valid!!!"; |
||||
|
bV = parseInt(navigator.appVersion) |
||||
|
bNS = navigator.appName=="Netscape" |
||||
|
bIE = navigator.appName=="Microsoft Internet Explorer" |
||||
|
function nrc(e) { |
||||
|
if (bNS && e.which > 1){ |
||||
|
alert(am) |
||||
|
return false |
||||
|
} else if (bIE && (event.button >1)) { |
||||
|
alert(am) |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
document.onmousedown = nrc; |
||||
|
if (document.layers) window.captureEvents(Event.MOUSEDOWN); |
||||
|
if (bNS && bV<5) window.onmousedown = nrc; |
||||
|
</script> |
||||
|
|
||||
|
<script language="Javascript1.2"> |
||||
|
|
||||
|
//function for suppressing form submission |
||||
|
function noEnter(e){ |
||||
|
var characterCode |
||||
|
if(e && e.which){ |
||||
|
e = e |
||||
|
characterCode = e.which |
||||
|
} |
||||
|
else{ |
||||
|
e = event |
||||
|
characterCode = e.keyCode |
||||
|
} |
||||
|
if(characterCode == 13){ |
||||
|
return false; |
||||
|
} |
||||
|
else{ |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function dateformat(s) |
||||
|
{ |
||||
|
var a; |
||||
|
a=s.split("/"); |
||||
|
d=a[1]+"/"+a[0]+"/"+a[2]; |
||||
|
return d; |
||||
|
} |
||||
|
|
||||
|
function ch_dat(field) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function validate() |
||||
|
{ |
||||
|
if (document.grvdt.pet_dt.value=="" ) |
||||
|
{ |
||||
|
alert("Please enter Petition Date"); |
||||
|
document.grvdt.pet_dt.focus(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// If here, then all fields are entered. So,submit form |
||||
|
// document.grvdt.submit(); |
||||
|
var frm=document.grvdt; |
||||
|
if (frm.emailID[1].checked) |
||||
|
{ |
||||
|
window.location.href="grv_ack_det.jsp?opt=D&pet_dt="+document.grvdt.pet_dt.value; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
window.location.href="grv_ack_det_mail.jsp?opt=D&pet_dt="+document.grvdt.pet_dt.value; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function ext() |
||||
|
{ |
||||
|
window.location.href("http://10.1.0.15:7778/pls/fas/mayor_grev_det"); |
||||
|
} |
||||
|
function fn_getdatails(val) |
||||
|
{ |
||||
|
var frm=document.grvid; |
||||
|
if (frm.emailID[0].checked) |
||||
|
{ |
||||
|
window.location.href="mayor_mail_grev_ack.jsp?pet_id="+val; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
window.location.href="mayor_grev_ack.jsp?pet_id="+val; |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<html> |
||||
|
|
||||
|
<head> |
||||
|
<meta http-equiv="Content-Language" content="en-us"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> |
||||
|
<meta name="GENERATOR" content="Microsoft FrontPage 6.0"> |
||||
|
<meta name="ProgId" content="FrontPage.Editor.Document"> |
||||
|
<title>Corporation of Chennai</title> |
||||
|
</head> |
||||
|
|
||||
|
<body > |
||||
|
|
||||
|
|
||||
|
<% |
||||
|
if (opt.equals("D")) |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="grv_ack_det.jsp?opt=<%=opt%>" name="grvdt"> |
||||
|
<input type="hidden" name="pet_id" value="" > |
||||
|
</form> |
||||
|
<% |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
%> |
||||
|
<form method="POST" action="grv_ack_det.jsp?opt=<%=opt%>" name="grvid"> |
||||
|
<input type="hidden" name="pet_dt" value="" > |
||||
|
|
||||
|
<table align="center" width="614" bordercolorlight="#660033" bordercolordark="#660033"> |
||||
|
<td width="606"> |
||||
|
<div align="center"> |
||||
|
<center> |
||||
|
<table cellpadding="10" cellspacing="0" BORDER=1 width="618" height="96" > |
||||
|
<tr> |
||||
|
<td width="261" height="25"><font SIZE="2" > இணையதள |
||||
|
வாயிலாக |
||||
|
பெறப்பட்ட |
||||
|
மனுக்கள்</font></td> |
||||
|
<td height="25" colspan="2"><span ><font SIZE="2" > |
||||
|
<input type="radio" value="Y" name="emailID" id="emailID" tabindex="1"> |
||||
|
ஆம்</font></span> |
||||
|
<font SIZE="2" > |
||||
|
<input type="radio" value="N" name="emailID" id="emailID" tabindex="1"> |
||||
|
இல்லை</font></span></td> |
||||
|
|
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td width="261" height="29"><b><font face="divya">kD vz;</font></b></td> |
||||
|
<td width="299" height="29"><input type="text" name="pet_id" onblur="fn_getdatails(this.value)" size="5"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="6" colspan="2"> </td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td height="45" colspan="2"> |
||||
|
<p align="center"> <input type="button" value="btspna" name="Exit" onClick="ext();" style=" font-size: 12pt; font-family: divya; font-style: italic; font-weight: bold"> |
||||
|
</p> </td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</center> |
||||
|
|
||||
|
</div> |
||||
|
</table> |
||||
|
</form> |
||||
|
<% |
||||
|
} |
||||
|
%> |
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
@ -0,0 +1,59 @@ |
|||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<%@ page language="java" import ="java.io.*,java.text.*,java.lang.*,java.util.Date,java.util.*,java.sql.*" %> |
||||
|
<%@include file="DBCon.jsp"%> |
||||
|
|
||||
|
<% |
||||
|
if ( session.getAttribute("COCMISUserCode") == null || ((String)session.getAttribute("COCMISUserCode")).equals("") ) |
||||
|
{ |
||||
|
response.sendRedirect("login.jsp"); |
||||
|
return; |
||||
|
} |
||||
|
String sDep = (String)session.getAttribute("COCMISUserDep"); |
||||
|
%> |
||||
|
|
||||
|
<% |
||||
|
String sName = (String)session.getAttribute("COCMISUserName"); |
||||
|
System.out.println("text--->"+sName); |
||||
|
%> |
||||
|
<head> |
||||
|
<title>Chennai Corporation - MIS </title> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
||||
|
|
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
function fnCallLeftMenu() |
||||
|
{ |
||||
|
<% if ( !sDep.equals("") ) { %> |
||||
|
//alert("1"); |
||||
|
parent.frames[1].location.reload(); |
||||
|
<% } %> |
||||
|
} |
||||
|
</script> |
||||
|
</head> |
||||
|
|
||||
|
<body topmargin="0" onLoad="fnCallLeftMenu();" > |
||||
|
<br> |
||||
|
<div class="box"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<td align="right" width="50%" ><b>WELCOME </b> </td> |
||||
|
<%=sName %> |
||||
|
</div> |
||||
|
<CENTER> |
||||
|
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style=" background-image:url('image/Picture1.jpg');"> |
||||
|
<tr><td width="100%" style="color:#2C4365" align="center" ><h1>Welcome to Executive Information System </h1></td></tr> |
||||
|
|
||||
|
|
||||
|
<tr><td width="100%" style="color:#2C4365" align="center" valign="top" ><h2><a target="_parent" href="http://www.chennaicorporation.gov.in/eis_new">Dashboard</a></h2></td></tr> |
||||
|
</table> |
||||
|
</CENTER> |
||||
|
</body> |
||||
|
</html> |
||||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue