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

📄 uploaddata.jsp

📁 Oracle的J2EE Sample
💻 JSP
字号:
<%--
 * @author  Elangovan
 * @version 1.0
 *
 * Development Environment       : Oracle9i JDeveloper
 * 
 * Name of the File              : UploadData.jsp
 *
 * Creation/Modification History :
 *
 *    Elangovan     26-Apr-2002      Created
 *
 * Overview of Application       :
 *
 *     This JSP assists the site administrators to configure the upload of latest News and
 *  stock rates. The uploaded News and Stock rates are used for trading.
 *
--%>

<%-- Set Context type and characterset --%>
<%@page contentType="text/html;charset=WINDOWS-1252" language="java" %>

<html>

  <head>

    <title>OTN Financial Brokerage System : Admin Data Upload Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
    <link rel="stylesheet" href="includes/contents.css" type="text/css">

    <script>

      // This function sets the EventName parameter and submits the Form      
      function submitForm(doEvent) { 

        // Set EVENTNAME form field
        document.frmUpload.EVENTNAME.value=doEvent;
        
        if(doEvent == "CONFIGSTOCKRATEUPLOAD" ) {
            
          if(!validInterval(document.frmUpload.SHOUR,document.frmUpload.SMINUTES))
            return;
                 
        } else if(doEvent == "CONFIGNEWSUPLOAD" ) {

          if(!validInterval(document.frmUpload.NHOUR,document.frmUpload.NMINUTES))
            return;
        
        }

        // Submit the form
        document.frmUpload.submit();
        
      }
      
      function validInterval(hour,minutes) {
      
        if(hour.value == "" ) 
          hour.value = "0";
        if(minutes.value == "")
          minutes.value = "0";
          
        if(isNaN(hour.value)) {
          alert(" Hour must be a Number ");
          return false;
        }
        
        if(isNaN(minutes.value)) {
          alert(" Minutes must be a Number ");
          return false;
        }
        
        if(parseInt(hour.value) < 0) {
          alert(" Hour cannot be less than zero ");
          return false;
        }

        if((parseInt(minutes.value) < 15)  && (parseInt(hour.value) <= 0) ) {

           alert(" Auto-Upload interval should be minimum of 15 minutes ");
           return false;
           
        }
        
        return true;

      }
  

      // This function appends the current date to the document
      function writeDate() {
  
        var today = new Date();    
    
        //Thursday, April 09, 2002,06:43 FORMAT
        document.write(today.toLocaleString());
    
      }   
    </script>

  </head>
  <%    

     // Get the eventname
     String eventName = request.getParameter("EVENTNAME");

     // Get the username from session
     String userName = (String) session.getAttribute("USERNAME.RESPONSE");  

  %>
  
  <body text="#000000" bgcolor="#FFFFEA"  >


    <!-- Start of Company Logo-->
  
    <jsp:include page="TitleGifs.jsp" flush="true"/>
  
    <!-- End of Company Logo-->
  
    <b>
      <font face="Verdana, Times New Roman, Times, serif" color="#990000" size="2">
           Welcome <%= userName %>
      </font>
    </b>

    <table width="100%" border="0"  bgcolor="#008000" cellpadding="0" cellspacing="0" >
      <tr>
        <td align="left" class="midTime">&nbsp;&nbsp;
          <Script>writeDate();</Script>
        </td>
        <td align="right"> <span class="midTime">&nbsp;&nbsp;</span> </td>
      </tr>
    </table>

    <jsp:include page="ShowError.jsp" flush="true"/>

    <table width="100%" border="1" cellpadding="0" cellspacing="0" height="70%"
                   bgcolor="#FFFFEA" bordercolor="#008000" >
      <tr>
        <td width="22%" bordercolor="#FFFFEA" valign="center" bgcolor="#FFFFD5"> 

          <!--  Start of Admin Operations List -->
          
          <jsp:include page="AdminLeftList.jsp" flush="TRUE"/>

          <!-- End of Admin Operations List -->
          
        </td>
        <td bordercolor="#FFFFEA" valign="center" align="center"> 
          <table width="80%">
            <tr> 
              <td valign="top"> 
   
                  <br>

                  <form name="frmUpload" method="post" action="controllerservlet" >

                  <br>
                  <b><font face='Verdana, Times New Roman' color='#990000' size='2'> 
                     Configure Stock Rate Upload
                  </font>
                  <br><br> 
                  <font face='Verdana, Times New Roman' color='#008000' size='2'> 
                  Upload Stock Rates every, &nbsp;
                  <input type="text" name="SHOUR" maxlength="2" size="3" 
                         value="0" >&nbsp;Hour and &nbsp;
                  <input type="text" name="SMINUTES" maxlength="2" size="3" 
                         value="15">&nbsp;&nbsp;Minutes 

                  <p align="right">
                  <A href="javascript:submitForm('CONFIGSTOCKRATEUPLOAD');">
                  <IMG border="0" src="images/config.gif"></A>
                  </p>
                  </font>
                      
                  <img src="images/line.gif" >                      
                  <br><br><br>
                  <b><font face='Verdana, Times New Roman' color='#990000' size='2'> 
                  Configure News Upload
                  </font>
                  <br>
                  <br>
                  <font face='Verdana, Times New Roman' color='#008000' size='2'> 
                  Upload Latest News every,&nbsp;
                  <input type="text" name="NHOUR" maxlength="2" size="3" 
                         value="0" >&nbsp;Hour and &nbsp;
                  <input type="text" name="NMINUTES" maxlength="2" size="3" 
                         value="15" >&nbsp;&nbsp;Minutes 

                  </font>
                  <p align="right" >
                  <A href="javascript:submitForm('CONFIGNEWSUPLOAD');">
                  <IMG border="0" src="images/config.gif"></A> 
                  </p>
                   <br> 
                  <input type="hidden" name="EVENTNAME" >
                  <input type="hidden" name="CALLOUT_EVENT" value="<%=eventName%>">                     
                </form>
               </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>               
    
    <!-- Start of Footer -->
    
    <jsp:include page="Footer.jsp" flush="false"/>
    
    <!-- End of Footer -->
    
  </body>
  
</html>

⌨️ 快捷键说明

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