2 if( isset($errors) && count($errors) > 0 )
4 print( "<p><strong>The following errors occured:</strong>" );
5 print( "<font color='red' size='-1'><ul>\n" );
6 foreach( $errors as $err )
10 print( "</ul></font>\n" );
13 <script language="javascript">
14 function updateStaticFields()
16 var is_dhcp= document.fm.method[0].checked;
18 document.fm.netmask.disabled= is_dhcp;
19 document.fm.network.disabled= is_dhcp;
20 document.fm.gateway.disabled= is_dhcp;
21 document.fm.broadcast.disabled= is_dhcp;
22 document.fm.dns1.disabled= is_dhcp;
23 document.fm.dns2.disabled= is_dhcp;
26 <div class="plroundedconfirm">
27 <?= form_open("register/stage4_confirmnode/$pcu_id/$site_id") ?>
28 <table border=0 cellpadding=3>
30 <tr><td colspan='2'><h3>Choose a Node to Associate with PCU</h3></td></tr>
31 <?php if ( !empty($node_list) ): ?>
32 <tr><th>Node Name: </th><td>
33 <select name='node_id'>
34 <option value='0'>--</option>
35 <?php foreach ( $node_list as $node): ?>
36 <option value='<?= $node->data['node_id'] ?>' <?= ( $this->node_id == $node->data['node_id'] ? "selected" : "" ) ?>>
37 <?= $node->hostname ?>
46 <input type=submit name='node_choose' value='Continue'>
56 <div class="plroundedupdate">
57 <table border=0 cellpadding=3>
59 <?php if ( !isset($node_id) || $node_id == 0 ): ?>
60 <?= form_open("register/stage3_addnode/$pcu_id/$site_id", array('name'=>'fm', 'method'=>'post')) ?>
61 <tr><td colspan='2'><h3>Or, Add a Node</h3></td></tr>
62 <tr><th>Site: </th><td><?= $site['name'] ?></td>
65 <th width=200>Hostname:</td>
66 <td><input type="text" name="hostname" value="<?= $this->validation->hostname ?>"
67 size="40" maxlength="256">
68 <?= ( $this->disp_errors ? $this->validation->hostname_error : "") ?>
74 <input type="text" name="model" value="<?= $this->validation->model ?>"
75 size="40" maxlength="256">
76 <?= ( $this->disp_errors ? $this->validation->model_error : "") ?>
80 <td> <b>Network Settings</b> </td>
84 <th valign='top' width="200">Addressing Method</th>
86 <input type="radio" name="method" value="dhcp" onChange='updateStaticFields()'
87 <?= ( $this->validation->method == 'dhcp' ? "checked" : "" ) ?>>DHCP
88 <input type="radio" name="method" value="static" onChange='updateStaticFields()'
89 <?= ( $this->validation->method == 'static' ? "checked" : "" ) ?>>Static
93 <tr><th valign='top'>IP Address</td>
94 <td><input type="text" name="ip" value="<?= $this->validation->ip ?>">
95 <?= ( $this->disp_errors ? $this->validation->ip_error : "") ?>
100 <th valign='top'>Netmask</font></td>
101 <td><input type="text" name="netmask" value="<?= $this->validation->netmask ?>">
102 <?= ( $this->disp_errors ? $this->validation->netmask_error : "") ?>
107 <th valign='top'>Network address</td>
108 <td><input type="text" name="network" value="<?= $this->validation->network ?>">
109 <?= ( $this->disp_errors ? $this->validation->network_error : "") ?>
114 <th valign='top'>Gateway Address</td>
115 <td><input type="text" name="gateway" value="<?= $this->validation->gateway ?>">
116 <?= ( $this->disp_errors ? $this->validation->gateway_error : "") ?>
121 <th valign='top'>Broadcast address</td>
122 <td><input type="text" name="broadcast" value="<?= $this->validation->broadcast ?>">
123 <?= ( $this->disp_errors ? $this->validation->broadcast_error : "") ?>
128 <th valign='top'>Primary DNS</td>
129 <td><input type="text" name="dns1" value="<?= $this->validation->dns1 ?>">
130 <?= ( $this->disp_errors ? $this->validation->dns1_error : "") ?>
135 <th valign='top'>Secondary DNS</td>
136 <td><input type="text" name="dns2" value="<?= $this->validation->dns2 ?>">
137 <?= ( $this->disp_errors ? $this->validation->dns2_error : "") ?>
144 <input type=hidden name='pcu_id' value='<?= $pcu_id ?>'>
145 <input type=hidden name='site_id' value='<?= $site_id ?>'>
146 <input type=submit name='register_node' value='Add New Node'>
152 <table border=0 cellpadding=3>
154 <tr><td></td><td><h3>Node Added Successfully!!!!</h3></td></tr>
155 <?php if ( isset($errors) and ! empty ($errors) ): ?>
156 <?php foreach ( $errors as $error ): ?>
157 <tr><td></td><td><?= $error ?></td></tr>
165 <a href='/db/sites/index.php?id=<?= $default_site_list[0] ?>'>Back to Home Site</a>
168 <script language="javascript">
169 updateStaticFields();