网页 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>
<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 动态师范的更多相关文章
- Web网页中动态数据区域的识别与抽取 Dynamical Data Regions Identification and Extraction in Web Pages
Web网页中动态数据区域的识别与抽取 Dynamical Data Regions Identification and Extraction in Web Pages Web网页中动态数据区域的识别 ...
- 静态网页VS动态网页
干<沙朗新闻发布系统>什么时候.我们已经建立的网页.html的,并且.aspx,第一次接触.我认为这些东西是一样的,因为它,在观看ASP.NET视频的时候.听见里面讲课的老师有提到了这两样 ...
- 网页特效-动态加载JavaScript
描述: 把一些逻辑独立的JavaScript脚本文件单独加载,是一种常见的JavaScript动态加载技术.可以减少不必要的JavaScript脚本文件的加载,以提高网页浏览速度 代码: <!D ...
- 如何用phpcms将静态网页生成动态网页?
在前两篇随笔中已经简单介绍了phpcms,那么现在让我们来看一下如何用phpcms将静态网页生成动态网页? 1.在templates文件夹下新建模板文件夹ceshi(名字可以自己随笔起) 2.在ces ...
- 网页中动态嵌入PDF文件/在线预览PDF内容https://www.cnblogs.com/xgyy/p/6119459.html
#网页中动态嵌入PDF文件/在线预览PDF内容# 摘要:在web开发时我们有时会需要在线预览PDF内容,在线嵌入pdf文件: 问题1:如何网页中嵌入PDF: 在网页中: 常用的几种PDF预览代码片段如 ...
- Python动态网页爬虫-----动态网页真实地址破解原理
参考链接:Python动态网页爬虫-----动态网页真实地址破解原理
- ASP.NET中Literal控件的使用方法(用于向网页中动态添加内容)
原文:https://www.jb51.net/article/82855.htm 可以将 Literal 控件用作网页上其他内容的容器.Literal 控件最常用于向网页中动态添加内容.简单的讲,就 ...
- #网页中动态嵌入PDF文件/在线预览PDF内容#
摘要:在web开发时我们有时会需要在线预览PDF内容,在线嵌入pdf文件: 问题1:如何网页中嵌入PDF: 在网页中: 常用的几种PDF预览代码片段如下: 代码片段1: 1 <object ty ...
- 静态网页、动态网页、apache和tomcat之间区别和联系
1.静态网页 静态网页:在网站设计中, 纯粹的HTML(标准通用标志语言下的一个应用)格式的网页通常被称为"静态网页",静态网页是标准的HTML文件,它的拓拓展名是.html或者. ...
随机推荐
- CMake Error at cmake/OpenCVModule.cmake:295 (message): No extra modules found in folder:Please provide path to 'opencv_contrib/modules' folder
其实,我们使用的opencv中要用的contrib/modules 是需要额外下载并在cmakelists.txt中指定的 git clone https://github.com/opencv/ ...
- Java中String的intern方法,javap&cfr.jar反编译,javap反编译后二进制指令代码详解,Java8常量池的位置
一个例子 public class TestString{ public static void main(String[] args){ String a = "a"; Stri ...
- HTML 设置字体
HTML,CSS,font-family:中文字体的英文名称 (宋体 微软雅黑) 宋体 SimSun 黑体 SimHei 微软雅黑 Microsoft YaHei 微软正黑体 Microsof ...
- rectangle,boundingRect和Rect
rectangle( rook_image, Point( , *w/8.0 ), Point( w, w), Scalar( , , ), , ); 矩形将被画到图像 rook_image 上 矩形 ...
- express 中间件
[express 中间件] 中间件(Middleware) 是一个函数,它可以访问请求对象(request object (req)), 响应对象(response object (res)), 和 ...
- ssh远程端口转发
当ssh的连接方向和应用连接的方向不一致时,这就称为ssh远程转发. 主机3是一台web server 应用请求是主机2到主机1 ssh请求是主机1到主机2 主机2开启ssh服务 service ss ...
- python reload(sys) 后无法输出
重新加载sys后,在idle里无法输出内容.出现这种情况,需要将sys的三个变量重新定义. 在重新载入sys之前,为三个变量赋值 a,b,c = sys.studin,sys.studout,sys. ...
- ffmpeg编码中的二阻塞一延迟
1. avformat_find_stream_info接口延迟 不论是减少预读的数据量,还是设置flag不写缓存,我这边都不实用,前者有风险,后者会丢帧,可能我还没找到好姿势,记录在此,参考:htt ...
- NumPy 算术函数
NumPy 算术函数 NumPy 算术函数包含简单的加减乘除: add(),subtract(),multiply() 和 divide(). 需要注意的是数组必须具有相同的形状或符合数组广播规则. ...
- C# 关于委托
例如: public class test:Form { //定义委托 public delegate void GetSql(string sql); //定义装载委托的属性 public GetS ...