<?php if (!defined('VIRGO_API_DIR')) { define("VIRGO_API_DIR", "virgo_api"); } require_once VIRGO_API_DIR . "/virgo_api.php"; require_once 'functions.php'; $api = new VirgoAPI(); if (isset($_GET['offers'])) { $count = $api->SynchronizeDB(true); echo "Synchronizing database completed ({$count})."; } else { if (isset($_GET['graphics'])) { $ret = $api->SynchronizeGraphics(); echo "Synchronizing graphics completed:<br />{$ret}"; } else { if (isset($_GET['clearphotos'])) { $idofe = $idusr = $idodd = 0; if (isset($_GET['idofe'])) { $idofe = $_GET['idofe']; } if (isset($_GET['idusr'])) { $idusr = $_GET['idusr']; } if (isset($_GET['idodd'])) { $idodd = $_GET['idodd']; } if ($idofe > 0) { $ret = $api->ClearPhotos($idofe); } elseif ($idusr > 0) { $ret = $api->ClearWebPhotos($idusr);