织梦开发:淘客商品跳转面页

时间:2016-12-18 23:39 / 来源:未知 / 作者:酱油 / 点击:

有不少有喜欢用DEDECMS修改成淘宝客类的网站,织梦作为淘宝客站并不是特别的方便和适用。举例,我们增加字段,为了SEO效果,有些朋友增加了一个跳转页面。

代码如下:举例四个字段,查询表arctype

<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
$id == $id;
if($id==0) {
    die(" Request Error! ");
    }
    else
    {
        $url = $dsql->GetOne("select test1,test2,test3,test4 from dede_arctype where id = '$id' ");
        $test1 = $url['test1'];
        $test2 = $url['test2'];
        $test3 = $url['test3'];
        $test4 = $url['test4'];
    }
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>即将前往:<?php echo $test2 ?>官网</title>
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=1000" />
<meta http-equiv="refresh" content="1;url=<?php echo $test1 ?>">
<link rel="stylesheet" media="all" href="gourl.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="website">
  <div class="one">
    <div class="logo"><a rel="nofollow" href="<?php echo $test1 ?>"><img src="http://127.0.0.1/logo/<?php echo $test3 ?>"></a></div>
    <div class="go">
      <dl>
        <dt><a rel="nofollow" href="<?php echo $test1 ?>">即将前往:<?php echo $test2 ?>官网</a></dt>
        <dd>如果页面没有跳转,请您<a rel="nofollow" href="<?php echo $test1 ?>">点击这里</a>直接访问</dd>
      </dl>
    </div>
  </div>
  <div class="load"><img src="loading.gif" /></div>
  <div class="two">
    <dl>
      <dt><?php echo $test2 ?>:</dt>
      <dd><?php echo $test4 ?></dd>
    </dl>
  </div>
  <div class="copy">Copyright &copy; 2002-2011 DEDECMS. 织梦科技 版权所有&nbsp;&nbsp;鄂ICP备08006614号-2</div>
</div>
</body>
</html>

CSS代码

@charset "utf-8";
body{margin:0;padding:0;background:#faf9f8 url(bg.png);color:#666;font:normal 12px/1.8em Verdana,Arial,sans-serif;-webkit-text-size-adjust:none;}
h1,h2,p,dl,dt,dd{margin:0;padding:0;}
a{color:#d32e4c;text-decoration:none;}
a:hover{text-decoration:underline;}
.website{overflow:hidden;width:500px;margin:150px auto;padding:30px;background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,0.3);-moz-box-shadow:0 1px 5px rgba(0,0,0,0.3);-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.3);border-top:3px solid #D72300;}
.website .one,.website .three{background:url(screw.gif) right no-repeat;height:53px; margin-bottom:30px;}
.website .one .logo{ width:150px; height:53px; float:left; padding-bottom:10px;}
.website .one .go{ width:340px; height:63px; float:left;padding-left:10px;}
.website .one .go dl dt,.website .three dl dt{color:#d32e4c;font:24px/26px '微软雅黑','华文细黑',Verdana,Geneva,sans-serif;}
.website .one .go dl dd,.website .three dl dd{color:#666;font-size:14px;word-wrap:break-word;word-break:break-all; line-height:37px;}
.website .two{padding:15px 10px 25px;}
.website .two dl dt{margin:10px 0;color:#666;font-size:16px; font-weight:600;}
.website .two dl dd{color:#999;font-size:14px;line-height:140%;}
.website .copy{border-top:1px dotted #ccc;color:#ccc;font:12px/20px 'Lucida Sans Unicode','Lucida Grande',Verdana,Geneva,sans-serif;text-align:center; padding-top:10px; font-family:Arial, Helvetica, sans-serif;}
.website .copy a{color:#ccc;}
.website .load{ width:200px; height:13px; margin:0 auto;}


猜你喜欢

推荐栏目

DEDECMS
DEDECMS

DEDE使用经验和技巧

WordPress
Wordpress

WP使用经验和技巧

Zblog
Zblog

Zblog使用经验和技巧

CSS
CSS

CSS使用经验和技巧

网络资料
网络资料

转载实用网络资料

按键伤人
按键伤人

转载乱七八糟的网络资源

我是酱油
我是酱油

随笔札记 记录生活点滴

本站推荐

百度站内搜索

专业博客主机