if ($orderBy[1] == 'asc') {
            $order = '&sortOrder=CurrentPriceHighest';
        } else {
            $order = '&sortOrder=PricePlusShippingLowest';
        }
    }
    if ($orderBy[0] == 'time') {
        if ($orderBy[1] == 'asc') {
            $order = '&sortOrder=EndTimeSoonest';
        } else {
            $order = '&sortOrder=StartTimeNewest';
        }
    }
    $orderfield = '<input type="hidden" name="sort" value="' . $orderBy[0] . '~' . $orderBy[1] . '">';
    $apicall .= $order;
}
// Load the call and capture the document returned by eBay API
$resp = simplexml_load_file($apicall);
$pages = new Paginator();
$pages->items_total = $resp->paginationOutput->totalEntries;
$pages->default_ipp = 25;
$pages->paginate();
$Make = $common->CustomQuery("SELECT * FROM `attribute_option_value` WHERE `attribute_id` = '2' ORDER BY `sort_order`");
/*$ebayid = $common->CustomQuery("Select count(*) as total from ebay_car ".$where);
$item = mysql_fetch_object($ebayid);
$pages = new Paginator; 
$pages->items_total = $item->total;
$pages->default_ipp=15;
$pages->paginate();
$resp = $common->CustomQuery("Select * from ebay_car ".$where." ".$order." ".$pages->limit);
$Make = $common->CustomQuery("SELECT Make From ebay_car GROUP BY Make order by Make ASC");*/
Example #2
0
<?php

include_once "conf/config.inc.php";
$common = new common();
$common->CustomQuery("delete FROM `ebay_car` where FROM_UNIXTIME(endtimestamp,'%Y-%m-%d') < CURDATE()-interval 3 month limit 100");
echo 'yes';
die;
    if (trim($_POST['password']) != trim($_POST['confirm_password'])) {
        $error++;
        $error_msg = "Mot de passe ne correspondent pas.";
    }
    if (trim($_POST['email']) != $_SESSION['User']['email']) {
        $wherecondition = "email='" . trim($_POST['email']) . "'";
        $usercount = $common->numberOfRows("users", $wherecondition);
        if ($usercount > 0) {
            $error++;
            $error_msg = "Cet e-mail est déjà enregistré.";
        }
    }
    if ($error == 0) {
        $updateQuery = "UPDATE users SET\n\t\t\t\t\t\tname \t= '" . trim($_POST['name']) . "',\n\t\t\t\t\t\taddress = '" . trim($_POST['address']) . "',\n\t\t\t\t\t\tpostal_code = '" . trim($_POST['postal_code']) . "',\n\t\t\t\t\t\tcity = '" . trim($_POST['city']) . "',\n\t\t\t\t\t\tphone_number = '" . trim($_POST['phone_number']) . "',\n\t\t\t\t\t\tsec_phone_number = '" . trim($_POST['sec_phone_number']) . "',\n\t\t\t\t\t\temail = '" . trim($_POST['email']) . "'";
        if (trim($_POST['password']) != "") {
            $updateQuery .= ", password \t\t= '" . base64_encode(trim($_POST['password'])) . "',\n\t\t\t\t\t\t\t original_pswd \t= '" . base64_encode(trim($_POST['password'])) . "'";
        }
        $updateQuery .= " WHERE id = '" . $_SESSION['User']['id'] . "'";
        $ok = $common->CustomQuery($updateQuery);
        if ($ok === true) {
            $_SESSION['User']['name'] = trim($_POST['name']);
            $_SESSION['User']['email'] = trim($_POST['email']);
            $error_msg = '<span class="success_msg">User profile updated successfully.</span>';
            extract($_POST);
        } else {
            $error_msg = '<span class="error_msg">Database Problem!Please Try Again.</span>';
        }
    } else {
        $error_msg = '<span class="error_msg">' . $error_msg . '</span>';
    }
}
function fetchEbayCar($itemId, $action)
{
    $common = new common();
    $version = 773;
    $devid = "e872f3d0-8bee-4784-b631-f0c6e0468c21";
    $appid = "Planetwe-4831-4322-a03c-57a0a2d3aafb";
    $certid = "574bc5e0-889c-431c-b3aa-918f19b83e0e";
    $siteid = 0;
    $callname = "GetItem";
    $xml = '<?xml version="1.0" encoding="utf-8"?>
				<GetItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
					<RequesterCredentials>
						<eBayAuthToken>AgAAAA**AQAAAA**aAAAAA**GsfITw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AFkYekC5iHogidj6x9nY+seQ**An0BAA**AAMAAA**PpioAZjw8mCxVt0pqkk749Yb5v0gTCgKSXUcQedT6MhtnDSO4CL2CwtOzOzMn4uwDGr3LIzawpsA/RkBeXpTInV/CITheT3XCyPh5t1O9OMgQy1fAvA6oHmfSjZtXUeEevdvnGRMnOz7gVZ13M6ZCRcReMQotcUkJ+UXqLxogoUrgmtVG3SE8+5mbAYnTmr/nwV3h+l5t3AxVVCr1d795tDXkyqpkXkZ+YY6xnDyg7UUTH3iXQxLPTB2CsmjIaU3wtbSfjQ+0Ep0mTsxKm7Wna2YEidRq9CBP71ynlVIO+iyOHg1Q6kfn6NWZHX1Oynzl6FXR1M2PpeT92xaVtAmg19JI1opydhdbD+CvwpSnrozmrUV57FsL+KyXVOI40JjbMfJFqHbJYZIQXVI+OgV2LxYmo4rv14tR5WiveTsZi482uXf0oL8OLn1hBQ4gN3ANlD2iv48VZjkIL7G/rmnGIvAd982DrujhB4kR8n0f3LcZKBPlCXrTTFnwNdaq/UHSNa4WjO0F0KwieNIDZ3+yqvF69r8ygHfb2zfiIHxDKED9vcv6KK6mcJgkwOKRF4MPZyV4sRZqjrLrOd/L3KVEVTy6MpkRC8P+n+YXuJ8sSXtZz9qTDIrv9SyJutvZs9Xy2Kk21dj39QWOnYxQiJ18pFLsg9In9O2it6+B3PPIqfUoUVE6G2LgVfpf7bnlleurBqemkKPftyN9Ml1b30OQBcM/T5Djcep6ffgsSrP7XnFojKCS811V5e1I0YzN9Xc</eBayAuthToken>
					</RequesterCredentials>
					<DetailLevel>ReturnAll</DetailLevel>
					<IncludeItemSpecifics>true</IncludeItemSpecifics>
					<ItemID>' . $itemId . '</ItemID>
				</GetItemRequest>​';
    $ch = curl_init("https://api.ebay.com/ws/api.dll?siteid={$siteid}");
    $headers = array('X-EBAY-API-COMPATIBILITY-LEVEL: ' . $version, 'X-EBAY-API-DEV-NAME: ' . $devid, 'X-EBAY-API-APP-NAME: ' . $appid, 'X-EBAY-API-CERT-NAME: ' . $certid, 'X-EBAY-API-CALL-NAME: ' . $callname, 'X-EBAY-API-SITEID: ' . $siteid);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
    $output = curl_exec($ch);
    curl_close($ch);
    $res = simplexml_load_string($output);
    $item = $res->Item;
    $gallery = array();
    foreach ($item->PictureDetails->PictureURL as $val) {
        $gallery[] = (string) $val;
    }
    $gallerystr = implode("**", $gallery);
    $ConditionDisplayName = (string) $item->ConditionDisplayName;
    $description = (string) $item->Description;
    $specs = array();
    foreach ($item->ItemSpecifics->NameValueList as $arr) {
        $valus = array();
        foreach ($arr->Value as $val) {
            $temp = (string) $val;
            $valus[] = $temp;
        }
        $values = implode(",", $valus);
        $key = (string) $arr->Name;
        $specs[$key] = $values;
    }
    $std_equips = array();
    foreach ($specs as $keys => $data) {
        $std_equips[] = $keys . "^" . $data;
    }
    $std_equip = implode("~", $std_equips);
    $postalCode = (string) $item->PostalCode;
    $location = (string) $item->Location;
    $country = (string) $item->Country;
    $timeLeft = (string) $item->TimeLeft;
    if ((int) $item->BuyItNowPrice == 0) {
        $buyItNowAvailable = 0;
        $buyItNowPrice = (double) $item->SellingStatus->ConvertedCurrentPrice;
    } else {
        $buyItNowAvailable = 1;
        $buyItNowPrice = (double) $item->BuyItNowPrice;
    }
    $vin = (string) $item->VIN;
    $endTimes = (string) $item->ListingDetails->EndTime;
    $listingType = (string) $item->ListingType;
    $title = (string) $item->Title . " " . (string) $item->SubTitle;
    $datArray = array("itemId" => $itemId, "galleryURL" => mysql_escape_string($gallerystr), "postalCode" => $postalCode, "location" => $location, "country" => $country, "endTime" => $timeLeft, "buyItNowPrice" => $buyItNowPrice, "listingType" => $listingType, "buyItNowAvailable" => $buyItNowAvailable, "ConditionDisplayName" => $ConditionDisplayName, "title" => mysql_escape_string($title), "description" => base64_encode($description), "stdequip" => mysql_escape_string($std_equip), "vin" => $vin, "Year" => $specs['Year'], "Make" => $specs['Make'], "Model" => $specs['Model'], "Mileage" => $specs['Mileage'], "endson" => $endTimes, "endtimestamp" => strtotime($endTimes));
    if ($action == "update") {
        $common->update("ebay_car", $datArray, " itemId = " . $itemId);
    } elseif ($action == "save") {
        $common->save("ebay_car", $datArray);
    }
    return $common->CustomQuery("Select * from ebay_car where itemId = " . $itemId);
}
Example #5
0
<?php

include_once "../conf/config.inc.php";
$common = new common();
$timenow = mktime();
$expireid = $common->CustomQuery("SELECT * FROM `ebay_car` where endtimestamp < " . $timenow);
while ($expire = mysql_fetch_object($expireid)) {
    $common->delete('contact', " car_id={$expire->car_id}");
    $common->delete('ebay_car', " car_id={$expire->car_id}");
}
Example #6
0
$attribute = $_POST['attr'];
$manufac = $_POST['manufact'];
$classname = $_POST["class"];
if ($classname == "") {
    $classname = "customStyleSelectBox";
}
$search = new search();
$com = new common();
if ($attribute == "manufacturer") {
    $dataArray = array("{$attribute}" => $value);
    $carid = $search->attributeSearch($dataArray, "");
    $set = implode(",", $carid);
    $returnvalue = '<select class="' . $classname . '" id="model" name="model" onchange="ajaxcall(this.value,\'model\',\'year\',' . $value . ')">';
    $returnvalue .= "<option value=''>Modèles</option>";
    //echo "Select DISTINCT(value) from car_varchar where attribute_id = '4' and FIND_IN_SET(car_id, '".$set."') order by value";
    $year = $com->CustomQuery("Select DISTINCT(value) from car_varchar where attribute_id = '4' and FIND_IN_SET(car_id, '" . $set . "') order by value");
    while ($yrow = mysql_fetch_object($year)) {
        $returnvalue .= "<option value='" . $yrow->value . "'>" . $yrow->value . "</option>";
    }
    $returnvalue .= '</select>';
    echo $returnvalue;
}
if ($attribute == "model") {
    $dataArray = array("{$attribute}" => $value, "manufacturer" => $manufac);
    $carid = $search->attributeSearch($dataArray, "");
    $set = implode(",", $carid);
    $returnvalue = '<select class="' . $classname . '" name="madeYear" id="madeYear">';
    $returnvalue .= "<option value=''>Année</option>";
    //echo "Select value from car_int where attribute_id = '1' and FIND_IN_SET(car_id, '".$set."')";
    $year = $com->CustomQuery("Select DISTINCT(value) from car_int where attribute_id = '1' and FIND_IN_SET(car_id, '" . $set . "') order by value");
    while ($yrow = mysql_fetch_object($year)) {
<!---********************** carosul 2 **********************-->
<?php 
extract($_POST);
extract($_GET);
include_once "functions/ebay_functions.php";
$search = new search();
$common = new common();
$carids = array();
$ebayidExists = array();
$ebayids = $common->CustomQuery("Select itemid from product_banner order by id asc");
while ($row = mysql_fetch_object($ebayids)) {
    $carids[] = $row->itemid;
}
$no_exists_carids = $ebayidExists = array();
$ebayids = $common->CustomQuery("Select itemId from ebay_car where itemId in (" . implode(",", $carids) . ")");
while ($row = mysql_fetch_object($ebayids)) {
    $ebayidExists[] = $row->itemId;
}
$no_exists_carids = array_diff($carids, $ebayidExists);
foreach ($no_exists_carids as $insertid) {
    $ebayid = fetchEbayCar($insertid, "save");
}
$ebayid = $common->CustomQuery("Select * from ebay_car where itemId in (" . implode(",", $carids) . ")");
$item = '';
if (mysql_num_rows($ebayid) > 0) {
    ?>
<section class="carousel-2 wow fadeInDown" data-wow-duration="2s" data-wow-delay=".5s">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <h1>Les annonces de voitures americaines les plus vues:</h1>
 * Description : This Code is used to Manage Home Page Rotating Banner
 */
extract($_GET);
extract($_POST);
$obj_setting = new common();
$obj = new validation();
/*Fetch real facts section content*/
$ebayidExists = array();
$ebayids = $common->CustomQuery("Select itemid from product_banner order by id asc");
while ($row = mysql_fetch_object($ebayids)) {
    $ebayidExists[] = $row->itemid;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $error = '';
    /*validation for fields*/
    $obj->add_fields($carid, 'req', 'Please Enter Content');
    $obj->add_fields($carid, 'num', 'Please Enter Numeric value');
    $obj->add_fields($carid, 'uniquearray', 'Please Enter Unique value');
    $error = $obj->validate();
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>{$error}</font>";
    } else {
        /*save banner car ids*/
        $terms = $obj_setting->CustomQuery("UPDATE product_banner  SET `itemid` = CASE `ID`\n\t\t\tWHEN '1' THEN '{$carid['0']}'\n\t\t\tWHEN '2' THEN '{$carid['1']}'\n\t\t\tWHEN '3' THEN '{$carid['2']}'\n\t\t\tWHEN '4' THEN '{$carid['3']}'\n\t\t\tWHEN '5' THEN '{$carid['4']}'\n\t\t\tWHEN '6' THEN '{$carid['5']}'\n\t\t\tWHEN '7' THEN '{$carid['6']}'\n\t\t\tWHEN '8' THEN '{$carid['7']}'\n\t\t\tWHEN '9' THEN '{$carid['8']}'\n\t\t\tWHEN '10' THEN '{$carid['9']}'\n\t\t\tEND\n\t\t\tWHERE `ID` between 1 and 10");
        $_SESSION['success_msg'] = 'Successfully Saved';
        echo '<script>location.href="' . DEFAULT_URL . '/superadmin/home/product_banner.php";</script>';
        exit;
    }
} else {
    $carid = $ebayidExists;
}
$common = new common();
if (trim($_POST['email']) != "") {
    if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
        $error++;
        $error_msg = "S'il vous plaît fournir une adresse email valide";
    }
    if (strlen(trim($_POST['password'])) < 6) {
        $error++;
        $error_msg = "Mot de passe doit être au minimum de 6 caractères.";
    }
    if (trim($_POST['password']) != trim($_POST['confirm_password'])) {
        $error++;
        $error_msg = "Mot de passe ne correspondent pas.";
    }
    if ($_POST['cgv'] != 1) {
        $error++;
        $error_msg = "Vous n'êtes pas d'accord avec la politique d'entreprise. S'il vous plaît accepter politique .";
    }
    $wherecondition = "email='" . trim($_POST['email']) . "'";
    $usercount = $common->numberOfRows("users", $wherecondition);
    if ($usercount > 0) {
        $error++;
        $error_msg = "Cet e-mail est déjà enregistré.";
    }
    if ($error == 0) {
        $dob = trim($_POST['birthday_year']) . "-" . trim($_POST['birthday_month']) . "-" . trim($_POST['birthday_day']);
        $insertQuery = "INSERT INTO users (prefix,firstname,name,dob,address,postal_code,city,country,phone_number,sec_phone_number,email,password,original_pswd,created)\n\t\tVALUES ('" . trim($_POST['prefix']) . "','" . trim($_POST['firstname']) . "','" . trim($_POST['name']) . "','" . $dob . "','" . trim($_POST['address']) . "','" . trim($_POST['postal_code']) . "','" . trim($_POST['city']) . "','" . trim($_POST['country']) . "','" . trim($_POST['phone_number']) . "','" . trim($_POST['sec_phone_number']) . "','" . trim($_POST['email']) . "','" . base64_encode(trim($_POST['password'])) . "','" . base64_encode(trim($_POST['confirm_password'])) . "',now())";
        $manf = $common->CustomQuery($insertQuery);
        $error_msg = "User created successfully.";
    }
}
Example #10
0
<?php

extract($_POST);
extract($_GET);
$common = new common();
$emailQuery = $common->CustomQuery("select * from admins where id = 1");
$toemail = mysql_fetch_object($emailQuery);
if ($submit_form != '' && $submit_form == "submitted" && $website == "") {
    $obj = new validation();
    $error = '';
    $obj->add_fields($fname, 'req', 'S\'il vous plaît Entrez le Nom');
    $obj->add_fields($email, 'req', "S'il vous plaît Entrez l'adresse e-mail");
    $obj->add_fields($email, 'email', "S'il vous plaît Entrez l'adresse e-mail valide");
    $obj->add_fields($phone, 'req', "S'il vous plaît Entrez numéro de téléphone");
    $obj->add_fields($phone, 'phone,us', "S'il vous plaît Entrez votre numéro de téléphone valide");
    /*if($phone != ''){
            	$obj->add_fields($phone, 'phone,us', "S'il vous plaît Entrez votre numéro de téléphone valide");
      }*/
    $obj->add_fields($massage, 'req', "S'il vous plaît Entrez votre message");
    $obj->add_fields($massage, 'min=2', "Message doit être d'au moins 2 caractères");
    // $obj->add_fields($_POST['6_letters_code'], 'req', 'Please Enter Captcha Code');
    //$obj->add_fields($message, 'max=100', 'Message should not be more than 100 characters long');
    $error = $obj->validate();
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
        $_SESSION['msg'] = $errorMsg;
    } else {
        $massage = htmlspecialchars_decode(htmlspecialchars($massage, ENT_NOQUOTES, "UTF-8"));
        $massage = str_replace("\\'", "'", $massage);
        $heading = $subject = "Contactez-nous reuest";
        //send my mail
} else {
    $pages->default_ipp = $limit;
}
$eu = $limit * ($page - 1);
$obj_setting = new common();
$obj_search = new search();
if (isset($_GET['field']) and $_GET['field'] != '') {
    $field = $_GET['field'];
} else {
    $field = 'car_id';
}
if (isset($_GET['orderBy']) and $_GET['orderBy'] != '') {
    $orderby = $_GET['orderBy'];
} else {
    $orderby = 'ASC';
}
$where = "";
if (isset($searched) && $searched != '') {
    $where .= " WHERE title LIKE '%" . $searched . "%' OR Make LIKE '%" . $searched . "%' OR Model LIKE '%" . $searched . "%' OR Year LIKE '%" . $searched . "%'";
}
$ebayid = $common->CustomQuery("Select count(*) as total from ebay_car " . $where);
$item = mysql_fetch_object($ebayid);
$pages->items_total = $item->total;
if (isset($limit_combo) && $limit_combo != '') {
    $pages->default_ipp = $limit_combo;
} else {
    $pages->default_ipp = 25;
}
$pages->paginate();
$total_rows = $item->total;
$resp = $common->CustomQuery("Select * from ebay_car " . $where . " Order BY endson ASC " . $pages->limit);
<?php

extract($_POST);
extract($_GET);
$common = new common();
if ($parent_id) {
    $terms = $common->CustomQuery("Select mainpage.* from pages as mainpage left join pages as parentCat on (mainpage.page_cat = parentCat.id) where mainpage.slug = '{$page_id}' AND parentCat.slug = '{$parent_id}'");
} else {
    $terms = $common->CustomQuery("Select * from pages where slug = '{$page_id}' and page_cat = 0");
}
$terms = mysql_fetch_object($terms);
<div class="middle_two_right_announces">
    <div id="craftysyntax_1">
        <script type="text/javascript" src="/~httpsylc/live-chat/livehelp_js.php?eo=0&amp;relative=Y&amp;department=1&amp;serversession=1&amp;pingtimes=10&amp;dynamic=Y&amp;creditline=L"></script>
    </div>
    <div class="add_area">
    <?php 
$common = new common();
$slide = $common->CustomQuery("Select * from banner where publish = 1 and type = 5 order by rand()");
while ($image = mysql_fetch_object($slide)) {
    ?>

        <?php 
    if ($image->website != "") {
        ?>
            <a href="<?php 
        echo $image->website;
        ?>
" target="_blank"> 
        <?php 
    }
    ?>
            <img src="<?php 
    echo DEFAULT_URL;
    ?>
/images/banner/<?php 
    echo $image->image;
    ?>
" alt="Banner" />
        <?php 
    if ($image->website != "") {
        ?>
<?php

extract($_POST);
extract($_GET);
$common = new common();
$faq = $common->CustomQuery("Select * from faq where publish = 1");
$faqhead = $common->CustomQuery("Select * from pages where id = 46");
$faqtext = mysql_fetch_object($faqhead);
function fetchEbayCar($itemId, $action)
{
    $common = new common();
    // crated by us
    //$version = 773;
    //$devid = "e872f3d0-8bee-4784-b631-f0c6e0468c21";
    //$appid = "Planetwe-4831-4322-a03c-57a0a2d3aafb";
    //$certid = "574bc5e0-889c-431c-b3aa-918f19b83e0e";
    //$siteid =0;
    //$callname = "GetItem";
    //$accesToken = "AgAAAA**AQAAAA**aAAAAA**4gqXUg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AGkISjAJWBpg6dj6x9nY+seQ**An0BAA**AAMAAA**5D3c3AfScHkf+mmuQBsiuSAHvJ5dvb5KeUGyfX43IK6P4wjRzo5Rj7MxubzlEB+QmPf+nrkYAUU8V0nczpqvYaFl8orKRmqEdXKW0JqUE72CHfNIeNkcE7usMZZ9g97D9Be4yfDdAILBxTOEh4TdV4U3YD19Gfq1aSalXtSnLNndWFKS3j4vO4yBcZImdPkoNgCj7gtwidbz8l6zv+EHBUIRXqoEMP6gAZIY2JLjGq1T/u96NqQj7UKyzwoCvAsmUWL/0JTieQXuKqlM5sFdwKdEUAJzgaiK93ghP2aLFde3Rxqgh5sijGeT+f2KIKODYO9PILnRsiEKFyamt5OPLRmPfFeKBAv9kYoj0plLHbeeEBMP+F6QdwHrnK8pq/xMMm1K71JpjN1hoI3MbrFzNLNh/6b8NTHjlbYqjn8e6TJ2j8CyQe8XaiB4BlI4aBdJXW2ikxaWtBP7SAHTSmTFKk7t7xNP3Ti+BAAr1Uc+kyMBLs7o2m5vvJxz6bj/fxgcoUAv+GNt5/PtuuB60o4x9bG1WWp50+zZsqBlLCEwBxDKhbZ49jJRNc8nbM9xUcaupLxVTxUwbqoPpWB2i/dZuA+7xxfB0AyCTzFU9xPpZUIoEfCUcSFtZ0euub2w9jET4imzeJCc41sE3Qo/wB2AubK5oMn6wJXTsvu2sHRQgIsM/vJOweg6uLIZ15gb6Pn7JD+trob9IzCXoSwK/ytCdDOWfT589Fg7tw6A4pK31eMUjIwaYuH+l1SoItIBWBLV";
    //Details provided by client
    $version = 849;
    $devid = "E69WP8Z16P996R8H2K1EWU7LC2F4P4";
    $appid = "francois-1656-442d-bf2d-37b84676c2fb";
    $certid = "2f56d2cd-9d4b-45a5-8945-67c432f53d29";
    $siteid = 0;
    $callname = "GetItem";
    //$accesToken = "AgAAAA**AQAAAA**aAAAAA**It2lUg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJlIOhCJWCpQ6dj6x9nY+seQ**fzgAAA**AAMAAA**HO7Ff5QcNtBiD9NvWdD1xP+4GLKHGfpUP+SwT+cDf4AnxrGLcjv2DHcPivAGLK06agYWzcX4jpuhunP+WbdU5Uw8T8S1fBdsV2pwuCVTG1a2lMz2zHSgqvhQ+CLS3eBqZ9APg/gg/HVG8PBhJa147C4OtSAoJb0Q1CNM9Fmi4iHoX91KM14b6g9LhOUpIH1ODtlpkiwQhA+ZBe8lyxZzgNgVL1NpaWBv6Z5WRBgdQmGRh5OUxhteTOp0iDG5pzVA7isLCfQyBf41mcrdMAWrNBlyGGVSIWjk82M4kHYbd7uRA9w+cr+YUkC2J8f2T3DuoRqxBDShUnlm9rn+PYYqYJjn5c+DIz6GMMVnrgURZd/8HHu5jbGCGnEgnTIvcP64zdUSzzMV9i6XE32Mw2Wse0qVVPEMYRPwkGAejvBh5NlwpSYaTHw4ePmGV5oKYma/Qoyxa0CxsZ6YFIgKI2RVsjUJBihixnfQU7JUcjwwMtJ1oVfyjmT7aDX5CGkwR9LfGyJQWAYDler441lRFw8Ci7D87h1H6sd2SY2Szy5HsWuNTwOl8IHgio6Yw1acpZSAUDJ8jhWV8pKITBq0oJvQX7VF8DjjYNN+zp4329U89yfH1kjaS79a5TJgBSUMU9UDZi2HilDzEaPLJJcZr8DctxoZrEsh1fozvlvwbAehRQcsHnBqTCVGWme47BY9Ia5eTipFlSYDo7Sl8V0gUQeiEOtca+f0sR6qvb85sW5EYDWuWXCaS4YR+taT9L5OxO25";
    $accesToken = "AgAAAA**AQAAAA**aAAAAA**fqSbVQ**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AGkISjAJWBpg6dj6x9nY+seQ**An0BAA**AAMAAA**F5lNYkkTF5+eh9ORJHXXaAi0kOFTeYMNzeVxybYeVyTcvJWc8bn4auZqxUK25zO8gqfChFLU1b3UbRcgJmhoQcVqb0L7rmNpFctACptDN7zUw+iv9ZLeePmxUFivtc5KUtPa7XLYKF4khJc7l5MWBwtzGC7+QKPWNRBoccYnpz5X6n7KHymsf1sH00toTpSczFBzQGFQcP65pyioz45/QQ//8f90jOyFXs60nR0RGHItNnwjjfQy/J2U6AhXSorLl3jOhqJhMErkNrmzkv9hjTYlpVoWhlJWGz93O5YKzneDW3h/pgikw7taeC63EUNCMHqM5eP16e+o2iOUFJ+AhvN0t4joK8/7JLuhUggOJLDQFvp9T5wzRMSmhhPobmI/ABfN0EgxFbiNb/9hDelf9HotFt2MvCsoupqVzat3Kz+hGWlovE+qieoKrQOzSi8Rzm/DTNBEequJtPd7MOSX/boW0Y/Hl0hnyzPoszj6wCepHtSilZrLHL0RO3+9ocSmmTJKgi038+oIJS4wC81YP0bTBReu3HHM9/cb5b457JJZ0TSo/mX9Mv+tPfrsWmzo4huyXspp3KdjeaTOvn+IzfiOekrE3JDRi7aPUFgY00A/gpQTkT1bgabdIm9V86zJVXvRDJXfa7vp2nCaA2BuQzJF2RLIoW6CYDnOV7oLJsYRo7QKRaCY6S8rDmiJTgrd99zZSusNYldBCJuFAj4g0abmEmiJr2aCKEtL5wFb9UDNWM7v0J2IELjzAf+p0dF1";
    $xml = '<?xml version="1.0" encoding="utf-8"?>
				<GetItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
					<RequesterCredentials>
						<eBayAuthToken>' . $accesToken . '</eBayAuthToken>
					</RequesterCredentials>
					<DetailLevel>ReturnAll</DetailLevel>
					<IncludeItemSpecifics>true</IncludeItemSpecifics>
					<ItemID>' . $itemId . '</ItemID>
				</GetItemRequest>​';
    $ch = curl_init("https://api.ebay.com/ws/api.dll?siteid={$siteid}");
    $headers = array('X-EBAY-API-COMPATIBILITY-LEVEL: ' . $version, 'X-EBAY-API-DEV-NAME: ' . $devid, 'X-EBAY-API-APP-NAME: ' . $appid, 'X-EBAY-API-CERT-NAME: ' . $certid, 'X-EBAY-API-CALL-NAME: ' . $callname, 'X-EBAY-API-SITEID: ' . $siteid);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
    $output = curl_exec($ch);
    //echo "<pre>";print_r($output);die;
    curl_close($ch);
    $res = simplexml_load_string($output);
    $item = $res->Item;
    $gallery = array();
    foreach ($item->PictureDetails->PictureURL as $val) {
        $gallery[] = (string) $val;
    }
    $gallerystr = implode("**", $gallery);
    $ConditionDisplayName = (string) $item->ConditionDisplayName;
    $description = (string) $item->Description;
    $specs = array();
    foreach ($item->ItemSpecifics->NameValueList as $arr) {
        $valus = array();
        foreach ($arr->Value as $val) {
            $temp = (string) $val;
            $valus[] = $temp;
        }
        $values = implode(",", $valus);
        $key = (string) $arr->Name;
        $specs[$key] = $values;
    }
    $std_equips = array();
    foreach ($specs as $keys => $data) {
        $std_equips[] = $keys . "^" . $data;
    }
    $std_equip = implode("~", $std_equips);
    $postalCode = (string) $item->PostalCode;
    $location = (string) $item->Location;
    $country = (string) $item->Country;
    $timeLeft = (string) $item->TimeLeft;
    if ((int) $item->BuyItNowPrice == 0) {
        $buyItNowAvailable = 0;
        $buyItNowPrice = (double) $item->SellingStatus->ConvertedCurrentPrice;
    } else {
        $buyItNowAvailable = 1;
        $buyItNowPrice = (double) $item->BuyItNowPrice;
    }
    $vin = (string) $item->VIN;
    $endTimes = (string) $item->ListingDetails->EndTime;
    $listingType = (string) $item->ListingType;
    $title = (string) $item->Title . " " . (string) $item->SubTitle;
    $itemData = (array) $item;
    if (!empty($itemData)) {
        $datArray = array("itemId" => $itemId, "galleryURL" => mysql_escape_string($gallerystr), "postalCode" => $postalCode, "location" => $location, "country" => $country, "endTime" => $timeLeft, "buyItNowPrice" => $buyItNowPrice, "listingType" => $listingType, "buyItNowAvailable" => $buyItNowAvailable, "ConditionDisplayName" => $ConditionDisplayName, "title" => mysql_escape_string($title), "description" => base64_encode($description), "stdequip" => mysql_escape_string($std_equip), "vin" => $vin, "Year" => $specs['Year'], "Make" => $specs['Make'], "Model" => $specs['Model'], "Mileage" => $specs['Mileage'], "endson" => $endTimes, "endtimestamp" => strtotime($endTimes));
        if ($action == "update") {
            $common->update("ebay_car", $datArray, " itemId = " . $itemId);
        } elseif ($action == "save") {
            $common->save("ebay_car", $datArray);
        }
    }
    return $common->CustomQuery("Select * from ebay_car where itemId = " . $itemId);
}
<?php

include "conf/config.inc.php";
$value = $_POST['value'];
$attribute = $_POST['attr'];
$manufac = $_POST['manufact'];
$classname = $_POST["class"];
if ($classname == "") {
    $classname = "customStyleSelectBox";
}
$common = new common();
if ($attribute == "model") {
    $year = $common->CustomQuery("SELECT Year From ebay_car where Make LIKE '%" . $manufac . "%' AND Model = '" . $value . "' GROUP BY Year order by Year ASC;");
    $returnvalue = '<select class="' . $classname . '" name="madeYear" id="madeYear">';
    $returnvalue .= "<option value=''>Ann&eacute;e</option>";
    while ($yrow = mysql_fetch_object($year)) {
        $returnvalue .= "<option value='" . $yrow->Year . "'>" . $yrow->Year . "</option>";
    }
    $returnvalue .= '</select>';
    echo $returnvalue;
} else {
    if ($attribute == "manufacturer") {
        $model = $common->CustomQuery("SELECT Model From ebay_car where Make LIKE '%" . $value . "%'  GROUP BY Model order by Model ASC;");
        $returnvalue = '<select class="' . $classname . '" id="model" name="model" onchange="ajaxcall(this.value,\'model\',\'year\',\'' . $value . '\')">';
        $returnvalue .= "<option value=''>Mod&egrave;les</option>";
        while ($yrow = mysql_fetch_object($model)) {
            $returnvalue .= "<option value='" . $yrow->Model . "'>" . $yrow->Model . "</option>";
        }
        $returnvalue .= '</select>';
        echo $returnvalue;
    }
Example #17
0
          </ul>
        </div>
        <div class="webaddrss">
          <div class="address"><a href="<?php 
echo DEFAULT_URL;
?>
" target="_blank">www.sylc-export.com/</a></div>
          <a href="<?php 
echo DEFAULT_URL;
?>
/<?php 
echo $common->getPageSlug('13');
?>
">Politique de Confidentialité</a>
          <?php 
$urls = $common->CustomQuery("Select * from admins where id =1");
$urlinfo = mysql_fetch_object($urls);
?>
          <ul>
            <?php 
/*?><li><a href="<?php echo $urlinfo->twitter; ?>" target="_blank"><img src="<?php echo DEFAULT_URL ?>/images/twitter.png" alt="Twitter" /></a></li><?php */
?>
            <li><a href="<?php 
echo $urlinfo->facebook;
?>
" target="_blank"><img src="<?php 
echo DEFAULT_URL;
?>
/images/facebook.png" alt="Facebook" /></a></li>
            <li><a href="<?php 
echo $urlinfo->youtube;
<?php

extract($_POST);
extract($_GET);
$common = new common();
$modelList = array();
$manf = $common->CustomQuery("SELECT * FROM `attribute_option_value` WHERE `attribute_id` = '2' ORDER BY `value`,`sort_order` ASC");
while ($row = mysql_fetch_assoc($manf)) {
    $modelList[] = $row;
}
if ($parent_id) {
    $terms = $common->CustomQuery("Select mainpage.* from pages as mainpage left join pages as parentCat on (mainpage.page_cat = parentCat.id) where mainpage.slug = '{$page_id}' AND parentCat.slug = '{$parent_id}'");
} else {
    $terms = $common->CustomQuery("Select * from pages where slug = '{$page_id}'");
}
$terms = mysql_fetch_object($terms);
$join = null;
if (isset($stockType) && $stockType != '') {
    $value = 0;
    $stockType = strtolower($stockType);
    if ($stockType == 'neuf') {
        $value = 388;
    } else {
        if ($stockType == 'classic') {
            $value = 389;
        }
    }
    $join .= ' join car_int on cars.car_id = car_int.car_id and car_int.attribute_id = 26 and car_int.value = ' . $value;
}
$join .= ' join car_decimal as prices on cars.car_id = prices.car_id and prices.attribute_id = 11 ';
$join .= ' join car_varchar as model on cars.car_id = model.car_id and model.attribute_id = 22 ';
$cars = $common->CustomQuery("select cars.car_id,prices.value as price,model.value as model, brand.logo from car as cars join brands as brand on cars.brand_id = brand.id  " . $join . " where  " . $conditions . " group by cars.car_id order by {$sort['0']} {$sort['1']} {$pages->limit}");
$total_rows = mysql_num_rows($cars);
$pages = new Paginator();
$pages->items_total = $total_rows;
$pages->default_ipp = 15;
$pages->paginate();
$options = array('madeYear', 'carName', 'images', 'extColor', 'interColor', 'fullName', 'stockType', 'model', 'price');
//$temp = $common->getCarWithAttrList($carid ,$options);
if (isset($_POST) && isset($_POST["submit_inq"])) {
    global $db;
    $common_obj = new common();
    $arr = array("car_id" => $_POST['car_id'], "name" => $_POST['name'], "email" => $_POST['email'], "phone" => $_POST['phone'], "message" => $_POST['message'], "type" => 0);
    $common_obj->save("contact", $arr);
    // Your subject
    $heading = $subject = 'Inquiry À propos de voitures';
    $subHeading = 'La personne qui vous a contacté est ' . $_POST['name'];
						timeOut:5000,
						opacity:0.6,
						autoClose:true
					});
				});
			})(jQuery); 
		</script>';
}
include "functions/ebay_functions.php";
if (isset($_POST) && isset($_POST["consult_to_spacs"])) {
    global $db;
    $arr = array("car_id" => $_POST['car_id'], "name" => $_POST['name'] . " " . $_POST['prename'], "email" => $_POST['email'], "time" => $_POST['recall'], "question" => $_POST['question'], "phone" => $_POST['phone'], "message" => $_POST['message'], "type" => 3);
    $common->save("contact", $arr);
    $carid = $_POST['car_id'];
    // get car details
    $ebayid = $common->CustomQuery("Select * from ebay_car where itemId = " . $carid);
    $item = '';
    if (mysql_num_rows($ebayid) > 0) {
        $item = mysql_fetch_object($ebayid);
        //echo "<pre>";print_r($item);die;
        if ($item->vin == '') {
            $ebayid = fetchEbayCar($carid, "update");
        }
    } else {
        $ebayid = fetchEbayCar($carid, "save");
        $item = mysql_fetch_object($ebayid);
    }
    $arr_new = array("itemId" => $_POST['car_id'], "title" => $_POST['title'], "buyItNowPrice" => $_POST['buyItNowPrice'], "postalCode" => $_POST['postalCode'], "location" => $_POST['location'], "listingType" => $_POST['listingType'], "endson" => $_POST['endson'], "endtimestamp" => $_POST['endtimestamp'], "buyItNowAvailable" => $_POST['buyItNowAvailable']);
    $common->save("ebay_car", $arr_new);
    // Send Admin notifications
    $comment1 = str_replace("\\'", "'", $_POST['message']);
    }
    if (isset($madeYear) && $madeYear != '') {
        $where .= $concat . "Year  = '" . $madeYear . "'";
        $concat = ' AND ';
        $searched .= ', Year: <span class="searched">' . $madeYear . '</span>';
    }
    if (isset($model) && $model != '') {
        $where .= $concat . "Model LIKE '%" . $model . "%'";
        $concat = ' AND ';
        $searched .= ', Model: <span class="searched">' . $model . '</span>';
    }
    if (isset($price) && $price != '') {
        $price = explode('~', $price);
        $where .= $concat . "buyItNowPrice BETWEEN " . $price[0] * 1000 . " AND " . $price[1] * 1000 . " ";
        $searched .= "with price range <span class=\"searched\"> \$" . $price[0] * 1000 . " USD  to \$" . $price[1] * 1000 . " USD </span>";
    }
}
if (isset($filter) && $filter != '') {
    $where .= $concat . "buyItNowAvailable = " . $filter;
}
if ($where != '') {
    $where = " WHERE " . $where;
}
$ebayid = $common->CustomQuery("Select count(*) as total from ebay_car " . $where);
$item = mysql_fetch_object($ebayid);
$pages = new Paginator();
$pages->items_total = $item->total;
$pages->default_ipp = 15;
$pages->paginate();
$resp = $common->CustomQuery("Select * from ebay_car " . $where . " " . $order . " " . $pages->limit);
$Make = $common->CustomQuery("SELECT Make From ebay_car GROUP BY Make order by Make ASC");
" <?php 
    if ($page == 'logout') {
        ?>
 class="active" <?php 
    }
    ?>
><span>D&Eacute;CONNEXION</span></a></li>
		<?php 
}
?>
		</ul>
	</div>
      
      <div class="contact_no_m"><?php 
$commons = new common();
$urls = $commons->CustomQuery("Select * from admins where id =1");
$urlinfo = mysql_fetch_object($urls);
?>
          <!--<ul class="header_social">
      <li><a href="<?php 
echo $urlinfo->facebook;
?>
" target="_blank"><img src="<?php 
echo DEFAULT_URL;
?>
/images/facebook_head.png" alt="Facebook" /></a></li>
      <li><a href="<?php 
echo $urlinfo->youtube;
?>
" target="_blank"><img src="<?php 
echo DEFAULT_URL;
<?php

extract($_GET);
extract($_POST);
$search = new search();
$common = new common();
if ($sorter == "") {
    $sorter = "prix~asc";
}
$sort = explode("~", $sorter);
if (isset($stockType) && $stockType != '') {
    $cars = $common->CustomQuery("select cars.*,brand.logo from new_car as cars join brands as brand on cars.brand_id = brand.id  where cars.publish = 1 and brand.publish = 1 and cars.stockType LIKE '%" . urldecode($stockType) . "%'");
    $total_rows = mysql_num_rows($cars);
    $pages = new Paginator();
    $pages->items_total = $total_rows;
    $pages->default_ipp = 15;
    $pages->paginate();
    $cars = $common->CustomQuery("select cars.*,brand.logo from new_car as cars join brands as brand on cars.brand_id = brand.id  where cars.publish = 1 and brand.publish = 1 and cars.stockType LIKE '%" . urldecode($stockType) . "%' order by {$sort['0']} {$sort['1']} {$pages->limit}");
} else {
    $cars = $common->CustomQuery("select cars.*,brand.logo from new_car as cars join brands as brand on cars.brand_id = brand.id  where cars.publish = 1 and brand.publish = 1");
    $total_rows = mysql_num_rows($cars);
    $pages = new Paginator();
    $pages->items_total = $total_rows;
    $pages->default_ipp = 15;
    $pages->paginate();
    $cars = $common->CustomQuery("select cars.*,brand.logo from new_car as cars join brands as brand on cars.brand_id = brand.id  where cars.publish = 1 and brand.publish = 1 order by {$sort['0']} {$sort['1']} {$pages->limit}");
}
if (isset($_POST) && isset($_POST["submit_inq"])) {
    global $db;
    $common_obj = new common();
    $arr = array("car_id" => $_POST['car_id'], "name" => $_POST['name'], "email" => $_POST['email'], "phone" => $_POST['phone'], "message" => $_POST['message'], "type" => 0);
<?php

extract($_POST);
extract($_GET);
$common = new common();
$modelList = array();
$manf = $common->CustomQuery("SELECT * FROM `attribute_option_value` WHERE `attribute_id` = '2' ORDER BY `value`,`sort_order` ASC");
while ($row = mysql_fetch_assoc($manf)) {
    $modelList[] = $row;
}
//print_r($modelList);//die;
<?php

session_start();
include "conf/config.inc.php";
$common = new common();
$settingid = $common->CustomQuery("SELECT * FROM `admins` WHERE `id` = '1'");
$setting = mysql_fetch_object($settingid);
$templaeid = $common->CustomQuery("SELECT * FROM `template` where id = '1'");
$template = mysql_fetch_object($templaeid);
$adminemail = $template->email;
$subject = $template->subject;
$message = $template->template;
$currentTimestamp = getCurrentTimestamp();
if ($template->next_date == 'daily') {
    $next = $currentTimestamp + 24 * 60 * 60;
} else {
    $next = $currentTimestamp + 7 * 24 * 60 * 60;
}
$address = $setting->office_address;
$phone = $setting->phone1;
//$contactid = $common->CustomQuery("SELECT * FROM `contact` WHERE  FIND_IN_SET(type,'0,2') group by email");
$contactid = $common->CustomQuery("SELECT * FROM `contact` WHERE type = '0' group by email");
$count = mysql_num_rows($contactid);
$i = 1;
/*while($contact = mysql_fetch_object($contactid)){ 
	pr($contact);
}
exit;
*/
while ($contact = mysql_fetch_object($contactid)) {
    $name = $contact->name;
function fetchEbayCar($itemId, $action)
{
    $common = new common();
    $version = 773;
    $devid = "e872f3d0-8bee-4784-b631-f0c6e0468c21";
    $appid = "Planetwe-4831-4322-a03c-57a0a2d3aafb";
    $certid = "574bc5e0-889c-431c-b3aa-918f19b83e0e";
    $siteid = 0;
    $callname = "GetItem";
    $xml = '<?xml version="1.0" encoding="utf-8"?>
				<GetItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
					<RequesterCredentials>
						<eBayAuthToken>AgAAAA**AQAAAA**aAAAAA**4gqXUg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AGkISjAJWBpg6dj6x9nY+seQ**An0BAA**AAMAAA**5D3c3AfScHkf+mmuQBsiuSAHvJ5dvb5KeUGyfX43IK6P4wjRzo5Rj7MxubzlEB+QmPf+nrkYAUU8V0nczpqvYaFl8orKRmqEdXKW0JqUE72CHfNIeNkcE7usMZZ9g97D9Be4yfDdAILBxTOEh4TdV4U3YD19Gfq1aSalXtSnLNndWFKS3j4vO4yBcZImdPkoNgCj7gtwidbz8l6zv+EHBUIRXqoEMP6gAZIY2JLjGq1T/u96NqQj7UKyzwoCvAsmUWL/0JTieQXuKqlM5sFdwKdEUAJzgaiK93ghP2aLFde3Rxqgh5sijGeT+f2KIKODYO9PILnRsiEKFyamt5OPLRmPfFeKBAv9kYoj0plLHbeeEBMP+F6QdwHrnK8pq/xMMm1K71JpjN1hoI3MbrFzNLNh/6b8NTHjlbYqjn8e6TJ2j8CyQe8XaiB4BlI4aBdJXW2ikxaWtBP7SAHTSmTFKk7t7xNP3Ti+BAAr1Uc+kyMBLs7o2m5vvJxz6bj/fxgcoUAv+GNt5/PtuuB60o4x9bG1WWp50+zZsqBlLCEwBxDKhbZ49jJRNc8nbM9xUcaupLxVTxUwbqoPpWB2i/dZuA+7xxfB0AyCTzFU9xPpZUIoEfCUcSFtZ0euub2w9jET4imzeJCc41sE3Qo/wB2AubK5oMn6wJXTsvu2sHRQgIsM/vJOweg6uLIZ15gb6Pn7JD+trob9IzCXoSwK/ytCdDOWfT589Fg7tw6A4pK31eMUjIwaYuH+l1SoItIBWBLV</eBayAuthToken>
					</RequesterCredentials>
					<DetailLevel>ReturnAll</DetailLevel>
					<IncludeItemSpecifics>true</IncludeItemSpecifics>
					<ItemID>' . $itemId . '</ItemID>
				</GetItemRequest>​';
    $ch = curl_init("https://api.ebay.com/ws/api.dll?siteid={$siteid}");
    $headers = array('X-EBAY-API-COMPATIBILITY-LEVEL: ' . $version, 'X-EBAY-API-DEV-NAME: ' . $devid, 'X-EBAY-API-APP-NAME: ' . $appid, 'X-EBAY-API-CERT-NAME: ' . $certid, 'X-EBAY-API-CALL-NAME: ' . $callname, 'X-EBAY-API-SITEID: ' . $siteid);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
    $output = curl_exec($ch);
    curl_close($ch);
    $res = simplexml_load_string($output);
    $item = $res->Item;
    $gallery = array();
    foreach ($item->PictureDetails->PictureURL as $val) {
        $gallery[] = (string) $val;
    }
    $gallerystr = implode("**", $gallery);
    $ConditionDisplayName = (string) $item->ConditionDisplayName;
    $description = (string) $item->Description;
    $specs = array();
    foreach ($item->ItemSpecifics->NameValueList as $arr) {
        $valus = array();
        foreach ($arr->Value as $val) {
            $temp = (string) $val;
            $valus[] = $temp;
        }
        $values = implode(",", $valus);
        $key = (string) $arr->Name;
        $specs[$key] = $values;
    }
    $std_equips = array();
    foreach ($specs as $keys => $data) {
        $std_equips[] = $keys . "^" . $data;
    }
    $std_equip = implode("~", $std_equips);
    $postalCode = (string) $item->PostalCode;
    $location = (string) $item->Location;
    $country = (string) $item->Country;
    $timeLeft = (string) $item->TimeLeft;
    if ((int) $item->BuyItNowPrice == 0) {
        $buyItNowAvailable = 0;
        $buyItNowPrice = (double) $item->SellingStatus->ConvertedCurrentPrice;
    } else {
        $buyItNowAvailable = 1;
        $buyItNowPrice = (double) $item->BuyItNowPrice;
    }
    $vin = (string) $item->VIN;
    $endTimes = (string) $item->ListingDetails->EndTime;
    $listingType = (string) $item->ListingType;
    $title = (string) $item->Title . " " . (string) $item->SubTitle;
    $datArray = array("itemId" => $itemId, "galleryURL" => mysql_escape_string($gallerystr), "postalCode" => $postalCode, "location" => $location, "country" => $country, "endTime" => $timeLeft, "buyItNowPrice" => $buyItNowPrice, "listingType" => $listingType, "buyItNowAvailable" => $buyItNowAvailable, "ConditionDisplayName" => $ConditionDisplayName, "title" => mysql_escape_string($title), "description" => base64_encode($description), "stdequip" => mysql_escape_string($std_equip), "vin" => $vin, "Year" => $specs['Year'], "Make" => $specs['Make'], "Model" => $specs['Model'], "Mileage" => $specs['Mileage'], "endson" => $endTimes, "endtimestamp" => strtotime($endTimes));
    if ($action == "update") {
        $common->update("ebay_car", $datArray, " itemId = " . $itemId);
    } elseif ($action == "save") {
        $common->save("ebay_car", $datArray);
    }
    return $common->CustomQuery("Select * from ebay_car where itemId = " . $itemId);
}
" <?php 
    if ($page == 'logout') {
        ?>
 class="active" <?php 
    }
    ?>
><span>D&Eacute;CONNEXION</span></a></li>
		<?php 
}
?>
		
		</ul>
	</div>
    <div class="contact_no_m"><?php 
$commons = new common();
$urls = $commons->CustomQuery("Select * from admins where id =1");
$urlinfo = mysql_fetch_object($urls);
?>
		  
		  
	<!-- <ul class="header_social">
      <li><a href="<?php 
echo $urlinfo->facebook;
?>
" target="_blank"><img src="<?php 
echo DEFAULT_URL;
?>
/images/facebook_head.png" alt="Facebook" /></a></li>
      <li><a href="<?php 
echo $urlinfo->youtube;
?>