<?php
// LOCATION FROM ROOT TO WHERE THE CLASSES WILL BE STORED
// EXAMPLE: '/home/user/classes'
define('PATH_CLASSES','');
// ARRAY of other classes by 3 Service Solution
$aClasses = array('syncfile','ddf','te','ftp','cpanel');
$vFilePath = 'http://www.3servicesolution.com/_classes';
$vRemoteSyncFile = $vFilePath.'/threesssyncfile.class.inc';
$vLocalSyncFile = PATH_CLASSES.'/threesssyncfile.class.inc';
if (!file_exists($vLocalSyncFile))
{
$vSyncFileString = file_get_contents($vRemoteSyncFile);
if ($vSyncFileString != '')
{
if ($vHandle = fopen($vLocalSyncFile, 'a'))
{
fwrite($vHandle, $vSyncFileString);
fclose($vHandle);
}
}
require($vLocalSyncFile);
}
else require($vRemoteSyncFile);
if (PATH_CLASSES != '')
{
for($i=0;$i<count($aClasses);$i++)
{
$vRemoteFile = $vFilePath."/threess".$aClasses[$i].".class.inc";
$vLocalFile = PATH_CLASSES."/threess".$aClasses[$i].".class.inc";
$sync = new threessSyncFile($vRemoteFile,$vLocalFile);
//$sync->debug = True; // UNCOMMENT to view errors
$sync->startSync();
}
}
else echo 'Missing PATH_CLASSES';
?>
|