<?
  include("vars.inc.php");
  //include($EASYPORTAL_DOC_ROOT."functions/functions.php");
?>
	<div class="title">
		<img src="images/dienste.png" align="left" class="icon">Dienste
	</div>
	<div class="content">
		<table cellspacing="3">
			<?
				exec("cat ".$EASYPORTAL_DOC_ROOT."includes/dienste.inc", $SERVICES);
				$IP = shell_exec($EASYPORTAL_DOC_ROOT."scripts/easyvdr_hw.sh --php --ip");

				foreach ($SERVICES as $Satz) {
					$Daten = explode(";",$Satz);
					$Aktiv = shell_exec("ps ax|grep -v grep|grep $Daten[0] &>/dev/null; echo $?");

					if ($Aktiv == 0){
						if ($Daten[2] != ""){
							if ($Daten[2] == "21") {
								echo "<tr onmouseover=\"Tip('$TIP_DIENSTE_RUN')\"><td valign=\"top\"><img src=\"images/run.png\" alt=\"Aktiv\"></td><td valign=\"top\">&nbsp;<a target='_blank' href='ftp://".$IP."'>$Daten[1]</a></td></tr>";
							}
							else {
								echo "<tr onmouseover=\"Tip('$TIP_DIENSTE_RUN')\"><td valign=\"top\"><img src=\"images/run.png\" alt=\"Aktiv\"></td><td valign=\"top\">&nbsp;<a target='_blank' href='http://".$IP.":$Daten[2]'>$Daten[1]</a></td></tr>";
							}
						}
						else {
							echo "<tr onmouseover=\"Tip('$TIP_DIENSTE_RUN')\"><td valign=\"top\"><img src=\"images/run.png\" alt=\"Aktiv\"></td><td valign=\"top\">&nbsp;".$Daten[1]."</td></tr>";
						}
					}
				}
			?>
		</table>
	</div>