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

📄 circular.java

📁 一个日本流行的,功能较全的开源Web办公管理(Groupware)系统。
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
			break;


		case CICmd.CI_S_DEL://
			if( hsPara.get("__submit.x") != null ) {
				bu1f = (String[])hsPara.get("cbox");
				if(bu1f!=null) {
					for( int ii=0;ii<bu1f.length;ii++) {
						/* ID */
						String cid = bu1f[ii];
            			if(sendCheck(sessionUID.toString(),req,res,url,Integer.parseInt( cid ),dataDir) ) return;    //2001.3.1 add ookubo
						/* cirdirectreceirve */
						CIRdirectFile cirdirect = new CIRdirectFile(dataDir,cid,0);
						for( int i = 0 ; i < cirdirect.size() ; i++) {
							CIRdirectData cirdata = cirdirect.Getmod(i);//
							String str = cirdata.GetDate();
							if( str.equals(" ")) {
								str = cirdata.GetId();
								/* receirve */
								CIReceirveFile crfile = new CIReceirveFile(dataDir,str);
								crfile.Del(cid);//
								crfile.Save();
							}
						}
						/* send */
						CISendFile csfile = new CISendFile(dataDir,sessionUID.toString());
						csfile.Del(cid);//
						csfile.Save();
						/* datacircularid */
						String GrpDir = dataDir + "data" + File.separator + cid ;
						File file = new File(GrpDir);
						GSTool.deleteDir(file);
					}
				}
			}

			page = new Createcircular_send(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString());
			break;


		case CICmd.CI_MSG:// 夞棗儊僢僙乕僕
			if(receirveCheck(sessionUID.toString(),req,res,url,Integer.parseInt( (String)((String[])hsPara.get("cid"))[0] ),dataDir) ) return;    //2001.3.1 add ookubo

			buf = (String[])hsPara.get("kakunin.x");// 妋擣
			if(buf!=null) {
				cal.ResetTime();
				limit = cal.getstrYear() + cal.getstrMonth() + cal.getstrDate()+cal.getstrHour()+cal.getstrMinute()+cal.getstrSecond();
				String cid = (String)((String[])hsPara.get("cid"))[0];
				String memo = (String)((String[])hsPara.get("memo"))[0];
				if(memo.length() == 0)
					memo = " ";
				/* cirdirect僼傽僀儖峏怴 */
				CIRdirectFile cifile = new CIRdirectFile();
				if( cifile.Get(dataDir,cid) == true ) {
					CIRdirectData cidata = cifile.DataChk(sessionUID.toString());//柧嵶撉傒崬傒
					cidata.SetMemo(memo);
					cidata.SetDate(limit);
					cifile.update(cidata);
					cifile.Save();
				}
				/* receirve僼傽僀儖偐傜嶍彍 */
				CIReceirveFile crfile = new CIReceirveFile(dataDir,sessionUID.toString());
				crfile.Del(cid);//柧嵶嶍彍
				crfile.Save();
				if(hsPara.get("miniwindow") != null)
					page = new Createcircular_dammy();
				else
					page = new Createcircular_jushin(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString(),UM);
				break;
			}
			buf = (String[])hsPara.get("cansel.x");// 栠傞
			if(buf!=null) {
				if(hsPara.get("miniwindow") != null)
					page = new Createcircular_dammy();
				else
					page = new Createcircular_jushin(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString(),UM);
				break;
			}

			// 妋擣僼儔僌傪峏怴
			String ci = (String)((String[])hsPara.get("cid"))[0];
			CIReceirveFile rfile = new CIReceirveFile(dataDir,sessionUID.toString()); 
			CIReceirveData rdata = rfile.DataChk(ci);
			if(rdata.GetUmu().equals("0")){
				rdata.SetUmu("1");
				rfile.update(rdata);
				rfile.Save();
			}

			page = new Createcircular_msg(hsInitData,hsPara,intpage);
			break;


		case CICmd.CI_CHKMSG://夞棗儊僢僙乕僕乮憲怣幰梡乯
			if(sendCheck(sessionUID.toString(),req,res,url,Integer.parseInt( (String)((String[])hsPara.get("cid"))[0] ),dataDir) ) return;    //2001.3.1 add ookubo
			buf = (String[])hsPara.get("del.x");// 嶍彍
			if(buf!=null) {
				String msg =  "夞棗儊僢僙乕僕傪嶍彍偟傑偡丅傛傠偟偄偱偡偐丅";
				String title = "夞棗儊僢僙乕僕偺嶍彍";
				String IconName = "kakunin.gif";
//				String url = GSTool.removeParaFormURI(req.getRequestURI());			//2001.3.1 del ookubo
				Para[] paras = new Para[4];
				paras[0] = new Para("action",url);
				paras[1] = new Para(CICmd.PA_CMD,Integer.toString(CICmd.CI_CM_DEL));
				paras[2] = new Para(CICmd.PA_PAG,Integer.toString(intpage));
				paras[3] = new Para(CICmd.PA_CID,(String)((String[])hsPara.get(CICmd.PA_CID))[0]);
				CreateMsgPage mpage = new CreateMsgPage(CreateMsgPage.MB_YESNO,CreateMsgPage.ID_POST ,title,msg,paras,urlMap+IconName);
				mpage.write(req,res);
				return;
			}
			buf = (String[])hsPara.get("cansel.x");// 栠傞
			if(buf!=null) {
				page = new Createcircular_send(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString());
				break;
			}
			page = new Createcircular_chkmsg(hsInitData,hsPara,intpage);
			break;


		case CICmd.CI_CM_DEL://夞棗儊僢僙乕僕乮憲怣幰梡乯
			if( hsPara.get("__submit.x") != null ) {
				if(sendCheck(sessionUID.toString(),req,res,url,Integer.parseInt( (String)((String[])hsPara.get("cid"))[0] ),dataDir) ) return;    //2001.3.1 add ookubo
				String cid = (String)((String[])hsPara.get("cid"))[0];
				/* cirdirect傪撉傒巕偳傕偺receirve傪嶍彍 */
				CIRdirectFile cirdirect = new CIRdirectFile(dataDir,cid,0);
				for( int i = 0 ; i < cirdirect.size() ; i++) {
					CIRdirectData cirdata = cirdirect.Getmod(i);//柧嵶撉傒崬傒
					String str = cirdata.GetDate();
					if( str.equals(" ") ) {
						str = cirdata.GetId();
						/* receirve僼傽僀儖偐傜嶍彍 */
						CIReceirveFile crfile = new CIReceirveFile(dataDir,str);
						crfile.Del(cid);//柧嵶嶍彍
						crfile.Save();
					}
				}
				/* send僼傽僀儖偐傜嶍彍 */
				CISendFile csfile = new CISendFile(dataDir,sessionUID.toString());
				csfile.Del(cid);//柧嵶嶍彍
				csfile.Save();
				/* data偺circularid傪嶍彍 */
				String GrpDir = dataDir + "data/" + cid ;
				File file = new File(GrpDir);
				GSTool.deleteDir(file);
			}

			page = new Createcircular_send(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString());
			break;


		case CICmd.CI_N_E://  夞棗斅怴婯嶌惉夋柺嶌惉
			mode = (String)((String[])hsPara.get("mode"))[0];
			buf = (String[])hsPara.get("cansel.x");//栠傞
			if(buf!=null) {
				if(mode.equals("0")) {
					page = new Createcircular_jushin(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString(),UM);
				}else{
					page = new Createcircular_send(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString());
				}
				break;
			}
			cinote = new CINoteFile(dataDir,sessionUID.toString(),1);
			cinote.Load();
			entuserid = sessionUID.toString();
			taitol = (String)((String[])hsPara.get("title"))[0];
			if(taitol.length() == 0)
				taitol = " ";
			taitol = cnv.ReturntoBR(taitol);
			messege = (String)((String[])hsPara.get("messege"))[0];
			if(messege.length() == 0)
				messege = " ";
			messege = cnv.ReturntoBR(messege);
			tmpfile = " ";
			limit = (String)((String[])hsPara.get("caution"))[0];
			/* note 嶌惉  */
			cinote.CINote(entuserid,sessionUNAME,taitol,messege,limit,timestamp," "," ");
			cinote.Save();

			buf = (String[])hsPara.get("sentaku.x");//夞棗幰慖戰
			if(buf!=null) {
				String dir = dataDir + "user" + File.separator + sessionUID.toString() ;
				File file = new File(dir+ File.separator + "cirdirect");
				if(file.exists()){
					GSTool.copyFile(new File(dir+ File.separator + "cirdirect"),new File(dir+ File.separator + "cirdirectwk"));
				}else{
					file = new File(dir+ File.separator + "cirdirectwk");
					if(file.exists())
						file.delete();
				}
				page = new Createcircular_select(hsInitData,hsPara,intpage,UM,sessionUID.toString());
				break;
			}

			//夞棗奐巒
			cinote = new CINoteFile(dataDir,conf.GetStrCircularMax(),0);
			entuserid = sessionUID.toString();
			taitol = (String)((String[])hsPara.get("title"))[0];
			if(taitol.length() == 0) {
//				String url = GSTool.removeParaFormURI(req.getRequestURI());			//2001.3.1 del ookubo
				String nexturl = url + "?" + CICmd.PA_CMD + "=" + CICmd.CI_N_EP
					+ "&" + CICmd.PA_MOD + "=" + (String)((String[])hsPara.get(CICmd.PA_MOD))[0]
					+ "&" + CICmd.PA_MO2 + "=" + (String)((String[])hsPara.get(CICmd.PA_MO2))[0]
					+ "&" + CICmd.PA_PAG + "=" + (String)((String[])hsPara.get(CICmd.PA_PAG))[0]
					+ "&" + "caution" + "=" + (String)((String[])hsPara.get("caution"))[0];
				CreateErrorPage epage = new CreateErrorPage("僞僀僩儖傪擖椡偟偰偔偩偝偄丅",urlMap,nexturl);
				epage.write(req,res);
				return;
			}

			taitol = cnv.ReturntoBR(taitol);
			messege = (String)((String[])hsPara.get("messege"))[0];
			if(messege.length() == 0)
				messege = " ";
			messege = cnv.ReturntoBR(messege);
			Hashtable hash = (Hashtable)hsPara.get("tmpfile");
			tmpfile = (String)hash.get("filename");
			tmptype = (String)hash.get("content-type");
			byte[] content = (byte[])hash.get("content");
			if(tmpfile.length() == 0) {
				tmpfile = " ";
				tmptype = " ";
			}else{
				tmpfile = GSTool.Lastname(tmpfile);
			}

			tmpfile = GSTool.Lastname(tmpfile);
			limit = (String)((String[])hsPara.get("caution"))[0];
			cal.ResetTime();
			timestamp = cal.getstrYear() + cal.getstrMonth() + cal.getstrDate()+cal.getstrHour()+cal.getstrMinute()+cal.getstrSecond() ;

			/* cirdirect 嶌惉  */
			String dir = dataDir + "user" + File.separator + sessionUID.toString() ;
			String dir1 = dataDir + "data" + File.separator + conf.GetStrCircularMax() ;
			file = new File(dir+ File.separator + "cirdirect");
			if(!file.exists()) {
//				String url = GSTool.removeParaFormURI(req.getRequestURI());				//2001.3.1 del ookubo
				String nexturl = url + "?" + CICmd.PA_CMD + "=" + CICmd.CI_N_EP
					+ "&" + CICmd.PA_MOD + "=" + (String)((String[])hsPara.get(CICmd.PA_MOD))[0]
					+ "&" + CICmd.PA_MO2 + "=" + (String)((String[])hsPara.get(CICmd.PA_MO2))[0]
					+ "&" + CICmd.PA_PAG + "=" + (String)((String[])hsPara.get(CICmd.PA_PAG))[0]
					+ "&" + "caution" + "=" + (String)((String[])hsPara.get("caution"))[0];
				CreateErrorPage epage = new CreateErrorPage("夞棗幰傪慖戰偟偰偔偩偝偄丅",urlMap,nexturl);
				epage.write(req,res);
				return;
			}
			GSTool.copyFile(new File(dir + File.separator + "cirdirect"),new File(dir1 + File.separator + "cirdirect"));
			cirdirect = new CIRdirectFile(dataDir,conf.GetStrCircularMax(),0);
			if( cirdirect.size() == 0) {
//				String url = GSTool.removeParaFormURI(req.getRequestURI());				//2001.3.1 del ookubo
				String nexturl = url + "?" + CICmd.PA_CMD + "=" + CICmd.CI_N_EP
					+ "&" + CICmd.PA_MOD + "=" + (String)((String[])hsPara.get(CICmd.PA_MOD))[0]
					+ "&" + CICmd.PA_MO2 + "=" + (String)((String[])hsPara.get(CICmd.PA_MO2))[0]
					+ "&" + CICmd.PA_PAG + "=" + (String)((String[])hsPara.get(CICmd.PA_PAG))[0]
					+ "&" + "caution" + "=" + (String)((String[])hsPara.get("caution"))[0];
				CreateErrorPage epage = new CreateErrorPage("夞棗幰傪慖戰偟偰偔偩偝偄丅",urlMap,nexturl);
				epage.write(req,res);
				return;
			}
			if(content.length == 0) {
				tmpfile = " ";
				tmptype = " ";
			}
			/* note 嶌惉  */
			cinote.CINote(entuserid,sessionUNAME,taitol,messege,limit,timestamp,tmpfile,tmptype);
			cinote.Save();
			if(content.length != 0) {
				cinote.setContent(content);
			}
			/* send 峏怴 */
			CISendFile cisend = new CISendFile(dataDir,sessionUID.toString());
			cisend.Addmod(0,new CISendData(conf.GetStrCircularMax(),timestamp,taitol));
			cisend.Save();

			/* cirdirect 嶌惉  */
			if(file.exists()){
				GSTool.copyFile(new File(dir + File.separator + "cirdirect"),new File(dir1 + File.separator + "cirdirect"));
				cirdirect = new CIRdirectFile(dataDir,conf.GetStrCircularMax(),0);
				for( int i = 0 ; i < cirdirect.size() ; i++) {
					CIRdirectData gdata = cirdirect.Getmod(i);//柧嵶撉傒崬傒
					String uids = gdata.GetId();
					/* receirve 嶌惉  */
					CIReceirveFile cireceirve = new CIReceirveFile(dataDir,uids);
					cireceirve.Addmod(0,new CIReceirveData(conf.GetStrCircularMax(),timestamp,taitol,sessionUNAME,limit,"0"));
					cireceirve.Save();
				}
			}else{
			}

			/* Main configure 峏怴 */
			conf.SetCircularMax(conf.GetCircularMax()+1);
			conf.Save();

			if(mode.equals("0")) {
				page = new Createcircular_jushin(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString(),UM);
			}else{
				page = new Createcircular_send(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString());
			}
			break;


		case CICmd.CI_N_EP://  夞棗斅怴婯嶌惉夋柺嶌惉
			page = new Createcircular_new(hsInitData,hsPara,intpage,UM,sessionUID.toString());
			break;


		case CICmd.CI_PERSONAL:// 屄恖愝掕
			mode = (String)((String[])hsPara.get("mode"))[0];
			buf = (String[])hsPara.get("cansel.x");//夞棗傊栠傞
			if(buf!=null) {
				if(mode.equals("0")) {
					page = new Createcircular_jushin(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString(),UM);
				}else{
					page = new Createcircular_send(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),sessionUID.toString());
				}
				break;
			}
			buf = (String[])hsPara.get("set.x");//愝掕
			if(buf!=null) {
				intpage = 0 ;
				String display = (String)((String[])hsPara.get("Display"))[0];
				uconf.SetDisplay(display);
				uconf.Save();
			}
			buf = (String[])hsPara.get("new.x");//怴婯
			if(buf!=null) {
				CIDirFile dfile = new CIDirFile(dataDir,sessionUID.toString(),CICmd.CI_DIRECN,1);
				dfile.Addmod(new CIDirData("-1"," ",""," "));
				dfile.Save();
				page = new Createcircular_group(hsInitData,hsPara,intpage,UM,sessionUID.toString());	//2001.2.28 update ookubo
				break;
			}
			buf = (String[])hsPara.get("del.x");//嶍彍
			if(buf!=null) {
				bu1f = (String[])hsPara.get("cbox");
				if(bu1f!=null) {
					String msg =  "夞棗愭僌儖乕僾傪嶍彍偟傑偡丅傛傠偟偄偱偡偐丅";
					String title = "夞棗愭僌儖乕僾偺嶍彍";
					String IconName = "kakunin.gif";
//					String url = GSTool.removeParaFormURI(req.getRequestURI());		//2001.3.1 del ookubo
//					Para[] paras = new Para[6+bu1f.length];							//2001.2.28 update ookubo
					Para[] paras = new Para[5+bu1f.length];
					paras[0] = new Para("action",url);
					paras[1] = new Para(CICmd.PA_CMD,Integer.toString(CICmd.CI_P_DEL));
					paras[2] = new Para(CICmd.PA_PAG,Integer.toString(intpage));
					paras[3] = new Para(CICmd.PA_MOD,(String)((String[])hsPara.get(CICmd.PA_MOD))[0]);
					paras[4] = new Para(CICmd.PA_MO2,"1");
//					paras[5] = new Para(CICmd.PA_UID,sessionUID.toString());		//2001.2.28 del ookubo
					for( int ii=0;ii<bu1f.length;ii++) {
//						paras[6+ii] = new Para(CICmd.PA_CBOX,bu1f[ii]);				//2001.2.28 update ookubo
						paras[5+ii] = new Para(CICmd.PA_CBOX,bu1f[ii]);
					}
					CreateMsgPage mpage = new CreateMsgPage(CreateMsgPage.MB_YESNO,CreateMsgPage.ID_POST ,title,msg,paras,urlMap+IconName);
					mpage.write(req,res);
					return;
				}
			}
			buf = (String[])hsPara.get("imp.x");//僀儞億乕僩
			if(buf!=null) {
				page = new Createcircular_import(hsInitData,hsPara,intpage);
				break;
			}
			buf = (String[])hsPara.get("exp.x");//僄僋僗億乕僩
			if(buf!=null) {
				bu1f = (String[])hsPara.get("cbox");
				if(bu1f!=null) {

⌨️ 快捷键说明

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