* * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt * */ /*******************************************************************************/ /* */ /* This script is called from nfsen packages to translate sensors uuid to name */ /* */ /*******************************************************************************/ set_include_path('/usr/share/ossim/include'); error_reporting(0); ini_set("display_errors", "0"); //This is used to avoid an error when there is not connection to mysql if (!isset($GLOBALS["CONF"])) { $GLOBALS["CONF"] = array(); require_once 'ossim_db.inc'; $db = new ossim_db(); unset($GLOBALS["CONF"]); } else { require_once 'ossim_db.inc'; $db = new ossim_db(); } $uuid = $argv[1]; if (@$db->test_connect()) { $conn = $db->connect(); $name = Av_sensor::get_nfsen_channel_name($conn, $uuid); $db->close(); } else { $name = empty($uuid) ? 'Unknown' : $uuid; } echo $name;