<!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="text/html; charset=utf-8" />
<script src="../jquery-1.11.2.min.js"></script>
<title>无标题文档</title>
<style type="text/css">
*
{
padding:0px;
margin:0px auto;
font-family:微软雅黑;
}
.cd:hover
{
cursor:pointer;
}
</style>
</head> <body> <div style="width:1300px"> <div id="top">
<div id="topleft" style="width:600px; float:left"> <?php $code = $_GET["code"]; include("mydbda.php");
$db = new mydbda(); $sql = "select Pic from ChePic where CarCode = '{$code}'";
$attr = $db->Select ($sql,"CX","guazi"); $sqlcar = "select * from carinfo where Code = '{$code}'";
$attrcar = $db->Select ($sqlcar,"CX","guazi"); ?> <div style="width:600px; height:400px"><img src="<?php echo $attr[0][0];?>" style="width:600px; height:400px"/></div>
<div style="width:600px; height:121px; margin-top:10px">
<?php for($i=0;$i<count($attr);$i+ +)
{ echo "<img src='{$attr[$i] [0]}' style='width:90px; height:60px; margin- left:5px;' />";
}
?>
</div>
</div>
<div id="topright" style="width:680px; float:left; margin-left:20px">
<div style="font-size:24px; font-weight:bold; color:#333;"><?php echo $attrcar[0][1]?></div>
<div style="margin:10px 0px 0px 0px; font- size:12px;">车源号:<?php echo $attrcar[0][2] ?></div>
<hr style="width:680px; margin:10px 10px 0px 0px;" />
<div style="height:41px; font- size:12px"><span>车主报价:</span><span style="font- size:36px; font-weight:bold; color:#ff7e00">¥<?php echo $attrcar[0][3] ?>万</span><span>新车价(含税) </span><span style="color:#ff7e00"><?php echo $attrcar[0][4] ?>万</span><span>, 省</span><span style="color:#ff7e00"><?php echo $attrcar[0][4]- $attrcar[0][3] ?>万</span></div>
<div style="font-size:12px; margin-top:10px"> 分期付款:首付<span style="color:#ff7e00">3.24万 </span> ,月供<span style="color:#ff7e00">1260元 </span></div>
<div style="font-size:12px; margin-top:10px"> 服 务 费:3240元(车价x3%),送1年2万公里质保</div> <div style="height:44px; width:540px; font- size:12px; margin:10px 0px 0px 0px">
<div style="width:135px; height:44px; float:left;">
<div style="font-size:16px; font- weight:bold"><?php echo $attrcar[0][6] ?></div>
<div>上牌时间</div>
</div>
<div style="width:135px; height:44px;float:left">
<div style="font-size:16px; font- weight:bold"><?php echo $attrcar[0][7] ?></div>
<div>里程</div>
</div>
<div style="width:135px; height:44px;float:left">
<div style="font-size:16px; font- weight:bold"><?php
if($attrcar[0][8]==0)
{
echo "手动";
}
else if($attrcar[0][8]==1)
{
echo "自动";
}
else
{
echo "手自一体";
}
?></div>
<div>变速箱</div>
</div> <div style="width:135px; height:44px;float:left">
<div style="font-size:16px; font- weight:bold"><?php echo $attrcar[0][9] ?></div>
<div>排放标准</div>
</div> </div> <div style="margin-top:10px">
<div style="width:115px; height:48px; float:left; background-color:#fd8000; text- align:center; line-height:48px; vertical- align:middle; color:white; font-size:18px;">预约看车 </div>
<div style="width:115px; height:48px; float:left; background-color:#fd8000; text- align:center; line-height:48px; vertical- align:middle; color:white; font-size:18px;margin- left:10px">预约看车</div>
</div> <div style="clear:both"></div> <div style="margin-top:10px; font- size:18px;"> <span style="color:#fd8000">看车电话: </span> <span style=" font-weight:bold"><?php echo $attrcar[0][10] ?></span></div> </div> </div> <div style="clear:both"></div> <div style="width:100%; height:48px; border:solid 1px #ddd; color:#666;font-size:16px;">
<div class="cd" bs="jbxx" style="width:125px; height:46px; background-color:#22ac38; float:left; border:solid 1px #ddd; color:white; text- align:center; line-height:46px; vertical-align:middle ">基本信息
</div> <div class="cd" bs="cltp" style="width:125px; height:46px; background-color:#FFF; float:left; border:solid 1px #ddd; color:#666; text-align:center; line-height:46px; vertical-align:middle ">车辆图片
</div> <div class="cd" bs="jcbg" style="width:125px; height:46px; background-color:#FFF; float:left; border:solid 1px #ddd; color:#666; text-align:center; line-height:46px; vertical-align:middle ">检测报告
</div> <div class="cd" bs="pzcs" style="width:125px; height:46px; background-color:#FFF; float:left; border:solid 1px #ddd; color:#666; text-align:center; line-height:46px; vertical-align:middle ">配置参数
</div> </div> <!--基本信息-->
<div class="xq" id="jbxx" style="width:100%; display:block">
<div style=" margin-top:10px;font-size:16px; color:#666; font-weight:bold">
<div style="background-color:#22ac38; height:16px; width:4px;float:left; margin- right:5px;"></div>
基本信息</div> <div style="width:100%; font-size:14px;margin- top:20px">
<div style="width:220px; height:24px; float:left;margin-right:30px">车主: 王先生| 职员| 顺 义</div>
<div style="width:200px; height:24px;float:left;margin-right:30px">年检到期: 2017-10</div>
<div style="width:200px; height:24px;float:left;margin-right:30px">交强险到期: 2016-10</div>
<div style="width:200px; height:24px;float:left;margin-right:30px">商业险到期: 2016-10</div>
<div style="width:200px; height:24px;float:left;margin-right:30px">过户次数: 2016-10</div> </div>
<div style="clear:both"></div> <div style="width:100%; height:80px; background- color:#f9f9f9;border:solid 1px #ddd; margin-top:10px; word-wrap:break-word; word-break:break-all;font- size:14px; padding:15px 0px 15px 15px;">还拉黑的卡拉哈 里还法拉赫客户</div> </div> <!--车辆图片-->
<div class="xq" id="cltp" style="width:100%; display:none">
<div style=" margin-top:10px;font-size:16px; color:#666; font-weight:bold">
<div style="background-color:#22ac38; height:16px; width:4px;float:left; margin- right:5px;"></div>
车辆图片</div>
<?php for($i=0;$i<count($attr);$i+ +)
{ echo "<img src='{$attr[$i] [0]}' style='width:580px; height:400px; margin:10px;'/>";
}
?> </div> <!--检测报告-->
<div class="xq" id="jcbg" style="width:100%; height:500px; background-color:#63C; display:none"></div> <!--配置参数-->
<div class="xq" id="pzcs" style="width:100%; height:500px; background-color:#FC0; display:none">
</div> </div> <script type="text/javascript">
$(document).ready(function(e) { $(".cd").click(function(){
//所有DIV背景变白,字体变灰色
$(".cd").css("background- color","#FFF");
$(".cd").css("color","#666");
//自己变绿,字体变白
$(this).css("background- color","#22ac38");
$(this).css("color","#FFF"); //控制详情显示
var id = $(this).attr("bs");
$(".xq").css ("display","none");
$("#"+id).css ("display","block"); //添加一个自定义属性
$(".cd").removeAttr("xz");
$(this).attr("xz","1"); }) $(".cd").mouseover(function(){ //自己变绿,字体变白
$(this).css("background- color","#22ac38");
$(this).css("color","#FFF"); }) $(".cd").mouseout(function(){ if($(this).attr("xz") == "1")
{
}
else
{
//变回原形
$(this).css("background- color","#FFF");
$(this).css("color","#666");
} }) });
</script>
</body>
</html>
<?php
class mydbda
{
var $host = "localhost";
var $username = "root";
var $password = "123";
var $database = "mydb"; /**
功能:执行SQL语句,返回结果
参数:$sql:要执行的SQL语句
$type:SQL语句的类型 ,CX代表查询,QT代表其他
$data:要操作的数据库
返回值:如果是查询,返回结果集
如果是其他语句,执行 成功返回OK,失败返回NO
*/
function Select($sql,$type,$data)
{ //1.造连接对象
$db = new mysqli($this- >host,$this->username,$this->password,$data); //2.判断是否连接成功
if(mysqli_connect_error())
{
echo "连接失败"; //退出整个程序
exit;
}
else
{
//4.执行SQL语句 $result = $db->query ($sql); if($type == "CX")
{
return $result->fetch_all();
}
else
{
if($result)
{ return "OK";
}
else
{ return "NO";
}
} }
} }
?>

mydbda

网页 PHP 动态师范的更多相关文章

  1. Web网页中动态数据区域的识别与抽取 Dynamical Data Regions Identification and Extraction in Web Pages

    Web网页中动态数据区域的识别与抽取 Dynamical Data Regions Identification and Extraction in Web Pages Web网页中动态数据区域的识别 ...

  2. 静态网页VS动态网页

    干<沙朗新闻发布系统>什么时候.我们已经建立的网页.html的,并且.aspx,第一次接触.我认为这些东西是一样的,因为它,在观看ASP.NET视频的时候.听见里面讲课的老师有提到了这两样 ...

  3. 网页特效-动态加载JavaScript

    描述: 把一些逻辑独立的JavaScript脚本文件单独加载,是一种常见的JavaScript动态加载技术.可以减少不必要的JavaScript脚本文件的加载,以提高网页浏览速度 代码: <!D ...

  4. 如何用phpcms将静态网页生成动态网页?

    在前两篇随笔中已经简单介绍了phpcms,那么现在让我们来看一下如何用phpcms将静态网页生成动态网页? 1.在templates文件夹下新建模板文件夹ceshi(名字可以自己随笔起) 2.在ces ...

  5. 网页中动态嵌入PDF文件/在线预览PDF内容https://www.cnblogs.com/xgyy/p/6119459.html

    #网页中动态嵌入PDF文件/在线预览PDF内容# 摘要:在web开发时我们有时会需要在线预览PDF内容,在线嵌入pdf文件: 问题1:如何网页中嵌入PDF: 在网页中: 常用的几种PDF预览代码片段如 ...

  6. Python动态网页爬虫-----动态网页真实地址破解原理

    参考链接:Python动态网页爬虫-----动态网页真实地址破解原理

  7. ASP.NET中Literal控件的使用方法(用于向网页中动态添加内容)

    原文:https://www.jb51.net/article/82855.htm 可以将 Literal 控件用作网页上其他内容的容器.Literal 控件最常用于向网页中动态添加内容.简单的讲,就 ...

  8. #网页中动态嵌入PDF文件/在线预览PDF内容#

    摘要:在web开发时我们有时会需要在线预览PDF内容,在线嵌入pdf文件: 问题1:如何网页中嵌入PDF: 在网页中: 常用的几种PDF预览代码片段如下: 代码片段1: 1 <object ty ...

  9. 静态网页、动态网页、apache和tomcat之间区别和联系

    1.静态网页 静态网页:在网站设计中, 纯粹的HTML(标准通用标志语言下的一个应用)格式的网页通常被称为"静态网页",静态网页是标准的HTML文件,它的拓拓展名是.html或者. ...

随机推荐

  1. Unity3d资源管理分析

    原创链接:http://blog.csdn.net/ox_thedarkness/article/details/9197453 分离资源管理 参考 1.Unity3D占用内存太大的解决方法 - 星尘 ...

  2. 一,Serializer和ModelSerializer

    1.REST Framework概述 Django REST framework是一套基于Django的REST框架,是一个用于构建Web API的功能强大且灵活的工具包. RESTful 简述 Re ...

  3. web前端面试题整理

    1.在浏览器解析原理?2.ES5 的Object.defineProperties3.css3新属性的优势?4.vue 的computed和method的区别5.html5 的十个新特性6.web s ...

  4. Python 测试

    (1)import doctest doctest.testmod(verbose=True) (2) pip install tests

  5. Nodejs this详解

    [Nodejs this详解] Nodejs中, 文件层this,指向的是module.export. 函数层this,指向的是global对象. 参考:http://www.jb51.net/art ...

  6. python pbr 打包

    在之前学习stevedore时,在setup.py中使用setuptools打包发布了代码,然后调用代码中的实例化对象.参考我的文章 https://www.cnblogs.com/CaesarLin ...

  7. Linux 学习总结(二)

    一.用户与用户组管理 1.添加用户 useradd 选项 用户名 -c 指定一段注释性描述 -d 目录,指定用户目录,若目录不存在,-m 选项可以创建目录 -g 指定用户所属用户组 -s 指定用户登陆 ...

  8. windows 查询端口占用 杀掉进程

    参考 https://www.cnblogs.com/lynn-li/p/6077993.html netstat -ano | findstr "8001" taskkill / ...

  9. layui复选框

    效果图 layui复选框,一个主的复选框控制多个从复选框,主复选框和从复选框的颜色不一样 layui复选框的样式,都是在选然后才会有的,所以直接通过css设置就实现不了了.只可以通过js动态设置 ht ...

  10. 58. Length of Last Word (String)

    Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the l ...