2008-03-13 11:58:06 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								< ? php 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if  ( ! is_integer ( $i  /  2 ))  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $bg_colour  =  $list_colour_a ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $bg_colour  =  $list_colour_b ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2008-03-13 11:58:06 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								echo  " <tr bgcolor=' $bg_colour '> " ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-03-13 11:58:06 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								echo  '<td width=100 class=list-large> Vlan ' . $vlan [ 'vlan_vlan' ] . '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								echo  '<td width=200 class=box-desc>' . $vlan [ 'vlan_name' ] . '</td>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								echo  '<td class=list-bold>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-23 10:35:26 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-12-15 23:14:50 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  $vlan_ports  =  array (); 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  $otherports  =  dbFetchRows ( 'SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.port_id = V.port_id' ,  array ( $device [ 'device_id' ],  $vlan [ 'vlan_vlan' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								foreach  ( $otherports  as  $otherport )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $vlan_ports [ $otherport [ ifIndex ]]  =  $otherport ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2011-12-15 23:14:50 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  $otherports  =  dbFetchRows ( 'SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?' ,  array ( $device [ 'device_id' ],  $vlan [ 'vlan_vlan' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								foreach  ( $otherports  as  $otherport )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $vlan_ports [ $otherport [ ifIndex ]]  =  array_merge ( $otherport ,  array ( 'untagged'  =>  '1' )); 
							 
						 
					
						
							
								
									
										
										
										
											2008-03-13 11:58:06 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ksort ( $vlan_ports ); 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-12 08:50:47 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 13:36:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								foreach  ( $vlan_ports  as  $port )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $port  =  ifLabel ( $port ,  $device ); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( $vars [ 'view' ]  ==  'graphs' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        echo  " <div style='display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color:  " . $list_colour_b_b . " ;'>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    < div  style = 'font-weight: bold;' > " .makeshortif( $port['ifDescr'] ). " </ div > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    < a  href = 'device/device=".$device[' device_id '].' / tab = port / port = '.$port[' port_id ']."/'  onmouseover = \ " return overlib(' \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    < div  style = \ 'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device[' hostname '].'  -  '.$port[' ifDescr '].' </ div > \ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    '.$port[' ifAlias ' ] . "   \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    < img  src = \ 'graph.php?type=$graph_type&id=".$port[' port_id '].' & amp ; from = '.$config[' time '][' twoday '].' & amp ; to = '.$config[' time '][' now ' ] . " &width=450&height=150 \ '> \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ', CENTER, LEFT, FGCOLOR, ' #e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\"  >"."<img src='graph.php?type=$graph_type&id=".$port['port_id'].'&from='.$config['time']['twoday'].'&to='.$config['time']['now']."&width=132&height=40&legend=no'>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    </ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    < div  style = 'font-size: 9px;' > " .truncate(short_port_descr( $port['ifAlias'] ), 22, '').'</div>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								   </ div > ' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        echo  $vlan [ 'port_sep' ] . generate_port_link ( $port ,  makeshortif ( $port [ 'label' ])); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $vlan [ 'port_sep' ]  =  ', ' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( $port [ 'untagged' ])  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            echo  '(U)' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} //end foreach
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								echo  '</td></tr>' ;