Exemple #1
0
 private void LoadQuangCao23()
 {
     QuangCao qcao = new QuangCao();
     DataSet ds = qcao.SelectQuangCaoAtViTriQuangCaoByLoaiNguoiDungID(Common.LoaiNguoiDungID(), 23);
     if (ds.Tables[0].Rows.Count >= 1)
     {
         if (ds.Tables[0].Rows[0]["LoaiAnh"].ToString() == "FLASH")
         {
             spnQuangCao23.InnerHtml = "<object border:solid 1px #C9C3C3 classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
                                       +
                                       "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\""
                                       + "width=\"100%\" height=\"216\" title=\"Quang Cao\">"
                                       + "<param name=\"movie\" value=\"." + ds.Tables[0].Rows[0]["DuongDanAnh"] +
                                       "\" />"
                                       + "<param name=\"quality\" value=\"high\" />"
                                       + "<embed src=\"" + ds.Tables[0].Rows[0]["DuongDanAnh"] +
                                       "\" quality=\"high\""
                                       +
                                       "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\""
                                       + "width=\"100%\" height=\"216\"></embed></object>";
         }
         else
         {
             spnQuangCao23.InnerHtml = "<a href=\"" + ds.Tables[0].Rows[0]["DuongDan"]
                                       + "\" target=\"_blank\"><img alt=\"" + ds.Tables[0].Rows[0]["NoiDungQuangCao"]
                                       + "\" src=\"." + ds.Tables[0].Rows[0]["DuongDanAnh"] +
                                       "\" height=\"216px\" width=\"100%\" style=\"border:solid 1px #C9C3C3\"/></a>";
         }
     }
     else
     {
         spnQuangCao23.InnerHtml =
             "<img alt=\"Moi quang cao\" src=\"../images/advblank.jpg\" height=\"216px\" width=\"596px\" style=\"border:none\"/>";
     }
 }
Exemple #2
0
    private void LoadQuangCao22()
    {
        QuangCao qcao = new QuangCao();
        DataSet ds = qcao.SelectQuangCaoAtViTriQuangCaoByLoaiNguoiDungID(Common.LoaiNguoiDungID(), 22);
        int n = 4;
        if (ds.Tables[0].Rows.Count <= 4) n = ds.Tables[0].Rows.Count;

        for (int i = 0; i < n; i++)
        {
            TableRow tr = new TableRow();
            TableCell td = new TableCell();
            td.Style.Value = "padding-top: 4px;";
            string content = "";
            if (ds.Tables[0].Rows[i]["LoaiAnh"].ToString() == "FLASH")
            {
                content = "<object style=\"border:solid 1px #C9C3C3\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
                          +
                          "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\""
                          + "width=\"220\" height=\"155\" title=\"Quang Cao\">"
                          + "<param name=\"movie\" value=\"." + ds.Tables[0].Rows[i]["DuongDanAnh"] + "\" />"
                          + "<param name=\"quality\" value=\"high\" />"
                          + "<embed src=\"." + ds.Tables[0].Rows[i]["DuongDanAnh"] + "\" quality=\"high\""
                          +
                          "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\""
                          + "width=\"220\" height=\"155\"></embed></object></a>";
            }
            else
            {
                content = "<a href=\"" + ds.Tables[0].Rows[i]["DuongDan"]
                          + "\" target=\"_blank\"><img alt=\"" + ds.Tables[0].Rows[i]["NoiDungQuangCao"]
                          + "\" src=\"." + ds.Tables[0].Rows[i]["DuongDanAnh"]
                          + "\" style=\"border:solid 1px #C9C3C3; width:220px;\">";
            }
            td.Text = content;
            tr.Cells.Add(td);
            tblQuangCao22.Rows.Add(tr);
        }
    }
Exemple #3
0
 private void LoadQuangCao07()
 {
     QuangCao qcao = new QuangCao();
     DataSet ds = qcao.SelectQuangCaoAtViTriQuangCaoByLoaiNguoiDungID(3, 7);
     int n = ds.Tables[0].Rows.Count;
     spnQuangCao07a.InnerHtml =
         "<img alt=\"Moi quang cao\" src=\"./images/advblank.jpg\" height=\"122px\" width=\"365px\" style=\"border:solid 1px #C9C3C3\"/>";
     spnQuangCao07b.InnerHtml =
         "<img alt=\"Moi quang cao\" src=\"./images/advblank.jpg\" height=\"122px\" width=\"365px\" style=\"border:solid 1px #C9C3C3\"/>";
     //spnQuangCao07c.InnerHtml = "<img alt=\"Moi quang cao\" src=\"./images/advblank.jpg\" height=\"122px\" width=\"365px\" style=\"border:solid 1px #C9C3C3\"/>";
     if (n >= 1)
     {
         if (ds.Tables[0].Rows[0]["LoaiAnh"].ToString() == "FLASH")
         {
             spnQuangCao07a.InnerHtml = "<object style=\"border:solid 1px #C9C3C3\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
                                        +
                                        "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\""
                                        + "width=\"365px\" height=\"122\" title=\"Quang Cao\">"
                                        + "<param name=\"movie\" value=\"" + ds.Tables[0].Rows[0]["DuongDanAnh"] +
                                        "\" />"
                                        + "<param name=\"quality\" value=\"high\" />"
                                        + "<embed src=\"" + ds.Tables[0].Rows[0]["DuongDanAnh"] +
                                        "\" quality=\"high\""
                                        +
                                        "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\""
                                        + "width=\"365px\" height=\"122\"></embed></object>";
         }
         else
         {
             spnQuangCao07a.InnerHtml = "<a href=\"" + ds.Tables[0].Rows[0]["DuongDan"]
                                        + "\" target=\"_blank\"><img alt=\"" +
                                        ds.Tables[0].Rows[0]["NoiDungQuangCao"]
                                        + "\" src=\"" + ds.Tables[0].Rows[0]["DuongDanAnh"] +
                                        "\" height=\"122px\" width=\"365px\" style=\"border:solid 1px #C9C3C3\"/></a>";
         }
         if (n >= 2)
         {
             if (ds.Tables[0].Rows[1]["LoaiAnh"].ToString() == "FLASH")
             {
                 spnQuangCao07b.InnerHtml = "<object style=\"border:solid 1px #C9C3C3\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
                                            +
                                            "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\""
                                            + "width=\"365px\" height=\"122\" title=\"Quang Cao\">"
                                            + "<param name=\"movie\" value=\"" + ds.Tables[0].Rows[1]["DuongDanAnh"] +
                                            "\" />"
                                            + "<param name=\"quality\" value=\"high\" />"
                                            + "<embed src=\"" + ds.Tables[0].Rows[1]["DuongDanAnh"] +
                                            "\" quality=\"high\""
                                            +
                                            "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\""
                                            + "width=\"365px\" height=\"122\"></embed></object>";
             }
             else
             {
                 spnQuangCao07b.InnerHtml = "<a href=\"" + ds.Tables[0].Rows[1]["DuongDan"]
                                            + "\" target=\"_blank\"><img alt=\"" +
                                            ds.Tables[0].Rows[1]["NoiDungQuangCao"]
                                            + "\" src=\"" + ds.Tables[0].Rows[1]["DuongDanAnh"] +
                                            "\" height=\"122px\" width=\"365px\" style=\"border:solid 1px #C9C3C3\"/></a>";
             }
             //if (n >= 3)
             //{
             //    if (ds.Tables[0].Rows[2]["LoaiAnh"].ToString() == "FLASH")
             //    {
             //        spnQuangCao07c.InnerHtml = "<object style=\"border:solid 1px #C9C3C3\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""
             //            + "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\""
             //            + "width=\"365px\" height=\"122\" title=\"Quang Cao\">"
             //            + "<param name=\"movie\" value=\"" + ds.Tables[0].Rows[2]["DuongDanAnh"].ToString() + "\" />"
             //            + "<param name=\"quality\" value=\"high\" />"
             //            + "<embed src=\"" + ds.Tables[0].Rows[2]["DuongDanAnh"].ToString() + "\" quality=\"high\""
             //            + "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\""
             //            + "width=\"365px\" height=\"122\"></embed></object>";
             //    }
             //    else
             //    {
             //        spnQuangCao07c.InnerHtml = "<a href=\"" + ds.Tables[0].Rows[2]["DuongDan"].ToString()
             //          + "\" target=\"_blank\"><img alt=\"" + ds.Tables[0].Rows[2]["NoiDungQuangCao"].ToString()
             //          + "\" src=\"" + ds.Tables[0].Rows[2]["DuongDanAnh"].ToString() + "\" height=\"122px\" width=\"365px\" style=\"border:solid 1px #C9C3C3\"/></a>";
             //    }
             //}
         }
     }
     else
     {
         tblQuangCao07.Visible = false;
     }
 }