<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Room2.aspx.cs" Inherits="Display.Room2" %>


<!DOCTYPE html  >
<html>
<head id="Head1" runat="server">
    <title>启明星会议系统</title> 

    <script src="../javascript/jquery-1.12.4.min.js"></script>
    <script src="template2/date.js"></script>
    
    <style>

        /* 下面CSS用于对页面进行缩放  */ 
            body {
          transform: scale(1); 
        }

        
    </style>
  
      
  <style>
     
      .companyname{ font-size:40px; color:#ffffff; padding-left:40px; padding-top:20px; letter-spacing:4px; }
      .roomname{display:inline-block; margin-top:90px;  margin-left:170px;  font-size:30px;}
      .clock{ display:inline-block;  font-size:30px; margin-right:300px; margin-top:90px;  float:right; }

      .box{ margin-left:310px; position:relative; width:700px;  height:400px; margin-top:130px; } 
      #intro{ font-size:30px;  left:10px; top:0px ; position:absolute  }
      #time{ font-size:30px;  left:10px; top:160px ; position:absolute  }
      #contactname{ font-size:30px;  left:10px; top:320px ; position:absolute  }

      .nextbox{ position:relative; left:290px; width:700px; height:100px;  }
      #booklist{  margin-top:10px;  margin-left:-75px;  color:#ffffff; font-weight:bold; width:800px }
  </style>
    
</head>
<body  style="background-color:#004273; color:#003366; overflow:hidden; margin:0px; padding:0px; font-family:'微软雅黑'" >

    <div style=" background:url(template2/<%=picid%>.png)  no-repeat ;   background-position:0px 10px; width:1366px; margin:0 auto;   min-height:800px;  ">
        
    <div class="companyname" > 
         <%=companyname %>会议状态列表 
    </div>
            
      
  <div  class="roomname">
        <asp:Label ID="lbl_roomname" runat="server" ></asp:Label>
  </div>
     
       
   <div class="clock">
         <div id="bgclock"  ></div>
  </div>

   
    <form id="form1" runat="server">    
  
           <div class="box"> 
             <div id="intro" ></div>
             <div id="time"  ></div>
             <div id="contactname" ></div>
          </div> 
 
 
    <div  class="nextbox"> 
   
      <div id="booklist" ></div>

  </div>	
 
  
      
<script>   
    clock(); 
</script>

 
    </form>
    
    
    </div>
    


   
</body>






      
<script>


    function setbook(o) {

        if (o.ends=="0") {

            $("#intro").html(" -- ");
            $("#time").html(" 空闲中  ");           
            $("#contactname").html(' -- ');
        }
        else {
            
            $("#intro").html(o["intro"]);
            $("#time").html(o["begintime"] + '-' + o["endtime"]);
            $("#contactname").html(o["contactname"]);

        }

    }




    function GetBook() {

        GetCurrentBook();
        GetBookList();
        setTimeout("GetBook()", 90000);
    }


    $(document).ready(function () {
        GetBook();
    });





</script> 



<script>

    function GetCurrentBook() {

        $.getJSON(
            "ajax/GetCurrentBook.aspx",
            {
                "roomid":<%=Request["roomid"] %>,  
                random: Math.random() 
            },

            function(d) {   
                setbook(d);
            });
         
    } ;
 
    


    
    
    function GetBookList() {
     
        $.getJSON(
        "ajax/GetBookList.aspx",
           { 
               "roomid":<%=Request["roomid"] %>,
                random: Math.random()
            },


            function (data) {


                if (data.length==0) {
                    $("#booklist").html('');
                    return;
                }

                var html = '<marquee scrollamount=10 scrolldelay=200> 接下来会议：';

                try {

                    $.each(data, function (i, entry) {

                        html += entry['begintime1'] + ' - ' + entry['endtime1'] + "&nbsp;&nbsp;" + entry['intro'] + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

                    });
                }
                catch (e) {

                }

                html += '</marquee>';




                $("#booklist").html(html);


            });


    }

</script>
    
      

</html>
