首页 > CMS > PhpCMS > 正文

phpcms 2008图片幻灯片集合搜狐网flash的问题

2024-09-10 07:15:30
字体:
来源:转载
供稿:网友
  1. {get sql="SELECT a.contentid,a.catid,a.title,a.style,a.url,a.thumb,a.description,a.updatetime,a.inputtime FROM `ezzcc_content` a, `ezzcc_content_position` p WHERE a.status=99  AND a.contentid=p.contentid AND p.posid=7 $arrchildid ORDER BY a.contentid DESC limit 0,4"
  2.  {php $flash_texts .= str_replace('"',"'",$r[title]).'|';$flash_pics .= $r[thumb].'|';$flash_links .= $r[url].'|';$arr=array('/n','/r','/r/n','"',' ');$flash_des .= str_replace($arr,"",str_cut($r[description],50)).'|';} 
  3. {/get} //Vevb.com 

上面是从推荐位获取四组幻灯片,并进行了一些字符串处理,代码如下:

  1. {php $flash_texts=substr($flash_texts,0,-1);$flash_pics=substr($flash_pics,0,-1);$flash_links=substr($flash_links,0,-1);$flash_des=substr($flash_des,0,-1);} 
  2.  
  3. <SCRIPT type=text/javascript> 
  4.     
  5.    var pics_b="{$flash_pics}"
  6.    var pics_s="{$flash_pics}";  
  7.    var mylinks="{$flash_link}"
  8.    var texts="{$flash_texts}"
  9.    var texts_con="{$flash_des}"
  10.     
  11.    var sohuFlash2 = new sohuFlash("templates/201007/skins/201007/images/flash/pz1.swf","sohuFlashID01","332","290","4","#d7d7d7"); 
  12.     sohuFlash2.addParam("quality""high"); 
  13.     sohuFlash2.addParam("salign""t"); 
  14.     sohuFlash2.addVariable("b",pics_b); 
  15.     sohuFlash2.addVariable("p",pics_s);  
  16.     sohuFlash2.addVariable("l",mylinks); 
  17.     sohuFlash2.addVariable("icon",texts);  
  18.     sohuFlash2.addVariable("icon2",texts_con); 
  19.     sohuFlash2.write("flashcontent01"); 
  20.     
  21. </script>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表