Index: trunk/dports/net/nedi/Portfile
===================================================================
--- trunk/dports/net/nedi/Portfile	(revision 40454)
+++ trunk/dports/net/nedi/Portfile	(revision 40455)
@@ -5,4 +5,5 @@
 name			nedi
 version			1.0
+revision		1
 categories		net
 maintainers		markd
@@ -21,4 +22,5 @@
 worksrcdir		${name}
 checksums		md5 adae0699ea6d010d6d92f807f04ca442
+patchfiles		patch-html-Reports-Modules.php-diff
 
 depends_lib		port:perl5.8 \
@@ -55,5 +57,4 @@
 
 use_configure		no
-patch {}
 build {}
 
Index: trunk/dports/net/nedi/files/patch-html-Reports-Modules.php-diff
===================================================================
--- trunk/dports/net/nedi/files/patch-html-Reports-Modules.php-diff	(revision 40455)
+++ trunk/dports/net/nedi/files/patch-html-Reports-Modules.php-diff	(revision 40455)
@@ -0,0 +1,82 @@
+--- html/Reports-Modules.php.orig	2008-06-06 20:49:43.000000000 -0700
++++ html/Reports-Modules.php	2008-06-25 22:36:11.000000000 -0700
+@@ -10,6 +10,7 @@
+ # 03/07/07	minor changes & new inventory
+ # 04/09/07	implemented CSS scheme
+ # 20/09/07	implemented language support
++# 24/06/08	fixed ccc support (provided by Andreas Wassatsch)
+ */
+ 
+ error_reporting(E_ALL ^ E_NOTICE);
+@@ -190,20 +191,25 @@
+ 			echo "<tr class=\"imgb\" class=\"blu\"><th>\n";
+ 			echo "<a href=\"Devices-Status.php?dev=$ud\"><b>$d[0]</b></a></th>\n";
+ 
+-	//$query_ccc = "SELECT status,contract FROM cisco_contracts WHERE serial=\"$d[2]\"";
+-	$query_ccc = GenQuery('cisco_contracts','s','status,contract','','',array('serial'),array('='),array($d[2]));
++	//$query_ccc = GenQuery('cisco_contracts','s','service_level,contract_number,end_date,DATEDIFF(STR_TO_DATE(end_date, '%d-%b-%Y'),CURDATE())','','',array('serial'),array('='),array($d[2]));
++	$query_ccc = "SELECT service_level,contract_number,end_date,DATEDIFF(STR_TO_DATE(end_date, '%d-%b-%Y'),CURDATE()) FROM cisco_contracts WHERE serial_number=\"$d[2]\"";
+ 	$res_ccc = @DbQuery($query_ccc,$link_ccc);
+ 	$ccc = @DbFetchRow($res_ccc);
+-	if ($ccc[0] == 0) {
++	if ($ccc[3] > 30) {
+ 		$color = "green";
+-	} elseif ($ccc[0] == 1) {
++		$ccc_message = "$ccc[0]<br>Contract #$ccc[1] valid till $ccc[2]";
++	} elseif ($ccc[3] > 1) {
+ 		$color = "darkyellow";
+-	} elseif ($ccc[0] == 2) {
+-		$color = "red";
++		$ccc_message = "$ccc[0]<br>Contract #$ccc[1] valid till $ccc[2]";
+ 	} else {
+-		$color = "orange";
++		$color = "red";
++		$ccc_message = "$ccc[0]<br>Contract #$ccc[1] expired since $ccc[2] !";
++	}
++	if ($ccc[1] == "") {
++		$color = "blue";
++		$ccc_message = "Unknown";
+ 	}
+-			echo "<td align=right>-</td><td><b>$d[1]</b></td><td>$d[2]</td><td><font color=$color>$ccc[1]</font></td></tr>\n";
++			echo "<td align=right>-</td><td><b>$d[1]</b></td><td>$d[2]</td><td><font color=$color>$ccc_message</font></td></tr>\n";
+ 
+ 			$mquery	= GenQuery('modules','s','*','slot','',array('device'),array('='),array($d[0]));
+ 			$mres	= @DbQuery($mquery,$link);
+@@ -212,19 +218,24 @@
+ 					if ($row % 2){$bg = "txta";}else{$bg = "txtb";}
+ 					$row++;
+ 					echo "<tr class=\"$bg\"><th>\n";
+-	$query_ccc = "SELECT status,contract FROM cisco_contracts WHERE serial=\"$m[4]\"";
+-	$res_ccc = @DbQuery($query_ccc,$link_ccc);
+-	$ccc = @DbFetchRow($res_ccc);
+-	if ($ccc[0] == 0) {
+-		$color = "green";
+-	} elseif ($ccc[0] == 1) {
+-		$color = "darkyellow";
+-	} elseif ($ccc[0] == 2) {
+-		$color = "red";
+-	} else {
+-		$color = "orange";
+-	}
+-					echo "<td align=right>$m[1]</td><td><b>$m[2]</b> $m[3]</td><td>$m[4]</td><td><font color=$color>$ccc[1]</font></td></tr>\n";
++					$query_ccc = "SELECT service_level,contract_number,end_date,DATEDIFF(STR_TO_DATE(end_date, '%d-%b-%Y'),CURDATE()) FROM cisco_contracts WHERE serial_number=\"$m[2]\"";
++					$res_ccc = @DbQuery($query_ccc,$link_ccc);
++					$ccc = @DbFetchRow($res_ccc);
++					if ($ccc[3] > 30) {
++						$color = "green";
++						$ccc_message = "$ccc[0]<br>Contract #$ccc[1] valid till $ccc[2]";
++					} elseif ($ccc[3] > 1) {
++						$color = "darkyellow";
++						$ccc_message = "$ccc[0]<br>Contract #$ccc[1] valid till $ccc[2]";
++					} else {
++						$color = "red";
++						$ccc_message = "$ccc[0]<br>Contract #$ccc[1] expired since $ccc[2]";
++					}
++					if ($ccc[1] == "") {
++						$color = "blue";
++						$ccc_message = "Unknown";
++					}
++					echo "<td align=right>$m[1]</td><td><b>$m[2]</b> $m[3]</td><td>$m[4]</td><td><font color=$color>$ccc_message</font></td></tr>\n";
+ 				}
+ 				@DbFreeResult($mres);
+ 			}else{
