Php+javascript Slide Generation Code

Source: Internet
Author: User
Keywords Web Programming PHP Tutorials
Tags code document html http javascript links mysql mysql_select_db

<?php Tutorial
$bbsconn =mysql tutorial _connect ("localhost", "root", "");
mysql_select_db ("Lsmsql", $bbsconn);
$kind = "slides";
$sql = "SELECT * from sa_article where kind= ' $kind ' ORDER by ArticleID desc limit 0,6";
$result =mysql_query ($sql);
$pics = $links = $texts = "";
while ($rows =mysql_fetch_array ($result)) {

$pics. = "/attached/" $rows [' source ']. "|"

$links. = "show.php?id=". $rows [' ArticleID ']. "|";

$texts. = $rows [' title ']. "|"

}
$pics =substr ($pics, 0,-1);

$links =substr ($links, 0,-1);

$texts =substr ($texts, 0,-1);
?>


<!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>
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>
<title> Slides </title>
</head>
<body>
<table width= border= "1" >
<tr>
<td>
<script type=text/Web page Special effects >
<!--

var focus_width=300;


var focus_height=200;


var text_height=20;


var swf_height = focus_height+text_height


var pics= "&lt;?= $pics?&gt;"


var links= "&lt;?= $links?&gt;"


var texts= "&lt;?= $texts?&gt;"


document.write (' &lt;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 + ' &gt; ');


document.write (' &lt;param name= "allowscriptaccess" value= "Samedomain" &gt;&lt;param name= "movie" Value= " playswf.swf "&gt;&lt;param name=wmode value=transparent&gt;&lt;param name=" quality "high" &gt; ");


document.write (' &lt;param name= ' menu value= ' false ' &gt;&lt;param name=wmode value= ' opaque ' &gt; ');


document.write ("&lt;param name=" Flashvars "value=" pics= ' +pics+ ' &amp;links= ' +links+ ' ' &amp;texts= ', ' +texts+ ') &amp; Borderwidth= ' +focus_width+ ' &amp;borderheight= ' +focus_height+ ' &amp;textheight= ' +text_height+ ' "&gt; ');


document.write (' &lt;embed src= ' playswf.swf wmode= ' opaque ' flashvars= ' pics= ' +pics+ ' &amp;links= ' +links+ ') &amp;texts = ' +texts+ ' &amp;borderwidth= ' +focus_width+ ' &amp;borderheight= ' +focus_height+ ' &amp;textheight= ' +text_height+ ' Menu= "false" bgcolor= "#dadada" quality= "High" width= "' + focus_width + '" height= "' + swf_height + '" allowscriptaccess= " Samedomain "type=" Application/x-shockwave-flash "pluginspage=" Http://www.macromedia.com/go/getflashplayer "/&gt;"  ); document.write (' &lt;/object&gt; ');


//--&gt;


&lt;/script&gt;


</td>
</tr>
</table>
</body>
</html>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.