<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="cn.myapps.core.dynaform.document.ejb.*" %>
<%@ page import="java.util.*"%>
<%@ page import="cn.myapps.util.*"%>
<%@ page import="cn.myapps.base.dao.*" %>
<%@ page import="cn.myapps.util.iProcessFactory"%>
<%@ page import="cn.myapps.core.user.action.WebUser"%>  
<%@ page import="cn.myapps.constans.Web"%>
<%@ page import="cn.myapps.core.user.ejb.*" %>
<%@ page import="cn.myapps.core.user.dao.*" %> 
<%@ page import="cn.myapps.base.dao.DataPackage" %> 
<%@ page import="java.util.Date" %> 
<%@ page import="java.text.SimpleDateFormat" %> 
<%@ page import="java.text.DateFormat" %> 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>3ʹmyAppsɴ͹ƽ̨</title>
<%@include file="/common/tags.jsp"%>
<link href="style.css" rel="stylesheet" type="text/css" />

  <STYLE TYPE="text/css">
    <!--

    .calCurrentDay  {background-color: #FFCC00; font-size: 12px; color: #000000;}
    .calOtherDay    {background-color: #FFFFFF; font-size: 12px; color: #000000;}
    .calNotDay	    {background-color: #FFFFFF; font-size: 12px; color: #000000;}
	#obj {bottom:0px;overflow:hidden}
	#pic {bottom:0px;overflow:hidden}
	#top{bottom:0px;overflow:hidden}
	#next{bottom:0px;overflow:hidden}
	.textcss{font-size:14px; color:#996600; font-family:''}
	h2 {margin: 0px; padding: 0px; font-size: 16px; font-weight: normal; color:#996600}
	.zhubao08 {width: 100%; height: 42px; padding-top: 5px;}
.zhubao08 span {height: 42px; float: left;}
.zhubao08 .zh_01 {width:30px; height:39px; text-align:center; color:#F00; line-height: 38px; font-size: 36px;}
.zhubao08 .zh_02 {width:14px; height:14px; text-align:center; color:#F00; padding-top: 5px; font-size: 36px; font-weight: bold;}
.zhubao08 .zh_03 {no-repeat right; width: 31px; height: 39px; text-align: center; color:#F00; line-height: 38px; font-size: 36px; font-weight: bold;}
.zhubao08 .zh_04 {width: 96px; height: 29px; text-align: right; color:#333; line-height: 20px; font-size: 14px; font-weight: bold;padding-left:80px;padding-top:10px;}
  
    -->
  </STYLE>

<script  type="text/javascript">
	 var curIndex=0; 
	 var curIndex1=0;
	 var timeInterval=3000;
	 var arr=new Array();
	 arr[0]="img/youa/1.jpg";
	 arr[1]="img/youa/2.jpg"; 
	 arr[2]="img/youa/3.jpg"; 
	 arr[3]="img/youa/4.jpg";
	 arr[4]="img/youa/5.jpg";
	 arr[5]="img/youa/6.jpg";
	 arr[6]="img/youa/7.jpg";
	 arr[7]="img/youa/8.jpg";
	 arr[8]="img/youa/9.jpg";
	 arr[9]="img/youa/10.jpg";
	 arr[10]="img/youa/11.jpg";
	 arr[11]="img/youa/12.jpg"; 
	 arr[12]="img/youa/13.jpg"; 
	 arr[13]="img/youa/14.jpg";
	 arr[14]="img/youa/15.jpg";
	 arr[15]="img/youa/16.jpg";
	 arr[16]="img/youa/17.jpg";
	 arr[17]="img/youa/18.jpg";
	 arr[18]="img/youa/19.jpg";
	 arr[19]="img/youa/20.jpg";

	var arr1=new Array();
		arr1[0]="img/youa/21.jpg";
		arr1[1]="img/youa/22.jpg";
		arr1[2]="img/youa/23.jpg";
		arr1[3]="img/youa/24.jpg";
		arr1[4]="img/youa/25.jpg";
		arr1[5]="img/youa/26.jpg";
		arr1[6]="img/youa/27.jpg";
		arr1[7]="img/youa/28.jpg";
		arr1[8]="img/youa/29.jpg";
		arr1[9]="img/youa/30.jpg";
		arr1[10]="img/youa/31.jpg";
		arr1[11]="img/youa/32.jpg";
		arr1[12]="img/youa/33.jpg";
		arr1[13]="img/youa/34.jpg";
		arr1[14]="img/youa/35.jpg";
		arr1[15]="img/youa/36.jpg";
		arr1[16]="img/youa/37.jpg";
		arr1[17]="img/youa/38.jpg";
		arr1[18]="img/youa/39.jpg";
		arr1[19]="img/youa/40.jpg";
	
		
	 setInterval(changeImg,timeInterval);
	 function changeImg()
	 {
			var obj=document.getElementById("obj");
				if (curIndex==arr.length-1)
					 {
							curIndex=0;
					 }
				else
					 {
					 curIndex+=1;
					 }
						 obj.src=arr[curIndex];
			var pic=document.getElementById("pic");
				if (curIndex1==arr1.length-1)
					 {
							curIndex1=0;
					 }
				else
					 {
					 curIndex1+=1;
					 }
						 pic.src=arr1[curIndex1];
	}
	
	
	
	
	
	</script>


</head>

<body id="main_page">

<div>
  <div>
    <div id="main">
      <div class="con">
        <div class="table">  
          <h2 class="th1" style="font-size:16px; color:#996600; font-family:'';text-align:left" ></h2>         
          <h2 class="th2" style="font-size:16px; color:#996600; font-family:'';text-align:left" >֪ͨ</h2> 
          
          			<table class="td1" style="background:#DBDBDB">
				<tr>
					<td valign="top" style="text-align:left;padding:13px;height:20px; width:50px;">
						<center><img alt="ʵʱ" src="img/youa/ƽ.jpg" width="66" height="66" ></img></center>
						</td>
					<td valign="top" style="text-align:left;padding:10px;height:20px;">
						
							 <H2>ʵʱ</H2>
                              <div class="zhubao08">
                               	 <SPAN class="zh_01">246.3</SPAN>
                                    <SPAN class="zh_04">                                     
                                    2014-01-03
                                            </SPAN>
                               </DIV>
					</td>
					
				</tr>

				
		
					<%
           String applicationid="11e3-6b7a-4e75501c-be7c-2139aacb9db8";
           DocumentProcess process = null;
           process = (DocumentProcess) DocumentProcessBean.createMonitoProcess(applicationid);
			Date date = new Date();
			date.getDate();

		   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			sdf.format(date);

           String sql = "select top 1* from TLK_GLODPRICE order by  CREATED desc";
           WebUser user = (WebUser) session.getAttribute("FRONT_USER");   //ȡǰ̨½ûsession,صһû, FRONT_USERǰ̨¼û
           String domainid = user.getDomainid();   //ȡǰ̨ûsessionд洢domainid.
                   //System.out.println("domainid=="+domainid);
		//ȡݼ  
           DataPackage dp = process.queryBySQL(sql,domainid);
           //Collection col = dp.getDatas();
		
		    Iterator iter = dp.datas.iterator();
			 while(iter.hasNext()){
				Document doc = (Document)iter.next();
				
            %>

				 
				
				

				<tr >
					<td valign="top" style="text-align:left;padding:13px;height:20px;">
                    	<center><img src="img/youa/ƽ2.jpg" alt="ʵʱع" width="66" height="66"></img></center>
						</td>
						
					<td valign="top" style="text-align:left;padding:10px;height:20px;">
							<H2>ʵʱع</H2>
                              <div class="zhubao08">
                               	 <SPAN class="zh_01"><%=doc.getItemValueAsFloat("glodPrice")%></SPAN>
                                    <SPAN class="zh_04">                                     
                                    <%=sdf.format(date)%>
                                             </SPAN>
											
											  <%
											
											  } %>
                               </DIV>
					</td>
				</tr>	
			</table>
          
    	<%
           String sql2 = "select top 5 * from tlk_NoticeAnnouncement order by ITEM_NA_PUBLISHDATE desc"; 
           DataPackage dp2 = process.queryBySQL(sql2,domainid);
		   String contextPath ="http://localhost:8080/obpm";
			 String  NoticeformId = "11e3-6f8a-cdaec5c4-9688-2f05bcd325b7";
		%>


          <table class="td2">
            <tr>
              <td valign="top" style="text-align:left;padding:10px;height:110px;">
			  <ul>
		 <%
			Iterator iter2 = dp2.datas.iterator();
			while(iter2.hasNext()){
			Document doc2 = (Document)iter2.next();
			String Noticeid =doc2.getItemValueAsString("id");
		String url="../portal/dynaform/document/view.action?_docid="+Noticeid+"&_formid="+NoticeformId+"&application="+applicationid+"&signatureExist=false";
		  %>
              <a href="<%=url%>"><li class="textcss">>> <%=doc2.getItemValueAsString("NA_Title")%></li></a>
		  <%	}
		  %>
              </ul>
              </td>
            </tr>
          </table>
        </div>
      <!--  <div style="clear:both;height:1px;"></div>
        <div class="table">  
          <h2 class="th1" style="font-size:16px; color:#996600; font-family:'';text-align:left" >ƽָ</h2>         
          <h2 class="th2" style="font-size:16px; color:#996600; font-family:'';text-align:left" >ƽָ</h2>         
          <table class="td1">
            <tr>
              <td valign="top" style="text-align:left;padding:10px;height:110px;"><div align="center">
                  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="231" height="165">
                    <param name="movie" value="http://images1.hx9999.com/flash/todayGold.swf?data=http://info.hx9999.com/cn/data_golds.php?type=golds" />
                    <param name="quality" value="high" />
                    <param name="wmode" value="transparent" />
                    <embed src="http://images1.hx9999.com/flash/todayGold.swf?data=http://info.hx9999.com/cn/data_golds.php?type=golds" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="231" height="165"></embed>
                  </object>
                </div></td>
            </tr>
          </table>
          <table class="td2">
            <TR>
              
             <td valign="top" style="text-align:left;padding:10px;height:110px;"><div align="center">
                  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="231" height="165">
                    <param name="movie" value="http://images1.hx9999.com/flash/todayGold.swf?data=http://info.hx9999.com/cn/data_golds.php?type=golds" />
                    <param name="quality" value="high" />
                    <param name="wmode" value="transparent" />
                    <embed src="http://images1.hx9999.com/flash/todayGold.swf?data=http://info.hx9999.com/cn/data_golds.php?type=golds" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="231" height="165"></embed>
                  </object>
                </div></TD>
              
            </TR>
 
          </table>
        </div>-->
      </div><!--/ con-->
    </div>    
  </div><!--/ container-->
</div>

<div style="clear:both;height:1px;"></div>

  <div id="main">
           
            <div class="con">                                 
                <div class="table">
                <h2 class="th" style="font-size:16px; color:#996600; font-family:'';text-align:left" >Ʒչʾ</h2>                
                    <table> 
                        <tr>
						 <td width="5%" style="color:#DD0000;font-weight:bold;height:30px;">
                        <img src ="img/youa/toppic.jpg" width="40" height="306" border =0 id=top onclick="changeImg();" /></td>
                       
                       
<%
           String applicationid="11e3-6b7a-4e75501c-be7c-2139aacb9db8";
           DocumentProcess process = null;
           process = (DocumentProcess) DocumentProcessBean.createMonitoProcess(applicationid);
			Date date = new Date();
			date.getDate();

		   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			sdf.format(date);

           String sql = "select * from TLK_PRODUCTCLASS";
           WebUser user = (WebUser) session.getAttribute("FRONT_USER");   //ȡǰ̨½ûsession,صһû, FRONT_USERǰ̨¼û
           String domainid = user.getDomainid();   //ȡǰ̨ûsessionд洢domainid.
                   //System.out.println("domainid=="+domainid);
		//ȡݼ  
           DataPackage dp = process.queryBySQL(sql,domainid);
           //Collection col = dp.getDatas();
		
		    Iterator iter = dp.datas.iterator();
			 while(iter.hasNext()){
				Document doc = (Document)iter.next();
				
            %>
						
                        <td width="45%" style="color:#DD0000;font-weight:bold;height:30px;"><img src ="img/youa/20.jpg" width="464" height="298" border =0 id=pic /></td>
                        <td width="45%" style="color:#DD0000;font-weight:bold;height:30px;"><img src ="img/youa/1.jpg" width="440" height="297" border =0 id=obj /></td>


                        <td width="5%" style="color:#DD0000;font-weight:bold;height:30px;"><img src ="img/youa/nextpic.jpg" width="38" height="309" border =0 id=next  onclick="changeImg();" /></td>
                      </tr>

                    </table>
                </div>
            </div><!--/ con-->
        </div>    



</body>

</html>
