<?php

include_once '../conf/config.inc.php';
include LIST_ROOT . "/getEntity.php";
if (isset($_GET['make_id']) && $_GET['make_id'] != null) {
    $makeID = $_GET['make_id'];
    $getEntityObj = new getEntity();
    $models = $getEntityObj->getEntityOutput($makeID, 4);
    $retOpt = '';
    foreach ($models as $id => $model) {
        $retOpt .= '<option value="' . $id . '" >' . $model . '</option>';
    }
    echo $retOpt;
}
/*************************************************************************************************************
#Coder         : ishan Siddiqui
#Description : This Code is used to Manage Pages
*************************************************************************************************************/
include LIST_ROOT . "/getEntity.php";
extract($_GET);
extract($_POST);
$obj_setting = new common();
$obj = new validation();
#Code to Fetch page category data
#END
$publish = 1;
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
$getEntityObj = new getEntity();
$makes = $getEntityObj->getEntityOutput(6001, 3);
foreach ($makes as $make_id => $name) {
    $first = $make_id;
    break;
}
$models = $getEntityObj->getEntityOutput($first, 4);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $count = 0;
    $order = 1;
    $medias = array();
    foreach ($_POST as $key => $value) {
        $count++;
        if ($count > 11) {
            $explodedkey = explode("-", $key);
            $mediaType = $explodedkey[0];