Advertisement
Sparkster

Untitled

Dec 10th, 2013
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. session_start();
  4. require_once(__DIR__ . "/api/database.php");
  5. require_once(__DIR__ . "/api/api.classifieds.php");
  6.  
  7. $classifieds_api = new ClassifiedsAPI($database);
  8.  
  9. // $info_general  = $classifieds_api->get_general_ad($_GET['id']);
  10. // $info_vehicle  = $classifieds_api->get_vehicle_ad($_GET['id']);
  11. // $info_property = $classifieds_api->get_property_ad($_GET['id']);
  12.  
  13. include("ad_datas.php");
  14.  
  15. ?>
  16.  
  17. <!DOCTYPE html>
  18. <html lang="en">
  19. <head>
  20. <meta charset="utf-8">
  21. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  22. <meta name="description" content="">
  23. <meta name="author" content="">
  24. <link rel="shortcut icon" href="">
  25.  
  26. <title>Ziper |  Post a Listing</title>
  27.  
  28. <link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css' />
  29. <link href='css/font-awesome.min.css' rel="stylesheet" />
  30. <link href="css/bootstrap.css" rel="stylesheet" />
  31. <link href="css/sparky.css" rel="stylesheet" />
  32.  
  33. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  34. <!--[if lt IE 9]>
  35. <script src="../../assets/js/html5shiv.js"></script>
  36. <script src="../../assets/js/respond.min.js"></script>
  37. <![endif]-->
  38. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  39.  
  40. <script>
  41. $(function() {
  42.     $('#maincat').change(function() {
  43.         var option = $(this).find('option:selected');
  44.         $('#vehi').toggle(option.hasClass('show0'));
  45.         $('#hous').toggle(option.hasClass('show1'));
  46.         $('#homedec').toggle(option.hasClass('show2'));
  47.         $('#hobbies').toggle(option.hasClass('show3'));
  48.         $('#jobser').toggle(option.hasClass('show4'));
  49.         $('#electr').toggle(option.hasClass('show5'));
  50.     }).change();
  51. });
  52. </script>
  53.  
  54. </head>
  55.  
  56. <body>
  57.  
  58. <? include("nav.php"); ?>
  59.  
  60. <div class="jumbotron">Welcome to Ziper! Post your new and used items here for your neighbourly friends to find.<br />
  61. <div class="jc1"></div><div class="jc2"></div><div class="jc3">
  62. </div>
  63. </div>
  64. <div class="container">
  65.  
  66. <h1>Post an item</h1>
  67. <select id="maincat" name="main_category">
  68. <option value='Select'>Select Category</option>
  69. <?php
  70.  
  71.     foreach($category as $index => $category_name) {
  72.         echo "<option value='{$index}' class='show{$index}'>- {$category_name}</option>";
  73.     }
  74. ?>
  75.  
  76. </select>
  77.  
  78. <div id="vehi">
  79. <p>When posting please dont do this and that and stuff and more things. Just omg, please!</p>
  80.  
  81. <form id="post_vehicle" action="post_confirm.php" method="post">
  82.  
  83. <?php
  84.  
  85.     echo "<select name='vehicle_type'>";
  86.     echo "<option>Vehicle Type</option>";
  87. foreach($vehicle_types as $vehi_index => $vehicle_cat) {
  88.     echo "<option value='{$vehi_index}' class='no_show{$index}'>- {$vehicle_cat}</option>";
  89. }
  90.     echo "</select>";
  91.     echo "<select name='transmission_type'>";
  92.     echo "<option>Transmission Type</option>";
  93. foreach($transmission_types as $tran_index=> $transmission_cat) {
  94.     echo "<option value='{$tran_index}'> - {$transmission_cat}</option>";
  95. }
  96.     echo "</select>";
  97.  
  98. ?>
  99. <input type="text" class="form-control w70" placeholder="Title" name="vehicle_title">
  100. <input type="text" class="form-control w30" placeholder="Price" name="vehicle_price">
  101. <textarea rows="8" class="form-control" placeholder="Description" name="vehicle_description"></textarea>
  102. <input type="text" class="form-control" placeholder="Mileage" name="mileage">
  103. <input type="text" class="form-control" placeholder="Fuel type" name="fuel">
  104. <input type="text" class="form-control" placeholder="Year" name="year">
  105. <h3>Images</h3>
  106. <input type="file" name="images[]">
  107. <input type="file" name="images[]">
  108. <input type="file" name="images[]">
  109. <button class="btn btn-lg btn-success btn-block" type="submit">Post Ad</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement