2 require_once 'plc_functions.php';
4 if( isset($errors) && count($errors) > 0 )
6 print( "<p><strong>The following errors occured:</strong>" );
7 print( "<font color='red' size='-1'><ul>\n" );
8 foreach( $errors as $err )
10 print( "<li>$err\n" );
12 print( "</ul></font>\n" );
15 <script language="javascript">
16 function initNodeTypeFields() {
17 var regular=document.getElementById("regular_checked");
18 var reservable=document.getElementById("reservable_checked");
19 if ( regular.checked || reservable.checked) return;
20 window.console.log('initNodeTypeFields is setting regular mode');
23 function updateMethodFields() {
24 var dhcp=document.getElementById("dhcp_checked");
25 var static=document.getElementById("static_checked");
26 // set dhcp as default
27 if ( ! dhcp.checked && ! static.checked) dhcp.checked=true;
28 var is_dhcp=dhcp.checked;
30 document.fm.netmask.disabled= is_dhcp;
31 document.fm.network.disabled= is_dhcp;
32 document.fm.gateway.disabled= is_dhcp;
33 document.fm.broadcast.disabled= is_dhcp;
34 document.fm.dns1.disabled= is_dhcp;
35 document.fm.dns2.disabled= is_dhcp;
38 <div class="plroundedconfirm">
39 <h3>Confirm Node Information</h3>
40 <?= form_open("register/stage45_mappcu/$pcu_id/$site_id/$node_id", array('method'=>'post')) ?>
41 <table border=0 cellpadding=3>
44 Please review the information below, and if it is correct, then Proceed to the
45 next stage. Otherwise, please Update the information as appropriate.
50 <input type=hidden name='pcu_id' value='<?= $pcu_id ?>'>
51 <input type=hidden name='node_id' value='<?= $node_id ?>'>
52 <input type=hidden name='site_id' value='<?= $site_id ?>'>
53 <input type=submit name='node_confirm' value='Confirm & Proceed'>
64 <div class="plroundedupdate">
65 <?= form_open("register/stage4_confirmnode/$pcu_id/$site_id/$node_id", array('name'=>'fm', 'method'=>'post')) ?>
66 <table border=0 cellpadding=3>
68 <tr><td colspan='2'> </td></tr>
69 <?php if ( !empty($site) )
71 <tr><th>Site: </th><td> <?= $site['name'] ?> </td>
75 <th width=200>Hostname:</td>
76 <td><input type="text" name="hostname" value="<?= $node->hostname ?>"
77 size="40" maxlength="256">
78 <?= ( $this->disp_errors ? $this->validation->hostname_error : "") ?>
82 <th valign='top' width="200">Node Type</th>
84 <input type="radio" name="node_type" value="regular" id="regular_checked"
85 <?= ( $node->node_type == 'regular' ? "checked" : "" ) ?>>regular
86 <input type="radio" name="node_type" value="reservable" id="reservable_checked"
87 <?= ( $node->node_type == 'reservable' ? "checked" : "" ) ?>>reservable
93 <input type="text" name="model" value="<?= $node->model ?>"
94 size="40" maxlength="256">
95 <?= ( $this->disp_errors ? $this->validation->model_error : "") ?>
100 <th valign='top' width="200">Addressing Method</th>
102 <input type="radio" name="method" value="dhcp" id="dhcp_checked" onChange='updateMethodFields()'
103 <?= ( $node->method == 'dhcp' ? "checked" : "" ) ?>>DHCP
104 <input type="radio" name="method" value="static" id='static_checked' onChange='updateMethodFields()'
105 <?= ( $node->method == 'static' ? "checked" : "" ) ?>>Static
109 <th valign='top'>IP Address</th>
110 <td><input type="text" name="ip" value="<?= $node->ip ?>">
111 <?= ( $this->disp_errors ? $this->validation->ip_error : "") ?>
116 <th valign='top'>Netmask</font></th>
117 <td><input type="text" name="netmask" value="<?= $node->netmask ?>">
118 <?= ( $this->disp_errors ? $this->validation->netmask_error : "") ?>
123 <th valign='top'>Network address</th>
124 <td><input type="text" name="network" value="<?= $node->network ?>">
125 <?= ( $this->disp_errors ? $this->validation->network_error : "") ?>
130 <th valign='top'>Gateway Address</th>
131 <td><input type="text" name="gateway" value="<?= $node->gateway ?>">
132 <?= ( $this->disp_errors ? $this->validation->gateway_error : "") ?>
137 <th valign='top'>Broadcast address</th>
138 <td><input type="text" name="broadcast" value="<?= $node->broadcast ?>">
139 <?= ( $this->disp_errors ? $this->validation->broadcast_error : "") ?>
144 <th valign='top'>Primary DNS</th>
145 <td><input type="text" name="dns1" value="<?= $node->dns1 ?>">
146 <?= ( $this->disp_errors ? $this->validation->dns1_error : "") ?>
151 <th valign='top'>Secondary DNS</th>
152 <td><input type="text" name="dns2" value="<?= $node->dns2 ?>">
153 <?= ( $this->disp_errors ? $this->validation->dns2_error : "") ?>
160 <input type=hidden name='pcu_id' value='<?= $pcu_id ?>'>
161 <input type=hidden name='node_id' value='<?= $node_id ?>'>
162 <input type=hidden name='site_id' value='<?= $site_id ?>'>
163 <input type=submit name='node_update' value='Update & Return'>
170 <a href='/db/sites/index.php?id=<?= $site_id ?>'>Back to Home Site</a>
173 <script language="javascript">
174 initNodeTypeFields();
175 updateMethodFields();