Revize 100
Přidáno uživatelem Tomáš Dulík před asi 16 roky(ů)
freenetis/trunk/kohana/application/controllers/ifaces.php | ||
---|---|---|
$grid_ip_addresses->field('subnet_name')->label(url_lang::lang('texts.Subnet name'));
|
||
$grid_ip_addresses->action_field('id')->label(url_lang::lang('texts.Show')) ->url(url_lang::base().'ip_addresses/show') ->action(url_lang::lang('texts.Show'))->class('center');
|
||
$grid_ip_addresses->action_field('id')->label(url_lang::lang('texts.Edit')) ->url(url_lang::base().'ip_addresses/edit') ->action(url_lang::lang('texts.Edit'))->class('center');
|
||
$grid_ip_addresses->action_field('id')->label(url_lang::lang('texts.Delete')) ->url('delete') ->action(url_lang::lang('texts.Delete'))->class('center');
|
||
$grid_ip_addresses->action_field('id')->label(url_lang::lang('texts.Delete')) ->url(url_lang::base().'ip_addresses/delete') ->action(url_lang::lang('texts.Delete'))->class('center');
|
||
$grid_ip_addresses->datasource( $query );
|
||
|
||
|
||
... | ... | |
}
|
||
//----- end EDIT --------------------------------------------------------------
|
||
//=============================================================================
|
||
|
||
|
||
|
||
}
|
||
|
||
?>
|
freenetis/trunk/kohana/application/controllers/ip_addresses.php | ||
---|---|---|
}
|
||
//----- end EDIT --------------------------------------------------------------
|
||
//=============================================================================
|
||
function delete($acc_id = NULL)
|
||
{
|
||
// if (!$this->gacl_class->acl_check('freenetis', 'delete_own', 'all', $_SESSION['username'],get_class($this),'delete_accounts')) Controller::error(1);
|
||
|
||
if (isset($acc_id))
|
||
{
|
||
$model_ip = new Ip_address_Model($acc_id);
|
||
$iface = $model_ip->iface_id;
|
||
$model_ip->delete();
|
||
$this->session->set_flash('message', url_lang::lang('texts.IP deleted.'));
|
||
url::redirect(url_lang::base().'ifaces/show/'.(int)$iface);
|
||
}
|
||
else
|
||
{
|
||
Controller::error();
|
||
}
|
||
}
|
||
|
||
function valid_ip($input) {
|
||
$method=$this->form->IP_address->method; // <FORM> method = POST, GET, ...
|
Také k dispozici: Unified diff
Přidána funkce delete u IP adres