示例#1
0
<?php

require "includes/configure.php";
require DIR_WS_INCLUDES . "application_top.php";
require DIR_WS_INCLUDES . "template_top.php";
$dataFeedPath = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "datafeed" . DIRECTORY_SEPARATOR;
require $dataFeedPath . "datafeed.php";
$dataFeedConfig = new DataFeed();
$data = $dataFeedConfig->getData();
$zones = $dataFeedConfig->getZones();
$zoneId = $dataFeedConfig->getZoneId();
$dataFeedConfig->getOptionsForForm($_SESSION['languages_id']);
$dataFeedConfig->initCountries();
$dataFeedConfig->initTablesColumns();
$dataFeedConfig->initShipping();
$dataFeedConfig->initZones();
$dataFeedConfig->defaultValues['condition'] = array(CONDITION_NEW => CONDITION_NEW, CONDITION_USED => CONDITION_USED);
$dataFeedConfig->defaultValues['ModelOwn'] = $dataFeedConfig->pluginFields;
if (isset($_GET['action']) && $_GET['action'] == 'saveForm') {
    $data = $_POST;
    $dataFeedConfig->setData($data);
    $zoneId = $dataFeedConfig->getZoneId();
    $dataFeedConfig->remove();
    $dataFeedConfig->install();
    $sPath = $dataFeedPath . "sdk" . DIRECTORY_SEPARATOR . "feed.php";
    if (!file_exists($sPath)) {
        echo "<p>SDK NOT FOUND</p>";
        return false;
    }
    require_once $sPath;
    $sPluginName = "osdatafeed";