phpcms推荐位幻灯片在JS里的调用

phpcms 首页幻灯片调用代码

<script type="text/javascript">
{pc:content action="position" posid="1" order="listorder DESC" thumb="1" num="6"}
var swf_width=300;
var swf_height=200;
var config='3|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000';
//-- config 参数设置 -- 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字颜色|当前按键颜色|普通按键色彩 --
var files='{php $num = 1}
{loop $data $n $r}
{$r[thumb]}
{if $num%6!=0}|{/if}
{php $num++}
{/loop}';
var links='{php $num2 = 1}
{loop $data $n $v}
{urlencode($v[url])}
{if $num2%6!=0}|{/if}
{php $num2++}
{/loop}';
var texts='{php $num3 = 1}
{loop $data $n $k}
{$k[title]}
{if $num3%6!=0}|{/if}
{php $num3++}
{/loop}';
{/pc}
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="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="{IMG_PATH}focus.swf" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="menu" value="false" />');
document.write('<param name=wmode value="opaque" />');
document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
document.write('<embed src="{IMG_PATH}focus.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
< /script>

你可能感兴趣的:(phpcms推荐位幻灯片在JS里的调用)