<div class="container">
    <div class="row">
        <div class="col-md-2">
            <div class="panel panel-default">

                <!--Left panel heading-->
                <div class="panel-heading">
                    <h3 class="panel-title">My Listings</h3>
                </div>

                <!--Left panel body-->
                <div class="panel-body">
                    <ul class="nav nav-pills nav-stacked">
                        <li><a>
                                <span class="badge pull-right"><?php echo $total; ?></span>
                                Engines</a></li>
                        <li class="active"><a>
                                <span class="badge pull-right"><?php echo $ptotal; ?></span>
                                Parts</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <!--Mid panel heading-->
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h2 class="form-signin-heading">Enter Part Information</h2>

                </div>

                <?php
                $attributes = array(
                    'class' => 'form-horizontal',
                );
                ?>

                <?php echo validation_errors('<p class="alert alert-dismissable alert-danger">'); ?>

<?php echo form_open_multipart('epc_listings/listings/add_plisting', $attributes); ?>

                <!--Mid panel body-->        
                <div class="panel-body">

                    <span class="msgF pull-right">* required field.</span>

                    <div class="form-group">           
                        <label for="part_number" class="col-sm-3 control-label">Part Number:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="part_number" name="part_number" autocomplete="off" value="<?php echo set_value('part_number'); ?>" placeholder="Part Number">
                        </div>
                        <div class="col-xs-1">
                            <span class="error2">*</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="part_description" class="col-sm-3 control-label">Part Description:</label>
                        <div class="col-sm-5">
                            <textarea type="text" class="form-control" rows="7" id="part_description" name="part_description" placeholder="Part Description"><?php echo set_value('part_description'); ?></textarea>
                        </div>
                    </div>
                    <div class="form-group">           
                        <label for="part_condition" class="col-sm-3 control-label">Part Condition:</label>
                        <div class="col-sm-5">

                            <select name="part_condition_dropdown" class="form-control">
                                <option value="--Select Part Condition--" <?php if (!empty($_REQUEST['part_condition_dropdown']) && $_REQUEST['part_condition_dropdown'] == '--Select Part Condition--') echo 'selected'; ?>>--Select Part Condition--</option>                        
                                <option value="AR" <?php if (!empty($_REQUEST['part_condition_dropdown']) && $_REQUEST['part_condition_dropdown'] == 'AR') echo 'selected'; ?>>AR</option>
                                <option value="NE" <?php if (!empty($_REQUEST['part_condition_dropdown']) && $_REQUEST['part_condition_dropdown'] == 'NE') echo 'selected'; ?>>NE</option>
                                <option value="NS" <?php if (!empty($_REQUEST['part_condition_dropdown']) && $_REQUEST['part_condition_dropdown'] == 'NS') echo 'selected'; ?>>NS</option>
                                <option value="OH" <?php if (!empty($_REQUEST['part_condition_dropdown']) && $_REQUEST['part_condition_dropdown'] == 'OH') echo 'selected'; ?>>OH</option>
                                <option value="SV" <?php if (!empty($_REQUEST['part_condition_dropdown']) && $_REQUEST['part_condition_dropdown'] == 'SV') echo 'selected'; ?>>SV</option>
                            </select>
                        </div>
                        <div class="col-sm-1">
                            <span class="error2">*</span>
                        </div>
                    </div>

                    <div class="form-group">           
                        <label for="enginep_model" class="col-sm-3 control-label">Engine Model:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="enginep_model" name="enginep_model" autocomplete="off" value="<?php echo set_value('enginep_model'); ?>" placeholder="Engine Model">
                        </div>

                    </div>

                    <div class="form-group">           
                        <label for="tag" class="col-sm-3 control-label">Tag:</label>
                        <div class="col-sm-5">

                            <select name="tag_dropdown" class="form-control">
                                <option value="--Select Tag--" <?php if (!empty($_REQUEST['tag_dropdown']) && $_REQUEST['tag_dropdown'] == '--Select Tag--') echo 'selected'; ?>>--Select Tag--</option>                        
                                <option value="AR" <?php if (!empty($_REQUEST['tag_dropdown']) && $_REQUEST['tag_dropdown'] == 'AR') echo 'selected'; ?>>AR</option>
                                <option value="DUAL" <?php if (!empty($_REQUEST['tag_dropdown']) && $_REQUEST['tag_dropdown'] == 'DUAL') echo 'selected'; ?>>DUAL</option>
                                <option value="EASA" <?php if (!empty($_REQUEST['tag_dropdown']) && $_REQUEST['tag_dropdown'] == 'EASA') echo 'selected'; ?>>EASA</option>
                                <option value="FAA" <?php if (!empty($_REQUEST['tag_dropdown']) && $_REQUEST['tag_dropdown'] == 'FAA') echo 'selected'; ?>>FAA</option>
                            </select>
                        </div>
                        <div class="col-sm-1">
                            <span class="error2">*</span>
                        </div>
                    </div>

                    <div class="form-group">           
                        <label for="quantity" class="col-sm-3 control-label">Quantity:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="quantity" name="quantity" autocomplete="off" value="<?php echo set_value('quantity'); ?>" placeholder="Quantity">
                        </div>
                        <div class="col-xs-1">
                            <span class="error2">*</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="lister" class="radio-inline col-sm-3 control-label"><strong>Lister:</strong></label>
                        <div class="col-sm-5">
                            <label class="radio-inline">
                                <input type="radio" id="inlineRadio1" name="inlineradio" value="Buyer" <?php echo set_radio('inlineradio', 'Buyer'); ?>>Buyer
                            </label>
                            <label class="radio-inline">
                                <input type="radio" id="inlineRadio2" name="inlineradio" value="Seller" <?php echo set_radio('inlineradio', 'Seller'); ?>>Seller
                            </label>
                        </div>
                        <div class="col-xs-1">
                            <span class="error2">*</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="transaction" class="checkbox-inline col-sm-3 control-label"><strong>Transaction:</strong></label>
                        <div class="col-sm-5">
                            <label class="checkbox-inline">
                                <input type="checkbox" id="inlineCheckbox1" name="inlinecheck[]" class="childC" value="Sale" <?php echo set_checkbox('inlinecheck[]', 'Sale'); ?>>Sale
                            </label>
                            <label class="checkbox-inline">
                                <input type="checkbox" id="inlineCheckbox2" name="inlinecheck[]" class="childC" value="Lease" <?php echo set_checkbox('inlinecheck[]', 'Lease'); ?>>Lease
                            </label>
                            <label class="checkbox-inline">
                                <input type="checkbox" id="inlineCheckbox3" name="inlinecheck[]" class="childC" value="Exchange" <?php echo set_checkbox('inlinecheck[]', 'Exchange'); ?>>Exchange
                            </label>
                        </div>
                        <div class="col-xs-1">
                            <span class="error2">*</span>
                        </div>
                    </div>

                    <div class="form-group">           
                        <label for="asking_price" class="col-sm-3 control-label">Asking Price:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="asking_price" name="asking_price" autocomplete="off" value="<?php echo set_value('asking_price'); ?>" placeholder="Asking Price">
                        </div>
                    </div>

                    <div class="form-group">           
                        <label for="monthly_rent" class="col-sm-3 control-label">Monthly Rent:</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="monthly_rent" name="monthly_rent" autocomplete="off" value="<?php echo set_value('monthly_rent'); ?>" placeholder="Monthly Rent">
                        </div>
                    </div>

                    <div class="form-group">           
                        <label for="available_date" class="col-sm-3 control-label">Available Date:</label>
                        <div class="col-sm-5">
                           <input type="text" class="form-control datepicker" id="available_date" data-date-format="mm-dd-yyyy" name="available_date" autocomplete="off" value="<?php echo set_value('available_date'); ?>" placeholder="DD-MM-YYYY">
                        
                        </div>
                        <div class="col-xs-1">
                            <span class="error2">*</span>
                        </div>
                    </div>
                    
                    <div class="form-group">           
                        <label for="record" class="col-sm-3 control-label">Record:</label>
                        <div class="col-sm-5">
                            <input type="file" class="form-control" name="userfile" size="20">
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-10">
                            <button type="submit" class="btn btn-primary btn-xs">Add 
                                <i class="glyphicon glyphicon-check"></i></button>
                            <a href="<?php echo base_url(); ?>epc_listings/listings/my_engine_parts_list">
                                <button type="button" class="btn btn-default btn-xs">Close</button></a>
                        </div>
                    </div>


                </div>
<?php echo form_close(); ?>



            </div>
        </div>

    </div>
</div>