<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Dd_preview.aspx.cs" Inherits="HteamDd.Web.Web.Dd_preview" %>

<!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 runat="server">
    <title>预览|海客轻微博</title>
    <link href="/css/preview.css" rel="stylesheet" type="text/css" />
    <script src="/jscript/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="/jscript/Dd_image_deal.js" type="text/javascript"></script>
    <script type="text/javascript">
        var jq = jQuery.noConflict();
        jq(document).ready(function () {
            var user_mes = document.cookie;
            var user_lg_id = user_mes.split('&');
            var user = user_lg_id[0].split('=');
            img_user(user[2], "2"); //处理个人图片问题
        });

        function look() {
            var _type = '<%=type %>';
            var url = '<%=title %>';
            jq(document).ready(function () {
                if (_type == "0") {
                    jq("#img").css("display", "none");
                    jq("#radio").hide();
                }
                else if (_type == "1") {
                    jq("#radio").hide();
                    jq("#text").css("display", "none");
                    var image = url.split('|');
                    var path = image[0].split('/');
                    var num = 0; //记录图片的个数
                    for (var i = 0; i < image.length - 2; i++) {

                        num += 1;
                        var str = "<li>";
                        str += "<div class='imageload" + i + "'><img src='/" + path[1] + '/UploadPictures/'+path[3]+'/'+path[4]+'/'+image[i + 1] + "' width='500'/></div>";
                        str += "</li>";
                        jq("#images").append(str);
                    }
                }
                else if (_type == "3") {
                    jq("#radio").hide();
                    jq("#img").css("display", "none");
                }
                else if (_type == "4") {
                    jq("#text").hide();
                    jq("#img").css("display", "none");
                    jq(".feed-video-ct").show();
                    jq(".feed-video-img-holder").show();
                    jq(".feed-video-close").hide();
                    jq(".feed-full-video-wrap.clearfix").hide();

                    jq(".feed-video-play").click(function () {
                        jq(".feed-video-close").show();
                        jq(".feed-video-img-holder").hide();
                        jq(this).parent("div").parent("div").prepend(get_parent_video_url(this));
                        //              jq(".feed-full-video-wrap.clearfix").show();
                    });

                    jq(".feed-video-close").click(function () {
                        jq(".feed-video-close").hide();
                        jq(".feed-video-img-holder").show();
                        jq(".feed-full-video-wrap.clearfix").remove();
                        //              jq(".feed-full-video-wrap.clearfix").hide();
                    });
                }
                else {
                    alert("地址出错啦~");
                }
            });
            function get_parent_video_url(video_play) {
                var parent = jq(video_play).parent("div").parent("div");
                var json = eval(parent.attr("data").toString());
                video_show = '<div class="feed-full-video-wrap clearfix">'
            + '<div class="feed-full-video">'
            + '<object width="500" height="416">'
            + '<param value="true" name="isAutoPlay">'
            + '<param value="sameDomain" name="allowscriptaccess">'
            + '<param value="transparent" name="wmode">'
            + '<param value="true" name="allowfullscreen">'
            + '<param value='
            + json[0].flashurl.toString()
            + '&amp;isAutoPlay=true" name="movie">'
            + '<embed width="500" height="416" allowfullscreen="true" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="sameDomain" src="'
            + json[0].flashurl.toString()
            + '&amp;isAutoPlay=true" flashvars="isAutoPlay=true">'
            + '</object>'
            + '</div>'
            + '<div class="feed-video-footer clearfix">'
            + '<span class="feed-video-link">'
            + '<a target="_blank" href="'
            + json[0].videourl.toString()
            + '">youku.com</a>→'
            + '</span>'
            + '</div>'
            + '</div>';
                return video_show;
            }
        }
    </script>
    <style type"text/css">
        .box-footer {
            color: #DADDDD;
            cursor: default;
            font-size: 12px;
        }
        .box-footer-sep {
            border-bottom: 1px dotted #DADDDD;
            margin-bottom: 8px;
            padding-bottom: 8px;
        }
        .tags {
            line-height: 20px;
        }
        .box-footer a {
            color: #DADDDD;
            margin-right: 10px;
        }

        a {           
            font-weight: 500;
            text-decoration: none;
        }
          .feed-video-img-holder {
            float: left;
            height: 113px;
            margin-right: 10px;
            overflow: hidden;
            position: relative;
            top: 0px;
            left: 0px;
        }
        .feed-video .feed-video-img {
            cursor: pointer;
            height: 113px;
            width: 150px;
        }
     
        .feed-video-play {
            background: url("/images/player_$295.png") no-repeat scroll 0 0 transparent;
            display: block;
            height: 48px;
            left: 50%;
            margin: -22px 0 0 -22px;
            position: absolute;
            text-indent: -9999px;
            top: 50%;
            width: 43px;
        }
        .feed .feed-full-video {
            background-color: #F3F3F3;
        }
        .feed-ct .feed-video-footer {
            font-size: 10px;
        }
        .feed-ct .feed-video-link {
            float: left;
        }
    </style>
</head>
<body onload="look()" >
    
    <div id="container" class="container">
        <div class="main-content">
            <div class="box w500">
                <div class="title" id="text" >
                    <a href="<%=linkaddress %>" id="title"><%=title %></a>
                </div>
                <div class="title" id="img" style=" margin-left:0px; margin-top:0px;">
                    <ul id="images" style=" margin-left:0px; margin-top:0px;">

                    </ul>
                </div>
                 <div class="feed-video-ct" id="radio" data='[{"flashurl":"<%=playurl %>","videourl":"<%=title %>"}]'>
    <span class="feed-video-link"> <a class="feed-video-close"  style="cursor:pointer;">关闭视频</a></span>
    <div class="feed-video-img-holder">
        <img class="feed-video-img" src="<%=linkaddress %>" alt=""/>
        <a class="feed-video-play">播放</a>
    </div></div>
                <div class="caption tich-content">
                
                   <p>
                       <%=content %> <br />
                   </p> 
                </div>
                <div class="box-footer">
                    <ul>
                        <li class="box-footer-sep">
                            <p class="tags">
                            <a href="#">#<%=lable %></a>
                            </p>
                        </li>
                        <li>
                            <p>
                                <span class="mr10">
                                    <a href="#">刚刚更新</a>
                                </span>
                            </p>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="aside">
            <div class="box">
                <h2 class="user-info">
                    <a href="#"><%=userName %></a>
                </h2>
            </div>
            <div class="box">
                <ul id="aside_list" class="blog-communi" style=" margin-left:0px; margin-top:0px;">
                    <li class="user-avatar">
                        <img width="280" id="img_personal" src="../images/touxiang.jpg" alt="shadow"/>
                    </li>
                    <li class="list-desc">
                        <p>好好学习海客向上.</p>
                    </li>
                    <li>
                        <a href="#">首页</a>
                    </li>
                    <li>
                        <a rel="nofollow" href="#">投稿</a>
                    </li>
                    <li>
                        <a rel="nofollow" href="#">私信</a>
                    </li>
                    <li>
                        <a href="#">存档</a>
                    </li>
                    <li class="box-footer blog-communi-footer">
                        <p>
                            &copy; 
                            <a href="#">shadow</a>
                            ❤
                            <a target="_blank" href="#">海客网</a>.
                        </p>
                    </li>
                </ul>
            </div>
        </div>
        <div class="clear"></div>
    </div>
   
</body>
</html>
