Blame view

src/DATA/MANAGER/RemoveVI.php 726 Bytes
62372d94   Elena.Budnik   RemoveVi
1
2
3
4
5
6
<?php

/**
*  @file RemoveVI.php
*  @version $Id: RemoveVI.php 14 2013-09-23 11:23:28Z elena $
*  @brief DD Server Tools: 
05fbcab0   Elena.Budnik   DDServices reorga...
7
*  @arg  ViID [ BaseID ]
62372d94   Elena.Budnik   RemoveVi
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
*/
	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;

?>