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

📄 addheader.jsp.svn-base

📁 一个timesheet程序,用来统计开发人员的度量衡web在线程序.用于软件行业
💻 SVN-BASE
字号:
<%@ page import="java.util.List" %>
<%@ page import="com.nsi.components.util.LoginuserUtil" %>
<%@ page import="com.nsi.util.tsdate.TsDateUtil" %>
<%@ page import="com.nsi.components.web.util.TsWebUtil" %>
<%@ page import="com.nsi.components.util.info.RsDropInfo" %>
<%
List<RsDropInfo> rslist = TsWebUtil.getInstance().getActiverslist(request);
%>
<html>
<head>
	<meta http-equiv="content-style-type" content="text/css">
	<meta http-equiv="pragma" content="no-cache">
	<%
	if ( LoginuserUtil.getInstance().isNotLogined(request) || !(LoginuserUtil.getInstance().isAdmin(request)) )
	{
		%><meta http-equiv="refresh" content="0; url=/entrance.jsp"><%
	}
	%>
	<title>Achievo-RMS Add TS Header</title>
	<link href="../theme/master.css" rel="stylesheet" type="text/css">
	<script language="javascript">
	<!--
	    var today = new Date();
		var day   = today.getDate();
		var month = today.getMonth();
		var year  = y2k(today.getYear());
		var monthname = new Array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
		var valid = 0;
		var changeflag = 0;
		function restart()
		{
			document.ts_header_form.weekbegining.value = monthname[month] + "-" + padout(day) + "-" + y2k(year);
			mywindow.close();
			document.ts_header_form.tsinsert.focus();
		}
		function y2k(number)
		{
			number = parseInt(number);
			return (number < 1000) ? number + 1900 : number;
		}
		function padout(number)
		{
			number = parseInt(number);
			return (number < 10) ? '0' + number : number;
		}
		function newwindow()
		{
			mywindow = window.open('/rms/timesheet/tscalender.html','Calendar', "resizeable = no,width=345,height=295" );
			mywindow.location.href = '/rms/timesheet/tscalender.html';
			mywindow.focus();
			if (mywindow.opener == null) mywindow.opener = self;
		}
		function convertdate(date)
		{
			var datemon; 
			for ( var i = 0; i < monthname.length; i++ )
			{
				if ( monthname[ i ] == date.substring( 0, 3 ) )
				{
					datemon = i;
				}	
			}
			if ( datemon < 10 )
			{
				datemon = "0" + datemon;
			}
			return date.substring( 7, 11 ).toString() + datemon.toString() + date.substring( 4, 6 ).toString();
		}
		function getweekdate(date, numday)
		{
			var datemon; 
			for ( var i = 0; i < monthname.length; i++ )
			{
				if ( monthname[ i ] == date.substring( 0, 3 ) )
				{
					datemon = i;
				}	
			}
			var year = date.substring( 7, 11 ); 
			var day = date.substring( 4, 6 );
			var weekday = new Date();
			weekday.setFullYear(year,datemon,day); 
			weekday.setDate(weekday.getDate()+ numday);
			year = weekday.getFullYear();
			datemon = weekday.getMonth();
			day = weekday.getDate();
			if ( datemon < 10 )
			{
				datemon = "0" + datemon;
			}
			else
			{
				datemon = "" + datemon;
			}
			
			if(day <10)
			{
				day ="0" + day;
			}
			else
			{
				day ="" + day;
			}
			return "" + year  + datemon  +  day;
		}
		function getweekday(date)
		{
			var datemon; 
			for ( var i = 0; i < monthname.length; i++ )
			{
				if ( monthname[ i ] == date.substring( 0, 3 ) )
				{
					datemon = i;
				}	
			}
			var year = date.substring( 7, 11 ); 
			var day = date.substring( 4, 6 );
			var weekday = new Date();
			weekday.setFullYear(year,datemon,day); 
			switch(weekday.getDay())
			{
				case 0:
				  return "Sunday";
				case 1:
				  return "Monday";
				case 2:
				  return "Tuesday";
				case 3:
				  return "Wedsday";
				case 4:
				  return "Thursday";
				case 5:
				  return "Friday";
				case 6:
				  return "Satuday";
				default:
				  return "null";
			 } 
		}
		function newwindow()
		{
			mywindow = window.open('/rms/timesheet/tscalender.html','Calendar', "resizeable = no,width=345,height=295" );
			mywindow.location.href = '/rms/timesheet/tscalender.html';
			mywindow.focus();
			if (mywindow.opener == null) mywindow.opener = self;
		}
		function changefocus(theform)
		{
		    // theform.tsinsert.focus();
			if ( changeflag == 0 )
			{
				newwindow();
			} 
			else 
			{
				if ( confirm("The current timesheet has been changed! To save the changes, click OK. Otherwise, click Cancel.") )
				{
					if ( checkvalid(theform) )
					{
						changeflag = 0;
					}
				} 
				else 
				{
					changeflag = 0;
					newwindow();
				}
			}
		}
		function submitform(theform, action)
		{
		    theform.action.value = action;
			theform.submit();
		}
	//	-->
	</script>
</head>
<body>
<form name="ts_header_form" method="post" action="/rms/mainservlet">
<h1>Add Timesheet Header</h1>
<input type="hidden" name="urlmapping" value="/timesheet/addheader">
<input type="hidden" name="action" value="">
<table width="837" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td class="txtLabel">User Name</td>
					<td colspan="3" class="cell">
						<select class="cell" name="resourceid" size="1">
						<%
						int size = rslist.size();						
						for ( int i=0;i<size;i++ ) 
						{
							RsDropInfo info = rslist.get(i);
							%><option class="cell" value="<%= info.getResourceid()%>"><%= info.getName()%></option><%
						}
						%>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
					<td width="200" class="txtLabel">Start from <font class="cell">(weekbegining)</font> </td>
					<td width="150" class="cell">
						<input type="text" class="cell" size="12" maxlength="11" name="weekbegining" value="<%= TsDateUtil.getInstance().getDefaultBegin() %>" onclick="javascript:changefocus(this.form)">
					</td>
					<td width="200" class="txtLabel"> to <font class="cell">(weekbegining)</font> </td>
					<td width="287" class="cell"><%= TsDateUtil.getInstance().getDefaultBegin() %></td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="4" class="cell">
						<input type="button" class="cell" name="tsinsert" value="Insert" onclick="javascript:submitform(this.form,'AddHeader')">
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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