CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Dynamic Tables (IF) for flash or gifs

Print topic Send  topic

Author Message
tecolotemx
Posted: 06/02/2005, 9:28 AM

Help me please!!!!
I´m transfering a portal developed in DreamWeaver to CCS.
I´m using the ver 2.2.3.6 .

Actually in my company, someone developed an application for show banners, in diferent formats like Flash, jpg, gif and plain text.

The user insert the kind of "banner" on a database, and If the banner is defined as an "image", the code responses with the appropiate code in HTML, who has the table format, or if the banner is defined as a "flash" the code responses with the appropiate tags, The link of both gifs and flashes are inside the database.

This example is running using a "virtual include".
Full site: http://foremagazine.com.mx - The 5 banner at the top.
Full URL app: http://foremagazine.com.mx/portada.asp

Im trying to change this code, including it on a "before show" using IF´s, but the recordsets in CCS need to work "inside" a table, so all i do is useless.

Any idea????

- (My alternatives are to custom the following code to CCS, or to do a virtual incude from CCS to this page.asp, but all i tried don´t work)

Sorry for my bad english.


The actual code is that: (portada.asp)


<%
Dim gStrConnString
gStrConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Access.mdb") & ";Persist Security Info=False"

Dim conn, rs, strSQL, reng,opt1, opt2, strPortada
set conn = server.CreateObject("ADODB.Connection")
conn.open gStrConnString

set rs = conn.execute("select * from Portada order by Orden")
strPortada = ""
strPortada = "<table width=""960"" height=""105"" border=""0"">"
strPortada = strPortada & "<tr>"
do while not rs.eof
If rs("Foto") = "S" then
strPortada = strPortada & "<td width=""153"" height=""103""><a href=" & rs("Ligar_a") & "><img src=" & rs("Foto_Ruta") & " width=""153"" high=""99"" border=""0"" alt=" & rs("Nota") & "></a></td>"
end if
If rs("Foto") = "A" then
strPortada = strPortada & "<td width=""153""><a href=" & rs("Ligar_a") & "><img src=" & rs("Foto_Ruta") & " width=""80"" high=""80"" border=""0"" alt=" & rs("Nota") & "></a>"
strPortada = strPortada & "<a href=" & rs("Ligar_a") & """>" & rs("Texto") & "</a></td>"
end if
If rs("Foto") = "N" then
strPortada = strPortada & "<td width=""153""><a href=" & rs("Ligar_a") & ">" & rs("Texto") & "</a></td>"
end if
If rs("Foto") = "F" then
strPortada = strPortada & "<td width=""153""><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=""153"" height=""99"">"
strPortada = strPortada & "<param name=""movie"" value=""" & rs("Foto_Ruta") & """>"
strPortada = strPortada & "<param name=""quality"" value=""high"">"
strPortada = strPortada & "<embed src=""" & rs("Foto_Ruta") & """ quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""153"" height=""99""></embed></object></td>"
end if
rs.movenext
loop
strPortada = strPortada & "</tr>"
strPortada = strPortada & "</table>"
%>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body bgcolor="#FFFFFF">

<%=strPortada%>
</body>
smalloy

Posts: 107
Posted: 06/02/2005, 12:18 PM

Here is my advice, create a Grid with the Grid builder using the Portada as the table where the data lies. Make each record a label then in each records before show event perform your If staments. Here is an example for your Flash:

grid.label.Value = "<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=550 height=400> " & _  
  "<param name=movie value=images/PorterCurtis_Splash5.swf> " & _  
  "<param name=quality value=high> " & _  
  "<param name=LOOP value=false> " & _  
  "<embed src=images/PorterCurtis_Splash5.swf align=middle width=550 height=400 loop=false quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash></embed> " & _  
  "</object>"

You'll need to do some playing around to get it just right but it should work with not a lot of effort.
_________________
Anything can be done, just give me time and money.
View profile  Send private message
tecolotemx
Posted: 06/02/2005, 12:52 PM

8-) Nice advice !!!!!!!!!
I´ll try it.

Thanks for your help.
manolo
Posted: 08/24/2005, 10:02 PM

How I can apply this in PHP?

Im trying to use a Flash banner in CCS, and it seems this is the way to include flash in a CCS page.

thanks in advance...
marcos
Posted: 12/05/2005, 3:08 PM

... I need the php implementation too, I have problems with the double quotes!

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.