62,254
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PicFlash.aspx.cs" Inherits="Web.PicFlash" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblPic" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
public string news_pics = string.Empty;
public string pics = string.Empty;
public string links = string.Empty;
public string texts = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData);
}
}
public void BindData()
{
Bll.SysManage.Article bllArticle = new Bll.SysManage.Article();
DataTable dt = bllArticle.GetAQDT(aTypeId, count);
int Rows = dt.Rows.Count;
for (int i = 0; i < Rows; i++)
{
if (i == Rows - 1)
{
pics += dt.Rows[i]["ARTICLE_URL"].ToString();
links += "SafeManage/ArticleContent.aspx?articleId=" + dt.Rows[i]["ARTICLE_ID"].ToString();
texts += Bll.WebManage.strCut(dt.Rows[i]["ARTICLE_TITLE"].ToString(), 15);
}
else
{
pics += dt.Rows[i]["ARTICLE_URL"].ToString() + "|";
links += "SafeManage/ArticleContent.aspx?articleId=" + dt.Rows[i]["ARTICLE_ID"].ToString() + "|";
texts += Bll.WebManage.strCut(dt.Rows[i]["ARTICLE_TITLE"].ToString(), 15)+"|";
}
}
news_pics = "<SCRIPT type=text/javascript>";
news_pics += "var focus_width=240;";
news_pics += "var focus_height=160;";
news_pics += "var text_height=18;";
news_pics += "var swf_height = focus_height+text_height;";
news_pics += "var pics=\"" + pics + "\";";
news_pics += "var links=\"" + links + "\";";
news_pics += "var texts=\"" + texts + "\";";
news_pics += "document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"'+ focus_width +'\" height=\"'+ swf_height +'\">');";
news_pics += "document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"Images/viewer.swf\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#FFFFFF\">');";
news_pics += "document.write('<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">');";
news_pics += "document.write('<param name=\"FlashVars\" value=\"pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'\">');";
news_pics += "document.write('<embed src=\"images/viewer.swf\" wmode=\"opaque\" FlashVars=\"pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'\" menu=\"false\" bgcolor=\"#FFFFFF\" quality=\"high\" width=\"'+ focus_width +'\" height=\"'+ focus_height +'\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />');";
news_pics += "document.write('</object>');";
news_pics += "</SCRIPT>";
lblPic.Text = news_pics;