<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: ZJW
  Date: 2019/4/11
  Time: 23:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>Homepage</title>
    <link rel="shortcut icon" href="http://dsada1.oss-cn-beijing.aliyuncs.com/img/xicon.png" type="image/x-icon">
    <script src="bootstrap/js/jquery-3.3.1.min.js"></script>
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    <style type="text/css">
        body{
            background-color: #2b2b2b;
            text-align:center;
        }
        a{
            text-decoration: none;
            color: white;
        }
        input{

            border:none;//去除边框
            border-radius:0;
            box-shadow: 0px 0px 0px 0px;//去除阴影
        }
        .basic{
            margin:0 auto;
            /*border:1px solid #000;*/
            width:960px;
            height:920px;
        }
        .top{
            height: 80px;
            left: 0px;
            /*border:1px solid red;*/
        }
        .titleBG{
            margin: 0px;
            position: relative;
            left: -7px;
            float: right;
        }
        .titleImg{
            position: relative;

            top: -235px;
            left: -240px;

        }
        .login{
            font-family: "Microsoft YaHei";
            font-size: 10px;
            position: relative;
            top: -300px;
            left: 270px;
            text-align: right;

        }
        .bannerImg{
            margin:0 auto;
            position: absolute;
            /*border:1px solid red;*/
        }
        .banner{
            background-color: #111231;
            position: absolute;
            height: 30px;
            width: 100%;
            color: white;
            font-family: "Microsoft YaHei";
            text-decoration: none;
            /*border:1px solid red;//*/
        }
        .bannerChoice{
            position: relative;
            left: -250px;
            top: 4px;
            font-weight: bold;
        }
        .bannerSearch{
            width:200px;
            height: 30px;
            position: relative;
            top:-20px ;
            left:600px ;

        }
        .bannerForm{
            width: 200px;
            position: relative;
            top: 33px;
            left: 680px;

        }
        .bannerSearchBG{

        }
        .bannerSearchText{
            position: relative;
            top: -61px;
            left: -680px;

            width: 120px;
            margin: 0;
            padding: 0;
            background: transparent;
            color: #fff;
        }
        .bannerSearchIco{
            position: relative;
            top: -56px;
            left: -675px;
            /*border: 1px solid red;*/
        }
        .google{
            position: relative;
            top: -50px;
            left: 400px;
        }
        .left{
            /*border: 1px solid yellow;*/
            height: 645px;
            width: 240px;
            position: absolute;
            top: 479px;
            background-color: #201f31;
        }
        .personImg{
            margin: 10px 0 0 10px;
            position: relative;
            left: -55px;
        }
        .personDetail{
            /*border: 1px solid green;*/
            font-family: 'Microsoft YaHei';
            width: 100px;
            height: 150px;
            position: relative;
            top: -158px;
            left: 130px;
            font-size: 10px;
            text-align: right;
            color: white;
        }
        .likes{
            font-family: 'Microsoft YaHei';
            font-weight: bold;
            position: relative;
            top: -125px;
            left: -70px;
            color: white;
        }
        .likesDetail{
            /*border: 1px solid green;*/
            height: 250px;
            width: 210px;
            position: relative;
            top: -80px;
            left: 25px;
            color: white;
            font-size: 10px;
            font-family: 'Microsoft YaHei';
        }
        .LDname{
            text-align: left;
            margin: 0;
        }
        .LDcode{
            text-align: right;
            margin: 0;
        }
        .right{
            /*border: 1px solid green;*/
            height: 645px;
            width: 715px;
            position: relative;
            top: 391px;
            left: 240px;
            background-color: #434059;
        }
        .bottom{
            /*border: 1px solid red;*/
            width: 955px;
            height: 100px;
            background-color: #1d1f2e;
            /*float: bottom;*/
            position: relative;
            top: 300px;
        }
        .copyright{
            color: white;
            font-size: 12px;
            font-family: 'Microsoft YaHei';
            font-weight: normal;
            text-align: left;
            position: relative;
            top: 35px;
            left: 120px;
        }
        .contectUS{
            position: relative;
            left: 240px ;
            top:-26px;
        }

    </style>

    <%--<script type='text/javascript'>--%>
        <%--//禁用右键（防止右键查看源代码）--%>
        <%--window.oncontextmenu=function(){return false;}--%>
        <%--//禁止任何键盘敲击事件（防止F12和shift+ctrl+i调起开发者工具）--%>
        <%--window.onkeydown = window.onkeyup = window.onkeypress = function () {--%>
            <%--window.event.returnValue = false;--%>
            <%--return false;--%>
        <%--}--%>
        <%--//如果用户在工具栏调起开发者工具，那么判断浏览器的可视高度和可视宽度是否有改变，如有改变则关闭本页面--%>
        <%--var h = window.innerHeight,w=window.innerWidth;--%>
        <%--window.onresize = function () {--%>
            <%--if (h!= window.innerHeight||w!=window.innerWidth){--%>
                <%--window.close();--%>
                <%--window.location = "about:blank";--%>
            <%--}--%>
        <%--}--%>
    <%--</script>--%>
</head>
<body>
<div class="basic">
        <div class="top">
        <img class="titleBG" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/mainBasic.png"/>
            <a href="/logo.action"><img class="titleImg" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/title.png"></a>
            <a class="login" href="/login.action">登录</a>
    </div>
        <div class="bannerImg" >
            <div class="banner">
                <div class="bannerChoice">
                    <a href="/findMusic.action">发&nbsp;现&nbsp;音&nbsp;乐</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="/myMusic.action">我&nbsp;的&nbsp;音&nbsp;乐</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="/myFriends.action">我&nbsp;的&nbsp;朋&nbsp;友</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </div>
                <div class="bannerSearch">
                    <img class="bannerSearchBG" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/bannerSearchBG.png" alt="">
                    <form class="bannerForm" method="get" name="serach" action="/searchSongs.action">
                        <input class="bannerSearchText" type="text" name="searchText">
                        <img class="bannerSearchIco" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/bannerSearchIco.png" onclick="serach.submit()">
                    </form>
                </div>

                <a href="https://dsada1.oss-cn-beijing.aliyuncs.com/apk/MusicMana.apk"><img class="google" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/google.png"></a>
            </div>
            <img src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/banner_picture.png"/>
        </div>
        <div class="left">
            <img class="personImg" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/person.png">
            <div class="personDetail">
                <br><br><br>您未登录<br>右上角请登陆
                <%--<% ${personCode}%>--%>

                <%--<% ${personLevel}%>--%>
            </div>
            <div class="likes">猜你喜欢:</div>
            <div class="likesDetail">您还未登录</div>
        </div>
        <div class="right">

            <audio controls="controls">
                <source src="https://dsada1.oss-cn-beijing.aliyuncs.com/song/home.mp3" type="audio/mp3" />

                Your browser does not support this audio format.
            </audio>
        </div>
        <div class="bottom">
            <div class="copyright">Holy版权所有©2017-2018   违法和不良信息举报电话：xxxx-xxxxxxxx <br>举报邮箱：xxx@holys.top&nbsp;&nbsp;&nbsp;&nbsp;鲁ICP备号</div>
            <img class="contectUS" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/1545468262.png">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <img class="contectUS" src="http://dsada1.oss-cn-beijing.aliyuncs.com/img/1545468365.png">
        </div>
</div>
<script>
    var ackTime= "";
    var ipSpan=returnCitySN["cip"];
    var idSpan=returnCitySN["cid"];
    var nameSpan=returnCitySN["cname"];

    $(function(){

        $.ajax({
            url:"/insIPAdd.action",
            type:"post",
            async : false,
            data:{"cip":ipSpan,"cid":idSpan,"cname":nameSpan},
            dataType:"json"

        });

    });

    document.onreadystatechange = function(){
        if(document.readyState == "interactive"){ //DOM构建了就会执行，先与complete执行
            var date=new Date();
            if(date.getHours()>=0 && date.getHours()<6){
                ackTime="1";
                // oSpan.innerHTML="凌晨";
            }else if(date.getHours()>=6&&date.getHours()<12){
                ackTime="2";
                // oSpan.innerHTML="上午";
            }else if(date.getHours()>=12&&date.getHours()<17){
                ackTime="3";
                // oSpan.innerHTML="下午";
            }else if(date.getHours()>=17&&date.getHours()<19){
                ackTime="4";
                // oSpan.innerHTML="傍晚";
            }else if(date.getHours()>=19&&date.getHours()<24){
                ackTime="5";
                // oSpan.innerHTML="晚上";
            }
            console.log('document is interactive ');
        }

    };

    $(function(){

        $.ajax({
            url:"/ackTime.action",
            type:"post",
            async : false,
            data:{"time":ackTime},
            dataType:"json"

        });

    });

</script>
</body>
</html>
