Projekt

Obecné

Profil

<h2><?php echo url_lang::lang('texts.Device'). ' '.$device->name ?></h2>
<br />
<?php
echo ($message = $this->session->get('message')) ? '<div class="message">'.$message.'</div>' : '';

$links = array();
if ($this->acl_check_edit(get_class($this), 'devices'))
$links[] = html::anchor(url_lang::base().'devices/edit/'.$device->id, url_lang::lang('texts.Edit'));
if ($this->acl_check_delete('Devices_Controller', 'devices'))
$links[] = html::anchor(url_lang::base().'devices/delete/'.$device->id, url_lang::lang('texts.Delete'), array('onclick' => "return potvrd('".url_lang::lang('texts.Do you want to delete this device')."');"));
if ($this->acl_check_delete('Devices_Controller', 'devices'))
$links[] = html::anchor(url_lang::base().'devices/delete_whole/'.$device->id, url_lang::lang('texts.Delete whole device'), array('onclick' => "return potvrd('".url_lang::lang('texts.Do you want to delete this device including all its interfaces and IP adresses')."');"));
echo implode(' | ', $links)
?>
<br />
<br />
<table class="extended" cellspacing="0" style="float:left; width: 400px; word-wrap: break-word;">
<tr>
<th><?php echo url_lang::lang('texts.Device ID') ?></th>
<td><?php echo $device->id ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Member') ?></th>
<td><?php echo html::anchor(url_lang::base().'members/show/'.$device->user->member_id, $device->user->member->name.' ('.$device->user->member_id.')'); ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.User') ?></th>
<td><?php echo html::anchor(url_lang::base().'users/show/'.$device->user_id,$device->user->name.' '.$device->user->surname); ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Trade name') ?></th>
<td><?php echo $device->trade_name ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Type') ?></th>
<td><?php echo $device_type ?></td>
</tr>
<?php if ($this->acl_check_view(get_class($this),'login')): ?>
<tr>
<th><?php echo url_lang::lang('texts.Login name') ?></th>
<td><?php echo $device->login ?></td>
</tr>
<?php endif ?>
<?php if ($this->acl_check_view(get_class($this),'password')): ?>
<tr>
<th><?php echo url_lang::lang('texts.Password') ?></th>
<td><?php echo $device->password ?></td>
</tr>
<?php endif ?>
<?php if ($device->price) { ?>
<tr>
<th><?php echo url_lang::lang('texts.Price') ?></th>
<td><?php echo $device->price ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Monthly payment rate') ?></th>
<td><?php echo $device->payment_rate ?></td>
</tr>
<?php }
if ($device->buy_date != '' && $device->buy_date != '1970-01-01') { ?>
<tr>
<th><?php echo url_lang::lang('texts.Buy date') ?></th>
<td><?php echo $device->buy_date ?></td>
</tr>
<?php } ?>
<tr>
<th><?php echo url_lang::lang('texts.Location address') ?></th>
<td>
<a href="<?php echo url_lang::base() ?>address_points/show/<?php echo $device->address_point->id ?>">
<?php
if ($device->address_point->street_id && $device->address_point->street_number)
echo $device->address_point->street->street.' '.$device->address_point->street_number.', ';
else if ($device->address_point->street_id)
echo $device->address_point->street->street.', ';
else if ($device->address_point->street_number)
echo $device->address_point->street_number.', ';
echo $device->address_point->town->town;
echo ($device->address_point->town->quarter!='') ? '-'.$device->address_point->town->quarter.', ' : ', ';
echo $device->address_point->town->zip_code;
echo ', ' . $device->address_point->country->country_name;
?>
</a>
</td>
</tr>
<?php if ($gps != ''): ?>
<tr>
<th><?php echo url_lang::lang('texts.GPS') ?></th>
<td><?php echo $gps ?></td>
</tr>
<?php endif ?>
<tr>
<th><?php echo url_lang::lang('texts.Comment') ?></th>
<td><?php echo $device->comment ?></td>
</tr>
</table>

<?php if (!empty($gps)): ?>
<a href="http://maps.google.com/maps?f=q&hl=<?php echo $lang ?>&geocode=&q=<?php echo $gpsx ?>,<?php echo $gpsy ?>&z=18&t=h&ie=UTF8" target="_blank">
<img alt="<?php echo url_lang::lang('texts.Address point detail') ?>" src="http://maps.google.com/maps/api/staticmap?center=<?php echo $gpsx ?>,<?php echo $gpsy ?>&zoom=18&maptype=hybrid&size=300x300&markers=color:red%7C<?php echo $gpsx ?>,<?php echo $gpsy ?>&sensor=false" style="float: right; margin-right: 10px;" />
</a>
<?php endif; ?>

<br class="clear" />
<br />
<br />

<?php echo $sec_links ?>

<br /><br />

<!-- interfaces -->
<?php if ($this->acl_check_view(get_class($this),'iface',$device->user->member_id)) { ?>
<h3><a id="device_ifaces_link" name="interfaces"><?php echo url_lang::lang('texts.Interfaces') ?>
<img src="<?php echo url::base() ?>media/images/ico_<?php echo ($count_ifaces == 0) ? 'plus' : 'minus' ?>.gif" id="device_ifaces_button"></a></h3>
<div id="device_ifaces" class="<?php echo ($count_ifaces == 0) ? 'dispNone' : '' ?>">
<?php echo $table_ifaces ?><br />
</div><br />
<?php } ?>

<!-- vlan interfaces -->
<?php if ($this->acl_check_view(get_class($this),'vlan_iface',$device->user->member_id)) { ?>
<h3><a id="device_vlan_ifaces_link" name="vlan_interfaces"><?php echo url_lang::lang('texts.VLAN interfaces') ?>
<img src="<?php echo url::base() ?>media/images/ico_<?php echo ($count_vlan_ifaces == 0) ? 'plus' : 'minus' ?>.gif" id="device_vlan_ifaces_button"></a></h3>
<div id="device_vlan_ifaces" class="<?php echo ($count_vlan_ifaces == 0) ? 'dispNone' : '' ?>">
<?php echo $table_vlan_ifaces ?><br />
</div><br />
<?php } ?>

<!-- ip addresses -->
<?php if ($this->acl_check_view(get_class($this),'ip_address',$device->user->member_id)) { ?>
<h3><a id="device_ip_addresses_link" name="ip_addresses"><?php echo url_lang::lang('texts.IP addresses') ?>
<img src="<?php echo url::base() ?>media/images/ico_<?php echo ($count_ip_addresses == 0) ? 'plus' : 'minus' ?>.gif" id="device_ip_addresses_button"></a></h3>
<div id="device_ip_addresses" class="<?php echo ($count_ip_addresses == 0) ? 'dispNone' : '' ?>">
<?php echo $table_ip_addresses ?><br />
</div><br />
<?php } ?>

<!-- ports -->
<?php if ($this->acl_check_view(get_class($this),'port',$device->user->member_id)) { ?>
<h3><a id="device_ports_link" name="ports"><?php echo url_lang::lang('texts.Ports') ?>
<img src="<?php echo url::base() ?>media/images/ico_<?php echo ($count_ports == 0) ? 'plus' : 'minus' ?>.gif" id="device_ports_button"></a></h3>
<div id="device_ports" class="<?php echo ($count_ports == 0) ? 'dispNone' : '' ?>">
<?php echo $table_ports ?><br />
</div><br />
<?php } ?>

<br class="clear" />
<br />

<!-- device engineers -->
<div style="float:left; width: 50%">
<?php //if ($this->acl_check_view(get_class($this),'engineer',$device->user->member_id)) { ?>
<h3><a id="device_engineers_link" name="engineers"><?php echo url_lang::lang('texts.Device engineers') ?>
<img src="<?php echo url::base() ?>media/images/ico_<?php echo ($count_engineers == 0) ? 'plus' : 'minus' ?>.gif" id="device_engineers_button"></h3></a>
<div id="device_engineers" class="<?php echo ($count_engineers == 0) ? 'dispNone' : '' ?>">
<?php echo $table_device_engineers ?>
</div>
<?php //} ?>
</div>

<!-- device admins -->
<div style="float:left; margin-left:0px;">
<?php if ($this->acl_check_view(get_class($this),'admin',$device->user->member_id)) { ?>
<h3><a id="device_admins_link" name="admins"><?php echo url_lang::lang('texts.Device admins') ?>
<img src="<?php echo url::base() ?>media/images/ico_<?php echo ($count_admins == 0) ? 'plus' : 'minus' ?>.gif" id="device_admins_button"></h3></a>
<div id="device_admins" class="<?php echo ($count_admins == 0) ? 'dispNone' : '' ?>">
<?php echo $table_device_admins ?>
</div>
<?php } ?>
</div>
(9-9/68)