1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
$valeur='<table>';
while ($row=mysql_fetch_array($result_port)) {
$nb=$nb+1;
$valeur.='<tr>'
.'<td style="background-color:orange;">'.$row["port_switch"].'</td>'
.'<td>media</td>'
.'<td><select name="media'.$nb.'">'
.'<option '.selectionner($row['media_switch'],'').' value=""></option>'
.'<option '.selectionner($row['media_switch'],'100M Cu - Half').' value="100M Cu - Half">100M Cu - Half</option>'
.'<option '.selectionner($row['media_switch'],'100M Cu - Full').' value="100M Cu - Full">100M Cu - Full</option>'
.'<option '.selectionner($row['media_switch'],'100M Fo - Full').' value="100M Fo - Full">100M Fo - Full</option>'
.'<option '.selectionner($row['media_switch'],'1G Cu - Full').' value="1G Cu - Full">1G Cu - Full</option>'
.'<option '.selectionner($row['media_switch'],'1G Fo - Full').' value="1G Fo - Full">1G Fo - Full</option>'
.'<option '.selectionner($row['media_switch'],'Auto').' value="Auto">Auto</option>'
.'</select></td>'
.'<td>infra</td><td><input type="edit" value="'.$row['vlan_switch'].'" name="infra'.$nb.'"></td>'
.'<td>Port channel</td><td><input type="edit" name="channel'.$nb.'" value="'.$row['port_channel_switch'].'"></td>'
.'<td>Vlan</td><td><input type="edit" name="vlan'.$nb.'" value="'.$row['vlan_switch'].'"></td>'
.'<td><input type="button" value="Enregistrer"'
.' onclick="Enregistrement_switch(\''.$row['port_switch'].'\',document.f.media'.$nb.'.value,document.f.infra'.$nb.'.value,document.f.channel'.$nb.'.value,document.f.vlan'.$nb.'.value,\''.$_GET['ip'].'\');" '
.'></td></tr>';
}
$valeur.='</table>';
echo "document.getElementById('plus_information".$_GET['position']."').innerHTML='$valeur' "; |
Partager