<%@ LANGUAGE="Jscript" %>
<!-- #include file="../../include/jwheader-js.asp" -->
<%Patt=2;%>
<!--#include file="../../Include/Security.INC"-->
<%}
//01.02.05
	var Admin=0;
	var p3str="";
	var p5str="";
	Admin = Session("envmode");  //01.03.23
%>
<html>
<script language="JavaScript" src="../../include/jenv/envstrfunc.js"></script>

<%
r1=0;
if(Request("R1")==0 || Request("R1")==1){
    r1=Request("R1");
    QSecSvr=Request("QSecSvr");
}else{
    QSecSvr=jsrvDef;
}
//ޖύX
jwbmenv.QSecSvrChk(QSecSvr);
QSecSvrRet = jwbmenv.resultCode;
if (QSecSvrRet != 0) {
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
                alert("JMSST[oɐڑł܂B");
// -->
</SCRIPT>
<%
}
%>

<SCRIPT LANGUAGE="Javascript">

function ServerChange()
{
  var errServer = 0;
  srvnamstr = document.JqueForm.qsecJmssSv.value.toUpperCase()
  document.JqueForm.qsecJmssSv.value = srvnamstr
  if (document.JqueForm.qsecJmssSv.value != "")
  {
//    strRet = checkStr(document.JqueForm.qsecJmssSv.value);
//    if (strRet != 0) {
//      errServer = strRet;
//    }
    strRet = cutOverLenStr(document.JqueForm.qsecJmssSv.value, 15);
    if (strRet != 0) {
      errServer = 3;
    }
  }
  else
  {
    errServer = 4;
  }
  if (errServer == 2) {
    alert("T[oɎgpĂ͂Ȃgp܂B");
  }
  else if (errServer == 3) {
    alert("T[o܂B15oCgȓŎw肵ĂB");
  }
  else if (errServer == 4) {
    alert("T[ow肵ĂB");
  }
  else {
	document.location.replace("default.asp?mode=jobqueue&R1=<%=r1%>&name="+document.JqueForm.jobQueueName.value+"&QSecSvr="+document.JqueForm.qsecJmssSv.value);
  }
}

function MachineDummyCut()
{
    document.JqueForm.relMachines.length -= 1;
    document.JqueForm.unrelMachines.length -= 1;
}

function b2Check(btype){
	if(btype==0)
		document.JqueForm.mode.value = "machinedel";
	else
		document.JqueForm.mode.value = "jobqueuedel";
}

function grpChange(btype){
	strParam = "default.asp?mode=jobqueue&R1="+btype+"&name="+document.JqueForm.jobQueueName.value+"&QSecSvr="+document.JqueForm.qsecJmssSv.value;
//	strParam = "default.asp?mode=jobqueue&R1="+btype+"&name=<%=jsrvDef%>";
	location.replace(strParam);
}

//01.03.05
var u_list="<%=Request("u_str")%>";

function addList(btype){
  var strChr="";
  var len1=len2=selIndex=0;

  if(btype)
  	selIndex = document.JqueForm.unrelMachines.selectedIndex;
  else
  	selIndex = document.JqueForm.unbelongUser.selectedIndex;
  if(selIndex != -1) {
   arraySel = new Array();
   selcnt = 0;
   if(btype) {
	 len2 = document.JqueForm.unrelMachines.length;
     for(i=0; i<len2; i++) {
       if(document.JqueForm.unrelMachines.options[i].selected) {
         arraySel[selcnt] = document.JqueForm.unrelMachines.options[i].value;
         selcnt++;
       }
     }
   }
   else {
	 len2 = document.JqueForm.unbelongUser.length;
     for(i=0; i<len2; i++) {
       if(document.JqueForm.unbelongUser.options[i].selected) {
         arraySel[selcnt] = document.JqueForm.unbelongUser.options[i].value;
         selcnt++;
       }
     }
   }

   for(selcnti=0; selcnti<selcnt; selcnti++) {
	if(btype){
//		strChr = document.JqueForm.unrelMachines.options[selIndex].value;
		len1 = document.JqueForm.relMachines.length;
		len2 = document.JqueForm.unrelMachines.length;
	}
	else{
//		strChr = document.JqueForm.unbelongUser.options[selIndex].value;
		len1 = document.JqueForm.belongUser.length;
		len2 = document.JqueForm.unbelongUser.length;
	}
	strChr = arraySel[selcnti];
	if(strChr==""){
        if(selcnti!=0)
            continue;
		if(btype)
			alert("}VIĂB");
		else{
			if(document.JqueForm.R1[1].checked==true)
				alert("O[vIĂB");
			else
				alert("[UIĂB");
		}
		return;
	}
//01.03.05
	if(!btype){
     for(i=0; i<selcnt; i++) {
      if(arraySel[i]=="") {
        continue;
      }
	  if(u_list.length){
		u_list+=",'"+arraySel[i]+"'";
//		u_list+=",'"+strChr+"'";
      }
      else{
		u_list="'"+arraySel[i]+"'";
//		u_list="'"+strChr+"'";
	  }
     }
     document.location.replace("default.asp?mode=<%=Request("mode")%>&R1=<%=r1%>&name=<%=Request("name")%>&u_list=add&u_str="+u_list+"&QSecSvr="+document.JqueForm.qsecJmssSv.value);
//      document.location.replace("default.asp?mode=<%=Request("mode")%>&R1=<%=Request("R1")%>&name=<%=Request("name")%>&u_list=add&u_str="+u_list);
     return;
	}
//
	addOpt = new Option(strChr,strChr);
	for(i=0;i<len1;i++){
		if(btype){
			if(document.JqueForm.relMachines.options[i].value==""){
				document.JqueForm.relMachines.options[i] = addOpt;
				break;
			}
		}
		else{
			if(document.JqueForm.belongUser.options[i].value==""){
				document.JqueForm.belongUser.options[i] = addOpt;
				break;
			}
		}
	}
	if(len1==i){
		if(btype)
			document.JqueForm.relMachines.options[len1] = addOpt;
		else
			document.JqueForm.belongUser.options[len1] = addOpt;
	}
	selopt=0;
	for(i=0;i<len2;i++){
		if(selopt==0){
		  if(btype){
			if(document.JqueForm.unrelMachines.options[i].value == strChr){
				selopt=1;
				if(len2-1 == i){
					addOpt = new Option("");
					document.JqueForm.unrelMachines.options[i] = addOpt;
				}
				else{
					addOpt = new Option(document.JqueForm.unrelMachines.options[i+1].value,document.JqueForm.unrelMachines.options[i+1].value);
					document.JqueForm.unrelMachines.options[i] = addOpt;
				}
			}
		  }
		  else{
			if(document.JqueForm.unbelongUser.options[i].value == strChr){
				selopt=1;
				if(len2-1 == i){
					addOpt = new Option("");
					document.JqueForm.unbelongUser.options[i] = addOpt;
				}
				else{
					addOpt = new Option(document.JqueForm.unbelongUser.options[i+1].value,document.JqueForm.unbelongUser.options[i+1].value);
					document.JqueForm.unbelongUser.options[i] = addOpt;
				}
			}
		  }
		}
		else{
		  if(btype){
			if(len2-1 == i){
				addOpt = new Option("");
				document.JqueForm.unrelMachines.options[i] = addOpt;
			}
			else{
				addOpt = new Option(document.JqueForm.unrelMachines.options[i+1].value,document.JqueForm.unrelMachines.options[i+1].value);
				document.JqueForm.unrelMachines.options[i] = addOpt;
			}
		  }
		  else{
			if(len2-1 == i){
				addOpt = new Option("");
				document.JqueForm.unbelongUser.options[i] = addOpt;
			}
			else{
				addOpt = new Option(document.JqueForm.unbelongUser.options[i+1].value,document.JqueForm.unbelongUser.options[i+1].value);
				document.JqueForm.unbelongUser.options[i] = addOpt;
			}
		  }
		}
	}
   } //selcnt loop
  }
  else{
	if(btype)
		alert("}VIĂB");
	else{
		if(document.JqueForm.R1[1].checked==true)
			alert("O[vIĂB");
		else
			alert("[UIĂB");
	}
  }
}

function delList(btype){
  var strChr="";
  var len1=len2=selIndex=0;

  if(btype)
  	selIndex = document.JqueForm.relMachines.selectedIndex;
  else
  	selIndex = document.JqueForm.belongUser.selectedIndex;
  if(selIndex != -1) {
   arraySel = new Array();
   selcnt = 0;
   if(btype) {
	 len2 = document.JqueForm.relMachines.length;
     for(i=0; i<len2; i++) {
       if(document.JqueForm.relMachines.options[i].selected) {
         arraySel[selcnt] = document.JqueForm.relMachines.options[i].value;
         selcnt++;
       }
     }
   }
   else {
	 len2 = document.JqueForm.belongUser.length;
     for(i=0; i<len2; i++) {
       if(document.JqueForm.belongUser.options[i].selected) {
         arraySel[selcnt] = document.JqueForm.belongUser.options[i].value;
         selcnt++;
       }
     }
   }

   for(selcnti=0; selcnti<selcnt; selcnti++) {
	if(btype){
//		strChr = document.JqueForm.relMachines.options[selIndex].value;
		len1 = document.JqueForm.unrelMachines.length;
		len2 = document.JqueForm.relMachines.length;
	}
	else{
//		strChr = document.JqueForm.belongUser.options[selIndex].value;
		len1 = document.JqueForm.unbelongUser.length;
		len2 = document.JqueForm.belongUser.length;
	}
	strChr = arraySel[selcnti];
	if(strChr==""){
        if(selcnti!=0)
            continue;
		if(btype)
			alert("}VIĂB");
		else{
			if(document.JqueForm.R1[1].checked==true)
				alert("O[vIĂB");
			else
				alert("[UIĂB");
		}
		return;
	}
//01.03.06
	if(!btype){
      selIndex = "";
      for(i=len2; i>0; i--) {
        if(document.JqueForm.belongUser.options[i-1].selected) {
          if(selIndex == "") {
            selIndex=(i-1);
          } else {
            selIndex+=","+(i-1);
          }
        }
      }
      document.location.replace("default.asp?mode=<%=Request("mode")%>&R1=<%=r1%>&selno="+selIndex+"&name=<%=Request("name")%>&u_list=del&u_str="+u_list+"&QSecSvr="+document.JqueForm.qsecJmssSv.value);
//      document.location.replace("default.asp?mode=<%=Request("mode")%>&R1=<%=Request("R1")%>&selno="+selIndex+"&name=<%=Request("name")%>&u_list=del&u_str="+u_list);
      return;
	}
//
	addOpt = new Option(strChr,strChr);
	for(i=0;i<len1;i++){
		if(btype){
			if(document.JqueForm.unrelMachines.options[i].value==""){
				document.JqueForm.unrelMachines.options[i] = addOpt;
				break;
			}
		}
		else{
			if(document.JqueForm.unbelongUser.options[i].value==""){
				document.JqueForm.unbelongUser.options[i] = addOpt;
				break;
			}
		}
	}
	if(len1==i){
	if(btype)
		document.JqueForm.unrelMachines.options[len1] = addOpt;
	else
		document.JqueForm.unbelongUser.options[len1] = addOpt;
	}
	selopt=0;
	for(i=0;i<len2;i++){
		if(selopt==0){
		  if(btype){
			if(document.JqueForm.relMachines.options[i].value == strChr){
				selopt=1;
				if(len2-1 == i){
					addOpt = new Option("");
					document.JqueForm.relMachines.options[i] = addOpt;
				}
				else{
					addOpt = new Option(document.JqueForm.relMachines.options[i+1].value,document.JqueForm.relMachines.options[i+1].value);
					document.JqueForm.relMachines.options[i] = addOpt;
				}
			}
		  }
		  else{
			if(document.JqueForm.belongUser.options[i].value == strChr){
				selopt=1;
				if(len2-1 == i){
					addOpt = new Option("");
					document.JqueForm.belongUser.options[i] = addOpt;
				}
				else{
					addOpt = new Option(document.JqueForm.belongUser.options[i+1].value,document.JqueForm.belongUser.options[i+1].value);
					document.JqueForm.belongUser.options[i] = addOpt;
				}
			}
		  }
		}
		else{
		  if(btype){
			if(len2-1 == i){
				addOpt = new Option("");
				document.JqueForm.relMachines.options[i] = addOpt;
			}
			else{
				addOpt = new Option(document.JqueForm.relMachines.options[i+1].value,document.JqueForm.relMachines.options[i+1].value);
				document.JqueForm.relMachines.options[i] = addOpt;
			}
		  }
		  else{
			if(len2-1 == i){
				addOpt = new Option("");
				document.JqueForm.belongUser.options[i] = addOpt;
			}
			else{
				addOpt = new Option(document.JqueForm.belongUser.options[i+1].value,document.JqueForm.belongUser.options[i+1].value);
				document.JqueForm.belongUser.options[i] = addOpt;
			}
		  }
		}
	}
   }
  }
  else{
	if(btype)
		alert("}VIĂB");
	else{
		if(document.JqueForm.R1[1].checked==true)
			alert("O[vIĂB");
		else
			alert("[UIĂB");
	}
  }
}

function checkForm(theForm,mode){
	bin_cod="0123456789";
	esc_seq="\"\\!#$%&'()=~|<>?[]{}+*;:/,.";
	esc_seq2="\"\\|<>?*:/.";
	cct=0;
	ict=0;
	if(theForm.elements[0].value == ""){
		if(mode==1)
			alert("Wuғ}V`łB");
		else
			alert("WuL[`łB");
		return false;
	}
	else{
        if (document.JqueForm.mode.value == "machineadd") {
            theForm.elements[0].value = theForm.elements[0].value.toUpperCase();
            for (i=0; i<array2.length; i++) {
                if (theForm.elements[0].value.toUpperCase() == array2[i].toUpperCase()) {
                    alert("łɓÕWuғ}V݂܂B");
                    return false;
                }
            }
        }
		strRet = cutOverLenStr(theForm.elements[0].value, 15);
		if (strRet != 0) {
			if(mode==1)
				alert("Wuғ}V܂B15oCgȓŎw肵ĂB");
			else
				alert("WuL[܂B15oCgȓŎw肵ĂB");
			return false;
		}
		strRet = checkStr(theForm.elements[0].value);
		if (strRet != 0) {
			if(mode==1)
				alert("Wuғ}VɎgpĂ͂Ȃgp܂B");
			else
				alert("WuL[ɎgpĂ͂Ȃgp܂B");
			return false;
		}

		for(cct=0;cct<theForm.elements[0].value.length;cct++){
			for(ict=0;ict<esc_seq2.length;ict++){
				if(theForm.elements[0].value.charAt(cct)==esc_seq2.charAt(ict)){
					break;
				}
			}
			if(ict<esc_seq2.length){
				if(mode==1)//01.03.09 ғ}V̏ꍇ̘R
					alert("Wuғ}VɎgpĂ͂Ȃgp܂B");
				else
					alert("WuL[ɎgpĂ͂Ȃgp܂B");
				return false;
			}
	   	}
	}
	if(mode==1){//MACHINE
		if(theForm.jobMachineMulti.value == ""){
			alert("}Vdx`łB");
			return false;
		}
		else{
			for(cct=0;cct<theForm.jobMachineMulti.value.length;cct++){
				for(ict=0;ict<bin_cod.length;ict++){
					if(theForm.jobMachineMulti.value.charAt(cct)==bin_cod.charAt(ict)){
						break;
					}
				}
				if(ict>=bin_cod.length){
					alert("ȊO̓͂łB");
					return false;
				}
		   	}
<%
jwbmenv.GetJmssPP(jsrvDef);
if (jwbmenv.resultCode == 3) {//01.03.28 EE
%>
			if(theForm.jobMachineMulti.value <= 0 || theForm.jobMachineMulti.value > 200){
				alert("}Vdx̒lsłBLȒl(1`200)͂ĂB");
<% } else { %>
			if(theForm.jobMachineMulti.value <= 0 || theForm.jobMachineMulti.value > 100){
				alert("}Vdx̒lsłBLȒl(1`100)͂ĂB");
<% } %>
				return false;
			}
		}
	}
	else{//QUEUE
		for(sct=2;sct<6;sct++){
		  for(cct=0;cct<theForm.elements[sct].value.length;cct++){
			for(ict=0;ict<bin_cod.length;ict++){
				if(theForm.elements[sct].value.charAt(cct)==bin_cod.charAt(ict)){
					break;
				}
			}
			if(ict>=bin_cod.length){
				alert("ȊO̓͂łB");
				return false;
			}
		  }
		}
		if(theForm.jobQueueMulti.value == ""){
			alert("WuL[dx`łB");
			return false;
		}
<%
jwbmenv.GetJmssPP(jsrvDef);
if (jwbmenv.resultCode == 3) {//01.03.23 EE
%>
		else if(theForm.jobQueueMulti.value <= 0 || theForm.jobQueueMulti.value > 200){
			alert("WuL[dx̒lsłBLȒl(1`200)͂ĂB");
<% } else { %>
		else if(theForm.jobQueueMulti.value <= 0 || theForm.jobQueueMulti.value > 100){
			alert("WuL[dx̒lsłBLȒl(1`100)͂ĂB");
<% } %>
			return false;
		}
		else if(theForm.jobQueuePriority.value == ""){
			alert("WuL[Dx`łB");
			return false;
		}
		else if(theForm.jobQueuePriority.value <= 0 || theForm.jobQueuePriority.value > 16){
			alert("WuL[Dx̒lsłBLȒl(1`16)͂ĂB");
			return false;
		}
		else if(theForm.jobQueueRetryCount.value == ""){
			alert("gC񐔂`łB");
			return false;
		}
		else if(theForm.jobQueueRetryCount.value < 0 || theForm.jobQueueRetryCount.value > 10){
			alert("gC񐔂̒lsłBLȒl(0`10)͂ĂB");
			return false;
		}
		else if(theForm.jobQueueRetryInterval.value == ""){
			alert("gCԊu`łB");
			return false;
		}
		else if(theForm.jobQueueRetryInterval.value < 0 || theForm.jobQueueRetryInterval.value > 999999999){
			alert("gCԊu̒lsłBLȒl(0`999999999)͂ĂB");
			return false;
		}
		if(document.JqueForm.mode.value=="jobqueue"){
		  if(document.JqueForm.belongUser.length){//belongUser
			len = document.JqueForm.belongUser.length;
			for(i=0;i<len;i++){
				strChr = document.JqueForm.belongUser.options[i].value;
				addOpt = new Option(strChr,strChr,false,true);
				if(document.JqueForm.belongUser.options[i].value!=""){
					theForm.belongUser.options[i] = addOpt;
				}
				else{
					break;
				}
			}
		  }
		  if(document.JqueForm.relMachines.length){//relMachines
			len = document.JqueForm.relMachines.length;
			for(i=0;i<len;i++){
				strChr = document.JqueForm.relMachines.options[i].value;
				addOpt = new Option(strChr,strChr,false,true);
				if(document.JqueForm.relMachines.options[i].value!=""){
					theForm.relMachines.options[i] = addOpt;
				}
				else{
//01.03.08
					if(i==0){
//01.02.02
					  if(theForm.jobQueueStatus.options[0].selected){
						alert("֘A}V߁hhœo^܂B");
						theForm.jobQueueStatus.options[0].selected = false;
						theForm.jobQueueStatus.options[1].selected = true;
					  }
//01.03.08
					}
					break;
				}
			}
		  }
//01.02.02
		  else{
			if(theForm.jobQueueStatus.options[0].selected){
				alert("֘A}V߁hhœo^܂B");
				theForm.jobQueueStatus.options[0].selected = false;
				theForm.jobQueueStatus.options[1].selected = true;
			}
		  }
		}
	}
	return true;
}

//01.02.03
p1ok=0;
function Param1(){
	this.length = Param1.arguments.length;
//01.02.03
	if(this.length)
		p1ok=1;
	for(var i=0; i<this.length; i++){
		this[i] = Param1.arguments[i];
	}
}
array1 = new Param1(<%
		strParam = "";
		jwbmenv = Server.CreateObject("JWBMEnv.Env.1");
		if (Request("mode") == "jobqueue"){
		  strParam="/q /s:"+Request("name")+" ";
		  jwbmenv.EnvqSet(strParam,2,jsrvDef);
		  Response.Write(jwbmenv.Envq);
		}else if (Request("mode") == "machine"){
		  strParam="/m /s:"+Request("name")+" ";
		  jwbmenv.EnvqSet(strParam,2,jsrvDef);
		  Response.Write(jwbmenv.Envq);
		}else{
		  Response.Write("\"\"");
		}
		%>);

//01.02.06
p2ok=0;
function Param2(){
	this.length = Param2.arguments.length;
//01.02.06
	if(this.length)
		p2ok=1;
	for(var i=0; i<this.length; i++){
		this[i] = Param2.arguments[i];
	}
}
array2 = new Param2(<%
		jwbmenv.EnvqSet("/mx ",1,jsrvDef);
		if ( !jwbmenv.resultCode ){
		  Response.Write(jwbmenv.Envq);
		}else{
		  Response.Write("\"\"");
		}
		%>);

//01.02.06
p3ok=0;
function Param3(){
	this.length = Param3.arguments.length;
//01.02.06
	if(this.length)
		p3ok=1;
	for(var i=0; i<this.length; i++){
		this[i] = Param3.arguments[i];
	}
}
array3 = new Param3(<%
		if (Request("mode") == "jobqueue"){
		 if (QSecSvrRet == 0) {
		  jwbmenv.JEnvEnumSec("1",r1,/*01.03.07*/"0",QSecSvr,Request("name"),jsrvDef);
		  if (!jwbmenv.resultCode){ /*01.03.06*/
		    p3str=jwbmenv.Envq;
		    if(p3str.length){
		      Response.Write(p3str);
		    }else{
		      Response.Write("\"\"");
		    }
		  }else{
		    Response.Write("\"\"");
		  }
		 }else{
		   Response.Write("\"\"");
		 }
		}else{
		  Response.Write("\"\"");
		}
		%>);

<% //01.03.05
if (!Request("u_list").Count){
  if ( p3str.length ){
    Response.Write("u_list=\""+p3str+"\";");
  }
  else {
    Response.Write("u_list=\"\"");
  } 
}
   //%>
//01.02.06
p4ok=0;
function Param4(){
	this.length = Param4.arguments.length;
//01.02.06
	if(this.length)
		p4ok=1;
	for(var i=0; i<this.length; i++){
		this[i] = Param4.arguments[i];
	}
}
array4 = new Param4(<%
		if (Request("mode") == "jobqueue"){
		 if (QSecSvrRet == 0) {
		  jwbmenv.JEnvEnumSec("0",r1,/*01.03.07*/"4",QSecSvr,Request("name"),jsrvDef);
		  if ( !jwbmenv.resultCode ){
		    Response.Write(jwbmenv.Envq);
		  }else{
		    Response.Write("\"\"");
		  }
		 }else{
		   Response.Write("\"\"");
		 }
		}else{
		  Response.Write("\"\"");
		}
		%>);

//01.03.07
p45ok=0;
function Param45(){
	this.length = Param45.arguments.length;
	if(this.length)
		p45ok=1;
	for(var i=0; i<this.length; i++){
		this[i] = Param45.arguments[i];
	}
}
array45 = new Param45(<%
		if (Request("mode") == "jobqueue"){
		 if (QSecSvrRet == 0) {
		  if(r1==0){
		    jwbmenv.JEnvEnumSec("0",r1,"1",QSecSvr,Request("name"),jsrvDef);
		    if ( !jwbmenv.resultCode ){
		      Response.Write(jwbmenv.Envq);
		    }else{
		      Response.Write("\"\"");
		    }
		  }else{
		    Response.Write("\"\"");
		  }
		 }else{
		   Response.Write("\"\"");
		 }
		}else{
		  Response.Write("\"\"");
		}
		%>);

//01.03.05
p5ok=0;
function Param5(){
	this.length = Param5.arguments.length;
	if(this.length)
		p5ok=1;
	for(var i=0; i<this.length; i++){
		this[i] = Param5.arguments[i];
	}
}
array5 = new Param5(<%
		if (Request("u_list") == "add"){
		  Response.Write(Request("u_str"));
		}else if(Request("u_list")=="del"){
		  jwbmenv.deleteList(Request("selno")+",", Request("u_str")+",");
		  p5str=jwbmenv.Envq;
		  if(p5str.length){
		    Response.Write(p5str);
		  }else{
		    Response.Write("\"\"");
		  }
		}else{
		  Response.Write("\"\"");
		}
		%>);

<% //01.03.05
if (Request("u_list")=="del"){
  if ( p5str.length ){
    Response.Write("u_list=\""+p5str+"\";");
  }
  else {
    Response.Write("u_list=\"\"");
  } 
}
   //%>
//
</SCRIPT>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>JMSS</title>
<link rel="stylesheet" type="text/css" href="../../include/jmss.css">
<script src="../../include/functions.js"></script>
</head>

<!--
<body class="data"
	<% if (Request("mode") == "jobqueue"){ %>
		onload="document.all.d.style.display =''; document.all.s.style.display = 'none';document.all.r.style.display = 'none';"
	<%}%>>
-->
<% if(Request("mode") == "jobqueue") { %>
<body class="data" onLoad="MachineDummyCut()">
<% } else { %>
<body class="data">
<% } %>

<!-- menu -->

<!-- list -->
<table border="0" width="100%" cellspacing="0" cellpadding="4">
  <tr>
    <td valign="top" bgcolor="white" nowrap>
      <table border="0" width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="2">
        <tr>
          <td colspan="2" bgcolor="#4080C0" nowrap><font color="#FFFFFF"><b>WuL[</b></font></td>
        </tr>
<%
	jwbmenv.EnvqSet("/q ", 1,jsrvDef);
	if(jwbmenv.resultCode != 0)
	    Response.Write("\\L[͂܂");
	else{ Response.Write(jwbmenv.Envq); }  //WuL[ꗗ\
%>
        <tr>
<%if (Admin==1){//01.02.05 Admin & user MachinȊO̒ǉ͔\%>
          <td colspan="2" nowrap align="right"><a href="default.asp?mode=jobqueueadd&amp;name=">ǉ</a></td>
<%}%>
        </tr>
      </table>
      <table border="0" width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="2">
        <tr>
          <td bgcolor="#4080C0" nowrap><font color="#FFFFFF"><b>Wuғ}V</b></font></td>
        </tr>
<%
	jwbmenv.EnvqSet("/m ", 1,jsrvDef);
	if(jwbmenv.resultCode != 0)
	    Response.Write("\\}V͂܂");
	else{ Response.Write(jwbmenv.Envq); }
%>
        <tr>
<%if (Admin==1){//01.02.05 Admin & user MachinȊO̒ǉ͔\%>
          <td colspan="2" nowrap align="right"><a href="default.asp?mode=machineadd&amp;name=">ǉ</a></td>
<%}%>
        </tr>
      </table>
    </td>
    <td valign="top" bgcolor="white" width="80%">
<!-- main -->
	<% if (Request("mode") == "machine" || Request("mode") == "machineadd"){ %>
      <form name="JqueForm" method="POST" action="result.asp" onSubmit="return checkForm(this,1)">
       <table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
            <td width="100%" nowrap bgcolor="#4080C0"><font color="#FFFFFF"><b>ڍ</b></font></td>
        </tr>
        <tr>
         <td width="100%">
          <table border="0">
           <tr>
            <td nowrap>Wuғ}V</td>
<%if (Request("mode") != "machineadd"){ %>
            <td nowrap><input type="hidden" name="jobMachineName" value="<%=Request("name")%>"><script>/*01.02.03*/if(p1ok==0)document.write("񂪂܂"); else/**/document.write(array1[0]);</script></td>
<script>
//01.02.03
if(p1ok==0)
	document.JqueForm.jobMachineName.value = "";
else
//
document.JqueForm.jobMachineName.value = array1[0];
</script>

<%}else{ %>
            <td nowrap><input type="text" name="jobMachineName" size="29" maxlength="15" value="<%=Request("name")%>"></td>
<% } %>
           </tr>
           <tr>
            <td nowrap>}Vdx</td>
            <td nowrap><input type="text" name="jobMachineMulti" size="3" maxlength="3" value="100"></td>
           </tr>
<%if (Request("mode") != "machineadd"){ %>
<script>
//01.02.03
if(p1ok==0)
	document.JqueForm.jobMachineName.value = "";
else
//
document.JqueForm.jobMachineMulti.value = array1[1];
</script>
<% } %>
          </table>
         </td>
        </tr>
       </table>
<%if (Admin==1){//01.02.05 Admin ȊO̍XV͔\%>
<!--01.02.03-->
<script>
if(p1ok==1){
	document.write("<P><input type=\"submit\" value=\"o^\" name=\"B1\">");
}
</script>
<!--end-->
        <%if (Request("mode") != "machineadd"){ if(Request("name")!=jsrvDef){%>
<!--01.02.03-->
<script>
if(p1ok==1){
	document.write("<input type=\"submit\" value=\"폜\" name=\"B2\" onClick=\"return b2Check(0)\">");
}
</script>
<!--end-->
<%}}%>
<!--01.02.03-->
<script>
if(p1ok==1){
	document.writeln("<input type=\"button\" value=\"LZ\" name=\"B3\" onClick=\"location.replace('default.asp?mode=<%=Request("mode")%>&name=<%=Request("name")%>')\">");
}
</script>
<!--end-->
<%if (Request("mode")=="machine"){//01.03.12%>
        <input type="hidden" value="machine" name="mode">
<%}else{//01.03.12%>
        <input type="hidden" value="machineadd" name="mode">
<%}//01.03.12%>
<%if (Request("mode") == "machineadd"){ %>
<script>
    document.JqueForm.mode.value = "machineadd";
</script>
<%}%>
<% }%>
      </form>
		<% }else if (Request("mode") == "jobqueue" || Request("mode") == "jobqueueadd"){ %>
      <form name="JqueForm" method="POST" action="result.asp" onSubmit="return checkForm(this,0)">
<!--
        <table>
          <tr>
            <td onmouseover="this.style.background = '#4080C0'; this.style.color='white'" onmouseout="this.style.background = 'white'; this.style.color='black'" style="cursor:hand;" onclick="document.all.d.style.display = document.all.d.style.display == 'none' ? '' : 'none'; document.all.s.style.display = 'none';document.all.r.style.display = 'none';">ڍ</td>
            <td>b</td>
            <td onmouseover="this.style.background = '#4080C0'; this.style.color='white'" onmouseout="this.style.background = 'white'; this.style.color='black'" style="cursor:hand;" onclick="document.all.s.style.display = document.all.s.style.display == 'none' ? '' : 'none'; document.all.d.style.display = 'none';document.all.r.style.display = 'none';">WuL[ZLeB</td>
            <td>b</td>
            <td onmouseover="this.style.background = '#4080C0'; this.style.color='white'" onmouseout="this.style.background = 'white'; this.style.color='black'" style="cursor:hand;" onclick="document.all.r.style.display = document.all.r.style.display == 'none' ? '' : 'none'; document.all.d.style.display = 'none';document.all.s.style.display = 'none';">֘A}V</td>
          </tr>
        </table>
-->

<!-- ڍ -->
        <span id="d">
        <table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td width="100%" nowrap bgcolor="#4080C0"><font color="#FFFFFF"><b>ڍ</b></font></td>
          </tr>
          <tr>
            <td width="100%">
              <table border="0">
                <tr>
                  <td nowrap>WuL[</td>
<%if (Request("mode") != "jobqueueadd"){ %>
                  <td nowrap><input type="hidden" name="jobQueueName" value="<%=Request("name")%>"><script>/*01.02.06*/if(p1ok==0)document.write("񂪂܂B"); else/**/document.write(array1[0]);</script></td>
<script>
//01.02.06
if(p1ok==0)
	document.JqueForm.jobQueueName.value = "";
else
    document.JqueForm.jobQueueName.value = array1[0];
</script>

<%}else{ %>
                  <td nowrap><input type="text" name="jobQueueName" size="29" maxlength="15" value="<%=Request("name")%>"></td>
<% } %>
                </tr>
                <tr>
                  <td nowrap></td>
<%if (Request("mode") == "jobqueueadd"){ %>
                  <td nowrap><input type="hidden" name="jobQueueStatus" value="1"></td>
<% }else{ %>
                  <td nowrap><select size="1" name="jobQueueStatus">
<script>
//01.02.06
if(p1ok==1){
    if(array1[2]=="1"){
	    document.writeln("<option value=\"0\">J");
	    document.writeln("<option value=\"1\" selected>");
    }
    else{
	    document.writeln("<option value=\"0\" selected>J");
	    document.writeln("<option value=\"1\">");
    }
//01.02.06
}else{
	document.writeln("<option value=\"0\" selected>J");
	document.writeln("<option value=\"1\">");
}
</script>
                  </select></td>
<% } %>
                </tr>
                <tr>
                  <td nowrap>WuL[dx</td>
                  <td nowrap><input type="text" name="jobQueueMulti" size="3" maxlength="3" value="100"></td>
                </tr>
<%if (Request("mode") != "jobqueueadd"){ %>
<script>
//01.02.06
if(p1ok==0)
	document.JqueForm.jobQueueMulti.value = "";
else
    document.JqueForm.jobQueueMulti.value = array1[3];
</script>
<% } %>
                <tr>
                  <td nowrap>WuL[Dx</td>
                  <td nowrap><input type="text" name="jobQueuePriority" size="2" maxlength="2" value="8"></td>
                </tr>
<%if (Request("mode") != "jobqueueadd"){ %>
<script>
//01.02.06
if(p1ok==0)
	document.JqueForm.jobQueuePriority.value = "";
else
    document.JqueForm.jobQueuePriority.value = array1[4];
</script>
<% } %>
                <tr>
                  <td nowrap>gC</td>
                  <td nowrap><input type="text" name="jobQueueRetryCount" size="2" maxlength="2" value="5"></td>
                </tr>
<%if (Request("mode") != "jobqueueadd"){ %>
<script>
//01.02.06
if(p1ok==0)
	document.JqueForm.jobQueueRetryCount.value = "";
else
    document.JqueForm.jobQueueRetryCount.value = array1[5];
</script>
<% } %>
                <tr>
                  <td nowrap>gCԊu</td>
                  <td nowrap><input type="text" name="jobQueueRetryInterval" size="12" maxlength="9" value="1"></td>
                </tr>
<%if (Request("mode") != "jobqueueadd"){ %>
<script>
//01.02.06
if(p1ok==0)
	document.JqueForm.jobQueueRetryInterval.value = "";
else
    document.JqueForm.jobQueueRetryInterval.value = array1[6];
</script>
<% } %>
              </table>
            </td>
          </tr>
        </table>
        </span>

<!-- WuL[ZLeB -->
        <span id="s">
<% if (Request("mode") != "jobqueueadd" && Admin==1) {//01.02.05 Adminǉ %>
        <table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td width="100%" nowrap bgcolor="#4080C0"><font color="#FFFFFF"><b>WuL[ZLeB</b></font></td>
          </tr>
          <tr>
            <td width="100%">
              <table border="0">
                <tr>
                  <td nowrap>ꗗ\ </td>
                  <td nowrap>
                    <input type="radio" value="0" onClick="grpChange(0)" checked name="R1">[U@
                    <input type="radio" name="R1" value="1" onClick="grpChange(1)">O[v
                  </td>
<%  if (Request("mode") != "jobqueueadd") {
	  if(r1==0) { %>
<script>
      document.JqueForm.R1[0].checked = true;
      document.JqueForm.R1[1].checked = false;
</script>
<%    }else{ %>
<script>
      document.JqueForm.R1[0].checked = false;
      document.JqueForm.R1[1].checked = true;
</script>
<%    }
    } %>
                </tr>
                <tr>
                  <td nowrap>T[o@</td>
                  <td nowrap>
                    <!-- select size="1" name="qsecJmssSv" -->
                    <INPUT TYPE="text" SIZE="30" MAXLENGTH="15" NAME="qsecJmssSv" VALUE="<%=Server.HTMLEncode(QSecSvr) %>" onChange="ServerChange()">
                    <INPUT TYPE="button" VALUE="" NAME="qsecJmssSvBtn">
<%  if (Request("mode") != "jobqueueadd") { %>
<script>
//  document.writeln("<option value=\"<%=QSecSvr%>\"><%=QSecSvr%>");
</script>
<%  } %>
                    <!-- /select -->
                  </td>
                </tr>
                <tr>
<%  if (Request("mode") != "jobqueueadd") {
	  if(r1==0) { %>
                  <td colspan="2" nowrap>郆[U<br>
<%    } else { %>
                  <td colspan="2" nowrap>O[v<br>
<%    }
    } %>
                    <select size="5" multiple name="belongUser" style="width:70mm">
<script>
epion=<% if (Request("u_list").Count) Response.Write("1"); else Response.Write("0"); %>;
r1=<%=r1%>;
//01.02.06
if(p3ok==1){
  if(!epion){//01.03.05
	for(i=0;i<array3.length;i++){
			document.write("<option value=\""+array3[i]+"\">"+array3[i]);
//01.03.09
		if(!r1){
			for(ii=0;ii<array4.length;ii++){
				if(array3[i]==array4[ii])
					document.writeln(array45[ii]);
			}
		}
	}
  }//01.03.05
//01.03.05
  if(p5ok==1){
    for(i=0;i<array5.length;i++){
//01.03.14 
		document.write("<option value=\""+array5[i]+"\">"+array5[i]);
//		document.writeln("<option value=\""+array5[i]+"\">"+array5[i]);
		if(!r1){
			for(ii=0;ii<array4.length;ii++){
				if(array5[i]==array4[ii])
					document.writeln(array45[ii]);
			}
		}
//
    }
  }
//01.02.06
}
//
</script>
                    </select></td>
                </tr>
                <tr>
                  <td colspan="2" nowrap><input type="button" value="ǉ" name="add" onClick="addList(0)"><input type="button" value="폜" name="del" onClick="delList(0)"></td>
                </tr>
                <tr>
<% if (r1 == 0) { %>
                  <td colspan="2" nowrap>Ȃ[U<br>
<% } else { %>
                  <td colspan="2" nowrap>ȂO[v<br>
<% } %>
                    <select size="5" multiple name="unbelongUser" style="width:70mm">
<script>
//01.02.06
if(p4ok==1){
//01.03.12
  var user_array = new Array();
  for (i = 0; i < array4.length; i++)
  {
    user_array[i] = 0;
  }
  //bit=0;
  for(i=0;i<array4.length;i++){
    if(!epion){//01.03.05
	  for(ii=0;ii<array3.length;ii++){
		if(array3[ii]==array4[i]){
//01.03.12
			user_array[i] = 1;
//			if(i==0)
//				bit = bit | 1;
//			else
//				bit = bit | ((i)*2);
		}
	  }
    }//01.03.05
//01.03.05
	if(p5ok){
	  for(ii=0;ii<array5.length;ii++){
		if(array5[ii]==array4[i]){
//01.03.12
			user_array[i] = 1;
//			if(i==0)
//				bit = bit | 1;
//			else
//				bit = bit | ((i)*2);
		}
	  }
	}
//
  }
  for(i=0;i<array4.length;i++){
//01.03.12
	if(user_array[i] == 0)
//	if(i==0 && ((bit & 1)!=1))
//01.03.09
	{
	if(!r1)
		document.writeln("<option value=\""+array4[i]+"\">"+array4[i]+array45[i]);
	else
		document.writeln("<option value=\""+array4[i]+"\">"+array4[i]);
	}
//
//01.03.12 Delete
/*	else if((bit & ((i)*2))!=((i)*2))
//01.03.09
	{
	if(!r1)
		document.writeln("<option value=\""+array4[i]+"\">"+array4[i]+array45[i]);
	else
		document.writeln("<option value=\""+array4[i]+"\">"+array4[i]);
	}
//*/
  }
//for(i=0;i<array4.length;i++){
//		document.writeln("<option value=\""+array4[i]+"\">"+array4[i]);
//}
//01.02.06
}
//
</script>
                    </select></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
<% } %>
        </span>

<!-- ֘A}V -->
        <span id="r">
<%if (Request("mode") != "jobqueueadd"){ %>
        <table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td width="100%" nowrap bgcolor="#4080C0"><font color="#FFFFFF"><b>֘A}V</b></font></td>
          </tr>
          <tr>
            <td width="100%">
              <table border="0">
                <tr>
                  <td nowrap>}V<br>
                    <select size="5" multiple name="relMachines" style="width:70mm">
<script>
//for(i=0;i<array2.length;i++){
//01.02.06
if(p1ok==1){
	for(ii=0;ii<array1[7];ii++){
//		if(array1[ii+8]==array2[i])
//			document.writeln("<option value=\""+array2[i]+"\">"+array2[i]);
			document.writeln("<option value=\""+array1[ii+8]+"\">"+array1[ii+8]);
	}
//01.02.06
}
//}
</script>
                      <option value="">@@@@@@@@@@@@@@@
                    </select></td>
                </tr>
                <tr>
<%if (Admin==1){//01.02.05 Admin & user MachinȊO̒ǉ^폜͔\%>
                  <script>/*01.02.06*/if(p1ok==1){/**/if(array1[1]!="0")document.write("<td nowrap><input type=\"button\" value=\"ǉ\" name=\"add1\" onClick=\"addList(1)\"><input type=\"button\" value=\"폜\" name=\"del1\" onClick=\"delList(1)\"></td>");/*01.02.06*/}/**/</script>
<%}%>
                </tr>
                <tr>
                  <td nowrap>Ȃ}V<br>
                    <select size="5" multiple name="unrelMachines" style="width:70mm">
<script>
//01.02.06
if(p2ok==1){
//01.03.12
  var mac_array = new Array();
  for (i = 0; i < array2.length; i++)
  {
    mac_array[i] = 0;
  }
  //bit=0;
  for(i=0;i<array2.length;i++){
	for(ii=0;ii<array1[7];ii++){
		if(array1[ii+8]==array2[i]){
//01.03.12
			mac_array[i] = 1;
//			if(i==0)
//				bit = bit | 1;
//			else
//				bit = bit | ((i)*2);
//			document.writeln("<option value=\""+array2[i]+"\">"+array2[i]);
		}
	}
//	if(array1[7]==0)
//		document.writeln("<option value=\""+array2[i]+"\">"+array2[i]);
  }
  for(i=0;i<array2.length;i++){
//01.03.12
	if(mac_array[i] == 0)
//	if(i==0 && ((bit & 1)!=1))
		document.writeln("<option value=\""+array2[i]+"\">"+array2[i]);
//01.03.12 Delete
//	else if((bit & ((i)*2))!=((i)*2))
//		document.writeln("<option value=\""+array2[i]+"\">"+array2[i]);
  }
//01.02.06
}
//
</script>
                      <option value="">@@@@@@@@@@@@@@@
                    </select></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
<% } %>
        </span>
<%if (Admin==1){//01.02.05 Admin ȊO̍XV͔\%>
        <p><input type="submit" value="o^" name="B1"><%if (Request("mode") != "jobqueueadd"){ %><script>/*01.02.06*/if(p1ok==1){/**/if(array1[1]!="0")document.write("<input type=\"submit\" value=\"폜\" name=\"B2\" onClick=\"return b2Check(1)\">");/*01.02.06*/}/**/</script><%}%><input type="button" value="LZ" name="B2" onClick="location.replace('default.asp?mode=<%=Request("mode")%>&name=<%=Request("name")%>')"></p>
<%if (Request("mode")=="jobqueue"){//01.03.12%>
        <input type="hidden" value="jobqueue" name="mode">
<%}else{//01.03.12%>
        <input type="hidden" value="jobqueueadd" name="mode">
<%}//01.03.12%>
<%}%>
<%if (Request("mode") == "jobqueueadd"){ %>
<script>
document.JqueForm.mode.value = "jobqueueadd";
</script>
<% }%>
      </form>
        <% }else{ %>
      ̈ꗗWuL[܂̓Wuғ}VIĂB
		<%}%>
    </td>
  </tr>
</table>

</body>
<%
//	}
//	Session.Abandon;
%>

</html>
