Example #1
0
// Load dependencies
///////////////////////////////////////////////////////////////////////////////
$this->lang->load('web_proxy');
$this->lang->load('network');
///////////////////////////////////////////////////////////////////////////////
// Form handler
///////////////////////////////////////////////////////////////////////////////
if ($form_type === 'view') {
    $read_only = TRUE;
    $form_path = '/web_proxy/exceptions/view';
    $buttons = array(form_submit_add('submit'), anchor_cancel('/app/web_proxy/exceptions'));
} else {
    if ($form_type === 'add') {
        $read_only = FALSE;
        $form_path = '/web_proxy/exceptions/add';
        $buttons = array(form_submit_add('submit'), anchor_cancel('/app/web_proxy/exceptions/'));
    } else {
        $read_only = FALSE;
        $form_path = '/web_proxy/exceptions/edit';
        $buttons = array(form_submit_update('submit'), anchor_cancel('/app/web_proxy/exceptions/'), anchor_delete('/app/web_proxy/exceptions/delete/' . $interface));
    }
}
///////////////////////////////////////////////////////////////////////////////
// Form
///////////////////////////////////////////////////////////////////////////////
echo form_open($form_path);
echo form_header(lang('web_proxy_exception_sites'));
echo field_input('site', $site, lang('web_proxy_site'), $read_only);
echo field_button_set($buttons);
echo form_footer();
echo form_close();
Example #2
0
// You should have received a copy of the GNU General Public License
// 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);
Example #3
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);