1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
  2.  
  3. Transitional//EN"
  4.  
  5. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
  6.  
  7. transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html;
  11.  
  12. charset=utf-8" />
  13. <script src="../jquery-1.11.2.min.js"></script>
  14. <title>无标题文档</title>
  15. <style type="text/css">
  16. *
  17. {
  18. padding:0px;
  19. margin:0px auto;
  20. font-family:微软雅黑;
  21. }
  22. .cd:hover
  23. {
  24. cursor:pointer;
  25. }
  26. </style>
  27. </head>
  28.  
  29. <body>
  30.  
  31. <div style="width:1300px">
  32.  
  33. <div id="top">
  34. <div id="topleft" style="width:600px;
  35.  
  36. float:left">
  37.  
  38. <?php
  39.  
  40. $code = $_GET["code"];
  41.  
  42. include("mydbda.php");
  43. $db = new mydbda();
  44.  
  45. $sql = "select Pic from
  46.  
  47. ChePic where CarCode = '{$code}'";
  48. $attr = $db->Select
  49.  
  50. ($sql,"CX","guazi");
  51.  
  52. $sqlcar = "select * from
  53.  
  54. carinfo where Code = '{$code}'";
  55. $attrcar = $db->Select
  56.  
  57. ($sqlcar,"CX","guazi");
  58.  
  59. ?>
  60.  
  61. <div style="width:600px; height:400px"><img
  62.  
  63. src="<?php echo $attr[0][0];?>" style="width:600px;
  64.  
  65. height:400px"/></div>
  66. <div style="width:600px; height:121px;
  67.  
  68. margin-top:10px">
  69. <?php
  70.  
  71. for($i=0;$i<count($attr);$i+
  72.  
  73. +)
  74. {
  75.  
  76. echo "<img src='{$attr[$i]
  77.  
  78. [0]}' style='width:90px; height:60px; margin-
  79.  
  80. left:5px;' />";
  81. }
  82. ?>
  83. </div>
  84. </div>
  85. <div id="topright" style="width:680px;
  86.  
  87. float:left; margin-left:20px">
  88. <div style="font-size:24px; font-weight:bold;
  89.  
  90. color:#333;"><?php echo $attrcar[0][1]?></div>
  91. <div style="margin:10px 0px 0px 0px; font-
  92.  
  93. size:12px;">车源号:<?php echo $attrcar[0][2] ?></div>
  94. <hr style="width:680px; margin:10px 10px 0px
  95.  
  96. 0px;" />
  97. <div style="height:41px; font-
  98.  
  99. size:12px"><span>车主报价:</span><span style="font-
  100.  
  101. size:36px; font-weight:bold; color:#ff7e00">¥<?php
  102.  
  103. echo $attrcar[0][3] ?></span><span>新车价(含税)
  104.  
  105. </span><span style="color:#ff7e00"><?php echo
  106.  
  107. $attrcar[0][4] ?></span><span>, 省</span><span
  108.  
  109. style="color:#ff7e00"><?php echo $attrcar[0][4]-
  110.  
  111. $attrcar[0][3] ?></span></div>
  112. <div style="font-size:12px; margin-top:10px">
  113.  
  114. 分期付款:首付<span style="color:#ff7e00">3.24万
  115.  
  116. </span> ,月供<span style="color:#ff7e00">1260元
  117.  
  118. </span></div>
  119. <div style="font-size:12px; margin-top:10px">
  120.  
  121. 服 务 费:3240元(车价x3%),送1年2万公里质保</div>
  122.  
  123. <div style="height:44px; width:540px; font-
  124.  
  125. size:12px; margin:10px 0px 0px 0px">
  126. <div style="width:135px; height:44px;
  127.  
  128. float:left;">
  129. <div style="font-size:16px; font-
  130.  
  131. weight:bold"><?php echo $attrcar[0][6] ?></div>
  132. <div>上牌时间</div>
  133. </div>
  134. <div style="width:135px;
  135.  
  136. height:44px;float:left">
  137. <div style="font-size:16px; font-
  138.  
  139. weight:bold"><?php echo $attrcar[0][7] ?></div>
  140. <div>里程</div>
  141. </div>
  142. <div style="width:135px;
  143.  
  144. height:44px;float:left">
  145. <div style="font-size:16px; font-
  146.  
  147. weight:bold"><?php
  148. if($attrcar[0][8]==0)
  149. {
  150. echo "手动";
  151. }
  152. else if($attrcar[0][8]==1)
  153. {
  154. echo "自动";
  155. }
  156. else
  157. {
  158. echo "手自一体";
  159. }
  160. ?></div>
  161. <div>变速箱</div>
  162. </div>
  163.  
  164. <div style="width:135px;
  165.  
  166. height:44px;float:left">
  167. <div style="font-size:16px; font-
  168.  
  169. weight:bold"><?php echo $attrcar[0][9] ?></div>
  170. <div>排放标准</div>
  171. </div>
  172.  
  173. </div>
  174.  
  175. <div style="margin-top:10px">
  176. <div style="width:115px; height:48px;
  177.  
  178. float:left; background-color:#fd8000; text-
  179.  
  180. align:center; line-height:48px; vertical-
  181.  
  182. align:middle; color:white; font-size:18px;">预约看车
  183.  
  184. </div>
  185. <div style="width:115px; height:48px;
  186.  
  187. float:left; background-color:#fd8000; text-
  188.  
  189. align:center; line-height:48px; vertical-
  190.  
  191. align:middle; color:white; font-size:18px;margin-
  192.  
  193. left:10px">预约看车</div>
  194. </div>
  195.  
  196. <div style="clear:both"></div>
  197.  
  198. <div style="margin-top:10px; font-
  199.  
  200. size:18px;"> <span style="color:#fd8000">看车电话:
  201.  
  202. </span> <span style=" font-weight:bold"><?php echo
  203.  
  204. $attrcar[0][10] ?></span></div>
  205.  
  206. </div>
  207.  
  208. </div>
  209.  
  210. <div style="clear:both"></div>
  211.  
  212. <div style="width:100%; height:48px; border:solid 1px
  213.  
  214. #ddd; color:#666;font-size:16px;">
  215. <div class="cd" bs="jbxx" style="width:125px;
  216.  
  217. height:46px; background-color:#22ac38; float:left;
  218.  
  219. border:solid 1px #ddd; color:white; text-
  220.  
  221. align:center; line-height:46px; vertical-align:middle
  222.  
  223. ">基本信息
  224. </div>
  225.  
  226. <div class="cd" bs="cltp" style="width:125px;
  227.  
  228. height:46px; background-color:#FFF; float:left;
  229.  
  230. border:solid 1px #ddd; color:#666; text-align:center;
  231.  
  232. line-height:46px; vertical-align:middle ">车辆图片
  233. </div>
  234.  
  235. <div class="cd" bs="jcbg" style="width:125px;
  236.  
  237. height:46px; background-color:#FFF; float:left;
  238.  
  239. border:solid 1px #ddd; color:#666; text-align:center;
  240.  
  241. line-height:46px; vertical-align:middle ">检测报告
  242. </div>
  243.  
  244. <div class="cd" bs="pzcs" style="width:125px;
  245.  
  246. height:46px; background-color:#FFF; float:left;
  247.  
  248. border:solid 1px #ddd; color:#666; text-align:center;
  249.  
  250. line-height:46px; vertical-align:middle ">配置参数
  251. </div>
  252.  
  253. </div>
  254.  
  255. <!--基本信息-->
  256. <div class="xq" id="jbxx" style="width:100%;
  257.  
  258. display:block">
  259. <div style=" margin-top:10px;font-size:16px;
  260.  
  261. color:#666; font-weight:bold">
  262. <div style="background-color:#22ac38;
  263.  
  264. height:16px; width:4px;float:left; margin-
  265.  
  266. right:5px;"></div>
  267. 基本信息</div>
  268.  
  269. <div style="width:100%; font-size:14px;margin-
  270.  
  271. top:20px">
  272. <div style="width:220px; height:24px;
  273.  
  274. float:left;margin-right:30px">车主: 王先生| 职员| 顺
  275.  
  276. </div>
  277. <div style="width:200px;
  278.  
  279. height:24px;float:left;margin-right:30px">年检到期:
  280.  
  281. 2017-10</div>
  282. <div style="width:200px;
  283.  
  284. height:24px;float:left;margin-right:30px">交强险到期:
  285.  
  286. 2016-10</div>
  287. <div style="width:200px;
  288.  
  289. height:24px;float:left;margin-right:30px">商业险到期:
  290.  
  291. 2016-10</div>
  292. <div style="width:200px;
  293.  
  294. height:24px;float:left;margin-right:30px">过户次数:
  295.  
  296. 2016-10</div>
  297.  
  298. </div>
  299. <div style="clear:both"></div>
  300.  
  301. <div style="width:100%; height:80px; background-
  302.  
  303. color:#f9f9f9;border:solid 1px #ddd; margin-top:10px;
  304.  
  305. word-wrap:break-word; word-break:break-all;font-
  306.  
  307. size:14px; padding:15px 0px 15px 15px;">还拉黑的卡拉哈
  308.  
  309. 里还法拉赫客户</div>
  310.  
  311. </div>
  312.  
  313. <!--车辆图片-->
  314. <div class="xq" id="cltp" style="width:100%;
  315.  
  316. display:none">
  317. <div style=" margin-top:10px;font-size:16px;
  318.  
  319. color:#666; font-weight:bold">
  320. <div style="background-color:#22ac38;
  321.  
  322. height:16px; width:4px;float:left; margin-
  323.  
  324. right:5px;"></div>
  325. 车辆图片</div>
  326. <?php
  327.  
  328. for($i=0;$i<count($attr);$i+
  329.  
  330. +)
  331. {
  332.  
  333. echo "<img src='{$attr[$i]
  334.  
  335. [0]}' style='width:580px; height:400px;
  336.  
  337. margin:10px;'/>";
  338. }
  339. ?>
  340.  
  341. </div>
  342.  
  343. <!--检测报告-->
  344. <div class="xq" id="jcbg" style="width:100%;
  345.  
  346. height:500px; background-color:#63C;
  347.  
  348. display:none"></div>
  349.  
  350. <!--配置参数-->
  351. <div class="xq" id="pzcs" style="width:100%;
  352.  
  353. height:500px; background-color:#FC0; display:none">
  354. </div>
  355.  
  356. </div>
  357.  
  358. <script type="text/javascript">
  359. $(document).ready(function(e) {
  360.  
  361. $(".cd").click(function(){
  362. //所有DIV背景变白,字体变灰色
  363. $(".cd").css("background-
  364.  
  365. color","#FFF");
  366. $(".cd").css("color","#666");
  367. //自己变绿,字体变白
  368. $(this).css("background-
  369.  
  370. color","#22ac38");
  371. $(this).css("color","#FFF");
  372.  
  373. //控制详情显示
  374. var id = $(this).attr("bs");
  375. $(".xq").css
  376.  
  377. ("display","none");
  378. $("#"+id).css
  379.  
  380. ("display","block");
  381.  
  382. //添加一个自定义属性
  383. $(".cd").removeAttr("xz");
  384. $(this).attr("xz","1");
  385.  
  386. })
  387.  
  388. $(".cd").mouseover(function(){
  389.  
  390. //自己变绿,字体变白
  391. $(this).css("background-
  392.  
  393. color","#22ac38");
  394. $(this).css("color","#FFF");
  395.  
  396. })
  397.  
  398. $(".cd").mouseout(function(){
  399.  
  400. if($(this).attr("xz") == "1")
  401. {
  402. }
  403. else
  404. {
  405. //变回原形
  406. $(this).css("background-
  407.  
  408. color","#FFF");
  409. $(this).css("color","#666");
  410. }
  411.  
  412. })
  413.  
  414. });
  415. </script>
  416. </body>
  417. </html>
  1. <?php
  2. class mydbda
  3. {
  4. var $host = "localhost";
  5. var $username = "root";
  6. var $password = "123";
  7. var $database = "mydb";
  8.  
  9. /**
  10. 功能:执行SQL语句,返回结果
  11. 参数:$sql:要执行的SQL语句
  12. $type:SQL语句的类型
  13.  
  14. ,CX代表查询,QT代表其他
  15. $data:要操作的数据库
  16. 返回值:如果是查询,返回结果集
  17. 如果是其他语句,执行
  18.  
  19. 成功返回OK,失败返回NO
  20. */
  21. function Select($sql,$type,$data)
  22. {
  23.  
  24. //1.造连接对象
  25. $db = new mysqli($this-
  26.  
  27. >host,$this->username,$this->password,$data);
  28.  
  29. //2.判断是否连接成功
  30. if(mysqli_connect_error())
  31. {
  32. echo "连接失败";
  33.  
  34. //退出整个程序
  35. exit;
  36. }
  37. else
  38. {
  39. //4.执行SQL语句
  40.  
  41. $result = $db->query
  42.  
  43. ($sql);
  44.  
  45. if($type == "CX")
  46. {
  47. return
  48.  
  49. $result->fetch_all();
  50. }
  51. else
  52. {
  53. if($result)
  54. {
  55.  
  56. return "OK";
  57. }
  58. else
  59. {
  60.  
  61. return "NO";
  62. }
  63. }
  64.  
  65. }
  66. }
  67.  
  68. }
  69. ?>

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. C# 图像处理:将图像(24位真彩)转为 8位灰度图像 采用了内存法,大大提高了效率

    /// <summary> /// 将源图像灰度化,并转化为8位灰度图像. /// </summary> /// <param name="original&q ...

  2. C# 反射获取所有视图

    原地址:忘了 controller 的 action 加上属性 [System.ComponentModel.Description("菜单列表")]  且  返回值为 Syste ...

  3. 吴裕雄 python 机器学习-NBYS(2)

    import matplotlib import numpy as np import matplotlib.pyplot as plt n = 1000 xcord0 = [] ycord0 = [ ...

  4. Redis Cluster在线迁移

    由于之前的redis cluster物理硬件性能不足.决定升级到更好的服务器上.考虑到redis是核心生产数据库,决定在线迁移,迁移过程,不中断服务. 下面是测试环境的完成迁移步骤:1. 原环境(测试 ...

  5. OpenCV批量读入(处理)

    #include <windows.h> #include <iostream> #include <opencv2/opencv.hpp> using names ...

  6. kdump内核

    什么是kdump?   kdump 是一种先进的基于 kexec 的内核崩溃转储机制.当系统崩溃时,kdump 使用 kexec 启动到第二个内核.第二个内核通常叫做捕获内核,以很小内存启动以捕获转储 ...

  7. webpack 学习

    ·1.https://www.2cto.com/kf/201711/696035.html 2. http://blog.csdn.net/x550392236/article/details/784 ...

  8. skinned mesh render

    [skinned mesh render] 相比MeshRender组件 ,SkinnedMeshRender多了bones组件.所以很明显,MeshRender不支持骨骼动画,而SkinnnedMe ...

  9. uuid生成工具类

    public class UUIDTool { public static String getUUID() { return UUID.randomUUID().toString().replace ...

  10. CentOS 下环境变量

    1. 显示环境变量HOME(不要把一个#号输进去了,#代表用户名) # echo #HOME /home/redbooks 2. 设置一个新的环境变量hello # export HELLO=&quo ...