Esempio n. 1
0
<a style="width:100px;margin-bottom:5px;" class="btn btn-danger btn-xs" href="/ip/delete_block/' . $block->block_id . '" data-toggle="modal" data-target="#delete-' . $block->block_id . '" ><i class="glyphicon glyphicon-trash"></i> Delete Block</a> <div id="delete-' . $block->block_id . '" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
                                                </td></tr>';
}
?>
                        </table>
                </div>
        </div>
</div>


<div class="col-md-12 col-xl-6">
        <div class="panel panel-default">
                <div class="panel-heading">IPv6 Blocks <a class="pull-right btn btn-primary btn-xs" href="/ip/add_block6">Add IPv6 Block</a></div>
                <div class="panel-body no-pad">
                        <table class="table table-condensed">
                                <tr><th>Name</th><th>Used</th><th>Free</th><th>Total</th><th>Network</th><th>Nameservers</th><th>Nodes</th><th></th></tr>

                                <?php 
foreach ($blocks6 as $block) {
    $total = pow(2, 64 - $block->block_netmask) - 1;
    $free = $total - $block->used;
    echo '<tr><td><a href="/ip/listall6/' . $block->block_id . '">' . $block->block_name . '</a></td><td>' . $block->used . '</td><td>' . $free . '</td><td>' . $total . '</td><td>' . int64_to_inet6(array($block->block_gateway, 0)) . '/' . $block->block_netmask . '</td><td>' . int64_to_inet6(array($block->block_ns1_1, $block->block_ns1_2)) . ', ' . int64_to_inet6(array($block->block_ns2_1, $block->block_ns2_2)) . '</td><td>' . str_replace(',', ', ', $block->block_nodes) . '</td><td>
<a style="width:100px;margin-bottom:5px;" class="btn btn-primary btn-xs" href="/ip/edit_block6/' . $block->block_id . '"><i class="glyphicon glyphicon-edit"></i> Edit Block</a>
<a style="width:100px;margin-bottom:5px;" class="btn btn-danger btn-xs" href="/ip/delete_block6/' . $block->block_id . '" data-toggle="modal" data-target="#delete-' . $block->block_id . '" ><i class="glyphicon glyphicon-trash"></i> Delete Block</a> <div id="delete-' . $block->block_id . '" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
                                                </td></tr>';
}
?>
                        </table>
                </div>
        </div>
</div>
Esempio n. 2
0
<div class="col-md-12">
        <div class="panel panel-default">
                <div class="panel-heading"><?php 
echo $block->block_name;
?>
 Allocated IPs</div>
                <div class="panel-body no-pad">
                        <table class="table table-condensed">
                                <tr><th>Address</th><th>User</th><th>Container Hostname</th><th>Node</th></tr>

                                <?php 
foreach ($addresses as $ip) {
    echo '<tr><td>' . int64_to_inet6(array($ip->ip_address, 0)) . '/64</td>';
    if ($ip->ctid == -1) {
        echo '<td colspan="3">Reserved <a class="btn btn-danger btn-xs" href="/ip/unreserve6/' . $ip->ip_address . '">Unreserve</a></td>';
    } else {
        echo '<td>' . $ip->first_name . ' ' . $ip->last_name . '<td><a href="/server/' . $ip->ctid . '">' . $ip->hostname . '</a></td><td>' . $ip->node_name . '</td></tr>';
    }
}
?>
                        </table>
                        <?php 
echo '<p style="margin: 0 auto; text-align: center">' . $this->pagination->create_links() . '</p>';
?>
                </div>
        </div>
</div>
Esempio n. 3
0
    $this->output->set_output('');
    ?>
        <div class="modal-dialog">
                <div class="modal-content">
                        <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title">Remove IPv6 Block</h4>
                        </div>

                        <?php 
    echo form_open('server/remove_ip6/' . $container->ctid . '/' . $ip, array('class' => 'form-horizontal'));
    ?>

                        <div class="modal-body">
                                <p>Are you sure you want to remove IP Block <?php 
    echo int64_to_inet6(array($ip, 0));
    ?>
/64 from this server?</p>
                        </div>

                        <div class="modal-footer">
                                <?php 
    echo form_submit('remove', 'Remove', 'class="btn btn-primary"');
    ?>
                                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                        </div>

                <?php 
    echo form_close();
    ?>
Esempio n. 4
0
				<?php 
    $this->load->view('error', array('type' => 'info', 'message' => 'To add a specific IPv6 address to your OpenVZ VPS, simply add a reverse DNS entry for the address, and it will be added to your VPS. Removing the rDNS record for a particular IPv6 address will remove the IP from the VPS. Please note that adding too many IPv6 addresses will slow down your bootup & restart times, and could impact performance.'));
    ?>
                                </div>
                                <?php 
}
?>

				<table class="table table-striped table-condensed">
					<thead>
						<tr><th>Network</th><th>rDNS Records</th></tr>
					</thead>
					<tbody>
						<?php 
foreach ($addresses6 as $address) {
    echo '<tr><td>' . int64_to_inet6(array($address->ip_address, 0)) . '/64 <br /><a data-toggle="modal" data-target="#v6-add-' . $address->ip_address . '" class="btn btn-primary btn-xs" href="/ip/rdns6/' . $address->ip_address . '"><i class="fa fa-plus"></i> Add Record</a><div id="v6-add-' . $address->ip_address . '" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>';
    if ($this->ion_auth->is_admin()) {
        echo ' <a data-toggle="modal" data-target="#v6-rm-block-' . $address->ip_address . '" class="btn btn-danger btn-xs" href="/server/remove_ip6/' . $server_id . '/' . $address->ip_address . '"><i class="fa fa-trash-o"></i> Remove Block</a><div id="v6-rm-block-' . $address->ip_address . '" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>';
    }
    echo '</td><td><table class="table table-bordered table-striped table-condensed">';
    foreach ($address->rdns as $address6) {
        $a_int = inet6_to_int64(ptr_to_inet6($address6->name));
        echo '<tr><td style="padding-left: 0px">' . ptr_to_inet6($address6->name) . '</td><td>' . $address6->content . '</td><td><a data-toggle="modal" data-target="#v6-edit-' . $a_int[0] . '-' . $a_int[1] . '" class="btn btn-primary btn-xs" href="/ip/rdns6/' . $a_int[0] . '/' . $a_int[1] . '"><i class="fa fa-check"></i> Edit rDNS</a><div id="v6-edit-' . $a_int[0] . '-' . $a_int[1] . '" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div> <a data-toggle="modal" data-target="#v6-rm-rdns-' . $a_int[0] . '-' . $a_int[1] . '" class="btn btn-danger btn-xs" href="/ip/rdns6delete/' . $a_int[0] . '/' . $a_int[1] . '"><i class="fa fa-trash-o"></i> Delete</a><div id="v6-rm-rdns-' . $a_int[0] . '-' . $a_int[1] . '" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div></td></tr>';
    }
    echo '</table></td></tr>';
}
?>
					</tbody>
				</table>

			</div>
Esempio n. 5
0
                        </div>
                        
                        <div class="form-group">
                                <label class="col-md-3 control-label">Nameserver 1:</label>
                                <div class="col-md-8">
                                        <?php 
echo form_input('ns1', int64_to_inet6(array($block->block_ns1_1, $block->block_ns1_2)), 'class="form-control"');
?>
                                </div>
                        </div>
                        
                        <div class="form-group">
                                <label class="col-md-3 control-label">Nameserver 2:</label>
                                <div class="col-md-8">
                                        <?php 
echo form_input('ns2', int64_to_inet6(array($block->block_ns2_1, $block->block_ns2_2)), 'class="form-control"');
?>
                                </div>
                        </div>
                        
                        <div class="form-group">
                                <label class="col-md-3 control-label">Nodes</label>
                                <div class="col-md-8">
                                        <?php 
$n = explode(',', $block->block_nodes);
foreach ($nodes as $node) {
    echo form_checkbox('node[]', $node->id, in_array($node->id, $n)) . ' ' . $node->node_name . '<br />';
}
?>
                                </div>
                        </div>