95 lines
2.9 KiB
PHP
95 lines
2.9 KiB
PHP
<?php
|
|
// Define path to application directory
|
|
defined('APPLICATION_PATH')
|
|
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
|
|
|
|
// Define application environment
|
|
defined('APPLICATION_ENV')
|
|
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
|
|
|
// Ensure library/ is on include_path
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
realpath(APPLICATION_PATH . '/../library'),
|
|
get_include_path(),
|
|
)));
|
|
|
|
//Use classmap autoloader - useful with opcode and realpath cache
|
|
require_once 'Zend/Loader/AutoloaderFactory.php';
|
|
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
|
Zend_Loader_AutoloaderFactory::factory(array(
|
|
'Zend_Loader_ClassMapAutoloader' => array(
|
|
__DIR__ . '/../library/Zend/autoload_classmap.php',
|
|
__DIR__ . '/../library/Application/autoload_classmap.php',
|
|
__DIR__ . '/../library/Scores/autoload_classmap.php',
|
|
__DIR__ . '/../application/autoload_classmap.php',
|
|
),
|
|
'Zend_Loader_StandardAutoloader' => array(
|
|
'prefixes' => array(
|
|
'Zend' => __DIR__ . '/../library/Zend',
|
|
'Application' => __DIR__ . '/../library/Application',
|
|
'Scores' => __DIR__ . '/../library/Scores',
|
|
'SdMetier' => __DIR__ . '/../library/SdMetier',
|
|
'Metier' => __DIR__ . '/../library/Metier',
|
|
),
|
|
'fallback_autoloader' => true
|
|
)
|
|
));
|
|
|
|
// Create application, bootstrap, and run
|
|
$application = new Zend_Application(
|
|
APPLICATION_ENV,
|
|
APPLICATION_PATH . '/configs/application.ini'
|
|
);
|
|
|
|
$c = new Zend_Config($application->getOptions());
|
|
|
|
// Stockage Client => SD
|
|
$pathClientSend = '/home/data/clients/fransbonhomme/send';
|
|
|
|
// Stockage SD => Client
|
|
$pathClientRecv = '/home/data/clients/fransbonhomme/recv';
|
|
|
|
//Options
|
|
try {
|
|
$opts = new Zend_Console_Getopt(array(
|
|
'help|?' => "Displays usage information.",
|
|
'siren=s' => "SIREN",
|
|
));
|
|
$opts->parse();
|
|
} catch (Zend_Console_Getopt_Exception $e) {
|
|
echo $e->getUsageMessage();
|
|
exit;
|
|
}
|
|
|
|
//Usage
|
|
if( isset($opts->help) || count($opts->getOptions())==0 )
|
|
{
|
|
echo "\n"."Debuggage Scoring."."\n\n";
|
|
echo $opts->getUsageMessage();
|
|
exit;
|
|
}
|
|
|
|
$db = Zend_Db::factory($c->profil->db->metier);
|
|
Zend_Db_Table::setDefaultAdapter($db);
|
|
|
|
require_once APPLICATION_PATH.'/configs/config.php';
|
|
require_once 'framework/fwk.php';
|
|
require_once 'framework/common/chiffres.php';
|
|
require_once 'framework/common/dates.php';
|
|
require_once 'framework/mail/sendMail.php';
|
|
require_once 'Metier/partenaires/classMLiens2.php';
|
|
require_once 'Metier/partenaires/classMBanques.php';
|
|
require_once 'Metier/insee/classMInsee.php';
|
|
require_once 'Metier/scores/classMScores.php';
|
|
|
|
$tabIndiscore = calculIndiScore($opts->siren, 0, false, 2, false);
|
|
|
|
echo "NOTE/100 = ".$tabIndiscore['Indiscore'];
|
|
echo "\n";
|
|
echo "NOTE/20 = ".$tabIndiscore['Indiscore20'];
|
|
echo "\n";
|
|
echo "ENCOURS = ".$tabIndiscore['encours'];
|
|
echo "\n";
|
|
|
|
|