From 0ba7b3b898fa5047e95183e3ab1acd5b2abc9b9d Mon Sep 17 00:00:00 2001
From: root <root@orion.zcu.cz>
Date: Mon, 9 Jul 2012 12:13:54 +0200
Subject: [PATCH] uprava

---
 .../contrib/wardenweb/db.php.public           | 33 ++++++++++++++-----
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/src/warden-server/contrib/wardenweb/db.php.public b/src/warden-server/contrib/wardenweb/db.php.public
index c35b7ba..a7d20ca 100644
--- a/src/warden-server/contrib/wardenweb/db.php.public
+++ b/src/warden-server/contrib/wardenweb/db.php.public
@@ -1,12 +1,11 @@
 <?
-$host = "localhost"; 
-$dbname = "warden";
-$user = ""; 
-$pass = "";
-
-$db = mysql_pconnect($host, $user, $pass);
-if (!$db) { die('Could not connect: ' . mysql_error()); }
-mysql_select_db($dbname);
+#$host = "localhost"; 
+#$dbname = "warden";
+#$user = ""; 
+#$pass = "";
+#$db = mysql_pconnect($host, $user, $pass);
+#if (!$db) { die('Could not connect: ' . mysql_error()); }
+#mysql_select_db($dbname);
 
 function ownnetwhere2() {
 	#nacist seznam ownnet
@@ -45,5 +44,23 @@ function ownnetwhere() {
 	return $where;
 }
 
+function view_recode($tmp) {
+	$tmp['target_port'] = sprintf('<a href=show_TargetportActivity.php?port=%d>%d<a>',
+		$tmp['target_port'],$tmp['target_port']);
+	$tmp['source'] = sprintf('<a href=show_SourceActivity.php?source=%s>%s<a>',
+		$tmp['source'],$tmp['source']);
+
+	$tmp['h'] = $tmp['hostname'];
+	unset($tmp['hostname']);
+
+	$tmp['s'] = $tmp['service'];
+	unset($tmp['service']);
+
+	$tmp['t'] = $tmp['type'];
+	unset($tmp['type']);
+
+	return $tmp;
+}
+
 
 ?>
-- 
GitLab