⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adddhref.java

📁 ERO系统.针对生产型、分销型、服务型企业等不同的行业特点
💻 JAVA
字号:
/*
 *this file is part of nseer erp
 *Copyright (C)2006-2010 Nseer(Beijing) Technology co.LTD/http://www.nseer.com 
 *
 *This program is free software; you can redistribute it and/or
 *modify it under the terms of the GNU General Public License
 *as published by the Free Software Foundation; either
 *version 2 of the License, or (at your option) any later version.
 */
package include.nseer_cookie;

import include.nseer_db.*;
import java.sql.*;
import javax.servlet.*;

public class adddHref {

	private String a="";
	private String b="";
	private String c="";
	private String d="";
	private ServletContext dbApplication;

	public adddHref(ServletContext dbApplication){
		this.dbApplication=dbApplication;
	}

	public String adddHref(String unit_db_name,String a){
		this.a=a;
		this.d=a;
		nseer_db_backup db=new nseer_db_backup(dbApplication);
		try{
			int m=0;
			int j=d.indexOf("**");
				while(j!=-1){
					d=d.substring(0,j)+d.substring(j+2);
					m++;
					j=d.indexOf("**");
				}
			if(m%2!=0){
				a="falsefalse";
			}else{
			int i=a.indexOf("**");
				while(i!=-1){
					b=a.substring(0,i);
					a=a.substring(i+2);
					i=a.indexOf("**");
					c=a.substring(0,i);
					String sql="select * from document_comment where name='"+c+"'";
					if(db.conn(unit_db_name)){
					ResultSet rs=db.executeQuery(sql);
					if(!rs.next()){
						String sql1="insert into document_comment(name) values('"+c+"')";
						db.executeUpdate(sql1);
					}
						db.close();
					}
					a=a.substring(i+2);
					a=b+"<a href=javascript:winopen(&#39;../../comment/query_getpara.jsp?keyword="+c+"&#39;)>"+c+"</a>"+a;
					i=a.indexOf("**");
				}
			}
		}catch(Exception ex){
			ex.printStackTrace();
		}
		return a;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -