Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > by-pkgid > 4c0bd1397a62cc84ac9783aac9f1aa76 > files > 39

echelog-0.6.2-2mdk.i586.rpm

<?

  include(Str_Replace("binsnapshot.php","config.inc",__FILE__));
  include(Str_Replace("binsnapshot.php","system.inc",__FILE__));

  if (!$message) $message="*";
  if (!$host) $host="*";
  if (!$agent) $agent="*";
  if (!$instance) $instance="*";

  $binsnapshot_params = Array (
            "$binsnapshot_executable",
	    "-C $binsnapshot_config_file",
            "-S BinSnapshot.InputDatafile=$binstorage.dat",
            "-S BinSnapshot.InputIndexfile=$binstorage.idx",
            "-S BinSnapshot.OutputFile=stdout",
            "-S \"BinSnapshot.MsgName=$message\"",
            "-S \"BinSnapshot.Host=$host\"",
            "-S \"BinSnapshot.AgentName=$agent\"",
            "-S \"BinSnapshot.Instance=$instance\"",
            "-S \"BinSnapshot.Time=$time\"");

  $result = mysystem ($binsnapshot_params, false);
  
  if (count($result) < 2 || (ereg ("xml version", $result[0]) == false))
  {
      for ($i=0;$i<count($result);$i++)
      {
          echo htmlentities ($result[$i]) . "<BR>";
      }
  }

  header ("Content-type: text/xml");

  for ($i=1;$i<count($result);$i++)
  {
      echo $result[$i];
  }

?>