<!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. is not writable or has an invalid setter method错误的解决

    java中在配置spring时,遇到is not writable or has an invalid setter method的错误一般是命名方式的问题 需要写成private userInfoD ...

  2. Uni2D 入门 -- Asset Table

    转载 http://blog.csdn.net/kakashi8841/article/details/17686791 Uni2D生成了一个自定义的表格用于保存你资源的唯一ID的引用.这个表格用于更 ...

  3. VS2012/VS2013配色方案

    VS的配色方案下载地址 http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx 或者 http://studios ...

  4. Illegal access: this web application instance has been stopped already. could not load **

    启动tomcat的时候会报这样的错误: Illegal access: this web application instance has been stopped already.  could n ...

  5. ssh架构之hibernate(二)进阶学习

    1.JPA入门 JPA的认识:JPA全称Java Persistence API.JPA通过JDK 5.0注解或XML描述对象-关系表的映射关系,并将运行期的实体对象持久化到数据库中Java持久层AP ...

  6. 【翻译】View Frustum Culling --3 Clip Space Approach – Extracting the Planes

    3.使用裁剪空间的方法提取平面 上一篇中,我们讨论了通过几何的方法提取视锥体的六个片面.在这一篇中,我们继续讨论通过裁剪空间的方法来提取视锥体的平面. 假设现在在世界坐标系中有一点p=(x,yz,1) ...

  7. 求值器本质--eval&apply

    最近跟着(How to Write a (Lisp) Interpreter (in Python))使用python实现了一个简易的scheme解释器.不得不说使用python这类动态语言实现不要太 ...

  8. 基于.net开发chrome核心浏览器【一】(转)

    http://www.cnblogs.com/liulun/archive/2013/03/18/2874276.html 说明: 这是本系列的第一篇文章,我会尽快发后续的文章. 源起 1.加快葬送I ...

  9. java面试题:基础知识

    类和对象 Q:讲一下面向对象OOP思想. 面向对象主要是抽象,封装,继承,多态. 多态又分为重载和重写.重载主要是方法参数类型不一样,重写则是方法内容不一样. Q:抽象类和接口有什么区别? 抽象类中可 ...

  10. java 1.8

    rpm -qa|grep java (列出本机已安装的java,没有则没空)rpm -e --nodeps 文件名(上一步查到的文件名,一个一个复制过来卸载就好.) 下载java包 https://w ...