慧云科技 > 首页 > 文章详情

奥杰cms源码 - FlashView

本文来源:网站建设-网站制作|网络营销专家慧云科技-

抢滩登陆

2009-7-17 17:12:22

using System;
using System.Text;
using System.Web;
using System.Web.UI;
using BoyunBase;
using SiteCore;

public partial class Part_FlashView : System.Web.UI.UserControl
{
    protected void Page_Load( object sender, EventArgs e )
    {
        try {
            if( IsPostBack ) return;

            PartAccess pAcs = new PartAccess( this );
            if( !pAcs.IsReady ) return;

            string flashPath = pAcs.GetSetting( "flashPath" );
            if( flashPath == "" ) {
                ltrFlashView.Text = "<div style=\"width:16px;\"></div>";
                return;
            }

            int width = pAcs.GetSettingInt( "width", -1 );
            int height = pAcs.GetSettingInt( "height", -1 );
            if( width < 20 ) width = 20;
            if( height < 20 ) height = 20;

            StringBuilder sb = new StringBuilder( 512 );
            sb.Append( "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" class=\"FlashShow\" ");
            sb.Append( "width=\"" + width.ToString() + "px\" height=\"" + height.ToString() + "px\" >\n" );
            sb.Append( "<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n" );
            sb.Append( "<param name=\"wmode\" value=\"transparent\" />\n" );
            sb.Append( "<param name=\"menu\" value=\"false\" />\n" );
            sb.Append( "<param name=\"quality\" value=\"high\" />\n" );
            sb.Append( "<param name=\"movie\" value=\"" + flashPath + "\">\n" );
            sb.Append( "</object>\n" );
            ltrFlashView.Text = sb.ToString();

        } catch( Exception ex ) {
            Todo.DebugOut( "加载 Part_FlashView 出现异常:" + ex.Message );
        }
    }
}


RSS订阅| 关于我们| 网站地图| 加入项目| 法律条款| 友情链接| Firefox| Sitemap| 网站统计

全国免费咨询热线:400-600-6495 优惠活动咨询电话:021-62278496 Email:ajaxcms@yahoo.cn

上海慧云信息科技有限公司版权所有 2006-2009 沪ICP备09038165号

本站关键词:网站建设 高品质网站建设