网页 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或者. ...
随机推荐
- C++ MFC常用函数(转)
WinExec() ExitWindowsEx() GlobalMemoryStatus() GetSystemInfo() GetSystemDirectory() GetWindowsDirect ...
- java程序员到底该不该了解一点算法(一个简单的递归计算斐波那契数列的案例说明算法对程序的重要性)
为什么说 “算法是程序的灵魂这句话一点也不为过”,递归计算斐波那契数列的第50项是多少? 方案一:只是单纯的使用递归,递归的那个方法被执行了250多亿次,耗时1分钟还要多. 方案二:用一个map去存储 ...
- Oracle Oracle数据库 迁移到 SQL Server上
原地址:https://blog.csdn.net/LongtengGensSupreme/article/details/81355181
- 30种提高mysql处理速度的方法
1.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描. 2.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉 ...
- 新闻推荐系统:基于内容的推荐算法(Recommender System:Content-based Recommendation)
https://blog.csdn.net/qq_32690999/article/details/77434381 因为开发了一个新闻推荐系统的模块,在推荐算法这一块涉及到了基于内容的推荐算法(Co ...
- CSS 盒子大小
盒子的宽和高 盒子的大小通过宽和高来指定. 默认情况下,盒子的大小刚好容纳其中的内容. 两个属性设置盒子的宽和高 width 设置宽 height 设置高 示例: 1 2 3 4 5 6 7 8 9 ...
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.
https://blog.csdn.net/watermusicyes/article/details/44963773 Context中有一个startActivity方法,Activity继承自C ...
- Jmeter(二十五)常见问题(转载)
转载自 http://www.cnblogs.com/yangxia-test 收集工作中JMeter遇到的各种问题 1. JMeter的工作原理是什么? 向服务器提交请求:从服务器取回请求返回 ...
- maven开发工具安装
Maven安装并测试步骤: 1.下载并解压meaven.zip: 2.配置环境变量“M2_HOME”指向meaven安装目录: 3.添加“%M2_HOME%\bin;”到path环境变量中: 4.测试 ...
- Android设置ScrollView回到顶部的三种方式 (转)
一.ScrollView.scrollTo(0,0) 直接置顶,瞬间回到顶部,没有滚动过程,其中Y值可以设置为大于0的值,使Scrollview停在指定位置; 二.ScrollView.fullSc ...