RemoveVI.php
726 Bytes
<?php
/**
* @file RemoveVI.php
* @version $Id: RemoveVI.php 14 2013-09-23 11:23:28Z elena $
* @brief DD Server Tools:
* @arg ViID , [BaseID]
*/
if (!function_exists('__autoload'))
{
function __autoload($class_name) {
require_once $class_name . '.php';
}
}
putenv("LD_LIBRARY_PATH=".getenv("LD_LIBRARY_PATH"));
putenv("PATH=./:".getenv("DDBASEBIN").":/bin:/usr/bin");
set_include_path("./:".getenv("DATAMANAGER"));
$ViID = strtolower($argv[1]);
if ($argc == 3)
$BaseID = strtoupper($argv[2]);
else
$BaseID = "LOCAL";
$baseMgr = new DDBaseMgr();
if ($baseMgr->viExists($ViID, $BaseID))
$baseMgr->deleteVi($ViID, $BaseID);
else
echo "NO $ViID in DDsys.xml".PHP_EOL;
?>