Revize 97
Přidáno uživatelem Tomáš Dulík před více než 16 roky(ů)
freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'wrong password.'=> 'Špatné heslo',
|
||
'yes'=> 'ano',
|
||
'you have successfully logout' => 'Byl jste úspěšně odhlášen.',
|
||
'network address does not match the mask' => 'Síťová adresa neodpovídá zadané masce',
|
||
'network address does not match the mask' => 'Síťová adresa neodpovídá zadané masce !',
|
||
'invalid network address'=>'Neplatná adresa sítě !',
|
||
'zip code' => 'PSČ',
|
||
|
||
);
|
freenetis/trunk/kohana/application/controllers/ifaces.php | ||
---|---|---|
|
||
//die();
|
||
|
||
$query = $iface_model->select(array('devices.name as device_name', 'segments.name as segment_name', 'ifaces.*'))->join('devices', 'devices.id = ifaces.device_id')->join('segments', 'segments.id = ifaces.segment_id', NULL, 'LEFT')->orderby($order_by,$order_by_direction)->limit($limit_results,$sql_offset)->find_all();
|
||
$query = $iface_model->select(array('devices.name as device_name', 'segments.name as segment_name', 'ifaces.*'))
|
||
->join('devices', 'devices.id = ifaces.device_id')
|
||
->join('segments', 'segments.id = ifaces.segment_id', NULL, 'LEFT')
|
||
->orderby($order_by,$order_by_direction)
|
||
->limit($limit_results,$sql_offset)
|
||
->find_all();
|
||
|
||
$grid = new Grid(url_lang::base().'ifaces', null,array(
|
||
//'separator' => '<br />-----------',
|
||
... | ... | |
$ssDevice_id = $this->session->get('ssDevice_id');
|
||
|
||
$iface = new Iface_Model($iface_id);
|
||
|
||
if (is_null($iface->segment_id)) $iface->segment_id="NULL";
|
||
if (!isset($iface_id) || $iface->id == 0) {
|
||
Controller::error();
|
||
}
|
||
... | ... | |
$ip_model = new Ip_address_Model();
|
||
|
||
//$query = $iface_model->select(array('devices.name as device_name', 'segments.name as segment_name', 'ifaces.*'))->join('devices', 'devices.id = ifaces.device_id')->join('segments', 'segments.id = ifaces.segment_id')->orderby('id','ASC')->find_all_by_device_id($iface_id);
|
||
$query = $ip_model->select(array('ip_addresses.id','ip_addresses.IP_address','subnets.name as subnet_name'))->join('subnets','subnets.id=ip_addresses.subnet_id')->orderby('id','ASC')->find_all_by_iface_id($iface_id);
|
||
$query = $ip_model->select(array('ip_addresses.id','ip_addresses.IP_address','subnets.name as subnet_name'))
|
||
->join('subnets','subnets.id=ip_addresses.subnet_id', NULL, 'LEFT')
|
||
->orderby('id','ASC')
|
||
->find_all_by_iface_id($iface_id);
|
||
$grid_ip_addresses = new Grid(url_lang::base().'ifaces', null,array(
|
||
'use_paginator' => false,
|
||
'use_selector' => false
|
||
... | ... | |
//----------- list of VLAN INTERFACES ---------------
|
||
$VLAN_iface_model = new Vlan_iface_Model();
|
||
|
||
$query = $VLAN_iface_model->select(array('id','name'))->orderby('id','ASC')->find_all_by_iface_id($iface_id);
|
||
$query = $VLAN_iface_model->select(array('id','name'))
|
||
->orderby('id','ASC')
|
||
->find_all_by_iface_id($iface_id);
|
||
|
||
$grid_VLAN_ifaces = new Grid(url_lang::base().'ifaces', null,array(
|
||
'use_paginator' => false,
|
freenetis/trunk/kohana/application/controllers/devices.php | ||
---|---|---|
//----------- list of INTERFACES ---------------
|
||
$iface_model = new Iface_Model();
|
||
//$query = $iface_model->find_all_by_device_id($device_id);
|
||
$query = $iface_model->select(array('devices.name as device_name', 'segments.name as segment_name', 'ifaces.*'))->join('devices', 'devices.id = ifaces.device_id')->join('segments', 'segments.id = ifaces.segment_id')->orderby('id','ASC')->find_all_by_device_id($device_id);
|
||
$query = $iface_model->select(array('devices.name as device_name', 'segments.name as segment_name', 'ifaces.*'))
|
||
->join('devices', 'devices.id = ifaces.device_id')
|
||
->join('segments', 'segments.id = ifaces.segment_id', NULL, 'LEFT')
|
||
->orderby('id','ASC')
|
||
->find_all_by_device_id($device_id);
|
||
|
||
|
||
//$query = $device_model->get_all_devices($sql_offset, (int)$limit_results, $order_by, $order_by_direction);
|
freenetis/trunk/kohana/application/controllers/subnets.php | ||
---|---|---|
//=============================================================================
|
||
protected $form;
|
||
function edit($subnet_id)
|
||
{
|
||
{
|
||
$subnet = new Subnet_Model($subnet_id);
|
||
|
||
if (!isset($subnet_id) || $subnet->id == 0) {
|
||
Controller::error();
|
||
}
|
||
|
||
$form = new Forge(url_lang::base()."subnets/edit/".$subnet_id, '', 'POST', array('id' => 'article_form'));
|
||
$this->form=$form = new Forge(url_lang::base()."subnets/edit/".$subnet_id, '', 'POST', array('id' => 'article_form'));
|
||
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
|
||
|
||
$form->group('')->label(url_lang::lang('texts.Basic data'));
|
||
... | ... | |
$form->input('OSPF_area_id')->label(url_lang::lang('texts.OSPF area ID').':')->rules('valid_digit')->value($subnet->OSPF_area_id);
|
||
|
||
$form->submit('submit')->value(url_lang::lang('texts.update'));
|
||
// $form->input('tlacitko')->value('odeslat')->class('submit')->type('submit');
|
||
|
||
special::required_forge_style($form, ' *', 'required');
|
||
|
||
|
||
... | ... | |
exit;
|
||
}
|
||
|
||
}
|
||
//----- end validate --------------------------------------------------
|
||
} else {
|
||
// echo "Zkus to znovu...<div aling=left><pre>";
|
||
// print_r($_POST);
|
||
// echo "</pre></div>";
|
||
} //----- end validate --------------------------------------------------
|
||
|
||
|
||
$view = new View('template');
|
||
... | ... | |
$netip=ip2long($input->value);
|
||
$mask=ip2long($_POST['netmask']);
|
||
|
||
if ( ($netip & $mask) != $netip )
|
||
if ($netip==0)
|
||
$input->add_error('required', url_lang::lang('texts.Invalid network address.'));
|
||
else if ( ($netip & $mask) != $netip)
|
||
$input->add_error('required', url_lang::lang('texts.Network address does not match the mask.'));
|
||
|
||
}
|
Také k dispozici: Unified diff
V devices.php, ifaces.php, subnets.php provedeny úpravy, aby se správně zobrazovaly i zařízení, interfacy a subnety, které mají subnet_id nebo segment_id nastaveno na NULL