📄 work.java
字号:
wkdcf.Save();
/* Main configure 峏怴 */
conf.SetNoteMax(conf.GetNoteMax()+1);
conf.Save();
backflg = true;
break;
case WKCmd.WK_NEW_P:// 怴婯嶌惉夋柺
if(superUserCheck(sessionUID.intValue(),req,res,url,2,admin)) return;
page = new CreateWork_new(hsInitData,hsPara,intpage,UM,sessionUID.toString());
break;
case WKCmd.WK_PATH:// 宱楬愝掕夋柺
if(superUserCheck(sessionUID.intValue(),req,res,url,2,admin)) return;
buf = (String[])hsPara.get("cansel.x");//庢徚
if(buf!=null) {
page = new CreateWork_new(hsInitData,hsPara,intpage,UM,sessionUID.toString());
break;
}
buf = (String[])hsPara.get("kakutei.x");//慖戰
if(buf!=null) {
dir = dataDir + "user" + File.separator + sessionUID.toString() ;
file = new File(dir + File.separator + "modirectwk");
if(file.exists()){
GSTool.copyFile(new File(dir + File.separator + "modirectwk"),new File(dir + File.separator + "modirect"));
}
page = new CreateWork_new(hsInitData,hsPara,intpage,UM,sessionUID.toString());
break;
}
/* cirdirect僼傽僀儖峏怴 */
cifile = new WKModirectFile(dataDir,sessionUID.toString(),2);
cidata = cifile.DataChk(sessionUID.toString());//柧嵶撉傒崬傒
buf = (String[])hsPara.get("add.x");//捛壛
if(buf!=null) {
String buf2 = (String)((String[])hsPara.get("userlist"))[0];
if(buf2!=null) {
if(!buf2.equals("-1")) {
tofile = new WKRouteFile(dataDir,sessionUID.toString(),WKCmd.WK_DIRECT,0);
todata = tofile.GetMOD(buf2);
if ( todata.GetUserArray() != null) {
int[] alluid = todata.GetUserArray();
for(int x=0; x< alluid.length;x++) {
if( alluid[x] != sessionUID.intValue()) {
if ( UM.getUName(alluid[x]) != null ) {
cifile.Addmod(Integer.toString(alluid[x]),new WKModirectData(Integer.toString(alluid[x])," "," ","0",UM.getUName(alluid[x])));
}
}
}
}
}
}
}
buf = (String[])hsPara.get("r.x");//捛壛->
if( buf != null ) {
bu1f = (String[])hsPara.get("src_right");
if( bu1f != null ) {
for( int i = 0 ; i < bu1f.length ; i++ ) {
if( Integer.parseInt(bu1f[i]) != -1 ) {
if( Integer.parseInt(bu1f[i]) != sessionUID.intValue()) {
cifile.Addmod(bu1f[i],new WKModirectData(bu1f[i]," "," ","0",UM.getUName(Integer.parseInt(bu1f[i])) ) );
}
}
}
}
}
buf = (String[])hsPara.get("l.x");//<-嶍彍
if(buf!=null) {
bu1f = (String[])hsPara.get("src_left");
if(bu1f!=null) {
for( int i=0;i<bu1f.length;i++) {
cifile.Deluid(bu1f[i]);
}
}
}
buf = (String[])hsPara.get("up.x");//傾僢僾
if(buf!=null) {
bu1f = (String[])hsPara.get("src_left");
if(bu1f!=null) {
if( bu1f.length == 1 ) {
cifile.Upuid(bu1f[0]);
}
}
}
buf = (String[])hsPara.get("down.x");//僟僂儞
if(buf!=null) {
bu1f = (String[])hsPara.get("src_left");
if(bu1f!=null) {
if( bu1f.length == 1 ) {
cifile.Downuid(bu1f[0]);
}
}
}
cifile.Save();
page = new CreateWork_path(hsInitData,hsPara,intpage,UM,sessionUID.toString());
break;
case WKCmd.WK_APP_MNT:// 怽惪拞彂椶娗棟夋柺
if(superUserCheck(sessionUID.intValue(),req,res,url,0,admin)) return;
buf = (String[])hsPara.get("cansel.x");//栠傞
if(buf!=null) {
backflg = true;
break;
}
//専嶕
page = new CreateWork_app_mnt(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),UM);
break;
case WKCmd.WK_APP_DATA_S:// 怽惪拞僨乕僞妋擣夋柺
if(superUserCheck(sessionUID.intValue(),req,res,url,0,admin)) return;
page = new CreateWork_app_data(hsInitData,hsPara,intpage,UM);
break;
case WKCmd.WK_APP_DATA:// 怽惪拞僨乕僞妋擣夋柺
if(superUserCheck(sessionUID.intValue(),req,res,url,0,admin)) return;
buf = (String[])hsPara.get("cansel.x");//栠傞
if(buf!=null) {
page = new CreateWork_app_mnt(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),UM);
break;
}
wid = (String)((String[])hsPara.get(WKCmd.PA_WID))[0]; //彂椶俬俢庢摼
// 2001.3.1 update start ookubo
// uid = (String)((String[])hsPara.get(WKCmd.PA_UID))[0]; //嶌惉儐乕僓乕俬俢庢摼
// idx = (String)((String[])hsPara.get(WKCmd.PA_IDX))[0]; //俬俶俢俤倃
nid = "";
bid = "";
wknofi = new WKNoteFile(dataDir,wid,0);
wknofi.Get(dataDir,wid,0);
uid = wknofi.getUserid(); //
kfile = new WKModirectFile(dataDir,wid,0);
idx = 0;
int mo2 = 0;
id = new String[kfile.size()];
for( int i = 0 ; i < kfile.size() ; i++) {
kdata = kfile.Getmod(i);//
if( wknofi.getIntIndex() == i ) {
mo2 = i;
if( i == 0 )
mo2 = -1; //
else if( i == kfile.size() -1 )
mo2 = -2; //
idx = i;
}
id[i] = kdata.GetId();
}
if( idx == -1 ) {
nid = id[1] ;
} else if( idx != -2 ) {
if(id.length < kfile.size() ) // 2001.4.27 update
nid = id[idx+1];
}
// 2001.3.1 update end ookubo
// String mo2 = (String)((String[])hsPara.get(WKCmd.PA_MO2))[0]; //俬俶俢俤倃 2001.3.1 del ookubo
buf = (String[])hsPara.get("skip.x");//僗僉僢僾
if(buf!=null) {
// if(Integer.parseInt(mo2)==-2) { // 2001.3.1 update ookubo
if( mo2 == -2 ) {
page = new CreateWork_app_mnt(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),UM);
break;
}
}
cal.ResetTime();
timestamp = cal.getYMDHMS() ;
/* data motion configure 峏怴 */
wkdcf = new WKDataConfFile(dataDir,"",0);
wkdcd = wkdcf.DataChk(wid);//柧嵶撉傒崬傒
/* modirect 峏怴 */
wkmf = new WKModirectFile(dataDir,wid,0);
// wkmd = wkmf.Getmod(Integer.parseInt(idx));//柧嵶撉傒崬傒 2001.3.1 update ookubo
wkmd = wkmf.Getmod(idx);//柧嵶撉傒崬傒
/* receiv 嶍彍峏怴 */
wkrf = new WKReceivFile(dataDir,wkmd.GetId(),0);
wkrd = wkrf.DataChk(wid); //柧嵶撉傒崬傒
wkrf.Del(wid);
wkrf.Save();
/* motion 峏怴 彸擣丒媝壓嫟捠 */
wkmotionf = new WKReceivFile(dataDir,uid,1);
wkmotiond = wkmotionf.DataChk(wid); //柧嵶撉傒崬傒
/* note 峏怴 彸擣丒媝壓嫟捠 */
wknf = new WKNoteFile(dataDir,wid,0);
wknf.Get(dataDir,wid,0);
buf = (String[])hsPara.get("end.x");//嫮惂廔椆
if(buf!=null) {
/* note 峏怴 */
wknf.setCompdate(timestamp);
wknf.setStatus("1");
wknf.setIndex("-1");
/* data motion configure 峏怴 */
wkdcf.Del(wid);
/* motion 峏怴 */
wkmotionf.Del(wid);
/* complete 捛壛 */
WKReceivFile compf = new WKReceivFile(dataDir,uid,2);
compf.Addmod(0,wkmotiond);
compf.Save();
/* data complete configure 峏怴 */
WKDataConfFile wkdccf = new WKDataConfFile(dataDir,"",1);
wkdcd.SetEddate(timestamp);
wkdccf.Addmod(0,wkdcd);
wkdccf.Save();
/* data complete WID copy 峏怴 */
String olddir = dataDir + "data" + File.separator + "motion" + File.separator + wid ;
String newdir = dataDir + "data" + File.separator + "complete" + File.separator + wid ;
try{
File file = new File(newdir);
if(!file.mkdirs()) // 僼傽僀儖偑懚嵼偟側偄応崌偼丄嶌惉傪帋傒傞
throw new GSException("僨傿儗僋僩儕嶌惉偵帋傒偨偑幐攕偟傑偟偨丅");
GSTool.copyFile(new File(olddir + File.separator + "note"),new File(newdir + File.separator + "note"));
GSTool.copyFile(new File(olddir + File.separator + "modirect"),new File(newdir + File.separator + "modirect"));
file = new File(olddir + File.separator + "noteb");
if(file.exists())
GSTool.copyFile(new File(olddir + File.separator + "noteb"),new File(newdir + File.separator + "noteb"));
} catch (SecurityException e) {
throw new GSException("傾僋僙僗尃僄儔乕:"+newdir);
}
}
buf = (String[])hsPara.get("del.x");//嫮惂嶍彍
if(buf!=null) {
/* motion 峏怴 */
wkmotionf.Del(wid);
/* dust 捛壛 */
WKReceivFile dustf = new WKReceivFile(dataDir,uid,3);
dustf.Addmod(0,wkmotiond);
dustf.Save();
/* data motion configure 峏怴 */
wkdcf.Del(wid);
/* note 峏怴 */
wknf.setStatus("0");
}
buf = (String[])hsPara.get("skip.x");//僗僉僢僾
if(buf!=null) {
/* note 峏怴 */
wknf.setIndex(wknf.getIntIndex()+1);
/* data motion configure 峏怴 */
wkdcd.SetIndex(wkdcd.GetIntIndex()+1);
wkdcf.update(wkdcd);
/* 師偺receiv 捛壛 */
// String nid = (String)((String[])hsPara.get(WKCmd.PA_NID))[0]; //師偺UID 2001.3.1 del ookubo
wkrd.SetIndex(wkrd.GetIntIndex()+1);
WKReceivFile wknrf = new WKReceivFile(dataDir,nid,0);
wknrf.Addmod(0,wkrd);
wknrf.Save();
}
wkmotionf.Save();
wkdcf.Save();
wknf.Save();
page = new CreateWork_app_mnt(hsInitData,hsPara,intpage,uconf.GetDisplayMax(),UM);
break;
case WKCmd.WK_ACC_MNT:// 姰椆彂椶娗棟夋柺
if(superUserCheck(sessionUID.intValue(),req,res,url,1,admin)) return;
buf = (String[])hsPara.get("cansel.x");//栠傞
if(buf!=null) {
backflg = true;
break;
}
buf = (String[])hsPara.get("set.x");//愝掕
if(buf!=null) {
page = new CreateWork_acc_set(hsInitData,hsPara,intpage,conf);
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";
Para[] paras = new Para[14+bu1f.length];
paras[0] = new Para("action",url);
paras[1] = new Para(WKCmd.PA_CMD,Integer.toString(WKCmd.WK_ACC_MNT_DEL));
paras[2] = new Para(WKCmd.PA_PAG,Integer.toString(intpage));
paras[3] = new Para(WKCmd.PA_MOD,(String)((String[])hsPara.get(WKCmd.PA_MOD))[0]);
paras[4] = new Para(WKCmd.PA_HFOL,(String)((String[])hsPara.get(WKCmd.PA_HFOL))[0]);
paras[5] = new Para("shrch",(String)((String[])hsPara.get("shrch"))[0]);
paras[6] = new Para("styy",(String)((String[])hsPara.get("styy"))[0]);
paras[7] = new Para("stmm",(String)((String[])hsPara.get("stmm"))[0]);
paras[8] = new Para("stdd",(String)((String[])hsPara.get("stdd"))[0]);
paras[9] = new Para("to",(String)((String[])hsPara.get("to"))[0]);
paras[10] = new Para("edyy",(String)((String[])hsPara.get("edyy"))[0]);
paras[11] = new Para("edmm",(String)((String[])hsPara.get("edmm"))[0]);
paras[12] = new Para("eddd",(String)((String[])hsPara.get("eddd"))[0]);
paras[13] = new Para(WKCmd.PA_FOL,(String)((String[])hsPara.get(WKCmd.PA_FOL))[0]);
for( int ii=0;ii<bu1f.length;ii++) {
paras[14+ii] = new Para(WKCmd.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("idou.x");//堏摦
if(buf!=null) {
int hfol = Integer.parseInt( (String)((String[])hsPara.get(WKCmd.PA_HFOL))[0] );
int fol = Integer.parseInt( (String)((String[])hsPara.get(WKCmd.PA_FOL))[0] );
if( hfol != fol ) {
bu1f = (String[])hsPara.get("cbox");
if( bu1f != null ) {
WKFolderFile wkff = new WKFolderFile(dataDir);
WKDataConfFile mfromfile = null ;
WKDataConfFile mtofile = null ;
if( hfol == -1 ) {
mfromfile = new WKDataConfFile(dataDir,"",1);
}else{
WKFolderData wkfd = wkff.GetMOD(Integer.toString(hfol));
wkfd.SetCount(wkfd.GetIntCount()-bu1f.length);
wkff.update(wkfd);
mfromfile = new WKDataConfFile(dataDir, Integer.toString(hfol),1);
}
if( fol == -1 ) {
mtofile = new WKDataConfFile(dataDir,"",1);
}else{
WKFolderData wkfd = wkff.GetMOD(Integer.toString(fol));
wkfd.SetCount(wkfd.GetIntCount()+bu1f.length);
wkff.update(wkfd);
mtofile = new WKDataConfFile(dataDir, Integer.toString(fol),1);
}
for( int ii=0;ii<bu1f.length;ii++) {
WKDataConfData wktodata = mfromfile.DataChk(bu1f[ii]);
mtofile.Addmod(wktodata);
mfromfile.Del(bu1f[ii]);
}
wkff.Save();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -