<%@ LANGUAGE="Jscript" %>
<%Response.Expires=-1;Response.AddHeader("Pragma","No-Cache");%>
<!--#include file="../../Include/CODE.INC"-->
<!--#include file="../../Include/ADOJS.INC"-->
<%Patt=0;%>
<!--#include file="../../Include/Security.INC"-->
<!--#include file="../../Include/JLook/JLS1.INC"-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function logChange(btype){
//01.03.30 &lt;(<)ƂԂĂߍĕ\łȂ!
	strParam1 = "http://"+document.location.host+"/JMSS_WEB/jlook/joblog/default.asp?logtyp="+btype;
	strParam2 = "http://"+document.location.host+"<%=Request.ServerVariables("URL")%>?logtyp="+btype;
//
	window.open(strParam1,"compocontents");
	window.open(strParam2,"menu");
//	location.replace(strParam2);
}

//01.04.11
function pgChange(pgStr){
//alert(pgStr);
	strParam1 = "http://"+document.location.host+"/JMSS_WEB/jlook/joblog/default.asp"+pgStr;
	strParam2 = "http://"+document.location.host+"<%=Request.ServerVariables("URL")%>"+pgStr;
	window.open(strParam1,"compocontents");
	window.open(strParam2,"menu");
//	location.replace(strParam2);
}
//

//01.02.06
	var maok=0;
//
	var buttonOn=1;
	var webType =1;
	if(navigator.appName.charAt(0)=="N"){
		webType =0;
		if(navigator.appVersion.charAt(0)>=5)//N6 hidden
			buttonOn=0;
	}
	if(navigator.appVersion.charAt(0)<=3)
		buttonOn=0;
/*
function MakeArray(size){

	this.length = size;
//01.02.06
	if(this.length)
		maok=1;
//
	for(i = 1; i <= size; i++){
		this[i] = null;
	}
	return this

}
function Param(jobnet,stdout,icongif,iconalt,prop,jno,nest,gyoumu,sdate,stime,etime,ptime,status,ealt,ecolor,ecode){
	
	this.jobnet = jobnet;//jobnet script
	this.stdout = stdout;//stdout script
	this.icongif = icongif;//icon image file name
	this.iconalt = iconalt;//icon alt message
	this.prop = prop;//job log property script
	this.jno = jno;//job no.
	this.nest = nest;//nest log script
	this.gyoumu = gyoumu;//job name
	this.sdate = sdate;//strat date
	this.stime = stime;//strat time
	this.etime = etime;//end time
	this.ptime = ptime;//elaphs time
	this.status = status;//job status
	this.ealt = ealt;//end code alt message
	this.ecolor = ecolor;//end code font color
	this.ecode = ecode;//end code

}
*/
//-->
</SCRIPT>
<%
		agent_typ=0;
	   	str1 = "IE";
		str2 = new String(Request.ServerVariables("HTTP_USER_AGENT"));
		if(str2.indexOf(str1)>=0)
			agent_typ=1;
	    var page_line = 10;
	    var start_y = "";
	    var start_m = "";
	    var start_d = "";
	    var repl_time = 0;
	    var sort_type = 0;
		var lk_dispMode = 1;//1:End Log 2:Queue Log 4(3):ALL
//01.03.30 &lt;(<)ƂԂĂߍĕ\łȂ!
		if (Request("logtyp").Count){
			if (Request("logtyp") == "1"){
//
				lk_dispMode = 2;
			}
		}
//01.01.13
		var next_job = 0;
//01.03.08
		var prior_job = 0;
//
//
		msg="";
		jwbmenv.logonUserSerch(lgonuser,jsrvDef);
		user_id=lgonuser;//01.02.06 
//		user_id=jwbmenv.JmssUserName+"/"+jsrvDef;//00.02.25 Serverǉ;
//		user_id=jwbmenv.JmssUserName;
//ȉDBA/*...*/܂
	    connectDB = Server.CreateObject("ADODB.Connection");
	    connectDB.Open(Const_ConStr);
		sql = "";
	    sql = "select * from jmss_jlook";
	    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){
	        getflg = 1;
	        page_line = rsUser("PAGE_LINE");
	        start_y = rsUser("START_YEAR");
	        start_m = rsUser("START_MONTH");
	        start_d = rsUser("START_DAY");
	        repl_time = rsUser("RENEW_TIME");
	        sort_type = rsUser("SORT_TYPE");
	    }

		if(start_y==""){
			src_fdate="";
		}
		else{
			src_fdate=start_y+"/"+start_m+"/"+start_d;
		}

	    jwbmlook = Server.CreateObject("JWBMLook.Look.1");
		//ȍ~dl
		all_cnt = parseInt(Request("P_LEN"),10);
		sub_cnt = parseInt(Request("P_SUB"),10);
		next_page = parseInt(Request("P_NEXT"),10);
		back_page = parseInt(Request("P_BACK"),10);
		var lk_dpatt = lk_dispMode;
		var loop_sta = 1;
		var end_fg = false;
		var hit_use = false;
		var qresult = 0;
		loop_max = 5;
		job_max = 5;
		var lp_ct = 1;
			jwbmenv.GetMaxJobNo(jsrvDef);
			job_max=jwbmenv.resultCode;
			if(job_max == -1 ||
			   job_max == 0){
				end_fg = true;
				qresult = 1;
			}
			else{
//01.01.13
				if(src_fdate.length){
					look_type=2;
				}
				else {
					look_type=1;
				}
				if(sort_type==1){
//01.03.26 Que
					if(lk_dispMode==2)
						look_type = look_type + 30;
					else
//
					look_type = look_type + 10;
				}
//01.03.26 Que
				else{
					if(lk_dispMode==2)
						look_type = look_type + 20;
				}
//
//
%>
<SCRIPT LANGUAGE="JavaScript">
//alert("job_max=<%=job_max%><%=Request("JOB_NO")%>,<%=Request("JOB_NO").Count%>jwbmlook.JobStsHtml(\"<%=lp_ct.toString(10)%>\",\"<%=loop_max.toString(10)%>\",\"17\",\"<%=look_type%>\",\"<%=src_fdate%>\",\"\",\"<%=lk_dpatt%>\",\"<%=SUser%>\",\"<%=jsrvDef%>\");");
</SCRIPT>
<%
		if(!Request("JOB_NO").Count){
			if(!Request("PAGE_NO").Count){
//			if(!Request("NJOB_NO").Count){
//01.04.XX Not 1topLog Extented Method "Test̂ߋMethodp
				jwbmlook.JobStsHtmlCU("0","0",page_line,"17",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
//				jwbmlook.JobStsHtml("0","0",page_line,"17",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
			}else{
//01.04.XX Not 1topLog Extented Method "Test̂ߋMethodp
				jwbmlook.JobStsHtmlCU("0",Request("PAGE_NO"),page_line,"17",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
//				jwbmlook.JobStsHtmlCU("0",Request("NJOB_NO"),page_line,"17",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
//				jwbmlook.JobStsHtml("0",Request("NJOB_NO"),page_line,"17",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
			}
		}else{
			if(!Request("PAGE_NO").Count){
//			if(!Request("NJOB_NO").Count){
//01.04.XX Not 1topLog Extented Method "Test̂ߋMethodp
				jwbmlook.JobStsHtmlCU(Request("JOB_NO"),"0",page_line,"27",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
//				jwbmlook.JobStsHtml(Request("JOB_NO"),"0",page_line,"27",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
			}else{
//01.04.XX Not 1topLog Extented Method "Test̂ߋMethodp
				jwbmlook.JobStsHtmlCU(Request("JOB_NO"),Request("PAGE_NO"),page_line,"27",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
//				jwbmlook.JobStsHtmlCU(Request("JOB_NO"),Request("NJOB_NO"),page_line,"27",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
//				jwbmlook.JobStsHtml(Request("JOB_NO"),Request("NJOB_NO"),page_line,"27",look_type,src_fdate,"",lk_dpatt,SUser,jsrvDef);
			}
		}
%>
<SCRIPT LANGUAGE="JavaScript">
//alert("jwbmlook.JobStsHtml(\"<%=page_line%>\",\"<%=Request("parent_type")%>\",\"<%=src_fdate%>\",\"<%=sort_type%>\",\"<%=lk_dispMode%>\",\"<%=SUser%>\",\"<%=jsrvDef%>\");");
</SCRIPT>
<%
		qresult=jwbmlook.resultCode;

		if(qresult == 0){
//01.01.13
			next_job=jwbmlook.NextNo;
//01.03.08
			prior_job=jwbmlook.PriorNo;
		}
//
//	    rsUser.Close();//DBA

	}
//01.03.09 %>
<!--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>JMSS</title>
<link rel="stylesheet" type="text/css" href="../../include/jmss.css">
<script src="../../include/functions.js"></script>
</head>
<%
//01.03.30
   	str1 = "IE 4.0";
	str2 = new String(Request.ServerVariables("HTTP_USER_AGENT"));
	if(str2.indexOf(str1)>=0){
%>
<body onunload="winclose(0,<%if(repl_time!=0){Response.Write("0");}else{Response.Write("1");}%>)" bgcolor="#E0E0E0">

<%	}else{ %>
<body onUnload="winclose(0,<%if(repl_time!=0){Response.Write("0");}else{Response.Write("1");}%>)" class="data" style="background: #E0E0E0">

<%	}%>

<!-- menu -->
<table border="0" width="100%" cellspacing="0" cellpadding="4">
  <tr>
    <td class="menu" width="100%">
      <table border="0">
        <tr>
<%	if(Request("logtyp") == "1"){%>
          <td nowrap><b>WuL[ꗗ<b></td><td nowrap>&nbsp;</td>
<%	}else{%>
          <td nowrap><b>Wuꗗ<b></td><td nowrap>&nbsp;</td>
<%	}%>
<!-- 01.01.13 -->
<!-- 01.02.01 -->
<SCRIPT LANGUAGE="JavaScript">
<!--
nextpg=pgno;
//alert(pgno);
next_job=<%=next_job%>;
if(nextpg==0){
document.writeln("          <td nowrap>Õy[W</td><td nowrap>&nbsp;</td>");
}else{
ppg=nextpg-1;
//01.04.11 Request.ServerVariables("URL")CALLŃZbg
url_ppg="?JOB_NO="+jbno+"&NJOB_NO="+pjbno+"&logtyp="+lgtype+"&PAGE_NO="+ppg;
//01.03.30 &lt;(<)ƂԂĂߍĕ\łȂ!
document.writeln("          <td nowrap><a href=\"javascript:pgChange('"+url_ppg+"')\">Õy[W</a></td><td nowrap>&nbsp;</td>");
//
}
if(next_job){//Ƃ肠next̂
npg=nextpg+1;
//01.04.11 Request.ServerVariables("URL")CALLŃZbg
url_npg="?JOB_NO="+jbno+"&PJOB_NO=0&NJOB_NO=<%=next_job%>&logtyp="+lgtype+"&PAGE_NO="+npg;
//01.03.30 &lt;(<)ƂԂĂߍĕ\łȂ!
document.writeln("          <td nowrap><a href=\"javascript:pgChange('"+url_npg+"')\">̃y[W</a></td><td nowrap>&nbsp;</td>");
//
}else{
document.writeln("          <td nowrap>̃y[W</td><td nowrap>&nbsp;</td>");
}
document.writeln("          <td nowrap><a href=\"javascript:pgChange('?logtyp="+lgtype+"')\">TOPɖ߂</a></td><td nowrap>&nbsp;</td>");
document.writeln("          <td nowrap><a href=\"javascript:pgChange('?JOB_NO="+jbno+"&PJOB_NO="+pjbno+"&NJOB_NO="+njbno+"&logtyp="+lgtype+"&PAGE_NO="+pgno+"')\">XV</a></td><td nowrap>&nbsp;</td>");
//-->
</SCRIPT>
<!--01.03.30 &lt;(<)ƂԂĂߍĕ\łȂ-->
          <!--td nowrap><a href="<%//=Request.ServerVariables("URL")%>?logtyp=<%//=Request("logtyp")%>">TOPɖ߂</a></td>
          <td nowrap><a href="<%//=Request.ServerVariables("URL")%>?JOB_NO=<%//=Request("JOB_NO")%>&PJOB_NO=<%//=Request("PJOB_NO")%>&NJOB_NO=<%//=Request("NJOB_NO")%>&logtyp=<%//=Request("logtyp")%>&PAGE_NO=<%//=Request("PAGE_NO")%>">XV</a></td-->
		  <form>
	        <td nowrap>
<%
//01.03.30 &lt;(<)ƂԂĂߍĕ\łȂ!
if (Request("logtyp").Count){
	if (Request("logtyp") == "1"){ %>
				<input type="radio" value="0" onClick="logChange(0)" name="logtyp">Wu 
                <input type="radio" value="1" name="logtyp" checked>WuL[
<%	}else{%>
				<input type="radio" value="0" name="logtyp" checked>Wu 
                <input type="radio" value="1" onClick="logChange(1)" name="logtyp">WuL[
<% }}else{ %>
				<input type="radio" value="0" name="logtyp" checked>Wu 
                <input type="radio" value="1" onClick="logChange(1)" name="logtyp">WuL[
<% } %>
		    </td>
		  </form>
<!-- 01.01.13 -->
        </tr>
      </table>
    </td>
  </tr>
</table>

</body>

</html>
<%
//dl̂ߎgp
	}
//
//    Session.Abandon;//?
%>

