Revize 1093
Přidáno uživatelem Ondřej Fibich před více než 13 roky(ů)
freenetis/branches/testing/application/models/cloud.php | ||
---|---|---|
{
|
||
return $this->db->query("
|
||
SELECT u.id, CONCAT(u.surname,' ',u.name,' - ',u.login) as user
|
||
FROM clouds c
|
||
LEFT JOIN clouds_users cu ON c.id = cu.cloud_id
|
||
FROM clouds_users cu
|
||
LEFT JOIN users u ON u.id = cu.user_id
|
||
WHERE c.id = ?
|
||
WHERE cu.cloud_id = ?
|
||
", $cloud_id);
|
||
}
|
||
|
||
... | ... | |
return $this->db->query("
|
||
SELECT s.id, s.name, s.netmask,
|
||
CONCAT(s.network_address,'/', 32-log2((~inet_aton(netmask) & 0xffffffff) + 1)) AS network_address
|
||
FROM clouds c
|
||
LEFT JOIN clouds_subnets cu ON c.id = cu.cloud_id
|
||
FROM clouds_subnets cu
|
||
LEFT JOIN subnets s ON s.id = cu.subnet_id
|
||
WHERE c.id = ?
|
||
WHERE cu.cloud_id = ?
|
||
ORDER BY inet_aton(s.network_address)
|
||
", $cloud_id);
|
||
}
|
freenetis/branches/testing/application/controllers/clouds.php | ||
---|---|---|
'use_selector' => false
|
||
));
|
||
|
||
if ($this->acl_check_new('Clouds_Controller', 'clouds_users'))
|
||
if ($this->acl_check_new('Clouds_Controller', 'clouds'))
|
||
{
|
||
$grid_admins->add_new_button(
|
||
url_lang::base() . 'clouds/add_admin/' . $cloud_id,
|
||
... | ... | |
->action(url_lang::lang('texts.Show'));
|
||
}
|
||
|
||
if ($this->acl_check_delete('Clouds_Controller', 'clouds_users'))
|
||
if ($this->acl_check_delete('Clouds_Controller', 'clouds'))
|
||
{
|
||
$grid_admins->action_field('id')
|
||
->label(url_lang::lang('texts.Remove'))
|
||
... | ... | |
);
|
||
}
|
||
|
||
if ($this->acl_check_new('Clouds_Controller', 'clouds_subnets'))
|
||
if ($this->acl_check_new('Clouds_Controller', 'clouds'))
|
||
{
|
||
$grid_subnets->add_new_button(
|
||
url_lang::base() . 'clouds/add_subnet/' . $cloud_id,
|
||
... | ... | |
->action(url_lang::lang('texts.Show'));
|
||
}
|
||
|
||
if ($this->acl_check_delete('Clouds_Controller', 'clouds_subnets'))
|
||
if ($this->acl_check_delete('Clouds_Controller', 'clouds'))
|
||
{
|
||
$grid_subnets->action_field('id')
|
||
->label(url_lang::lang('texts.Remove'))
|
Také k dispozici: Unified diff
Opravy prav a dvou dotazu v oblastech.