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

📄 diarywrite.jsp

📁 tomcat最新安装程序
💻 JSP
📖 第 1 页 / 共 2 页
字号:
                      <%	
					        int t_Work=0;
					        int t_Study=0;
					        int t_Sport=0;
					        int t_Rest=0;
                     	            
					        List list=diaryManage.getDiaryItemList();
					        
					        List listA=(List)list.get(0);
					        List listB=(List)list.get(1);
					        List listC=(List)list.get(2);
					        List listD=(List)list.get(3);

                                    int pos1=0;
                                    int pos2=0;

                     	            String strTemp1=null;
                     	            String strTemp2=null;
                     	            String str=null;
                                                         	                                 	            
                     	            
					  	    for(int i=0;i<num;i++){
							  int rowsNum=2;
							  if(num<5){
								 rowsNum=7-num;
							}
                      %>
                     	<%
                      	   if(!b){
                      	%>                      	                      	       
                        <TR <%if((i+1)%2==0){%> class="bgcolor"<%}%>>	
                      	<TD width="20%" id=time09_10 class="common" nowrap><%=content[i]%>						   
                      	<select name="status_13<%=i%>" size=1 onChange="return count(status_13<%=i%>)">
                      	       <option value='A'>- 工作 -</option>
                      	       <%                         	
                         	    for(int j=0;j<listA.size();j++){      
                         	      str=(String)listA.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                         	                       	   
                               %>
                      	       <option value=<%=strTemp1%>><%=strTemp2%></option>
                      	       <%
                      	         ;}
                      	        %>
                      	        <option value='B'>- 学习 -</option>
                      	        <%

                                    for(int j=0;j<listB.size();j++){ 
                         	      str=(String)listB.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                                                                                                  	    
                                 %>
                      	       <option value=<%=strTemp1%>><%=strTemp2%></option>
                     	         <%
                     	            ;}
                     	         %>                     	    
                      	         <option value='C'>- 运动 -</option>
                     	         <%
                                   for(int j=0;j<listC.size();j++){                                                              	    
                         	      str=(String)listC.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                                                                                                  	    
                                   
                     	         %>
                      	       <option value=<%=strTemp1%>><%=strTemp2%></option>
                      	         <%
                      	           ;}
                      	         %>                     	    
                      	         <option value='D'>- 休息 -</option>
                      	         <%                     	           
                                   for(int j=0;j<listD.size();j++){    
                         	      str=(String)listD.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                                                                                             	                          	         
                      	         %>
                      	       <option value=<%=strTemp1%>><%=strTemp2%></option>
                      	         <%
                      	          ;}
                      	          %>                      	    
                                 </select>			
                        </TD>                      				  
					
		       <TD width="20%" class="common" nowrap>
                      	  <select name="TaskItem<%=i%>" size=1 onChange="return count(TaskItem<%=i%>)">
                      	  <option value="0" selected >---无---</option>
                      	          <%
                      	          if(null!=detailRs)
                      	                while(detailRs.next()){
                      	          %>
                      	          <option value=<%=detailRs.getD_Serial()%>><%=detailRs.getD_Topic()%></option>
                      	          <%
                      	            ;}
                      	          %>
                      	          <option value="10">其他任务</option>
                      	          </select>                      	          				 
		       </TD>		  
						
                		<TD  >
				                <textarea  name="t<%=PD_ID[i]%>" cols="50" rows="1"  bgcolor="#E7F3FF" style="overflow:auto"></textarea>
				        </TD> 
                 </TR>
				 <%
				   }
				   else{
				        diaryDefaultSetRecordSet.next();
                                        if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().substring(0,1).equals("A"))
                                          //t_Work++;
					  t_Work=t_Work+timePeriodInfo[i];
					if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().substring(0,1).equals("B"))
					  //t_Study++;
					  t_Study=t_Study+timePeriodInfo[i];						        
					if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().substring(0,1).equals("C"))
					  //t_Sport++;
					  t_Sport=t_Sport+timePeriodInfo[i];
					if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().substring(0,1).equals("D"))
                                          //t_Rest++;
					  t_Rest=t_Rest+timePeriodInfo[i];
				 %>
                        <TR <%if((i+1)%2==0){%> class="bgcolor"<%}%>>	
                      	<TD width="20%" id=time09_10 class="common" nowrap><%=content[i]%>								 
			         <select name="status_13<%=i%>" size=1 onChange="return count(status_13<%=i%>)">
                      	         <option value='' ></option>  
                      	         <option value='A'>- 工作 -</option>
                      	         <%            
                         	    for(int j=0;j<listA.size();j++){      
                         	      str=(String)listA.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                     	                        	                                    	           
                      	         %>
                      	         <option <% if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().equals(strTemp1)){%>selected <%}%>value=<%=strTemp1%>><%=strTemp2%></option>
                      	         <%
                      	           ;}
                      	         %>                      	    
                      	         <option value='B'>- 学习 -</option>
                      	         <%                         	
                         	    for(int j=0;j<listB.size();j++){      
                         	      str=(String)listB.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                     	                        	                                    	           
                      	         %>
                      	         <option <% if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().equals(strTemp1)){%>selected <%}%>value=<%=strTemp1%>><%=strTemp2%></option>
                      	         <%
                      	           ;}
                      	         %>                      	                          	    
                      	         <option value='C'>- 运动 -</option>
                      	         <%
                         	    for(int j=0;j<listC.size();j++){      
                         	      str=(String)listC.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                         	                        	                                    	           
                      	         %>
                      	         <option <% if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().equals(strTemp1)){%>selected <%}%>value=<%=strTemp1%>><%=strTemp2%></option>
                      	         <%
                      	           ;}
                      	         %>                      	                          	    
                      	         <option value='D'>- 休息 -</option>                      	    
                      	         <%                         	
                         	    for(int j=0;j<listD.size();j++){      
                         	      str=(String)listD.get(j);
                         	      pos1=str.indexOf("-");                         	      
                         	      strTemp1=str.substring(0,pos1);
                         	      strTemp2=str.substring(pos1+1);                       	                        	                                    	           
                      	         %>
                      	         <option <% if(diaryDefaultSetRecordSet.getDDS_SelectItem().trim().equals(strTemp1)){%>selected <%}%>value=<%=strTemp1%>><%=strTemp2%></option>
                      	         <%
                      	          ;}
                      	         %>                      	                          	                 
                                 </select>			
                      	         </TD>

				 <TD width="20%" class="common">
                      	          <select name="TaskItem<%=i%>" size=1 onChange="return count(TaskItem<%=i%>)">
                      	          <option value="0" selected >---无---</option>
                      	          <%

                      	            if(null!=detailRs){ 
                      	               while(detailRs.next()){
                      	          %>
                      	          <option value='<%=detailRs.getD_Serial()%>'><%=detailRs.getD_Topic()%></option>
                      	          
                      	          <%
                      	            ;}
                      	            detailRs.beforefirst();
                      	            }
                      	          %>
                      	           <option value="10">其他任务</option>
                      	          </select>                      	          				 
				 </TD>                                 				 
                      	         
                		 <TD width="60%" > 
				            <textarea name="t<%=PD_ID[i]%>" cols="50" rows="1" bgcolor="#E7F3FF" style="overflow:auto"></textarea> 
                                 </TD>
                                  
			         </TR>	
                                 <%
				   }  //else
				 %>
				 <%
				   ;}//for
				 %>					 		         					   
                                 </table>
                 </TD>                
              </TR>
              
              <TR> 
                <TD  class="tdC" align="center"> <p> 
				  <%
				  		if(error.equals("1")){
				  %>
				  <font color="#FF0000">当天时间安排填写格式出错!请重新填写</font> 
				  <%
				  		}else if(error.equals("2")){
				  %>
				  <font color="#FF0000">您的时间安排超过24小时,请重新填写!</font> 
				  <%
				  		}else{
				  %>
				  <font color="#006633">当天时间安排</font> 
				  <%
				  		}
				  %>
				  
                <table width="100%" border="0" align="center"  class="collapse">
                 <tr>
                   <td width="10%" height="20" align=center  class="common">工作</td>
                   <td width="15%" height="20" align=center  class="common"><INPUT name="work" size=10 value=<%=t_Work%> id="work"  readOnly ></td>
                   <td height="20" align=center  class="common">学习</td>
                   <td height="20" align=center  class="common"><INPUT name="study" size=10 value=<%=t_Study%> id="study"  readOnly ></td>
                   <td height="20" align=center  class="common">运动</td>
                   <td height="20" align=center  class="common"><INPUT name="sport" size=10 value=<%=t_Sport%> id="sport"  readOnly ></td>         
                   <td height="20" align=center  class="common">休息</td>
                   <td height="20" align=center  class="common"><INPUT name="rest" size=10 value=<%=t_Rest%> id="rest"  readOnly ></td>           
                 </tr>
                </table>				  
                <BR>
                  备忘:<font color="#FF0000">(请把文字限制在120个汉字以内) </font><BR>
              <textarea cols="80" name="memoInfo" style="overflow:auto" rows=7 bgcolor="#E7F3FF"></textarea> 
              <BR>
                  <BR>
              <input name="imageField" type="submit" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="添 加">
              &nbsp;&nbsp;
              <input name="button" type="button" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" onClick="history.back(1);" value="返 回" > </p> 
            </TD>
              </TR>
              <%
	 	}else{
	      %>
	      <tr>
               <td class="common" align="center" ><font color="#FF0000" size="2">               
                  <%if(num==0){%>  
                    工作日记填写时段未设置!<br>
                    请到管理员处询问! 
                  <%}else{%>
                   您今天的日记已经填写完毕!<br>
                   请浏览其他信息! 
                  <%}%>
                  </font>
               </td>
	      </tr>
	      <!--</table>-->
              <%
		}
	      %>
	      </table>
              </form>
              </td>
              </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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