Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 116

Přidáno uživatelem Michal Kliment před téměř 16 roky(ů)

Zobrazit rozdíly:

freenetis/trunk/kohana/media/js/js.js
}
function add_row(trobject, deletelabel)
function add_row(trobject, keys, values, deletelabel)
{
var row = trobject.parentNode.parentNode;
//var row2 = row.cloneNode(true);
......
var new_td_input = document.createElement("td");
var new_td_delete = document.createElement("td");
var new_delete_link = document.createElement("a");
var input_i = document.createElement("input");
var select_i = document.createElement("select");
var option = new Array();
var txt = new Array();
var input_v = document.createElement("input");
var new_td_value = document.createElement("td");
......
new_delete_link.setAttribute("href", "#");
new_delete_link.setAttribute("onclick", "delete_row(this)");
input_i.setAttribute("type", "text");
input_i.setAttribute("maxlength", "40");
input_i.setAttribute("name", "type[]");
input_i.setAttribute("style", "width:100px;");
select_i.setAttribute("name", "type[]");
select_i.setAttribute("style", "width:100px;");
input_v.setAttribute("type", "text");
input_v.setAttribute("maxlength", "255");
input_v.setAttribute("name", "value[]");
for(i=0;i<keys.length;i++) {
option[i] = document.createElement("option");
txt[i] = document.createTextNode(values[i]);
option[i].appendChild(txt[i]);
option[i].setAttribute("value",keys[i]);
select_i.appendChild(option[i]);
}
new_delete_link.appendChild(value_delete);
new_td_delete.appendChild(new_delete_link);
new_td_input.appendChild(input_i);
new_td_input.appendChild(select_i);
new_td_input.appendChild(input_row);
new_td_value.appendChild(input_v);
new_tr.appendChild(new_td_input);
......
}
row.parentNode.insertBefore(new_tr, row);
}
// ******************************* AJAX SECTION ********************************************************************
freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php
'acount deleted.' => 'Účet byl smazán',
'add new account' => 'Přidat nový účet',
'add new contact' => 'Přidat nový kontakt',
'add new device' => 'Přidat nové zařízení',
'add new device' => 'Přidat nové zařízení',
'add new device admin' => 'Přidat nového správce zařízení',
'add new interface' => 'Přidat nové rozhraní',
'add new ip address' => 'Přidat novou IP adresu',
'add new member' => 'Přidat nového člena',
......
'add new subnet' => 'Přidat novu podsíť',
'add new user' => 'Přidat nového uživatele',
'add new vlan interface' => 'Přidat nové VLAN rozhraní',
'add new vlan' => 'Přidat nový VLAN',
'add new vlan' => 'Přidat nový VLAN',
'add new work' => 'Přidat novou práci',
'add' => 'Přidat',
'additional_contacts_infotext' => 'Další kontaktní informace',
'address' => 'Adresa',
'aditional contacts successfully updated.' => 'Další kontakty úspěšně uloženy',
'aditional contacts successfully updated' => 'Další kontakty úspěšně uloženy',
'administrate additional contacts' => 'Přidávání/editace dalších kontaktních informací',
'administration of additional contacts' => 'Přidávání/editace dalších kontaktních informací',
'amount' => 'Částka',
......
'back to login' => 'Zpět na přihlášení',
'back to ports list' => 'Zpět na seznam portů',
'back to segments list' => 'Zpět na seznam segmentů',
'back to the member.'=> 'Zpět na profil člena',
'back to the member.'=> 'Zpět na profil člena',
'back to the user'=> 'Zpět na uživatele',
'back to this member.'=> 'Zpět na profil člena',
'back to the members transfers.'=> 'Zpět na transakce člena',
'back to this account.'=> 'Zpět na tento účet',
'back to this user.'=> 'Zpět na tohoto uživatele',
'back to this user'=> 'Zpět na tohoto uživatele',
'back to unidentified transfers'=> 'Zpět na neidentifikované platby',
'back to vlan interface parameters' => 'Zpět na parametry VLAN rozhraní',
'back to vlan interfaces list' => 'Zpět na seznam VLAN rozhraní',
......
'czk'=> 'Kč',
'date and time'=> 'Datum a čas',
'debit payment rate'=> 'Výše splátek',
'delete this contact.'=> 'Smazat tento kontakt',
'delete this contact'=> 'Smazat tento kontakt',
'delete_member'=> 'Smazat tohoto člena',
'delete_user'=> 'Smazat tohoto uživatele',
'delete_work'=> 'Smazat tuto práci',
......
'description'=> 'Popis',
'destination account'=> 'Cílový účet',
'detail of transfer number'=> 'Detail transakce č.',
'details'=> 'Detaily',
'details'=> 'Detaily',
'device admin is successfully saved' => 'Správce zařízení byl úspěšně uložen.',
'device admin is successfully updated' => 'Správce zařízení byl úspěšně upraven.',
'device admins' => 'Správci zařízení',
'device detail' => 'Detail zařízení',
'device is successfully saved' => 'Zařízení bylo úspěšně uloženo.',
'device is successfully updated' => 'Zařízení bylo úspěšně upraveno.',
......
'duplex' => 'Duplexní',
'edit'=> 'Upravit',
'edit account'=> 'Upravit účet',
'edit device' => 'Upravit zařízení',
'edit device' => 'Upravit zařízení',
'edit device admin' => 'Upravit správce zařízení',
'edit interface' => 'Upravit rozhraní',
'edit ip address' => 'Upravit IP adresu',
'edit member'=> 'Upravit člena',
'edit port' => 'Úprava portu',
'edit segment' => 'Úprava segmentu',
'edit the work'=> 'Upravit práci',
'edit the work'=> 'Upravit práci',
'edit user'=> 'Upravit uživatele',
'edit vlan interface' => 'Úprava VLAN rozhraní',
'edit vlan' => 'Úprava VLANu',
'edit' => 'Upravit',
'editation of member'=> 'Úprava člena',
'editation of user'=> 'Úprava uživatele',
'email' => 'E-mail',
'engineer' => 'Technik',
'engineer' => 'Technik',
'engineers' => 'Technici',
'entrance date'=> 'Datum vstupu',
'entrance fee'=> 'Vstupní příspěvek',
'entrance fee left'=> 'Nedoplatek vstupního příspěvku',
......
'select subnet name' => 'Vyber jméno podsítě',
'select subnet ip' => 'Vyber IP adresu podsítě',
'select subnet' => 'Vyber podsíť',
'select the member'=> 'Vyber člena',
'select the member'=> 'Vyber člena',
'select type'=> 'Vyber typ',
'select user' => 'Vyber uživatele',
'select vlan' => 'Vyber VLAN',
'send to member'=> 'Pošli členovi',
freenetis/trunk/kohana/application/models/device.php
//return self::$db->select(array('CONCAT(users.name,\' \',users.surname) as u_name', 'devices.*'))->from('devices')->join('users', 'users.id = devices.user_id')->get();
if (isset($user_id)) $where = 'WHERE d.user_id='.$user_id.'';
else $where = '';
return self::$db->query('SELECT d.id,d.type,d.name, CONCAT(users.name, \' \', users.surname) AS u_name,CONCAT(u2.name, \' \', u2.surname) AS engineer_name,
return self::$db->query('SELECT d.id,IFNULL(f.translated_term,e.value) as type,d.name, CONCAT(users.name, \' \', users.surname) AS u_name,
IFNULL(ifaces.iface_count,0) AS iface_count,
IFNULL(ports.port_count,0) AS port_count FROM devices d
JOIN users ON d.user_id = users.id
LEFT JOIN users u2 ON d.engineer_id = u2.id
LEFT JOIN enum_types e on d.type = e.id
LEFT JOIN (SELECT * FROM translations WHERE lang = "'.Config::item('locale.lang').'") f on e.value = f.original_term
LEFT JOIN (SELECT COUNT(*) as iface_count,device_id FROM ifaces GROUP BY ifaces.device_id) ifaces ON d.id=ifaces.device_id
LEFT JOIN (SELECT COUNT(*) as port_count,device_id FROM ports GROUP BY ports.device_id) ports ON d.id=ports.device_id
'.$where.'
......
if (isset($member_id)) $where = 'WHERE members.id='.$member_id.'';
else $where = '';
return self::$db->query(
'SELECT d.id,d.type,d.name, CONCAT(users.name, \' \', users.surname) AS u_name,
CONCAT(u2.name, \' \', u2.surname) AS engineer_name,
'SELECT d.id,IFNULL(f.translated_term,e.value) as type,d.name, CONCAT(users.name, \' \', users.surname) AS u_name,
IFNULL(ifaces.iface_count,0) AS iface_count,
IFNULL(ports.port_count,0) AS port_count
FROM devices AS d
JOIN users ON d.user_id = users.id
JOIN members on users.member_id=members.id
LEFT JOIN users AS u2 ON d.engineer_id = u2.id
JOIN members on users.member_id=members.id
LEFT JOIN enum_types e on d.type = e.id
LEFT JOIN (SELECT * FROM translations WHERE lang = "'.Config::item('locale.lang').'") f on e.value = f.original_term
LEFT JOIN (
SELECT COUNT(*) as iface_count,device_id FROM ifaces
GROUP BY ifaces.device_id
freenetis/trunk/kohana/application/models/enum_type.php
class Enum_type_Model extends ORM {
const id_type_of_member=1,
id_type_of_device=2,
id_type_of_user=3;
id_type_of_user=3,
id_type_of_contact=4;
/**
* enum_types array supplements a database table, holding the names for
......
private static $enum_types=array(
self::id_type_of_member=>"Member types",
self::id_type_of_device=>"Device types",
self::id_type_of_user=>"User types",
self::id_type_of_user=>"User types",
self::id_type_of_contact=>"Contact types",
);
function cmp_utf($a, $b)
{
return strcoll($a,$b);
}
public function get_value($type_id)
{
$type = $this->find_by_id($type_id);
$translation_model = new Translation_Model();
return $translation_model->get_translation($type->value);
}
/**
......
function get_values($type_id) {
// print_r("locale=".setlocale(LC_ALL,0));
$types = $this->find_all_by_type_id($type_id);
$arr_types=array();
$arr_types=array();
$translation_model = new Translation_Model();
foreach ($types as $type)
$arr_types[$type->id]=url_lang::lang('texts.'.$type->value);
$arr_types[$type->id] = $translation_model->get_translation($type->value);
uasort($arr_types, array($this, "cmp_utf"));
return $arr_types;
......
}
}
?>
?>
freenetis/trunk/kohana/application/controllers/members.php
{
$model_members = new Member_Model();
$member_data = $model_members->get_member($member_id)->current();
// print_r($member_data);
// print_r($member_data);
$model_translation = new Translation_Model();
$member_type = $model_translation->get_translation($member_data->member_type);
if ($member_id == $_SESSION['member_id'])
{
if (!$this->acl_check_2D('freenetis', 'view_own')) Controller::error(1);
......
if (!$this->acl_check_2D('freenetis', 'view_all')) Controller::error(1);
}
$model_contacts = new Contact_Model();
$contacts = $model_contacts->find_all_by_user_id($member_data->id);
$contacts = $model_contacts->find_all_by_user_id($member_data->id);
$enum_type_model = new Enum_type_Model();
$arr_contact_types = array();
foreach($contacts as $i => $contact) {
$arr_contact_types[$i] = $enum_type_model->get_value($contact->type);
}
$model_users = new User_Model();
$users = $model_users->orderby($order_by,$order_by_direction)->find_all_by_member_id($member_id);
......
// IE dont render TD border if content is NULL, so we must put nbsp into empty fields.
if (trim($val)=='') $member_data->$key = '&nbsp;';
}
$view->content->member_data = $member_data;
$view->content->member_data = $member_data;
$view->content->member_type = $member_type;
$view->content->contact_types = $arr_contact_types;
$view->content->contacts = $contacts;
$view->content->message = $this->session->get_once('message');
$view->render(TRUE);
......
if (!$this->acl_check_2D('freenetis', 'new_all')) Controller::error(1);
$enum_types=new Enum_type_Model();
$types=$enum_types->get_values(Enum_type_Model::id_type_of_member);
$types=$enum_types->get_values(Enum_type_Model::id_type_of_member);
$types[0] = '----- '.url_lang::lang('texts.select type').' -----';
asort($types);
$form = new Forge(url_lang::base().'members/add', '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
......
$form->input('surname')->label(url_lang::lang('texts.surname').':')->rules('required|length[3,60]');
$form->input('post_title')->label(url_lang::lang('texts.post title').':')->rules('length[3,30]');
$form->dropdown('type')->label(url_lang::lang('texts.Type').':')
->options($types);
->options($types)->rules('required');
$form->group('')->label(url_lang::lang('texts.Password'));
$form->password('passwd')->label(url_lang::lang('texts.password').':')->rules('required|length[3,50]')->class('required');
$form->password('confirm_password')->label(url_lang::lang('texts.confirm password').':')->rules('required|length[3,50]')->matches($form->passwd);
......
}
}
?>
?>
freenetis/trunk/kohana/application/controllers/users.php
if (!$this->gacl_class->acl_check('freenetis', 'view_all', 'all', $_SESSION['username'])) Controller::error(1);
}
$model_contacts = new Contact_Model();
$contacts = $model_contacts->find_all_by_user_id($user_id);
$contacts = $model_contacts->find_all_by_user_id($user_id);
$enum_type_model = new Enum_type_Model();
$arr_contact_types = array();
foreach($contacts as $i => $contact) {
$arr_contact_types[$i] = $enum_type_model->get_value($contact->type);
}
$model_works = new Job_Model();
//echo "jmeno je ". $model_users->member->name;
// ********** VIEW WORKS **********
......
//$view->content->heading = "Úprava uživatele ".$data['row']['name']." ".$data['row']['surname'];
// $view->content->user_data = $model_users->get_user($user_id)->current();
$view->content->user_data = $model_users;
$view->content->contacts = $contacts;
$view->content->contacts = $contacts;
$view->content->contact_types = $arr_contact_types;
$view->content->works = $grid ;
$view->content->message = $this->session->get_once('message');
$view->render(TRUE);
......
}
if ($issaved)
{
$this->session->set_flash('message', url_lang::lang('texts.Aditional contacts successfully updated.'));
$this->session->set_flash('message', url_lang::lang('texts.Aditional contacts successfully updated'));
}
else
{
$this->session->set_flash('message', url_lang::lang('texts.Error - cant update aditional contacts.'));
$this->session->set_flash('message', url_lang::lang('texts.Error - cant update aditional contacts'));
}
url::redirect(url_lang::base().'users/show/'.(int)$user_id);
}
else
{
{
$contacts = $model_contacts->find_all_by_user_id($user_id);
$enum_type_model = new Enum_type_Model();
$contact_types = $enum_type_model->get_values(Enum_type_Model::id_type_of_contact);
$arr_keys = array();
foreach($contact_types as $key => $contact_type) {
$arr_keys[] = $key;
}
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('users_contacts');
......
$view->header->menu = Controller::render_menu();
$view->header->title = url_lang::lang('texts.Administration of additional contacts');
//$view->header->other_styles = html::stylesheet('media/css/forms.css');
$view->content->contacts = $model_contacts->find_all_by_user_id($user_id);
$view->content->contacts = $contacts;
$view->content->contact_types = $contact_types;
$view->content->arr_keys = $arr_keys;
$view->content->user_id = $user_id;
$view->content->infotext = url_lang::lang('texts.additional_contacts_infotext');
......
}
}
?>
?>
freenetis/trunk/kohana/application/controllers/login.php
}
}
}
freenetis/trunk/kohana/application/controllers/devices.php
$grid->order_field('name')->label(url_lang::lang('texts.name'));
$grid->order_field('type')->label(url_lang::lang('texts.type'));
$grid->order_field('u_name')->label(url_lang::lang('texts.user'));
$grid->order_field('engineer_name')->label(url_lang::lang('texts.engineer'));
$grid->order_field('iface_count')->label(url_lang::lang('texts.ifaces'))->class('center');
$grid->order_field('port_count')->label(url_lang::lang('texts.ports'))->class('center');
$grid->action_field('id')->label(url_lang::lang('texts.Show')) ->url(url_lang::base().'devices/show') ->action(url_lang::lang('texts.Show'))->class('center');
......
$grid->order_field('name')->label(url_lang::lang('texts.name'));
$grid->order_field('type')->label(url_lang::lang('texts.type'));
$grid->order_field('u_name')->label(url_lang::lang('texts.user'));
$grid->order_field('engineer_name')->label(url_lang::lang('texts.engineer'));
$grid->order_field('iface_count')->label(url_lang::lang('texts.ifaces'))->class('center');
$grid->order_field('port_count')->label(url_lang::lang('texts.ports'))->class('center');
$grid->action_field('id')->label(url_lang::lang('texts.Show')) ->url(url_lang::base().'devices/show') ->action(url_lang::lang('texts.Show'))->class('center');
......
$grid->order_field('name')->label(url_lang::lang('texts.name'));
$grid->order_field('type')->label(url_lang::lang('texts.type'));
$grid->order_field('u_name')->label(url_lang::lang('texts.user'));
$grid->order_field('engineer_name')->label(url_lang::lang('texts.engineer'));
$grid->order_field('iface_count')->label(url_lang::lang('texts.ifaces'))->class('center');
$grid->order_field('port_count')->label(url_lang::lang('texts.ports'))->class('center');
$grid->action_field('id')->label(url_lang::lang('texts.Show')) ->url(url_lang::base().'devices/show') ->action(url_lang::lang('texts.Show'))->class('center');
......
if (!isset($device_id) || $device->id == 0) {
Controller::error();
}
}
$enum_type_model = new Enum_type_Model();
$device_type = $enum_type_model->get_value($device->type);
$this->session->set('ssDevice_id',$device->id);
$user_model = new User_Model;
$iface_model = new Iface_Model;
$ip_model = new Ip_address_Model;
$subnet_model = new Subnet_Model;
$subnet_model = new Subnet_Model;
$device_engineer_model = new Device_engineer_Model();
$engineer = $user_model ->find_by_id($device->engineer_id);
$ifaces = $iface_model ->find_all_by_device_id($device->id);
$engineers = $device_engineer_model->find_all_by_device_id($device->id);
$ifaces = $iface_model ->find_all_by_device_id($device->id);
$arr_engineers = array();
foreach($engineers as $engineer) {
$arr_engineers[] = $engineer->user->name . ' ' . $engineer->user->surname;
}
$engineer_name = $engineer->name.' '.$engineer->surname;
//print_r($ifaces);
$i = 0;
$ip_iface = '';
......
$arr_ip[$i]['netmask'] = $subnet->netmask;
$i++;
}
}
}
$device_admin_model = new Device_admin_Model();
$query = $device_admin_model->select(array('device_admins.id as id', 'users.id as user_id', 'users.name', 'users.surname', 'users.login'))
->join('users','users.id = device_admins.user_id')
->orderby('id','ASC')
->find_all_by_device_id($device_id);
$grid = new Grid(url_lang::base().'devices', null, array(
'use_paginator' => false,
'use_selector' => false
));
$grid->add_new_button(url_lang::base().'device_admins/add', url_lang::lang('texts.Add new device admin'));
$grid->field('id')->label('ID')->class('center');
$grid->field('name')->label(url_lang::lang('texts.name'));
$grid->field('surname')->label(url_lang::lang('texts.surname'));
$grid->field('login')->label(url_lang::lang('texts.username'));
$grid->action_field('user_id')->label(url_lang::lang('texts.Show')) ->url(url_lang::base().'users/show') ->action(url_lang::lang('texts.Show'))->class('center');
$grid->action_field('id')->label(url_lang::lang('texts.Edit')) ->url(url_lang::base().'device_admins/edit') ->action(url_lang::lang('texts.Edit'))->class('center');
$grid->action_field('id')->label(url_lang::lang('texts.Delete')) ->url('delete') ->action(url_lang::lang('texts.Delete'))->class('center');;
$grid->datasource( $query );
$grid_device_admins = $grid;
unset($grid);
//----------- list of INTERFACES ---------------
$iface_model = new Iface_Model();
......
$view->content = new View('show_device');
//$view->content->submenu = $submenu;
$view->content->headline = url_lang::lang('texts.Device detail').' - '.$device->name;
$view->content->device = $device;
$view->content->engineer = $engineer_name;
$view->content->device = $device;
$view->content->device_type = $device_type;
$view->content->engineers = $arr_engineers;
$view->content->count_iface = $iface_model->count_ifaces_of_device($device->id);
$view->content->ifaces = $ifaces;
$view->content->ip_iface = $ip_iface;
$view->content->set('arr_ip',$arr_ip);
$view->content->set('arr_ip',$arr_ip);
$view->content->table_device_admins = $grid_device_admins;
$view->content->table_ifaces = $grid_ifaces;
$view->content->table_ports = $grid_ports;
$view->content->link_back = html::anchor(url_lang::base().'devices/show_all/', url_lang::lang('texts.Back to devices list'));
......
foreach ($users as $user) {
$arr_users[$user->id] = $user->surname.' '.$user->name.' - '.$user->login;
}
asort($arr_users);
asort($arr_users);
$enum_type_model = new Enum_type_Model();
$types = $enum_type_model->get_values(Enum_type_Model::id_type_of_device);
$form->dropdown('user_id')->label(url_lang::lang('texts.user'))->options($arr_users)->rules('required');
$form->input('name')->label(url_lang::lang('texts.Device name').':')->rules('required|length[3,250]');
$form->input('type')->label(url_lang::lang('texts.type').':')->rules('length[1,250]');
$form->dropdown('type')->label(url_lang::lang('texts.Type'))->options($types)->rules('required');
$form->checkbox('PPPoE_logging_in')->label(url_lang::lang('texts.PPPoE'))->value('1');
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,250]');
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,250]');
......
foreach ($users as $user) {
$arr_users[$user->id] = $user->surname.' '.$user->name.' - '.$user->login;
}
asort($arr_users);
asort($arr_users);
$enum_type_model = new Enum_type_Model();
$types = $enum_type_model->get_values(Enum_type_Model::id_type_of_device);
$form->dropdown('user_id')->label(url_lang::lang('texts.user'))->options($arr_users)->rules('required')->selected($device->user_id);
$form->input('name')->label(url_lang::lang('texts.Device name').':')->rules('required|length[3,250]')->value($device->name);
$form->input('type')->label(url_lang::lang('texts.type').':')->rules('length[1,250]')->value($device->type);
$form->input('name')->label(url_lang::lang('texts.Device name').':')->rules('required|length[3,250]')->value($device->name);
$form->dropdown('type')->label(url_lang::lang('texts.type'))->options($types)->rules('required')->selected($device->type);
$form->checkbox('PPPoE_logging_in')->label(url_lang::lang('texts.PPPoE'))->value('1')->checked($device->PPPoE_logging_in);
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('length[0,250]')->value($device->login);
$form->input('password')->label(url_lang::lang('texts.password').':')->rules('length[0,250]')->value($device->password);
......
//----- end EDIT --------------------------------------------------------------
//=============================================================================
}
?>
?>
freenetis/trunk/kohana/application/views/members_show.php
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Type') ?></th>
<td><?php echo url_lang::lang("texts.$member_data->member_type") ?></td>
<td><?php echo $member_type ?></td>
</tr>
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Contact informations') ?></th>
......
<?php foreach ($contacts as $contact):?>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<th><?php echo $contact->type ?></th>
<th><?php echo $contact_types[$i] ?></th>
<td><?php echo $contact->value ?></td>
</tr>
<?php endforeach; ?>
freenetis/trunk/kohana/application/views/show_device.php
<td><?php echo $device->id ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Engineer') ?></th>
<td><?php echo $engineer ?></td>
<th><?php if(count($engineers)<=1) echo url_lang::lang('texts.Engineer'); else echo url_lang::lang('texts.Engineers')?></th>
<td><?php echo implode(', ',$engineers) ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.User') ?></th>
......
<td><?php echo $device->name ?></td>
</tr>
<tr>
<th>Typ<?php echo url_lang::lang('texts.Type') ?></th>
<td><?php echo $device->type ?></td>
<th><?php echo url_lang::lang('texts.Type') ?></th>
<td><?php echo $device_type ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Login name') ?></th>
......
<td><?php echo $device->comment ?></td>
</tr>
</table><br />
<h3><?php echo url_lang::lang('texts.Device admins') ?></h3>
<?php echo $table_device_admins ?>
<br />
<h3><?php echo url_lang::lang('texts.Interfaces') ?></h3>
<?php echo $table_ifaces ?>
<br />
freenetis/trunk/kohana/application/views/users_contacts.php
<h2><?php echo url_lang::lang('texts.Administration of additional contacts') ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to the user.')) ?>
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to the user')) ?>
<br /><br />
<?php echo $infotext ?>
<br />
......
&nbsp;
</th>
</tr>
<?php foreach ($contacts as $contact):?>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<td><?php echo '<input type="text" name="type[]" maxlength="40" style="width:100px;" value="'.$contact->type.'" /> : ' ?></td>
<td><?php echo '<select name="type[]" style="width:100px;" /> : ' ?>
<?php foreach ($contact_types as $key => $contact_type):?>
<?php echo '<option value="'.$key.'"';
if($contact->type == $key) echo ' selected';
echo '>'.$contact_type.'</option>' ?>
<?php endforeach; ?>
</select> : </td>
<td><?php echo '<input type="text" name="value[]" maxlength="255" value="'.$contact->value.'" />' ?></td>
<td><a href="#" onclick="delete_row(this)"><?php echo url_lang::lang('texts.Delete this contact.') ?></a></td>
<td><a href="#" onclick="delete_row(this)"><?php echo url_lang::lang('texts.Delete this contact') ?></a></td>
</tr>
<?php endforeach; ?>
<tr>
<td>
<a href="#" onclick="add_row(this,'<?php echo url_lang::lang('texts.Delete this contact.') ?>')"><?php echo url_lang::lang('texts.Add new contact') ?></a>
<a href="#" onclick="add_row(this, new Array('<?php echo implode("','",$arr_keys) ?>'), new Array('<?php echo implode("','",$contact_types) ?>'),'<?php echo url_lang::lang('texts.Delete this contact') ?>')"><?php echo url_lang::lang('texts.Add new contact') ?></a>
</td>
<td colspan="2">
<input id="contactsubmit" type="submit" value="<?php echo url_lang::lang('texts.Save changes') ?>" name="contactsubmit" />
freenetis/trunk/kohana/application/views/users_show.php
<?php foreach ($contacts as $contact):?>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<th><?php echo $contact->type ?></th>
<th><?php echo $contact_types[$i] ?></th>
<td><?php echo $contact->value ?></td>
</tr>
<?php endforeach; ?>

Také k dispozici: Unified diff