Revize 455
Přidáno uživatelem Jiří Sviták před asi 15 roky(ů)
freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'day' => 'Den',
|
||
'day book' => 'Účetní deník',
|
||
'debit payment rate' => 'Výše splátek',
|
||
'debtor' => 'Dlužník',
|
||
'debtors' => 'Dlužníci',
|
||
'deduct' => 'Strhnout',
|
||
'deduct entrance fee' => 'Strhnout vstupní příspěvek',
|
||
... | ... | |
'error - cant do the transfer' => 'Chyba - nelze provést transakci.',
|
||
'error - cant edit fee' => 'Chyba - nelze upravit poplatek.',
|
||
'error - cant change password' => 'Chyba - nelze změnit heslo',
|
||
'error - cant set redirection' => 'Chyba - nelze nastavit přesměrování.',
|
||
'error - cant update account' => 'Chyba - nelze upravit účet.',
|
||
'error - cant update additional contacts' => 'Chyba - nelze upravit další kontakty.',
|
||
'error - cant update member' => 'Chyba - nelze upravit člena.',
|
||
... | ... | |
'old password' => 'Staré heslo',
|
||
'operating account' => 'Provozní účet',
|
||
'optional' => 'nepovinné',
|
||
'optional message' => 'Volitelná zpráva',
|
||
'or' => 'nebo',
|
||
'order number' => 'Číslo objednávky',
|
||
'organization identifier' => 'IČ',
|
||
... | ... | |
'payment' => 'Platba',
|
||
'payment has been successfully assigned' => 'Platba byla úspěšně přiřazena.',
|
||
'payment information' => 'Informace o platbě',
|
||
'payment notice' => 'Upozornění na platbu',
|
||
'penalty' => 'Pokuta',
|
||
'penalty and fee' => 'Poplatky a pokuty',
|
||
'penalty for unidentified transfer' => 'Pokuta za neidentifikovanou platbu',
|
||
... | ... | |
'really delete this account' => 'Opravdu smazat tento účet',
|
||
'received member fees' => 'Přijaté členské příspěvky',
|
||
'redir' => 'Přesm',
|
||
'redirect' => 'Přesměrování',
|
||
'redirect as debtor' => 'Přesměrovat jako dlužníka',
|
||
'reg' => 'Přih.',
|
||
'redirect' => 'Přesměrovat',
|
||
'redirection' => 'Přesměrování',
|
||
'redirection has been successfully set' => 'Přesměrování bylo úspěšně nastaveno.',
|
||
'reg' => 'Přih.',
|
||
'register' => 'Registrovat',
|
||
'registration' => 'Přihláška',
|
||
'registrations' => 'Přihlášky',
|
freenetis/trunk/kohana/application/models/member.php | ||
---|---|---|
public function get_all_members($limit_from = 0, $limit_results = 50, $order_by = 'id', $order_by_direction = 'asc', $filter_values = array())
|
||
{
|
||
$where = '';
|
||
$first = true;
|
||
foreach($filter_values as $key => $value)
|
||
{
|
||
if ($key != 'submit')
|
||
{
|
||
// used for creating WHERE clausule
|
||
if ($first)
|
||
{
|
||
$where = 'WHERE ';
|
||
$first = false;
|
||
}
|
||
if ($where == '')
|
||
$where = 'WHERE '.$key.' LIKE \'%'.trim($value).'%\' COLLATE utf8_general_ci';
|
||
else
|
||
{
|
||
$where .= ' AND ';
|
||
}
|
||
if ($key == 'phone')
|
||
{
|
||
// joins table users to get phone number from user assigned to this member
|
||
$where .= 'u.phone = \''.trim($value).'\'';
|
||
}
|
||
else
|
||
{
|
||
// may filter name, street and town
|
||
$where .= 'm.'.$key.' LIKE \'%'.trim($value).'%\' COLLATE utf8_general_ci';
|
||
}
|
||
$where .= ' AND '.$key.' LIKE \'%'.trim($value).'%\' COLLATE utf8_general_ci';
|
||
}
|
||
}
|
||
return self::$db->query("SELECT m.id, m.registration, m.name, s.street, ap.street_number, t.town, t.quarter, u.phone
|
||
FROM members m
|
||
JOIN users u ON m.id = u.member_id AND u.type = ".User_Model::$member."
|
||
LEFT JOIN address_points ap ON m.address_point_id = ap.id
|
||
LEFT JOIN streets s ON ap.street_id = s.id
|
||
LEFT JOIN towns t ON ap.town_id = t.id
|
||
$where
|
||
ORDER BY $order_by $order_by_direction
|
||
LIMIT $limit_from, $limit_results"
|
||
return self::$db->query("SELECT
|
||
m.id, m.registration, m.name, s.street, ap.street_number, t.town, t.quarter, m.variable_symbol
|
||
FROM members m
|
||
LEFT JOIN address_points ap ON m.address_point_id = ap.id
|
||
LEFT JOIN streets s ON ap.street_id = s.id
|
||
LEFT JOIN towns t ON ap.town_id = t.id
|
||
$where
|
||
ORDER BY $order_by $order_by_direction
|
||
LIMIT $limit_from, $limit_results"
|
||
);
|
||
}
|
||
|
||
/**
|
||
* Function counts all members.
|
||
* @param $filter_values
|
||
* @return unknown_type
|
||
*/
|
||
public function count_all_members($filter_values = array())
|
||
{
|
||
$where = '';
|
||
foreach($filter_values as $key => $value)
|
||
{
|
||
if ($key != 'submit')
|
||
{
|
||
if ($where == '')
|
||
$where = 'WHERE '.$key.' LIKE \'%'.trim($value).'%\' COLLATE utf8_general_ci';
|
||
else
|
||
$where .= ' AND '.$key.' LIKE \'%'.trim($value).'%\' COLLATE utf8_general_ci';
|
||
}
|
||
}
|
||
return self::$db->query("SELECT COUNT(*) AS total
|
||
FROM members
|
||
$where
|
||
")->current()->total;
|
||
}
|
||
|
||
/**
|
||
* Function gets member for registration table.
|
||
* @param $limit
|
||
* @param $limit_results
|
||
... | ... | |
");
|
||
}
|
||
|
||
/**
|
||
* Function counts all members.
|
||
* @param $filter_values
|
||
* @return unknown_type
|
||
*/
|
||
public function count_all_members($filter_values = array())
|
||
{
|
||
$where = '';
|
||
$first = true;
|
||
foreach($filter_values as $key => $value)
|
||
{
|
||
if ($key != 'submit')
|
||
{
|
||
// used for creating WHERE clausule
|
||
if ($first)
|
||
{
|
||
$where = 'WHERE ';
|
||
$first = false;
|
||
}
|
||
else
|
||
{
|
||
$where .= ' AND ';
|
||
}
|
||
if ($key == 'phone')
|
||
{
|
||
$where .= 'u.phone = \''.trim($value).'\'';
|
||
}
|
||
else
|
||
{
|
||
// may filter name, street and town
|
||
$where .= 'm.'.$key.' LIKE \'%'.trim($value).'%\' COLLATE utf8_general_ci';
|
||
}
|
||
}
|
||
}
|
||
return self::$db->query("SELECT COUNT(*) AS total
|
||
FROM members m
|
||
JOIN users u ON m.id = u.member_id AND u.type = ".User_Model::$member."
|
||
$where"
|
||
)->current()->total;
|
||
}
|
||
|
||
public function get_member($id)
|
||
{
|
||
return self::$db->select(
|
freenetis/trunk/kohana/application/controllers/members.php | ||
---|---|---|
new Table_Form_Item('text','town','Town'),
|
||
"tr",
|
||
new Table_Form_Item('text','street','Street'),
|
||
new Table_Form_Item('text','phone','Phone'),
|
||
new Table_Form_Item('text','variable_symbol','Variable symbol'),
|
||
"tr", "td", "td", "td",
|
||
new Table_Form_Item('submit','submit','Filter')
|
||
)
|
||
... | ... | |
$max_page = $count / $limit_results;
|
||
if($count % $limit_results >0) $max_page++;
|
||
$members = $member_model->get_all_members_to_registration($min, $limit_results);
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Administration of members registrations');
|
||
$view->content = new View('members/registration');
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.Administration of members registrations');
|
||
$view->content->members = $members;
|
||
$view->content->page = $page;
|
||
$view->content->max_page = $max_page;
|
freenetis/trunk/kohana/application/controllers/users.php | ||
---|---|---|
// $grid->action_field('id')->label(url_lang::lang('texts.User'))->url(url_lang::base().'users/delete')->action(url_lang::lang('texts.Delete'))->script('onclick="return potvrd(\''.url_lang::lang('texts.delete_user').'\');"');
|
||
$grid->datasource($query);
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.List of all users');
|
||
$view->content = $grid;
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.List of all users');
|
||
$view->render(TRUE);
|
||
} // end of show_all function
|
||
|
||
... | ... | |
// $grid->action_field('id')->label(url_lang::lang('texts.Delete'))->url(url_lang::base().'users/delete')->action(url_lang::lang('texts.Delete'))->script('onclick="return potvrd(\''.url_lang::lang('texts.delete_user').'\');"');
|
||
$grid->datasource($query);
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.List of users of member').' '.$member->name;
|
||
$view->content = $grid;
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.List of users of member').' '.$member->name;
|
||
$view->render(TRUE);
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
else
|
||
{
|
||
$view->form = new View('registration');
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Editing of user');
|
||
$view->content = new View('form');
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.Display member');
|
||
$view->content->headline = url_lang::lang('texts.Editing of user').' '.$user_model->pre_title.' '.$user_model->name.' '.$user_model->middle_name.' '.$user_model->surname.' '.$user_model->post_title;
|
||
$view->content->form = $form->html();
|
||
$view->content->link_back = html::anchor(url_lang::base().'users/show/'.$user_model->id,url_lang::lang('texts.Back to this user'));
|
||
... | ... | |
{
|
||
$voip = html::anchor(url_lang::base().'voip/show/'.$voip->current()->user_id,$voip->current()->name);
|
||
}
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Display user');
|
||
$view->content = new View('users/show');
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.Display user');
|
||
$view->content->user_data = $model_users;
|
||
$view->content->contacts = $contacts;
|
||
$view->content->contact_types = $arr_contact_types;
|
||
... | ... | |
{
|
||
$view->form = new View('registration');
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Add new user');
|
||
$view->content = new View('form');
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.Add new user');
|
||
$view->content->headline = url_lang::lang('texts.Add new user');
|
||
$view->content->link_back = html::anchor(url_lang::base().'members/show/'.$member_id,url_lang::lang('texts.Back to the member.'));
|
||
$view->content->form = $form->html();
|
||
|
||
$view->render(TRUE);
|
||
}
|
||
}
|
||
... | ... | |
foreach($contact_types as $key => $contact_type) {
|
||
$arr_keys[] = $key;
|
||
}
|
||
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view->title = url_lang::lang('texts.Administration of additional contacts');
|
||
$view->content = new View('users/additional_contacts');
|
||
$view->footer = new View('base/footer');
|
||
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.Administration of additional contacts');
|
||
$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');
|
||
|
||
$view->render(TRUE);
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
else
|
||
{
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Change application password');
|
||
$view->content = new View('users/change_application_password');
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = url_lang::lang('texts.Change application password');
|
||
$view->content->form = $form->html();
|
||
$view->content->user_id = $user_id;
|
||
$view->content->member_id = $user->member_id;
|
freenetis/trunk/kohana/application/controllers/subnets.php | ||
---|---|---|
$form->input('netmask')->label(url_lang::lang('texts.Netmask').':')
|
||
->rules('required|length[1,250]');
|
||
$form->input('OSPF_area_id')->label(url_lang::lang('texts.OSPF area ID').':')->rules('valid_digit');
|
||
$form->dropdown('redirect')->label(url_lang::lang('texts.Redirect'))->options($redirect)->selected(0);
|
||
if ($this->acl_check_new('Devices_Controller', 'redirect'))
|
||
$form->dropdown('redirect')->label(url_lang::lang('texts.Redirect'))->options($redirect)->selected(0);
|
||
$form->submit('submit')->value(url_lang::lang('texts.Save'));
|
||
special::required_forge_style($form, ' *', 'required');
|
||
|
||
... | ... | |
$subnet->network_address = $form_data['network_address'];
|
||
$subnet->netmask = $form_data['netmask'];
|
||
$subnet->OSPF_area_id = $form_data['OSPF_area_id'];
|
||
$subnet->redirect = $form_data['redirect'];
|
||
if ($this->acl_check_new('Devices_Controller', 'redirect'))
|
||
$subnet->redirect = $form_data['redirect'];
|
||
|
||
unset($form_data);
|
||
|
||
... | ... | |
$form->input('netmask')->label(url_lang::lang('texts.Netmask').':')
|
||
->rules('required|length[1,250]')->value($subnet->netmask);
|
||
$form->input('OSPF_area_id')->label(url_lang::lang('texts.OSPF area ID').':')->rules('valid_digit')->value($subnet->OSPF_area_id);
|
||
$form->dropdown('redirect')->label(url_lang::lang('texts.Redirect'))->options($redirect)->selected($subnet->redirect);
|
||
if ($this->acl_check_edit('Devices_Controller', 'redirect'))
|
||
$form->dropdown('redirect')->label(url_lang::lang('texts.Redirect'))->options($redirect)->selected($subnet->redirect);
|
||
$form->submit('submit')->value(url_lang::lang('texts.update'));
|
||
special::required_forge_style($form, ' *', 'required');
|
||
|
||
... | ... | |
$subnet->network_address = $form_data['network_address'];
|
||
$subnet->netmask = $form_data['netmask'];
|
||
$subnet->OSPF_area_id = $form_data['OSPF_area_id'];
|
||
$subnet->redirect = $form_data['redirect'];
|
||
if ($this->acl_check_edit('Devices_Controller', 'redirect'))
|
||
$subnet->redirect = $form_data['redirect'];
|
||
|
||
unset($form_data);
|
||
|
freenetis/trunk/kohana/application/controllers/redirect.php | ||
---|---|---|
<?php
|
||
class Redirect_Controller extends Controller
|
||
{
|
||
/* Bits for redirection, from the least significant.
|
||
* 0 - debtor
|
||
* 1 - payment notice
|
||
* 2 - optional message (like general meeting invitation)
|
||
*/
|
||
|
||
|
||
/**
|
||
* This is the address where are members of network redirected to.
|
||
* @return unknown_type
|
||
... | ... | |
switch ($type)
|
||
{
|
||
// list of allowed ip addresses
|
||
// if ip address is in redirected range, then this ipset contains allowed ip addresses
|
||
case 'members':
|
||
$ip_model = new Ip_address_Model();
|
||
$ips = $ip_model->get_allowed_member_ips();
|
||
... | ... | |
echo "$ip->ip_address\n";
|
||
}
|
||
break;
|
||
// list of network address ranges to redirect
|
||
// list of network address ranges to redirect, gateway shorewall rules are applied to this ranges
|
||
case 'ranges':
|
||
$subnet_model = new Subnet_Model();
|
||
$subnets = $subnet_model->get_subnets_to_redirect();
|
||
... | ... | |
}
|
||
}
|
||
|
||
|
||
/*
|
||
function add_to_debtor_list($member_id = null)
|
||
/**
|
||
* Function edits member's redirections.
|
||
* @param $member_id
|
||
* @return unknown_type
|
||
*/
|
||
function member($member_id = null)
|
||
{
|
||
// access rights
|
||
if (!$this->acl_check_edit('Members_Controller', 'redirect', $member_id))
|
||
Controller::error(ACCESS);
|
||
if (!isset($member_id))
|
||
Controller::warning(PARAMETER);
|
||
$member_model = new Member_Model($member_id);
|
||
if ($member_model->id == 0)
|
||
Controller::error(RECORD);
|
||
// ipset model
|
||
$ipset_model = new Ipset_Model();
|
||
$ipset = $ipset_model->find_by_name('debtors');
|
||
// all ip addresses of interfaces of devices of users of given member
|
||
$ip_model = new Ip_address_Model();
|
||
$ips = $ip_model->get_ip_addresses_of_member($member_id);
|
||
// database
|
||
$db = new Database();
|
||
foreach($ips as $ip)
|
||
// member
|
||
$member = new Member_Model($member_id);
|
||
if ($member->id == 0 || $member->id == 1)
|
||
Controller::error(RECORD);
|
||
$array[0] = url_lang::lang('texts.No');
|
||
$array[1] = url_lang::lang('texts.Yes');
|
||
// form
|
||
$form = new Forge(url_lang::base().'redirect/member/'.$member_id, '', 'POST', array('id' => 'article_form'));
|
||
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
|
||
$form->group('')->label(url_lang::lang('texts.Redirection'));
|
||
$form->dropdown('debtor')->label(url_lang::lang('texts.Debtor'))->options($array)->selected(($member->redirect & 1) ? 1 : 0);
|
||
$form->dropdown('payment_notice')->label(url_lang::lang('texts.Payment notice'))->options($array)->selected(($member->redirect & 2) ? 1 : 0);
|
||
$form->dropdown('optional_message')->label(url_lang::lang('texts.Optional message'))->options($array)->selected(($member->redirect & 4) ? 1 : 0);
|
||
$form->submit('submit')->value(url_lang::lang('texts.Redirect'));
|
||
special::required_forge_style($form, ' *', 'required');
|
||
// validation
|
||
if ($form->validate())
|
||
{
|
||
echo $ip->ip_address."\n";
|
||
$db->query("INSERT INTO ipsets_ip_addresses
|
||
VALUES ('".$ipset->id."', '".$ip->id."')");
|
||
$form_data = $form->as_array();
|
||
$member->redirect;
|
||
// debtor
|
||
if ($form_data['debtor'] == 1)
|
||
$member->redirect |= 1;
|
||
else
|
||
$member->redirect &= ~1;
|
||
// payment notice
|
||
if ($form_data['payment_notice'] == 1)
|
||
$member->redirect |= 2;
|
||
else
|
||
$member->redirect &= ~2;
|
||
// optional message
|
||
if ($form_data['optional_message'] == 1)
|
||
$member->redirect |= 4;
|
||
else
|
||
$member->redirect &= ~4;
|
||
$member->redirect &= 7;
|
||
if ($member->save())
|
||
{
|
||
$this->session->set_flash('message', url_lang::lang('texts.Redirection has been successfully set.'));
|
||
url::redirect(url_lang::base().'members/show/'.$member_id);
|
||
}
|
||
else
|
||
{
|
||
$this->session->set_flash('message', url_lang::lang('texts.Error - cant set redirection.'));
|
||
url::redirect(url_lang::base().'members/show/'.$member_id);
|
||
}
|
||
}
|
||
|
||
echo 'uz to bude..';
|
||
else
|
||
{
|
||
// view
|
||
$headline = url_lang::lang('texts.Redirection');
|
||
$view = new View('main');
|
||
$view->title = $headline;
|
||
$view->content = new View('form');
|
||
$view->content->headline = $headline;
|
||
$view->content->link_back = html::anchor(url_lang::base().'members/show/'.$member_id, url_lang::lang('texts.Back to the member'));
|
||
$view->content->form = $form->html();
|
||
$view->render(TRUE);
|
||
}
|
||
}
|
||
*/
|
||
|
||
|
||
/**
|
freenetis/trunk/kohana/application/controllers/bank_transfers.php | ||
---|---|---|
$t->clear();
|
||
$time_now = date("Y-m-d H:i:s", time());
|
||
$t->member_id = $member_id;
|
||
$t->user_id = $this->session->get('user_id');
|
||
$t->origin_id = $bt->destination_id;
|
||
$t->destination_id = $form_data['name'];
|
||
$t->previous_transfer_id = $bt->id;
|
||
... | ... | |
{
|
||
$operating = ORM::factory('account')->find_by_account_attribute_id(Account_attribute_Model::$operating);
|
||
$pen = new Transfer_Model();
|
||
$pen->user_id = $this->session->get('user_id');
|
||
$pen->origin_id = $form_data['name'];
|
||
$pen->destination_id = $operating->id;
|
||
$pen->previous_transfer_id = $bt->id;
|
freenetis/trunk/kohana/application/controllers/accounts.php | ||
---|---|---|
else
|
||
{
|
||
$headline = url_lang::lang('texts.Add new project account');
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = $headline;
|
||
$view = new View('main');
|
||
$view->title = $headline;
|
||
$view->content = new View('form');
|
||
$view->content->headline = $headline;
|
||
$view->content->link_back = html::anchor(url_lang::base().'accounts/show_all?name=&group=2&submit=Filter', url_lang::lang('texts.Back to project accounts'));
|
||
$view->content->form = $form->html();
|
||
$view->footer = new View('base/footer');
|
||
$view->render(TRUE);
|
||
}
|
||
} // end of add_credit_account function
|
||
... | ... | |
else
|
||
{
|
||
$headline = url_lang::lang('texts.Edit account');
|
||
$view->form = new View('registration');
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = $headline;
|
||
$view->content = new View('form');
|
||
$view->content->headline = $headline;
|
||
$view->content->form = $form->html();
|
||
$view->content->link_back = html::anchor($linkback, url_lang::lang('texts.Back to double-entry accounts'));
|
||
$view->footer = new View('base/footer');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->header->title = $headline;
|
||
$view->render(TRUE);
|
||
}
|
||
} // end of edit function
|
freenetis/trunk/kohana/application/controllers/devices.php | ||
---|---|---|
$grid->datasource( $query );
|
||
$grid_ports = $grid;
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Device detail').' - '.$device->name;
|
||
$view->content = new View('show_device');
|
||
$view->content->headline = url_lang::lang('texts.Device detail').' - '.$device->name;
|
||
$view->content->device = $device;
|
||
... | ... | |
$view->content->table_device_admins = $grid_device_admins;
|
||
$view->content->table_ifaces = $grid_ifaces;
|
||
$view->content->table_ports = $grid_ports;
|
||
$view->footer = new View('base/footer');
|
||
$view->header->title = url_lang::lang('texts.Device detail').' - '.$device->name;
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->render(TRUE);
|
||
} // end of show
|
||
|
||
... | ... | |
}
|
||
}
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Add new device');
|
||
$view->content = new View('form');
|
||
$view->content->form = $form->html();
|
||
if (isset($user_id))
|
||
... | ... | |
$view->content->link_back = html::anchor(url_lang::base().'devices/show_all/', url_lang::lang('texts.Back to list of all devices'));
|
||
$view->content->headline = url_lang::lang('texts.Add new device');
|
||
}
|
||
$view->footer = new View('base/footer');
|
||
$view->header->title = url_lang::lang('texts.Add new device');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->render(TRUE);
|
||
} // end of add
|
||
|
||
... | ... | |
|
||
}
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Add new whole device');
|
||
$view->content = new View('form');
|
||
$view->content->form = $form->html();
|
||
if (isset($user_id))
|
||
... | ... | |
$view->content->link_back = html::anchor(url_lang::base().'devices/show_all/', url_lang::lang('texts.Back to list of all devices'));
|
||
$view->content->headline = url_lang::lang('texts.Add new whole device');
|
||
}
|
||
$view->footer = new View('base/footer');
|
||
$view->header->title = url_lang::lang('texts.Add new whole device');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->render(TRUE);
|
||
} // end of function add_whole
|
||
|
||
... | ... | |
url::redirect(url_lang::base().'devices/show/'.$device_model->id);
|
||
}
|
||
} // end of validation
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view = new View('main');
|
||
$view->title = url_lang::lang('texts.Edit device');
|
||
$view->content = new View('form');
|
||
$view->content->form = $form->html();
|
||
if ($this->session->get('ssUser_id'))
|
||
... | ... | |
$link_back = html::anchor(url_lang::base().'devices/show_all/', url_lang::lang('texts.Back list of all devices'));
|
||
$view->content->link_back = $link_back;
|
||
$view->content->headline = url_lang::lang('texts.Edit device').': '.$device->name;
|
||
$view->footer = new View('base/footer');
|
||
$view->header->title = url_lang::lang('texts.Edit device');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->render(TRUE);
|
||
} // end of function edit
|
||
|
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql.php | ||
---|---|---|
|
||
// array of sql queries that upgrade database
|
||
$upgrade_sql[get_SVN_rev()] = array(
|
||
"ALTER TABLE `transfers` ADD `user_id` INT NULL AFTER `member_id` "
|
||
"INSERT INTO `axo` (
|
||
`id` ,
|
||
`section_value` ,
|
||
`value` ,
|
||
`order_value` ,
|
||
`name` ,
|
||
`hidden`
|
||
)
|
||
VALUES (
|
||
'144', 'Members_Controller', 'redirect', '0', 'Presmerovani clena (jeho IP adres)', '0'
|
||
), (
|
||
'145', 'Devices_Controller', 'redirect', '0', 'Presmerovani podsite', '0'
|
||
);
|
||
",
|
||
"INSERT INTO `axo_map` (
|
||
`acl_id` ,
|
||
`section_value` ,
|
||
`value`
|
||
)
|
||
VALUES (
|
||
'38', 'Members_Controller', 'redirect'
|
||
), (
|
||
'38', 'Devices_Controller', 'redirect'
|
||
), (
|
||
'51', 'Members_Controller', 'redirect'
|
||
), (
|
||
'51', 'Devices_Controller', 'redirect'
|
||
);
|
||
"
|
||
);
|
||
|
||
|
||
?>
|
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql_454.php | ||
---|---|---|
<?php
|
||
$upgrade_sql[454] = array(
|
||
"ALTER TABLE `transfers` ADD `user_id` INT NULL AFTER `member_id` "
|
||
);
|
||
?>
|
freenetis/trunk/kohana/application/views/members/registration.php | ||
---|---|---|
</tr>
|
||
<?php foreach ($members as $member):?>
|
||
<tr>
|
||
<input type="hidden" name="ids[]" value="<?php echo $member->id ?>">
|
||
<?php echo "<input type=\"hidden\" name=\"ids[]\" value=\"".$member->id."\">" ?>
|
||
<td><?php echo $member->id; ?></td>
|
||
<td><input type="checkbox" name="registrations[<?php echo $member->id ?>]" value="yes" <?php if($member->registration==1) echo 'checked' ?>></td>
|
||
<td><?php echo $member->name; ?></td>
|
freenetis/trunk/kohana/application/views/members/show.php | ||
---|---|---|
$links[] = html::anchor(url_lang::base().'transfers/show_by_account/'.$account->id, url_lang::lang('texts.Show his transfers'));
|
||
if ($this->acl_check_edit('Accounts_Controller', 'transfers', $member_data->member_id) && $member_data->member_id != 1)
|
||
$links[] = html::anchor(url_lang::base().'transfers/add_member_fee_payment_by_cash/'.$member_data->member_id, url_lang::lang('texts.Add member fee payment by cash'));
|
||
//$links[] = html::anchor(url_lang::base().'redirect/ip_info/', url_lang::lang('texts.My IP address'));
|
||
//$links[] = html::anchor(url_lang::base().'redirect/add_to_debtor_list/'.$member_data->member_id, url_lang::lang('texts.Redirect as debtor'));
|
||
if ($this->acl_check_edit('Members_Controller', 'redirect', $member_data->member_id))
|
||
$links[] = html::anchor(url_lang::base().'redirect/member/'.$member_data->member_id, url_lang::lang('texts.Redirection'));
|
||
if ($member_data->member_id != 1 && $member_data->entrance_fee_left != 0 && $this->acl_check_edit('Members_Controller', 'en_fee_left', $member_data->member_id))
|
||
$links[] = html::anchor(url_lang::base().'transfers/deduct_entrance_fees/'.$member_data->member_id, url_lang::lang('texts.Deduct entrance fee'), array('onclick' => 'return potvrd(\''.url_lang::lang('texts.Do you want to deduct this member\'s entrance fee').'\')'));
|
||
echo implode (' | ', $links)
|
Také k dispozici: Unified diff
Uz funguje prace s presmerovanim - presmerovani clenu i podsiti, zbytek je treba dodelat na strane centralniho routeru.