Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require_once(__DIR__ . "/api/database.php");
- require_once(__DIR__ . "/api/api.classifieds.php");
- $classifieds_api = new ClassifiedsAPI($database);
- // $info_general = $classifieds_api->get_general_ad($_GET['id']);
- // $info_vehicle = $classifieds_api->get_vehicle_ad($_GET['id']);
- // $info_property = $classifieds_api->get_property_ad($_GET['id']);
- include("ad_datas.php");
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="">
- <link rel="shortcut icon" href="">
- <title>Ziper | Post a Listing</title>
- <link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css' />
- <link href='css/font-awesome.min.css' rel="stylesheet" />
- <link href="css/bootstrap.css" rel="stylesheet" />
- <link href="css/sparky.css" rel="stylesheet" />
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="../../assets/js/html5shiv.js"></script>
- <script src="../../assets/js/respond.min.js"></script>
- <![endif]-->
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- <script>
- $(function() {
- $('#maincat').change(function() {
- var option = $(this).find('option:selected');
- $('#vehi').toggle(option.hasClass('show0'));
- $('#hous').toggle(option.hasClass('show1'));
- $('#homedec').toggle(option.hasClass('show2'));
- $('#hobbies').toggle(option.hasClass('show3'));
- $('#jobser').toggle(option.hasClass('show4'));
- $('#electr').toggle(option.hasClass('show5'));
- }).change();
- });
- </script>
- </head>
- <body>
- <? include("nav.php"); ?>
- <div class="jumbotron">Welcome to Ziper! Post your new and used items here for your neighbourly friends to find.<br />
- <div class="jc1"></div><div class="jc2"></div><div class="jc3">
- </div>
- </div>
- <div class="container">
- <h1>Post an item</h1>
- <select id="maincat" name="main_category">
- <option value='Select'>Select Category</option>
- <?php
- foreach($category as $index => $category_name) {
- echo "<option value='{$index}' class='show{$index}'>- {$category_name}</option>";
- }
- ?>
- </select>
- <div id="vehi">
- <p>When posting please dont do this and that and stuff and more things. Just omg, please!</p>
- <form id="post_vehicle" action="post_confirm.php" method="post">
- <?php
- echo "<select name='vehicle_type'>";
- echo "<option>Vehicle Type</option>";
- foreach($vehicle_types as $vehi_index => $vehicle_cat) {
- echo "<option value='{$vehi_index}' class='no_show{$index}'>- {$vehicle_cat}</option>";
- }
- echo "</select>";
- echo "<select name='transmission_type'>";
- echo "<option>Transmission Type</option>";
- foreach($transmission_types as $tran_index=> $transmission_cat) {
- echo "<option value='{$tran_index}'> - {$transmission_cat}</option>";
- }
- echo "</select>";
- ?>
- <input type="text" class="form-control w70" placeholder="Title" name="vehicle_title">
- <input type="text" class="form-control w30" placeholder="Price" name="vehicle_price">
- <textarea rows="8" class="form-control" placeholder="Description" name="vehicle_description"></textarea>
- <input type="text" class="form-control" placeholder="Mileage" name="mileage">
- <input type="text" class="form-control" placeholder="Fuel type" name="fuel">
- <input type="text" class="form-control" placeholder="Year" name="year">
- <h3>Images</h3>
- <input type="file" name="images[]">
- <input type="file" name="images[]">
- <input type="file" name="images[]">
- <button class="btn btn-lg btn-success btn-block" type="submit">Post Ad</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement