<%@ LANGUAGE="Jscript" %>
<%Response.Expires=-1;Response.AddHeader("Pragma","No-Cache");%>
<!--#include file="../../Include/CODE.INC"-->
<!--#include file="../../Include/ADOJS.INC"-->

<%
// Request("pathList"):j[܂ł̑SKw̃j[t@CpX̗
path="";   //1Õj[t@C
pcnt=0;    //j[JEg 0=Top

if(Request("pcnt").Count){
	pcnt=Request("pcnt");
}
if(Request("pathList").Count){
	if(Request("BOPT").Count && Request("BOPT")=="1"){   //j[JڗL
		editPath = new String(Request("pathList"));
		indx=editPath.lastIndexOf(",");
		path=editPath.substring(0,indx);
	}
	else{
		path=Request("pathList");
	}
}
else{
	path=Request("pathList");
}
%>

<SCRIPT LANGUAGE="JavaScript">
<!--
strPath="http://"+document.location.host+"/jmss_web/jmenu/top/";

function topWin(){   //TOPɖ߂{^
	strParam1 = strPath+"default.asp";
	strParam2 = "http://"+document.location.host+"<%=Request.ServerVariables("URL")%>";
	window.open(strParam1,"compocontents");
	window.open(strParam2,"menu");
}
function relWin(){   //XV{^
	strParam1 = strPath+"default.asp?UNM=<%=Request("UNM")%>&pcnt=<%=pcnt%>&pathList=<%=path%>";
	strParam2 = "http://"+document.location.host+"<%=Request.ServerVariables("URL")%>?UNM=<%=Request("UNM")%>&pcnt=<%=pcnt%>&pathList=<%=path%>";
	window.open(strParam1,"compocontents");
	window.open(strParam2,"menu");
}
//-->
</SCRIPT>

<!--original form-->
<html>
<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>JMenu</title>
<link rel="stylesheet" type="text/css" href="../../include/jmss.css">
<script src="../../include/functions.js"></script>
</head>

<!--body class="data" style="background: #000080"-->

<%Patt=1;%>
<!--#include file="../../Include/Security.INC"-->

<script>
//stock menu path
nestcnt=<%=pcnt%>;
u_list="<%=path%>";

aok=0;
function array(){
	this.length = array.arguments.length;
	if(this.length)
		aok=1;
	for(var i=0; i<this.length; i++){
		this[i] = array.arguments[i];
	}
}
path = new array(<%=path%>);

//back menu operation
function bMenu(aftcnt){   //Õj[ɖ߂{^
	unm="";
	aftcnt=aftcnt-1;
	if(aok && aftcnt>0)
		unm=path[aftcnt-1];
	strParam1 = strPath+"default.asp?BOPT=1&UNM="+unm+"&pcnt="+aftcnt+"&pathList=<%=path%>";
	strParam2 = "http://"+document.location.host+"<%=Request.ServerVariables("URL")%>?BOPT=1&UNM="+unm+"&pcnt="+aftcnt+"&pathList=<%=path%>";
	window.open(strParam1,"compocontents");
	window.open(strParam2,"menu");
}

function MakeArray(size){
	this.length = size;
	for(i = 1; i <= size; i++){
		this[i] = null;
	}
	return this
}

function Param(jque,jname,jpath,jpara,jexec,jelap,jptyp,jsout,jofil){
	this.queu = jque;
	this.name = jname;
	this.path = jpath;
	this.para = jpara;
	this.exec = jexec;
	this.elap = jelap;
	this.ptyp = jptyp;
	this.sout = jsout;
	this.ofil = jofil;

}
</script>

<%
	var stup_mnu="";   //j[
	var bgc_r="255";   //wiF
	var bgc_g="255";   //wiF
	var bgc_b="255";   //wiF
	var b_sz_h=100;    //{^
	var b_sz_w=100;    //{^
	var b_lpart=3;     //1񒆂̃{^
	var bgc_rgb = 0;   //wiFԗΐ
	var dlg_dsp = 0;   //mFL

	user_id=lgonuser;//01.02.06 

	connectDB = Server.CreateObject("ADODB.Connection");
	connectDB.Open(Const_ConStr);
	sql = "";
    sql = "select * from jmss_jmenu";
    sql += " where USER_ID='";
    sql += user_id;
    sql += "'";
    sql += " and SERVER_ID='";
    sql += jsrvDef;
    sql += "'";
    sql += " and DEL_FLG=1";
    rsUser = Server.CreateObject("ADODB.Recordset");
    rsUser.Open(sql, connectDB, adOpenStatic, adLockReadOnly);

    if(rsUser.RecordCount >= 1){
		dlg_dsp=rsUser("START_CHECK");//01.04.04 Dialog On/Off
	}

	bgc_rgb = ( parseInt(bgc_r,10) * ( 256 * 256 ) ) + ( parseInt(bgc_g,10) * 256 ) + parseInt(bgc_b,10);
	j6wbm = Server.CreateObject("JWBMInit.InitInst.1");
	jwbmmenu = Server.CreateObject("JWBMMenu.Menu.1");
	j6wbm.PathConv(Session("pathinfo"),"","0");//01.01.19
	agent_typ=2;//01.03.19 NN default
   	str1 = "Netscape6";
   	str11 = "IE";//01.03.19
	str2 = new String(Request.ServerVariables("HTTP_USER_AGENT"));
	if(str2.indexOf(str1)>=0)
		agent_typ=1;
	if(str2.indexOf(str11)>=0)
		agent_typ=0;//01.03.19
//01.04.12 Not Gif Extented Method "6PARAM(RFU)p
	jwbmmenu.JmwReadFiles(Request("UNM"),bgc_rgb,b_sz_h,b_sz_w,b_lpart,"1",agent_typ,jsrvDef,lgonuser,j6wbm.PathTrans);
	mstatus=jwbmmenu.resultCode;
	if(mstatus==0){   //HTML쐬AGIFϊI
		Response.Write(jwbmmenu.resultJMW);   //HTML\t
%>

<script>
function initFormset(theForm,objJInfo){
	bin_cod="0123456789";
	dlg_dsp=0<%=dlg_dsp%>;//01.04.04 Dialog On/Off

	var webType =1;
	if(navigator.appName.charAt(0)=="N")
		webType=0;
	for(cct=0;cct<theForm.elements[0].value.length;cct++){
		for(ict=0;ict<bin_cod.length;ict++){
			if(theForm.elements[0].value.charAt(cct)==bin_cod.charAt(ict)){
				break;
			}
		}
		if(ict>=bin_cod.length){
			alert("ȊO̓͂łB");
			return false;
		}
   	}
	jno = theForm.elements[0].value;
	if((jno == 0) || (jno > objJInfo.length)){
		if(jno == 99){
			topWin();
		}
		else{
			alert("݂ȂƖACRԍłB");
			return false;
		}
	}
	else{
//01.03.24
		strname="";
		place=0;
		while(objJInfo[jno].name.indexOf("&quot;",place)!=-1){
			strname+=objJInfo[jno].name.substring(place,objJInfo[jno].name.indexOf("&quot;",place));
			strname+="\"";
			place+=objJInfo[jno].name.indexOf("&quot;",place)+6;
		}
		if(strname.length){
			strname+=objJInfo[jno].name.substring(objJInfo[jno].name.lastIndexOf("&quot;")+6,objJInfo[jno].name.length);
		}
		else{
			strname+=objJInfo[jno].name;
		}
		theForm.elements[2].value = strname;
		strOut = theForm.elements[2].value;
		strOut += "N܂H";
		if(objJInfo[jno].path.indexOf(".jmn")==-1){
			if( dlg_dsp==0 ){
				if( confirm(strOut)==true ){
					theForm.elements[1].value = objJInfo[jno].queu;
					theForm.elements[3].value = objJInfo[jno].path;
					theForm.elements[4].value = objJInfo[jno].para;
					theForm.elements[5].value = objJInfo[jno].exec;
					theForm.elements[6].value = objJInfo[jno].elap;
					theForm.elements[7].value = objJInfo[jno].ptyp;
					theForm.elements[8].value = objJInfo[jno].sout;
					theForm.elements[9].value = objJInfo[jno].ofil;
					theForm.elements[12].value = "<%=Request("UNM")%>";
//01.02.03
					theForm.action=document.location;
					if(0>theForm.action.indexOf("asp"))
//01.04.12
					{//01.04.18
						theForm.action+="menu.asp";
//01.04.12
						theForm.action+="?pcnt=<%=pcnt%>&pathList=<%=path%>";//01.04.18
					}//01.04.18
					theForm.target="menu";
					window.open(strPath+"default.asp?UNM=<%=Request("UNM")%>&pcnt=<%=pcnt%>&pathList=<%=path%>","compocontents");//reload
					return true;
				}
				else
					return false;
			}
			else{
				theForm.elements[1].value = objJInfo[jno].queu;
				theForm.elements[3].value = objJInfo[jno].path;
				theForm.elements[4].value = objJInfo[jno].para;
				theForm.elements[5].value = objJInfo[jno].exec;
				theForm.elements[6].value = objJInfo[jno].elap;
				theForm.elements[7].value = objJInfo[jno].ptyp;
				theForm.elements[8].value = objJInfo[jno].sout;
				theForm.elements[9].value = objJInfo[jno].ofil;
				theForm.elements[12].value = "<%=Request("UNM")%>";
				theForm.action=document.location;
				if(0>theForm.action.indexOf("asp"))
//01.04.12
				{//01.04.18
					theForm.action+="menu.asp";
					theForm.action+="?pcnt=<%=pcnt%>&pathList=<%=path%>";//01.04.18
				}//01.04.18
				theForm.target="menu";
				window.open(strPath+"default.asp?UNM=<%=Request("UNM")%>&pcnt=<%=pcnt%>&pathList=<%=path%>","compocontents");//reload
				return true;
			}
//
		}
		else{
			theForm.elements[10].value = "0";
//01.03.24
			afterstr="";
			for(ic=0;ic<objJInfo[jno].path.length;ic++){
				if(objJInfo[jno].path.charAt(ic)=="&")
					afterstr+="<";
				else if(objJInfo[jno].path.charAt(ic)=="+")
					afterstr+=">";
				else if(objJInfo[jno].path.charAt(ic)=="%")
					afterstr+="*";
				else
					afterstr+=objJInfo[jno].path.charAt(ic);
			}
//stock menu path export
			addUnm(afterstr);
			if(nestcnt>=9){
				alert("8Kw𒴂郁j[̑Jڂ͂ł܂B");
				return false;
			}
//
			theForm.elements[12].value = afterstr;
//01.04.16
			theForm.action=strPath+"menu.asp"
			theForm.action+="?pcnt="+nestcnt+"&pathList="+u_list;//01.04.18
			theForm.target="menu";
			window.open(strPath+"default.asp?UNM="+afterstr+"&pcnt="+nestcnt+"&pathList="+u_list,"compocontents");//reload
			return true;
		}
	}
}

function addUnm(strChr){   //SKwj[pX̗
	if(u_list.length){
		u_list+=",'"+strChr+"'";
	}
	else{
		u_list="'"+strChr+"'";
	}
	nestcnt++;
	return;
}

var webType =1;
if(navigator.appName.charAt(0)=="N")
{
	webType=0;
	if(navigator.appVersion.charAt(0)>=5)
		webType=2;
}
</script>

<form method="POST" onSubmit="return initFormset(this,jobInfo)">

  <!-- menu -->
  <table border="0" width="100%" cellspacing="0" cellpadding="4">
    <tr>
      <td class="menu" width="100%">
        <table border="0">
          <tr>
<script>
		if(FileName2){
            document.writeln("<td nowrap><font size=\"4\"><b>"+FileName2+"</b></font></td>");
		}
</script>
            <td nowrap>&nbsp;</td>
            <td nowrap>ƖACRԍ
<script>
		document.write("<INPUT TYPE=\"text\" maxlength=\"2\" SIZE=3,1 NAME=\"JOB_NO\" VALUE=\"1\" >");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"QUEUE\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"NAME\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"PATH\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"PARAMETER\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"EXECDIR\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"ELAPSE\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"PTYPE\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"STDOUT\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"STDFILE\" VALUE=\"\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"RETRY\" VALUE=\"1\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"DLGTYP\" VALUE=\"1\">");
		document.write("<INPUT TYPE=\"hidden\" NAME=\"UNM\" VALUE=\"\">");
//01.02.10
  		document.write("<input type=\"SUBMIT\" value=\"s\"></td>");
//back menu option
		if(nestcnt){
	 		document.write("<td nowrap>&nbsp;</td><td nowrap><input type=\"button\" value=\"&lt;\" onClick=\"javascript:bMenu("+nestcnt+")\"></td>");
		}
		else{
	 		document.write("<td nowrap>&nbsp;</td><td nowrap><input type=\"button\" value=\"&lt;\" onClick=\"javascript:alert('Top̃j[ł');\"></td>");
		}
</script>
            </td>
            <td nowrap>&nbsp;</td><td nowrap><a href="javascript:relWin()">XV</a></td>
<script>
		if(nestcnt){
	 		document.write("            <td nowrap>&nbsp;</td><td nowrap><a href=\"javascript:topWin()\">TOPɖ߂</a></td>");
		}
		else{
	 		document.write("            <td nowrap>&nbsp;</td><td nowrap>TOPɖ߂</td>");
		}
</script>
            <!--td nowrap><a href="default.asp">TOPɖ߂</a></td-->
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>

<%
	}   //if(mstatus==0)ɑ΂
	else{
		if(mstatus==6){   //j[o^
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
var FileName = "JDefault";
var Bt_Part = 0;
document.writeln("<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">");
document.writeln("<tr>");
document.writeln("<td class=\"menu\" width=\"100%\">");
document.writeln("<table border=\"0\">");
document.writeln("<tr>");
document.writeln("<td nowrap>&nbsp;</td>");
document.writeln("</tr>");
document.writeln("</table>");
document.writeln("</td>");
document.writeln("</tr>");
document.writeln("</table>");
//-->
</SCRIPT>
<%
		}else{
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
var FileName = "<%=jwbmmenu.FileName%>";
var Bt_Part = 0;
document.writeln("<form>");
document.writeln("<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">");
document.writeln("<tr>");
document.writeln("<td class=\"menu\" width=\"100%\">");
document.writeln("<table border=\"0\">");
document.writeln("<tr>");
document.writeln("<td nowrap><font size=\"4\"><b>"+FileName+"</b></font></td>");
document.writeln("<td nowrap>&nbsp;</td>");
//01.04.20
if(nestcnt){
	document.write("<td nowrap>&nbsp;</td><td nowrap><input type=\"button\" value=\"&lt;\" onClick=\"javascript:bMenu("+nestcnt+")\"></td>");
}
else{
	document.write("<td nowrap>&nbsp;</td><td nowrap><input type=\"button\" value=\"&lt;\" onClick=\"javascript:alert('Top̃j[ł');\"></td>");
}
//01.04.12
document.writeln("<td nowrap><a href=\"javascript:topWin()\">TOPɖ߂</a></td>");
document.writeln("</tr>");
document.writeln("</table>");
document.writeln("</td>");
document.writeln("</tr>");
document.writeln("</table>");
document.writeln("</form>");
//-->
</SCRIPT>
<%
		}
	}
//  rsUser.Close();//DBA
%>
<% } %>
</body>

</html>
