Exemple #1
0
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Load dependencies
///////////////////////////////////////////////////////////////////////////////
$this->lang->load('web_proxy');
///////////////////////////////////////////////////////////////////////////////
// Headers
///////////////////////////////////////////////////////////////////////////////
$headers = array(lang('web_proxy_site'));
///////////////////////////////////////////////////////////////////////////////
// Anchors
///////////////////////////////////////////////////////////////////////////////
$anchors = array(anchor_custom('/app/web_proxy', lang('base_return_to_summary')), anchor_add('/app/web_proxy/exceptions/add'));
///////////////////////////////////////////////////////////////////////////////
// Items
///////////////////////////////////////////////////////////////////////////////
foreach ($exceptions as $site) {
    $item['title'] = $site;
    $item['action'] = '/app/web_proxy/exceptions/edit/' . $site;
    $item['anchors'] = button_set(array(anchor_delete('/app/web_proxy/exceptions/delete/' . $site)));
    $item['details'] = array($site);
    $items[] = $item;
}
sort($items);
///////////////////////////////////////////////////////////////////////////////
// Summary table
///////////////////////////////////////////////////////////////////////////////
echo summary_table(lang('web_proxy_exception_sites'), $anchors, $headers, $items);
Exemple #2
0
// Load dependencies
///////////////////////////////////////////////////////////////////////////////
$this->lang->load('firewall');
$this->lang->load('network');
$this->lang->load('web_proxy');
///////////////////////////////////////////////////////////////////////////////
// Headers
///////////////////////////////////////////////////////////////////////////////
$headers = array(lang('firewall_nickname'), lang('network_address'));
///////////////////////////////////////////////////////////////////////////////
// Anchors
///////////////////////////////////////////////////////////////////////////////
$anchors = array(anchor_custom('/app/web_proxy', lang('base_return_to_summary')), anchor_add('/app/web_proxy/bypass/add'));
///////////////////////////////////////////////////////////////////////////////
// Items
///////////////////////////////////////////////////////////////////////////////
foreach ($bypasses as $id => $details) {
    // Deal with embedded / in network notation
    $address = preg_replace('/\\//', '-', $details['address']);
    $item['title'] = $details['address'];
    $item['action'] = '/app/web_proxy/bypass/edit/' . $address;
    $item['anchors'] = button_set(array(anchor_delete('/app/web_proxy/bypass/delete/' . $address)));
    $item['details'] = array($details['name'], $details['address']);
    $items[] = $item;
}
sort($items);
///////////////////////////////////////////////////////////////////////////////
// Summary table
///////////////////////////////////////////////////////////////////////////////
echo summary_table(lang('web_proxy_web_proxy_bypass'), $anchors, $headers, $items);