Example #1
1
function ShowSearchForm(VirgoAPI $api, Smarty $smarty, $lng)
{
    $smarty->assign("ShowSearchForm", true);
    $smarty->assign("provinces", $api->GetInvestmentsProvinces($lng));
    $smarty->assign("categories", $api->GetInvestmentsCategories($lng));
    $smarty->assign("post", $_POST);
}
Example #2
1
function ShowSearchForm(VirgoAPI $api, Smarty $smarty, $idLng)
{
    $smarty->assign("ShowSearchForm", true);
    $smarty->assign("objects", $api->GetObjects());
    $smarty->assign("provinces", $api->GetProvinces($idLng));
    $smarty->assign("flatTypes", $api->GetBuildingTypes($idLng));
    $smarty->assign("houseTypes", $api->GetHouseTypes($idLng));
    $smarty->assign("fieldDestiny", $api->GetFieldDestiny($idLng));
    $smarty->assign("localDestiny", $api->GetPremisesDestiny($idLng));
    $smarty->assign("post", $_POST);
}
Example #3
1
<?php

define("VIRGO_API_DIR", "virgo_api");
require_once "smarty/Smarty.class.php";
require_once VIRGO_API_DIR . "/virgo_api.php";
require "Sajax.php";
require VIRGO_API_DIR . "/ajaxfunctions.php";
sajax_init();
sajax_export("AJAXSynchronizeDB");
sajax_handle_client_request();
$smarty = new Smarty();
$api = new VirgoAPI();
sajax_handle_client_request();
$smarty->assign("synchronizeDB", $api->GetSynchronizeJS());
$smarty->assign("ajax", sajax_show_javascript());
$smarty->display("index.tpl");
Example #4
1
<?php

define("VIRGO_API_DIR", "virgo_api");
require_once VIRGO_API_DIR . "/virgo_api.php";
require_once 'functions.php';
if (!isset($_GET['element'])) {
    die("Error. No parameters.");
}
if (!isset($_GET['gid']) && !$_GET['element'] == '11') {
    die("Error. No parameters.");
}
$element = $_GET['element'];
$gid = 0;
if (isset($_GET['gid'])) {
    $gid = $_GET['gid'];
}
$del = false;
if (isset($_GET['del']) && $_GET['del'] == 1) {
    $del = true;
}
$force = false;
if (isset($_GET['force']) && $_GET['force'] == 1) {
    $force = true;
}
$api = new VirgoAPI();
$ret = $api->SynchronizeSiteElement($element, $gid, $del, $force);
echo "Synchronizing site element completed:<br />{$ret}";
Example #5
0
<?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);
Example #6
0
 /**
  * Return path to department photo file, if file not exist, download it and save on disk.
  * @param string $customSize Custom size, written as width_height, ex. 400_300
  * @return string
  */
 public function GetPhotoImageSrc($customSize)
 {
     if ($this->GetPhotoFile() == "") {
         return "";
     }
     $api = new VirgoAPI();
     return $api->GetAgentDepartmentPhoto($this->GetId(), $customSize, 2, str_replace(array('-', ':', ' '), array(''), $this->GetPhotoFile()));
 }
Example #7
0
function AJAXSynchronizeOffersCount()
{
    $api = new VirgoAPI();
    return $api->SynchronizeOffersCount();
}