<%@ page import = "java.sql.*,java.util.*,java.math.*,javax.mail.*,java.text.*,javax.mail.internet.*" %> <% DBConnect.setConnection(); %> <% ResultSet result; String queryStr = new String(""); boolean IntraLogin; Cookie[] cookies; IntraLogin = false; String IntraName=""; if (request.getCookies()!=null) { cookies = request.getCookies(); String OpName = new String(""); if (cookies.length > 0) { for ( int i=0 ; i <%@ include file="login.htm"%> <% } else { String farsitext=request.getParameter("farsitext"); String answer1=request.getParameter("answer1"); String testnote=""; String lasttestnote=""; String firstname=""; String lastname=""; String farsifirstname=""; String farsilastname=""; String warningMes=""; String sex=""; DecimalFormat threeDigit = new DecimalFormat("000"); DecimalFormat twoDigit = new DecimalFormat("00"); Calendar now = new GregorianCalendar(); String nowDate = new String (Integer.toString( now.get( Calendar.YEAR ) ) + "/" + twoDigit.format( now.get( Calendar.MONTH ) + 1 ) + "/" + twoDigit.format( now.get( Calendar.DAY_OF_MONTH ) ) ); String nowTime = new String (twoDigit.format( now.get( Calendar.HOUR_OF_DAY) ) + ":" + twoDigit.format( now.get( Calendar.MINUTE ) ) ); String today=nowDate+" at "+nowTime; queryStr = "select * from IntraUserTable where username ='" + IntraName + "' and isActive='1' "; try{ result = DBConnect.submitExecuteQuery ( queryStr ); if (result.next()) { sex=result.getString("sex"); lasttestnote=result.getString("note"); firstname=result.getString("FirstName"); lastname=result.getString("LastName"); farsifirstname=result.getString("FarsiFirstName"); farsilastname=result.getString("FarsiLastName"); } if (farsitext!=null) { //Replace \n with
: farsitext=IntraUtil.setBR(farsitext); queryStr = "UPDATE IntraUserTable set note='" +farsitext+ "',nazar='" + answer1 + "' WHERE username='" + IntraName+"'"; DBConnect.submitUpdateQuery ( queryStr ); warningMes="نظرات جنابعالى به داخل بانک اطلاعاتى وارد شد"; } }catch (Exception e){warningMes="يک خطا در سيستم اتفاق افتاده است ";} %> <%@ include file="intranet.htm"%> <% } %> <% DBConnect.disconnectFromDbase(); %>