21 lines
575 B
PHP
21 lines
575 B
PHP
<?php
|
|
|
|
class restriction extends control
|
|
{
|
|
public function index($type = 'view')
|
|
{
|
|
if(!empty($_POST))
|
|
{
|
|
$result = $this->restriction->setConfiguration($_POST);
|
|
$this->send($result);
|
|
}
|
|
|
|
$restriction = $this->restriction->getConfiguration();
|
|
|
|
$this->view->type = $type;
|
|
$this->view->enabled = isset($restriction->enabled) ? $restriction->enabled : false;
|
|
$this->view->cidrs = isset($restriction->cidrs) ? explode(',', $restriction->cidrs) : array();
|
|
$this->display();
|
|
}
|
|
}
|