<?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= "<?= $pics?>"
var links= "<?= $links?>"
var texts= "<?= $texts?>"
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 + ' > ');
document.write (' <param name= "allowscriptaccess" value= "Samedomain" ><param name= "movie" Value= " playswf.swf "><param name=wmode value=transparent><param name=" quality "high" > ");
document.write (' <param name= ' menu value= ' false ' ><param name=wmode value= ' opaque ' > ');
document.write ("<param name=" Flashvars "value=" pics= ' +pics+ ' &links= ' +links+ ' ' &texts= ', ' +texts+ ') & Borderwidth= ' +focus_width+ ' &borderheight= ' +focus_height+ ' &textheight= ' +text_height+ ' "> ');
document.write (' <embed src= ' playswf.swf wmode= ' opaque ' flashvars= ' pics= ' +pics+ ' &links= ' +links+ ') &texts = ' +texts+ ' &borderwidth= ' +focus_width+ ' &borderheight= ' +focus_height+ ' &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 "/>" ); document.write (' </object> ');
//-->
</script>
</td>
</tr>
</table>
</body>
</html>