<%@ Page CodeBehind="show.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.showpic" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>文件查看</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<style>
body img{
	border:3px ridge gold;
}
a:link,a:visited{
	text-decoration: none; color: blue;font-weight: bold;
}
a:hover,a:visited {
	text-decoration: none;
	position: relative;
	top: 1.5px;
	left: 1.5px
}
td,body {
	color:#4b4b4b;
	font-size:14px;
	font-family:arial,sans-serif;
}
.photobox {	
	border-top: 2px dotted #C6CFBD;
	border-left: 2px dotted #C6CFBD;
	border-right: 2px dotted #C6CFBD;
	border-bottom: 2px dotted #C6CFBD;
}
</style>
	</HEAD>
	<body>
<%if (Request["type"].ToString()=="1") {%>
<div align="center"><center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
  	<tr>
  	  <td align="center"><a href="<%=uplink%>">上一张</a>&nbsp;&nbsp;<a href="<%=nextlink%>">下一张</a>&nbsp;&nbsp;<a href='javascript:window.close();'>关闭窗口</a><BR/><BR/></td>
  	</tr>
   <tr>
      <td class="photobox" align=center valign=middle style="PADDING: 5px"><img src="<%=link1%>" name="img" onClick="window.open(img.src);" style="cursor:hand"></td>
    </tr>
  </table>
  </center>
</div>
<%}%>
<%if (Request["type"].ToString()=="2")
{%>
<script language=javascript defer>
var volv=xlp.settings.volume;
setInterval("if(xlp.playState==3){time.innerText=xlp.controls.currentPositionString+'|'+xlp.currentMedia.durationString}",1000);
setInterval("if(xlp.playState==3){itcn.style.width=parseInt(245*(xlp.controls.currentPosition/xlp.currentMedia.duration))}",1000);
function volup(){
	if (volv<100){
		volv+=5;
		xlp.settings.volume=volv;
		time.innerText=volv;
	} else {
		time.innerText='最大';
	}
}
function voldown(){
	if (volv>0){
		volv-=5;
		xlp.settings.volume=volv;
		time.innerText=volv;
	} else {
		time.innerText='最小';
	}
}
</script>
  <table cellSpacing=0 cellPadding=0 border=0 align="center">
    <tr>
      <td class="photobox" align=center valign=middle style="PADDING: 5px" width="420">
<%
string str1=Request["filepath"].ToString();
string str2="mp3";
string str3="wma";
string str4="wav";
int height;
if(str1.EndsWith(str2)){
	height=65;
}else if(str1.EndsWith(str3)) {
	height=65;
}else if(str1.EndsWith(str4)) {
	height=65;
}else{
	height=350;
}
%>
       <object id="xlp" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" width="450" height="<%=height%>" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="Loading Microsoft Windows Media Player components..." VIEWASTEXT>
	    <param name="rate" value="1">
	    <param name="balance" value="0">
	    <param name="currentPosition" value="0">
	    <param name="defaultFrame" value>
	    <param name="playCount" value="1">
	    <param name="autoStart" value="-1">
	    <param name="currentMarker" value="0">
	    <param name="invokeURLs" value="-1">
	    <param name="baseURL" value>
	    <param name="volume" value="50">
	    <param name="mute" value="0">
	    <param name="uiMode" value="full">
	    <param name="stretchToFit" value="0">
	    <param name="windowlessVideo" value="0">
	    <param name="enabled" value="-1">
	    <param name="enableContextMenu" value="-1">
	    <param name="fullScreen" value="0">
	    <param name="SAMIStyle" value>
	    <param name="SAMILang" value>
	    <param name="SAMIFilename" value>
	    <param name="captioningID" value>
	    <param name="enableErrorDialogs" value="0">
	    <param name="_cx" value="6482">
	    <param name="_cy" value="6350">
		<param name="url" value="<%=link2%>">
		<embed width="450" height="<%=height%>" type="application/x-mplayer2" src="<%=link2%>"></embed>
	   </object>
	  </td>
    </tr>
    <tr><td height=10></td></tr>
    <tr><td class="photobox" align=center valign=middle style="PADDING: 5px"><a href="javascript:window.close(-1)" target="_self">关 闭</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<%=link2%>" target="_blank">下 载</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:location.reload()" target="_self">刷 新</a></td></tr>
    <tr><td height=5></td></tr>
    <tr><td class="photobox" align="center" valign="middle" style="PADDING-TOP: 10px; PADDING-BOTTOM: 10px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
    	<input type="button" value="静音" onClick="xlp.settings.mute=xlp.settings.mute==true?false:true;time.innerText=xlp.settings.mute==true?'静音':'关闭静音';">
		<input type="button" value="播放" onClick="xlp.controls.play();time.innerText='播放';">
		<input type="button" value="暂停" onClick="xlp.controls.pause();time.innerText='暂停';">
		<input type="button" value="停止" onClick="xlp.controls.stop();time.innerText='停止';">
		<input type="button" value="声道" onClick="xlp.settings.balance=xlp.settings.balance=='100'?'-100':'100';time.innerText=xlp.settings.balance=='100'?'右声道':'左声道';">
		<input type="button" value="提音" onClick="volup();">
		<input type="button" value="降音" onClick="voldown();">
		<input type="button" value="全屏" onClick="if(xlp.playState==3)xlp.fullscreen=1;">
		<br><br>
		<div id="time" style="background:#f2f3f7;width:400">正在加载媒体。。。非IE浏览器，控制面板无法使用</div>
		<table id="bar" style="width:400;height:10px;border:1px black solid;">
		  <tr>
		    <td id="itcn" bgcolor="#f70968" style="width:0"></td>
		    <td id="bar2" style="width:400"></td>
		  </tr>
		</table>
	</td></tr>
  </table>
<%}%>
<%if (Request["type"].ToString()=="3")
{%>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%" VIEWASTEXT>
	<param name="movie" value="<%=link3%>">
	<param name="quality" value="high">
	<embed src="<%=link3%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%"></embed>
   </object>
<table cellSpacing=0 cellPadding=0 border=0 align="center" width="100%">
    <tr><td height=10></td></tr>
    <tr><td class="photobox" align=center valign=middle style="PADDING: 5px"><a href="javascript:window.close(-1)" target="_self">关 闭</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<%=link3%>" target="_blank">下 载</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:location.reload()" target="_self">刷 新</a></td></tr>
  </table>
<%}%>
<%if (Request["type"].ToString()=="5")
{%>
<script language="JavaScript" type="text/JavaScript">
function setFull()
{
	if(!document.playfull.CanStop()){
		alert("影片未开始播放无法切换为全屏模式")
	}else{
		alert("点击确定按钮后进入全屏播放模式,在全屏播放模式中按 Esc 键退出全屏模式")
		document.playfull.SetFullScreen()
	}
}
function rf(){
	return false;
}
document.oncontextmenu = rf
function keydown(){
	if(event.ctrlKey ==true || event.keyCode ==93 || event.shiftKey ==true){
		return false;
	} 
}
document.onkeydown =keydown
function drag(){
	return false;
}
document.ondragstart=drag
function stopmouse(e) { 
	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))  
		return false; 
	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
		alert("欢迎你观赏");
		return false; 
	}
	return true;
} 
document.onmousedown=stopmouse;
if (document.layers)
	window.captureEvents(Event.MOUSEDOWN);
	window.onmousedown=stopmouse;

var ERR_NonePlayer="播放器提示您:您的系统中没有安装Real Player播放器，请在主页上下载。\n\nMovie播放器将关闭。";
var ERR_FileNotFind="在线用户过多，服务器限制，请抢线或者换其他播放地址观看！";
var ERR_NotLocateServer="在线用户过多，服务器限制，请抢线或者换其他播放地址观看！";
var ERR_UnkownError="在线用户过多，服务器限制，请抢线或者换其他播放地址观看！";
</script>
<script language="VBScript">
on error resume next
RealPlayerG2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))
RealPlayer5 = (NOT IsNull(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")))
RealPlayer4 = (NOT IsNull(CreateObject("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")))
if not RealPlayerG2 and RealPlayer5 and RealPlayer4 then
	if MsgBox("Real 中没有支持此内容的软件更新。", vbYesNo) = vbYes then
		window.location = "http://www2.skycn.com/soft/6404.html"
	end if
end if

Sub player_OnBuffering(lFlags,lPercentage)
	if (lPercentage=100) then
		StartPlay=false
		if (FirstPlay) then
			FirstPlay=false
			id=player 
		end if	
		exit sub
	end if
End Sub
Sub player_OnErrorMessage(uSeverity, uRMACode, uUserCode, pUserString, pMoreInfoURL, pErrorString)
select case player.GetLastErrorRMACode()
		case -2147221496
			window.alert(ERR_FileNotFind)
		case -2147221433,-2147221428,-2147221417,-2147217468
			window.alert(ERR_NotLocateServer)
		case else
			window.alert(ERR_UnkownError)
	end select
End Sub
</script>
  <table cellSpacing=0 cellPadding=0 border=0 align="center">
    <tr>
      <td class="photobox" align=center valign=middle style="PADDING: 5px" width="470">
		<object id="player" name="player" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="468" height="300">
			<param name="src" value="<%=link3%>">
			<param name="AUTOSTART" value="-1">
			<param name="SHUFFLE" value="0">
			<param name="PREFETCH" value="0">
			<param name="NOLABELS" value="0">
			<param name="CONTROLS" value="Imagewindow">
			<param name="CONSOLE" value="clip1">
			<param name="LOOP" value="0">
			<param name="NUMLOOP" value="0">
			<param name="CENTER" value="1">
			<param name="MAINTAINASPECT" value="1">
			<param name="BACKGROUNDCOLOR" value="#000000">
			<embed src="<%=link3%>" type="audio/x-pn-realaudio-plugin" autostart="true" console="clip1" controls="Imagewindow" width="468" height="300">
		</object>
		<object ID="RP2" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="468" HEIGHT="30">
			<param name="_ExtentX" value="4657">
			<param name="_ExtentY" value="794">
			<param name="AUTOSTART" value="-1">
			<param name="SHUFFLE" value="0">
			<param name="PREFETCH" value="0">
			<param name="NOLABELS" value="-1">
			<param name="CONTROLS" value="ControlPanel">
			<param name="CONSOLE" value="clip1">
			<param name="LOOP" value="0">
			<param name="NUMLOOP" value="0">
			<param name="CENTER" value="0">
			<param name="MAINTAINASPECT" value="0">
			<param name="BACKGROUNDCOLOR" value="#000000">
			<embed type="audio/x-pn-realaudio-plugin" autostart="true" console="clip1" controls="ControlPanel" width="468" height="30">
		</object>
		<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="30" id="RP3"  name="RP3" width="468">
			<param name="_ExtentX" value="4657">
			<param name="_ExtentY" value="794">
			<param name="AUTOSTART" value="-1">
			<param name="SHUFFLE" value="0">
			<param name="PREFETCH" value="0">
			<param name="NOLABELS" value="-1">
			<param name="CONTROLS" value="StatusBar">
			<param name="CONSOLE" value="clip1">
			<param name="LOOP" value="0">
			<param name="NUMLOOP" value="0">
			<param name="CENTER" value="0">
			<param name="MAINTAINASPECT" value="0">
			<param name="BACKGROUNDCOLOR" value="#000000">
			<embed type="audio/x-pn-realaudio-plugin" autostart="true" console="clip1" controls="StatusBar" width="468" height="30">
		</object>
	  </td>
    </tr>
  </table>
  <table cellSpacing=0 cellPadding=0 border=0 align="center" width="100%">
    <tr><td height=10></td></tr>
    <tr><td class="photobox" align=center valign=middle style="PADDING: 5px"><a href="javascript:window.close(-1)" target="_self">关 闭</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<%=link3%>" target="_blank">下 载</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:location.reload()" target="_self">刷 新</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="###" style="CURSOR: hand" onClick="document.player.SetFullScreen()">全 屏</a></td></tr>
  </table>
<%}%>
<%if (Request["type"].ToString()=="4"){
Response.Write(showedit);
Response.Write(showtxt);
}
%>
	</body>
</HTML>