Advertisement
robertohozza

Untitled

Mar 11th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.27 KB | None | 0 0
  1. <?php
  2.  
  3. header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
  4. header("Cache-Control: post-check=0, pre-check=0", false);
  5. header("Pragma: no-cache");
  6. ?>
  7. <!DOCTYPE html>
  8.  
  9. <html lang="en">
  10.  
  11. <head>
  12.  
  13. <!-- meta -->
  14.  
  15. <meta charset="utf-8">
  16.  
  17. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  18.  
  19. <meta name="description" content="">
  20.  
  21. <meta name="author" content="">
  22.  
  23. <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
  24. <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
  25. <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
  26.  
  27.  
  28.  
  29. <!--title-->
  30. <?php
  31. error_reporting(0);
  32. $link = mysql_connect('sql15.dnsserver.eu', 'db86579xplush', 'Plush2018');
  33. if (!$link) {
  34. die('Could not connect: ' . mysql_error());
  35. }
  36. if (!mysql_select_db('db86579xplush', $link)) {
  37. die('Could not select database: ' . mysql_error());
  38. }
  39.  
  40. $id = $_GET["id"];
  41.  
  42. if(isset($id))
  43. {
  44.  
  45. $result = mysql_query('SELECT* FROM `auta` WHERE `id` = '.$id.' LIMIT 2');
  46. if (!$result) {
  47. die('Could not query:' . mysql_error());
  48. }
  49.  
  50. while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
  51.  
  52. ?>
  53.  
  54. <title><?php echo $row[1]; ?></title>
  55.  
  56.  
  57.  
  58. <!--CSS-->
  59.  
  60. <link href="css/bootstrap.min.css" rel="stylesheet">
  61.  
  62. <link href="css/font-awesome.min.css" rel="stylesheet">
  63.  
  64. <link href="css/owl.carousel.css" rel="stylesheet">
  65.  
  66. <link href="css/owl.transitions.css" rel="stylesheet">
  67.  
  68. <link href="css/prettyPhoto.css" rel="stylesheet">
  69.  
  70. <link href="css/main.css" rel="stylesheet">
  71.  
  72. <link id="css-preset" href="css/presets/preset1.css" rel="stylesheet">
  73.  
  74. <link href="css/responsive.css" rel="stylesheet">
  75. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
  76.  
  77.  
  78.  
  79. <!--Google Fonts-->
  80.  
  81. <link href="https://fonts.googleapis.com/css?family=Audiowide" rel="stylesheet">
  82.  
  83. <!--[if lt IE 9]>
  84.  
  85. <script src="js/html5shiv.js"></script>
  86.  
  87. <script src="js/respond.min.js"></script>
  88.  
  89. <![endif]-->
  90. <style type="text/css">
  91. body, li, p, a, h1, h2, h3, h4, h5, h6, span.quote, i, cite, em, var, address, dfn, .list-group-item
  92.  
  93. {
  94.  
  95. font-family: 'Audiowide', cursive;
  96.  
  97. }
  98.  
  99. </style>
  100.  
  101. <link rel="shortcut icon" href="images/ico/favicon.png">
  102.  
  103. <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
  104.  
  105. <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
  106.  
  107. <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
  108.  
  109. <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
  110.  
  111. </head><!--/head-->
  112.  
  113. <body>
  114.  
  115. <?php include("include/header.php"); ?>
  116.  
  117.  
  118. <div id="main-blog" style="color:#FFF; background-image:url(images/slider/default/1bg.jpg)">
  119.  
  120. <div class="container padding-top">
  121.  
  122. <div class="row section-title text-center">
  123.  
  124. <div class="col-sm-8 col-sm-offset-2">
  125.  
  126. <h1 style="text-shadow: 1px 1px 4px #FF2626;"><?php echo $row[1]; ?></h1>
  127.  
  128. <h2 style="text-shadow: 2px 2px 4px #000; font-size: 5em;"><?php echo $row[2]; ?></h2>
  129.  
  130. </div>
  131.  
  132. </div>
  133.  
  134. <div class="row">
  135.  
  136. <div id="sidebar" class="col-md-4">
  137.  
  138. <div class="widget-area">
  139.  
  140.  
  141.  
  142. <div class="widget" style="background-color:#999; background-image:url(images/metal-bgr.jpg);">
  143.  
  144. <h3 class="widget_title" style="text-shadow: 2px 2px 4px #fff;"><?php echo $row[1]; ?></h3>
  145.  
  146. <div class="latest-posts">
  147. <?php
  148.  
  149. $result2 = mysql_query('SELECT* FROM `fotogalery` WHERE `id_auta` = '.$id.' ORDER BY id_foto ASC LIMIT 1');
  150. if (!$result2) {
  151. die('Could not query:' . mysql_error());
  152. }
  153.  
  154.  
  155. while ($row2 = mysql_fetch_array($result2, MYSQL_NUM)) {
  156.  
  157.  
  158.  
  159. // echo"<strong>ID</strong>:".$row[0];
  160. // echo"<strong>ID auta</strong>:".$row[1];
  161. // echo" - <strong>cesta</strong>:".$row[2]."<br>";
  162. echo"
  163. <a class=\"thumbnail\" href=\"#\" data-image-id=\"1\" data-toggle=\"modal\" data-title=\"\" data-caption=\"\" data-image=\"watermark.php?image=http://plush-auto.sk/new/admin-img/".$row2[2]."&amp;watermark=http://plush-auto.sk/new/images/logo3.png\" data-target=\"#image-gallery\">
  164. <img src=\"watermark.php?image=http://plush-auto.sk/new/admin-img/".$row2[2]."&amp;watermark=http://plush-auto.sk/new/images/logo3.png\" alt=\"\" /></a>
  165.  
  166. <div class=\"modal fade\" id=\"image-gallery\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">
  167. <div class=\"modal-dialog\">
  168. <div class=\"modal-content\">
  169. <div class=\"modal-header\">
  170. <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>
  171. <h4 class=\"modal-title\" id=\"image-gallery-title\"></h4>
  172. </div>
  173. <div class=\"modal-body\">
  174. <img id=\"image-gallery-image\" class=\"img-responsive\" src=\"\">
  175. </div>
  176. <div class=\"modal-footer\">
  177.  
  178. <div class=\"col-md-2\">
  179. <button type=\"button\" class=\"btn btn-primary\" id=\"show-previous-image\">Predošlá</button>
  180. </div>
  181.  
  182. <div class=\"col-md-8 text-justify\" id=\"image-gallery-caption\">
  183.  
  184. </div>
  185.  
  186. <div class=\"col-md-2\">
  187. <button type=\"button\" id=\"show-next-image\" class=\"btn btn-default\">Ďalšia</button>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193.  
  194. <br />";
  195.  
  196.  
  197. }
  198.  
  199.  
  200. ?>
  201.  
  202. </div>
  203.  
  204. </div>
  205. </div>
  206.  
  207. </div> <!--/Sidebar-->
  208.  
  209.  
  210.  
  211. <div id="content" class="site-content col-md-8">
  212.  
  213. <?php
  214.  
  215.  
  216.  
  217. echo"<div class=\"post\" style=\"background-color:#999; background-image:url(images/metal-bgr.jpg); padding: 7px;\">
  218.  
  219.  
  220.  
  221. <div class=\"entry-summary\" style=\"text-shadow: 2px 2px 4px #000;\">
  222.  
  223. <p><strong>Technické údaje:</strong> ".$row[3]."</p>
  224. <p><strong>Spotreba vozidla (l/100km):</strong>".$row[4]."</p>
  225. <p><strong>Bezpečnost:</strong>".$row[5]."</p>
  226. <p><strong>Komfort:</strong>".$row[6]."</p>
  227. <p><strong>Ostatné:</strong>".$row[7]."</p>
  228. <p><strong>Stav vozidla:</strong> ".$row[8]."</p>
  229. <p><strong>Poznámky:</strong>".$row[9]."</p>
  230.  
  231.  
  232.  
  233.  
  234. </div>";
  235.  
  236. $result3 = mysql_query('SELECT* FROM `fotogalery` WHERE `id_auta` = '.$id.' ORDER BY id_foto ASC');
  237. if (!$result3) {
  238. die('Could not query:' . mysql_error());
  239. }
  240.  
  241.  
  242. while ($row3 = mysql_fetch_array($result3, MYSQL_NUM)) {
  243.  
  244. // echo"<strong>ID</strong>:".$row[0];
  245. // echo"<strong>ID auta</strong>:".$row[1];
  246. // echo" - <strong>cesta</strong>:".$row[2]."<br>";
  247. // echo"<img src=\"http://plush-auto.sk/new/admin-img/".$row3[2]."\" class=\"img-responsive\" /><br />";
  248.  
  249.  
  250. echo"<div class=\"col-sm-3\">
  251. <div class=\"single-project small-project\">
  252. <div class=\"portfolio-item\">
  253. <a class=\"thumbnail\" href=\"#\" data-image-id=\"\" data-toggle=\"modal\" data-title=\"\" data-caption=\"\" data-image=\"watermark.php?image=http://plush-auto.sk/new/admin-img/".$row3[2]."&amp;watermark=http://plush-auto.sk/new/images/logo3.png\" data-target=\"#image-gallery\">
  254. <img src=\"watermark.php?image=http://plush-auto.sk/new/admin-img/".$row3[2]."&amp;watermark=http://plush-auto.sk/new/images/logo3.png\" alt=\"\" /></a>
  255. </div>
  256. </div>
  257. </div>
  258. <div class=\"modal fade\" id=\"image-gallery\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">
  259. <div class=\"modal-dialog\">
  260. <div class=\"modal-content\">
  261. <div class=\"modal-header\">
  262. <button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>
  263. <h4 class=\"modal-title\" id=\"image-gallery-title\"></h4>
  264. </div>
  265. <div class=\"modal-body\">
  266. <img id=\"image-gallery-image\" class=\"img-responsive\" src=\"\">
  267. </div>
  268. <div class=\"modal-footer\">
  269.  
  270. <div class=\"col-md-2\">
  271. <button type=\"button\" class=\"btn btn-primary\" id=\"show-previous-image\">Previous</button>
  272. </div>
  273.  
  274. <div class=\"col-md-8 text-justify\" id=\"image-gallery-caption\">
  275.  
  276. </div>
  277.  
  278. <div class=\"col-md-2\">
  279. <button type=\"button\" id=\"show-next-image\" class=\"btn btn-default\">Next</button>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. </div> ";
  285.  
  286. }
  287.  
  288.  
  289.  
  290.  
  291. echo"</div>
  292.  
  293. </div><br><br><!--/post-->
  294.  
  295. ";
  296.  
  297.  
  298. }
  299.  
  300.  
  301. mysql_close($link);
  302. }
  303. else
  304. {
  305. echo"Nebolo vybrane ziadne auto";
  306. }
  307. ?>
  308.  
  309. <br><br>
  310.  
  311. </div>
  312.  
  313. </div>
  314.  
  315. </div>
  316.  
  317. </div><!--/#main-blog-->
  318. <br><br>
  319.  
  320.  
  321.  
  322. <?php include("include/footer.php"); ?>
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. <!--/#scripts-->
  330.  
  331. <script>
  332. $(document).ready(function(){
  333.  
  334. loadGallery(true, 'a.thumbnail');
  335.  
  336. //This function disables buttons when needed
  337. function disableButtons(counter_max, counter_current){
  338. $('#show-previous-image, #show-next-image').show();
  339. if(counter_max == counter_current){
  340. $('#show-next-image').hide();
  341. } else if (counter_current == 1){
  342. $('#show-previous-image').hide();
  343. }
  344. }
  345.  
  346. /**
  347. *
  348. * @param setIDs Sets IDs when DOM is loaded. If using a PHP counter, set to false.
  349. * @param setClickAttr Sets the attribute for the click handler.
  350. */
  351.  
  352. function loadGallery(setIDs, setClickAttr){
  353. var current_image,
  354. selector,
  355. counter = 0;
  356.  
  357. $('#show-next-image, #show-previous-image').click(function(){
  358. if($(this).attr('id') == 'show-previous-image'){
  359. current_image--;
  360. } else {
  361. current_image++;
  362. }
  363.  
  364. selector = $('[data-image-id="' + current_image + '"]');
  365. updateGallery(selector);
  366. });
  367.  
  368. function updateGallery(selector) {
  369. var $sel = selector;
  370. current_image = $sel.data('image-id');
  371. $('#image-gallery-caption').text($sel.data('caption'));
  372. $('#image-gallery-title').text($sel.data('title'));
  373. $('#image-gallery-image').attr('src', $sel.data('image'));
  374. disableButtons(counter, $sel.data('image-id'));
  375. }
  376.  
  377. if(setIDs == true){
  378. $('[data-image-id]').each(function(){
  379. counter++;
  380. $(this).attr('data-image-id',counter);
  381. });
  382. }
  383. $(setClickAttr).on('click',function(){
  384. updateGallery($(this));
  385. });
  386. }
  387. });
  388. </script>
  389.  
  390. <script type="text/javascript" src="js/jquery.js"></script>
  391.  
  392. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  393.  
  394. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
  395.  
  396. <script type="text/javascript" src="js/gmaps.js"></script>
  397.  
  398. <script type="text/javascript" src="js/jquery.inview.min.js"></script>
  399.  
  400. <script type="text/javascript" src="js/owl.carousel.min.js"></script>
  401.  
  402. <script type="text/javascript" src="js/jquery.countTo.js"></script>
  403.  
  404. <script type="text/javascript" src="js/jquery.parallax.js"></script>
  405.  
  406. <script type="text/javascript" src="js/isotope.pkgd.min.js"></script>
  407.  
  408. <script type="text/javascript" src="js/jquery.easypiechart.min.js"></script>
  409.  
  410. <script type="text/javascript" src="js/mousescroll.js"></script>
  411.  
  412. <script type="text/javascript" src="js/jquery.prettyPhoto.js"></script>
  413.  
  414. <script type="text/javascript" src="js/main.js"></script>
  415.  
  416.  
  417.  
  418.  
  419. </body>
  420.  
  421. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement