A5下载 - 努力做内容最丰富最安全的下载站!

A5站长下载站

当前位置:A5下载 > 程序插件 > ecms插件 > 类似太平洋之产品比较插件 for 帝国CMS
类似太平洋之产品比较插件 for 帝国CMS

类似太平洋之产品比较插件 for 帝国CMS

  • 软件大小:3 KB
  • 软件语言:简体中文
  • 更新时间:2010-09-21
  • 软件类型:国产软件 / ecms插件
  • 运行环境:Linux/2003/PHP
  • 软件授权:免费软件
  • 官方主页:http://
  • 软件等级 :
  • 软件厂商:zhangyi
立即高速安全下载
  • 介绍说明
  • 下载地址
  • 精品推荐
  • 相关软件
  • 网友评论

1.将我提供的JS文件解压到5.0的skin/default/js/目录下;

2.在列表页的添加以下代码:
 


<script type="text/java script" src="[!--news.url--]skin/default/js/select.js"></script>




3.在"对比"这两个字的超连接处添加动作(请参考下边代码):
 


<a href="java script:change_select([!--id--],'[!--title--]')"  >[对比]</a>




4.至此,就完成一半了,另外半就是接收参数进行产品比较的PHP页面了.可以利用帝国后台生成自定义页面;我给出我的代码如下:
 


<!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>
<title>[!--pagetitle--]</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="[!--pagetitle--]" />
<meta name="description" content="[!--pagetitle--]" />
<link href="[!--news.url--]skin/default/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/java script" src="[!--news.url--]skin/default/js/select.js"></script>
<style type="text/css">
<!--
.STYLE1 {font-weight: bold}
.STYLE2 {color: #FFFF00}
.STYLE3 {color: #CCFF00}
.STYLE4 {color: #FFCC00}
-->
</style></head>
<body class="homepage">
[!--temp.dtheader--]
<br>
<table width=950px align=center cellpadding=0 cellspacing=0 class="table_bk5">
<tr>

<!--code.start-->?php

$id=$_POST['pro_id'];
$countno=count($id);
        echo '<td valign=top  width=80px ><table width=100% align=center cellpadding=0 cellspacing=0><tr><td class=table_pic>产品图片</td></tr><tr><td class=table_bk7 >产品名称</td></tr><tr><td class=table_bk7>产品价格</td></tr><tr><td class=table_bk7>型号</td></tr><tr><td class=table_bk7>喇叭</td></tr><tr><td class=table_bk7>功率</td></tr><tr><td class=table_bk7>瞬时功率</td></tr><tr><td class=table_bk7>灵敏度</td></tr><tr><td class=table_bk7>频率范围</td></tr><tr><td class=table_bk7>阻抗</td></tr><tr><td class=table_bk7>防磁</td></tr><tr><td class=table_bk7>尺寸</td></tr><tr><td class=table_bk7>重量</td></tr></tr><tr><td class=table_bk7 height=450px;>产品描述</td></tr></table></td>';

        for($i=0;$i<$countno;$i++)
        {
         $theid = $id[$i];
             Readproducts($theid);         
         }
         
         
function Readproducts($theid){         
//连接到本地mysql数据库

    $myconn=mysql_connect("localhost","root","");

    //选择操作库

    mysql_query("set names 'gbk'"); // //这就是指定数据库字符集,一般放在连接数据库后面就系了

    mysql_select_db("empirecms",$myconn);

   $strSql="select * from phome_ecms_shop where id=$theid";

    //用mysql_query函数从phome_ecms_shop表里读取数据

    $result=mysql_query($strSql,$myconn);
    $kk=0;
    while($row=mysql_fetch_array($result))//通过循环读取数据内容

    {       
    echo '<td valign=top><table width=100% align=center cellpadding=0 cellspacing=0><tr><td class=table_bk6 ><img src='.$row["titlepic"].' border=0 width=100 height=120 /></td>
    </tr><tr><td class=table_bk6>'.$row["title"].'</td></tr><tr><td class=table_price>'.$row["price"].'</td></tr><tr><td><table width=100% align=center cellpadding=0 cellspacing=0><tr><td bgcolor=#F6F6F6 class=table_bk6><b>'.$row["xinhao1"].'</b></td>
<td class=table_bk6><b>'.$row["xinhao2"].'</b></td><td class=table_bk6 bgcolor=#F6F6F6><b>'.$row["xinhao3"].'</b></td><td class=table_bk6><b>'.$row["xinhao4"].'</b></td></tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["laba1"].'</td>
<td class=table_bk6>'.$row["laba2"].'</b></td><td class=table_bk6 bgcolor=#F6F6F6>'.$row["laba3"].'</td><td class=table_bk6>'.$row["laba4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["gongli1"].'</td>
<td class=table_bk6>'.$row["gongli2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["gongli3"].'</td>
<td class=table_bk6>'.$row["gongli4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["ssgongli1"].'</td>
<td class=table_bk6>'.$row["ssgongli2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["ssgongli3"].'</td>
<td class=table_bk6>'.$row["ssgongli4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["linmendu1"].'</td>
<td class=table_bk6>'.$row["linmendu2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["linmendu3"].'</td>
<td class=table_bk6>'.$row["linmendu4"].'</td>
</tr><tr>
<td bgcolor=#F6F6F6 class=table_bk6>'.$row["pinglfw1"].'</td>
<td class=table_bk6>'.$row["pinglfw2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["pinglfw3"].'</td>
<td class=table_bk6>'.$row["pinglfw4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["zukuan1"].'</td>
<td class=table_bk6>'.$row["zukuan2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["zukuan3"].'</td>
<td class=table_bk6>'.$row["zukuan4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["fance1"].'</td>
<td class=table_bk6>'.$row["fance2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["fance3"].'</td>
<td class=table_bk6>'.$row["fance4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["chicui1"].'</td>
<td class=table_bk6>'.$row["chicui2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["chicui3"].'</td>
<td class=table_bk6>'.$row["chicui4"].'</td>
</tr><tr><td bgcolor=#F6F6F6 class=table_bk6>'.$row["zhonliang1"].'</td>
<td class=table_bk6>'.$row["zhonliang2"].'</td>
<td class=table_bk6 bgcolor=#F6F6F6>'.$row["zhonliang3"].'</td>
<td class=table_bk6>'.$row["zhonliang4"].'</td>
</tr></table></td></tr><tr><td class=table_bk6><div id=sp_intro2>'.$row["newstext"].'<div></td></tr></table></td>';
    }

    //关闭对数据库的连接

    mysql_close($myconn);
}

         
?<!--code.end-->

</tr>
</table>
<br>
[!--temp.footer--]
 

下载地址

  • PC版

本地下载

相关软件

查看所有评论+

网友评论

网友
您的评论需要经过审核才能显示

本类排名

本类推荐

装机必备

换一批

相关资讯

公众号