Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1918

Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)

Novinky:
closes #517: Moznost povoleni/zakazani SMS

Upravy:
- mirne zmeny v nastaveni v sekci system (preusporadani)

Opravy:
- oprava pristupovych prav v sekcich viditelnych radnymi cleny
- ref #516: zapomenute zobrazeni administrovanych zaizeni v profilu uzivatele
- pokrocile zobrazeni zarizeni uzivatele (nezorazoval se obsah gridu)
- fixes #556: Nezobrazi blok IP adresa v profilu clena
- fixes #551: Docasne vyrazeni exportu prihlasky v PDF (ceka se na #407)

Zobrazit rozdíly:

freenetis/branches/1.1/application/i18n/cs_CZ/texts.php
'add work' => 'Přidat práci',
'added' => 'Přidáno',
'added by' => 'Přidal',
'additional demolition of membership fees' => 'Dodatečné stržení členských poplatků',
'additional demolition of membership fees' => 'Dodatečné stržení členských příspěvků',
'additional payment form services provided before membership' => 'Doplatek za využívání služeb v době kdy nebyl uživatel členem',
'another contact information' => 'Další kontaktní informace',
'additional information' => 'Doplňkové informace',
freenetis/branches/1.1/application/helpers/callback.php
{
if ($item->connected_to_devices_count == 1)
{
echo html::anchor(
'devices/show/'.$item->connected_to_device_id,
$item->connected_to_device_name
);
if (Controller::instance()->acl_check_view('Devices_Controller', 'devices'))
{
echo html::anchor(
'devices/show/'.$item->connected_to_device_id,
$item->connected_to_device_name
);
}
else
{
echo $item->connected_to_device_name;
}
}
else if (isset($item->link_id))
else if (Controller::instance()->acl_check_view('Links_Controller', 'link') &&
isset($item->link_id))
{
echo html::anchor(
'links/show/'.$item->link_id,
......
{
if ($connected->connected_to_devices_count == 1)
{
echo html::anchor(
'devices/show/'.$connected->connected_to_device_id,
$connected->connected_to_device_name
);
if (Controller::instance()->acl_check_view('Devices_Controller', 'devices'))
{
echo html::anchor(
'devices/show/'.$connected->connected_to_device_id,
$connected->connected_to_device_name
);
}
else
{
echo $connected->connected_to_device_name;
}
}
else
{
freenetis/branches/1.1/application/models/message.php
throw new Exception('Wrong args');
}
// check if enabled
if (!Settings::get('sms_enabled'))
{
throw new Exception('SMS are not enabled');
}
// preparations
$datetime = date('Y-m-d H:i:s');
$user_id = (intval($user_id)) ? intval($user_id) : 'NULL';
freenetis/branches/1.1/application/controllers/ifaces.php
$grid_ip_addresses->field('ip_address')
->label('IP address');
$grid_ip_addresses->link_field('subnet_id')
->link('subnets/show', 'subnet_name')
->label('Subnet');
if ($this->acl_check_view('Subnets_Controller', 'subnet'))
{
$grid_ip_addresses->link_field('subnet_id')
->link('subnets/show', 'subnet_name')
->label('Subnet');
}
else
{
$grid_ip_addresses->field('subnet_name')
->label('Subnet');
}
$actions = $grid_ip_addresses->grouped_action_field();
freenetis/branches/1.1/application/controllers/users.php
$aro_groups = $user->get_aro_groups_of_user($user_id);
// grid with lis of users
$admin_devices_grid = new Grid('members', null, array
(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false,
));
if ($this->acl_check_new('Devices_Controller', 'admin'))
if (Settings::get('networks_enabled') &&
$this->acl_check_view('Devices_Controller', 'admin'))
{
$admin_devices_grid->add_new_button(
'device_admins/edit_user/'.$user_id, __('Edit')
// grid with lis of users
$admin_devices_grid = new Grid('members', null, array
(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false,
));
if ($this->acl_check_new('Devices_Controller', 'admin'))
{
$admin_devices_grid->add_new_button(
'device_admins/edit_user/'.$user_id, __('Edit')
);
}
$admin_devices_grid->callback_field('device_id')
->label(__('Device'))
->callback('callback::device_field');
$admin_devices_grid->link_field('user_id')
->link('users/show', 'user_name')
->label('User');
if ($this->acl_check_delete('Devices_Controller', 'admin'))
{
$admin_devices_grid->grouped_action_field()
->add_action()
->icon_action('delete')
->url('device_admins/delete')
->label('Remove')
->class('delete_link');
}
$admin_devices_grid->datasource(
ORM::factory('device_admin')->get_all_devices_by_admin($user->id)
);
// grid with lis of users
$engineer_devices_grid = new Grid(url_lang::base().'members', null, array
(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false,
));
$engineer_devices_grid->callback_field('device_id')
->label(__('Device'))
->callback('callback::device_field');
$engineer_devices_grid->link_field('user_id')
->link('users/show', 'user_name')
->label('User');
if ($this->acl_check_delete('Devices_Controller', 'admin'))
{
$engineer_devices_grid->grouped_action_field()
->add_action()
->icon_action('delete')
->url('device_engineers/delete')
->label('Remove')
->class('delete_link');
}
$engineer_devices_grid->datasource(
ORM::factory('device_engineer')->get_all_devices_by_engineer($user->id)
);
}
$admin_devices_grid->callback_field('device_id')
->label(__('Device'))
->callback('callback::device_field');
$admin_devices_grid->link_field('user_id')
->link('users/show', 'user_name')
->label('User');
if ($this->acl_check_delete('Devices_Controller', 'admin'))
{
$admin_devices_grid->grouped_action_field()
->add_action()
->icon_action('delete')
->url('device_admins/delete')
->label('Remove')
->class('delete_link');
}
$admin_devices_grid->datasource(
ORM::factory('device_admin')->get_all_devices_by_admin($user->id)
);
// grid with lis of users
$engineer_devices_grid = new Grid(url_lang::base().'members', null, array
(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false,
));
$engineer_devices_grid->callback_field('device_id')
->label(__('Device'))
->callback('callback::device_field');
$engineer_devices_grid->link_field('user_id')
->link('users/show', 'user_name')
->label('User');
if ($this->acl_check_delete('Devices_Controller', 'admin'))
{
$engineer_devices_grid->grouped_action_field()
->add_action()
->icon_action('delete')
->url('device_engineers/delete')
->label('Remove')
->class('delete_link');
}
$engineer_devices_grid->datasource(
ORM::factory('device_engineer')->get_all_devices_by_engineer($user->id)
);
// grid with lis of users
$comments_grid = new Grid('members', null, array
(
'separator' => '<br /><br />',
......
$view->content->contact_types = $arr_contact_types;
$view->content->voip = Settings::get('voip_enabled') ? $voip : '';
$view->content->aro_groups = $aro_groups;
$view->content->admin_devices_grid = $admin_devices_grid;
$view->content->engineer_devices_grid = $engineer_devices_grid;
$view->content->comments_grid = $comments_grid;
$view->content->admin_devices_grid = @$admin_devices_grid;
$view->content->engineer_devices_grid = @$engineer_devices_grid;
$view->content->comments_grid = @$comments_grid;
$view->render(TRUE);
} // end of show function
freenetis/branches/1.1/application/controllers/notifications.php
self::KEEP => __('Without change')
));
$form->dropdown('sms')
->label(__('SMS message').':')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
));
if (Settings::get('sms_enabled'))
{
$form->dropdown('sms')
->label(__('SMS message').':')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
));
}
$form->submit('Send');
......
/* SMS messages */
if ($form_data['sms'] == self::ACTIVATE)
if (Settings::get('sms_enabled') &&
$form_data['sms'] == self::ACTIVATE)
{
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
......
$message->ignore_whitelist
)->class('center');
$grid->form_field('sms')
->label(__('SMS'))
->type('dropdown')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
))
->callback(
'callback::notification_form_field',
$message->type,
$message->ignore_whitelist
)->class('center');
if (Settings::get('sms_enabled'))
{
$grid->form_field('sms')
->label(__('SMS'))
->type('dropdown')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
))
->callback(
'callback::notification_form_field',
$message->type,
$message->ignore_whitelist
)->class('center');
}
}
$grid->form_extra_buttons = array
......
$m = 'E-mail has been sent for %s e-mail addresses';
$info_messages[] = __($m, $sent_emails).'.';
foreach ($smss as $member_id => $sms)
// only if SMS are enabled
if (Settings::get('sms_enabled'))
{
if ($sms == self::KEEP)
continue;
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
$member_id, Contact_Model::TYPE_PHONE, TRUE
);
// send email
$sent_sms += Message_Model::send_sms_messages(
$message, $contacts,
$user_id, $comment
);
foreach ($smss as $member_id => $sms)
{
if ($sms == self::KEEP)
continue;
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
$member_id, Contact_Model::TYPE_PHONE, TRUE
);
// send email
$sent_sms += Message_Model::send_sms_messages(
$message, $contacts,
$user_id, $comment
);
}
// info message
$m = 'SMS message has been sent for %d phone numbers.';
$info_messages[] = __($m, $sent_sms);
}
// info message
$m = 'SMS message has been sent for %d phone numbers.';
$info_messages[] = __($m, $sent_sms);
// user notification
if (count($info_messages))
{
......
$message->type,
$message->ignore_whitelist
)->class('center');
$grid->form_field('sms')
->label(__('SMS'))
->type('dropdown')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
))
->callback(
'callback::notification_form_field',
$message->type,
$message->ignore_whitelist
)->class('center');
if (Settings::get('sms_enabled'))
{
$grid->form_field('sms')
->label(__('SMS'))
->type('dropdown')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
))
->callback(
'callback::notification_form_field',
$message->type,
$message->ignore_whitelist
)->class('center');
}
}
$grid->form_extra_buttons = array
......
$m = 'E-mail has been sent for %s e-mail addresses';
$info_messages[] = __($m, $sent_emails).'.';
foreach ($smss as $member_id => $sms)
// only if SMS are enabled
if (Settings::get('sms_enabled'))
{
if ($sms == self::KEEP)
continue;
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
$member_id, Contact_Model::TYPE_PHONE, TRUE
);
// send email
$sent_sms += Message_Model::send_sms_messages(
$message, $contacts,
$user_id, $comment
);
foreach ($smss as $member_id => $sms)
{
if ($sms == self::KEEP)
continue;
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
$member_id, Contact_Model::TYPE_PHONE, TRUE
);
// send email
$sent_sms += Message_Model::send_sms_messages(
$message, $contacts,
$user_id, $comment
);
}
// info message
$m = 'SMS message has been sent for %d phone numbers.';
$info_messages[] = __($m, $sent_sms);
}
// info message
$m = 'SMS message has been sent for %d phone numbers.';
$info_messages[] = __($m, $sent_sms);
// user notification
if (count($info_messages))
{
......
))
->callback('callback::notification_form_field', $message->type, $message->ignore_whitelist);
$grid->form_field('sms')
->label('SMS')
->type('dropdown')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
))
->callback(
'callback::notification_form_field',
$message->type,
$message->ignore_whitelist
);
if (Settings::get('sms_enabled'))
{
$grid->form_field('sms')
->label('SMS')
->type('dropdown')
->options(array
(
self::ACTIVATE => __('Activate'),
self::KEEP => __('Without change')
))
->callback(
'callback::notification_form_field',
$message->type,
$message->ignore_whitelist
);
}
}
$grid->form_extra_buttons = array
......
$m = 'E-mail has been sent for %s e-mail addresses';
$info_messages[] = __($m, $sent_emails).'.';
foreach ($smss as $member_id => $sms)
// only if SMS are enabled
if (Settings::get('sms_enabled'))
{
if ($sms == self::KEEP)
continue;
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
$member_id, Contact_Model::TYPE_PHONE, TRUE
);
// send email
$sent_sms += Message_Model::send_sms_messages(
$message, $contacts,
$user_id, $comment
);
foreach ($smss as $member_id => $sms)
{
if ($sms == self::KEEP)
continue;
// gets all contacts of member
$contacts = $uc_model->get_contacts_by_member_and_type(
$member_id, Contact_Model::TYPE_PHONE, TRUE
);
// send email
$sent_sms += Message_Model::send_sms_messages(
$message, $contacts,
$user_id, $comment
);
}
}
// info message
freenetis/branches/1.1/application/controllers/scheduler.php
try
{
if (Sms::enabled())
if (Settings::get('sms_enabled') && Sms::enabled())
{
//send quened SMS
self::send_quened_sms();
freenetis/branches/1.1/application/controllers/members.php
}
// finds credit account of member
if ($member->id != 1)
if ($member->id != Member_Model::ASSOCIATION)
{
$account = ORM::factory('account')->where(array
(
......
}
/******** VoIP ***********/
if (Settings::get('voip_enabled'))
{
// VoIP SIP model
......
$actions = $voip_grid->grouped_action_field();
$actions->add_action('user_id')
->icon_action('phone')
->url('voip/show')
->label('Show VoIP account');
if ($this->acl_check_view('VoIP_Controller', 'voip', $member->id))
{
$actions->add_action('user_id')
->icon_action('phone')
->url('voip/show')
->label('Show VoIP account');
}
$actions->add_action('user_id')
->icon_action('member')
->url('users/show')
->label('Show user who own this VoIP account');
if ($this->acl_check_view('Users_Controller', 'users', $member->id))
{
$actions->add_action('user_id')
->icon_action('member')
->url('users/show')
->label('Show user who own this VoIP account');
}
$voip_grid->datasource($voip);
if ($has_driver && $b_account)
{
$voip_grid->add_new_button(
'voip_calls/show_by_member/'.$member->id,
__('List of all calls')
);
if ($this->acl_check_view('VoIP_Controller', 'voip', $member->id))
{
$voip_grid->add_new_button(
'voip_calls/show_by_member/'.$member->id,
__('List of all calls')
);
}
if ($member->id != 1)
if ($this->acl_check_new('Accounts_Controller', 'transfers', $member->id) &&
$member->id != Member_Model::ASSOCIATION)
{
$voip_grid->add_new_button(
'transfers/add_voip/'.$account->id,
......
$actions = $users_grid->grouped_action_field();
if($this->acl_check_view('Users_Controller', 'users', $member_id))
if ($this->acl_check_view('Users_Controller', 'users', $member_id))
{
$actions->add_action('id')
->icon_action('show')
......
->label(__('Activated redirection').'&nbsp;'.help::hint('activated_redirection'))
->callback('callback::message_field');
$redir_grid->callback_field('ip_address')
->label(__('Preview').'&nbsp;'.help::hint('redirection_preview'))
->callback('callback::redirection_preview_field');
if ($this->acl_check_view('Messages_Controller', 'member'))
{
$redir_grid->callback_field('ip_address')
->label(__('Preview').'&nbsp;'.help::hint('redirection_preview'))
->callback('callback::redirection_preview_field');
}
if ($this->acl_check_delete('Messages_Controller', 'ip_address'))
{
$redir_grid->callback_field('redirection')
......
}
// connection requests
if ($this->acl_check_view('Connection_Requests_Controller', 'request', $member->id))
if (Settings::get('connection_request_enable') &&
$this->acl_check_view('Connection_Requests_Controller', 'request', $member->id))
{
$user_links[] = html::anchor(
'connection_requests/show_by_member/'.$member->id,
......
->rules('required')
->options(array
(
'pdf' => 'PDF '.__('document'),
/*'pdf' => 'PDF '.__('document'), // waiting for fix */
'html' => 'HTML'
));
freenetis/branches/1.1/application/controllers/settings.php
$this->sections['system'] = __('System');
$this->sections['approval'] = __('Approval');
$this->sections['email'] = __('Email');
$this->sections['sms'] = __('SMS');
// are SMS enabled
if (Settings::get('sms_enabled'))
$this->sections['sms'] = __('SMS');
// is voip enabled
if (Settings::get('voip_enabled'))
......
->options(arr::bool())
->default(Settings::get('phone_invoices_enabled'));
// SMS
$this->form->radio('sms_enabled')
->label('SMS')
->options(arr::bool())
->default(Settings::get('sms_enabled'));
// VoIP
$this->form->radio('voip_enabled')
->label('VoIP')
......
->style('width:30px')
->help('Time threshold in minutes, before module is shown as inactive');
$this->form->group('E-mail settings');
$this->form->input('email_default_email')
->label('Default e-mail')
->rules('length[3,100]|valid_email')
->value(Settings::get('email_default_email'));
$this->form->group(__('URL settings') . ' ' . help::hint('url_settings'));
$this->form->dropdown('protocol')
......
}
}
$this->form->group('Network settings');
if (Settings::get('networks_enabled'))
{
$this->form->group('Network settings');
$this->form->textarea('address_ranges')
->help('address_ranges')
->rules('valid_address_ranges')
->value(str_replace(",","\n", Settings::get('address_ranges')))
->class('autosize');
$this->form->textarea('dns_servers')
->help('dns_servers')
->rules('valid_ip_address')
->value(str_replace(",","\n", Settings::get('dns_servers')))
->class('autosize');
$this->form->input('dhcp_server_reload_timeout')
->label('DHCP server maximal timeout')
->rules('required|valid_numeric')
->class('increase_decrease_buttons')
->value(Settings::get('dhcp_server_reload_timeout'))
->style('width:50px')
->help('dhcp_server_reload_timeout');
$this->form->textarea('address_ranges')
->help('address_ranges')
->rules('valid_address_ranges')
->value(str_replace(",","\n", Settings::get('address_ranges')))
->class('autosize');
$this->form->textarea('dns_servers')
->help('dns_servers')
->rules('valid_ip_address')
->value(str_replace(",","\n", Settings::get('dns_servers')))
->class('autosize');
$this->form->input('dhcp_server_reload_timeout')
->label('DHCP server maximal timeout')
->rules('required|valid_numeric')
->class('increase_decrease_buttons')
->value(Settings::get('dhcp_server_reload_timeout'))
->style('width:50px')
->help('dhcp_server_reload_timeout');
}
$this->form->group('Security');
$this->form->input('security_password_length')
......
// creating of new forge
$this->form = new Forge('settings/email');
$this->form->group('E-mail settings');
$this->form->input('email_default_email')
->label('Default e-mail')
->rules('length[3,100]|valid_email')
->value(Settings::get('email_default_email'));
$this->form->group('E-mail variables');
$this->form->dropdown('email_driver')
freenetis/branches/1.1/application/controllers/messages.php
->rows(5)
->cols(100);
$form->textarea('sms_text')
->label(__('Content of the message for SMS').':&nbsp;'.
help::hint('content_of_message'))
->rules('length[1,760]')
->style('width: 100%; max-width: 633px; height: 150px');
if (Settings::get('sms_enabled'))
{
$form->textarea('sms_text')
->label(__('Content of the message for SMS').':&nbsp;'.
help::hint('content_of_message'))
->rules('length[1,760]')
->style('width: 100%; max-width: 633px; height: 150px');
}
$form->submit('Add');
......
$email_text = trim($form_data['email_text']);
$email_text = empty($email_text) ? NULL : $email_text;
// sms text
$sms_text = trim(text::cs_utf2ascii(strip_tags($form_data['sms_text'])));
$sms_text = empty($sms_text) ? NULL : $sms_text;
if (Settings::get('sms_enabled'))
{
$sms_text = trim(text::cs_utf2ascii(strip_tags($form_data['sms_text'])));
$sms_text = empty($sms_text) ? NULL : $sms_text;
}
// set vars
$message->email_text = empty($email_text) ? NULL : $email_text;
$message->sms_text = $sms_text;
$message->text = Settings::get('redirection_enabled') ? $form_data['text'] : '';
if (Settings::get('sms_enabled'))
{
$message->text = Settings::get('redirection_enabled') ? $form_data['text'] : '';
}
$message->save_throwable();
$message->transaction_commit();
......
->value($message->email_text);
}
if (Message_Model::has_sms_content($message->type))
if (Settings::get('sms_enabled') &&
Message_Model::has_sms_content($message->type))
{
$form->textarea('sms_text')
->label(__('Content of the message for SMS').':&nbsp;'.
......
$message->email_text = empty($email_text) ? NULL : $email_text;
}
if (Message_Model::has_sms_content($message->type))
if (Settings::get('sms_enabled') &&
Message_Model::has_sms_content($message->type))
{
// sms text
$sms_text = trim(text::cs_utf2ascii(strip_tags($form_data['sms_text'])));
......
->callback('callback::notification_form_field', $message->type, $message->ignore_whitelist);
}
if (Message_Model::has_sms_content($message->type))
if (Settings::get('sms_enabled') &&
Message_Model::has_sms_content($message->type))
{
$grid->form_field('sms')
->label('SMS')
......
->selected(Notifications_Controller::KEEP)
->callback(array($this, 'valid_email_or_sms'));
$form->dropdown('sms')
->label('SMS')
->options($dropdown_options)
->selected(Notifications_Controller::KEEP)
->callback(array($this, 'valid_email_or_sms'));
if (Settings::get('sms_enabled'))
{
$form->dropdown('sms')
->label('SMS')
->options($dropdown_options)
->selected(Notifications_Controller::KEEP)
->callback(array($this, 'valid_email_or_sms'));
}
}
$form->submit('Send');
......
$user_id,
$redirection,
$form_data['email'],
$form_data['sms']
@$form_data['sms']
);
$ip_count = $counts['ip_count'];
freenetis/branches/1.1/application/controllers/contacts.php
$grid_private_contacts = NULL;
$grid_contacts->datasource($contact_model->find_all_users_contacts($user_id));
if ($this->acl_check_new(
if (Settings::get('phone_invoices_enabled') && $this->acl_check_new(
'Private_phone_contacts_Controller', 'contacts',
$user->member_id
))
freenetis/branches/1.1/application/controllers/sms.php
{
parent::__construct();
// sms is not enabled, quit
if (!Settings::get('sms_enabled'))
{
Controller::error(ACCESS);
}
if (!Sms::enabled())
{
$view = new View('main');
freenetis/branches/1.1/application/controllers/phone_operators.php
class Phone_operators_Controller extends Controller
{
/**
* Contruct checks if SMS are enabled
*/
public function __construct()
{
parent::__construct();
// sms is not enabled, quit
if (!Settings::get('sms_enabled'))
{
Controller::error(ACCESS);
}
}
/**
* Index redirects to show all
*/
public function index()
freenetis/branches/1.1/application/controllers/import.php
->label('Send e-mail notice about received payment to member')
->checked('checked');
$form->checkbox('send_sms_notice')
->value('1')
->label('Send SMS notice about received payment to member');
if (Settings::get('sms_enabled'))
{
$form->checkbox('send_sms_notice')
->value('1')
->label('Send SMS notice about received payment to member');
}
$form->submit('Submit');
......
$this->import_ebank(
$id, $form->listing->value,
@$form_data['send_email_notice'] == 1,
@$form_data['send_sms_notice'] == 1
Settings::get('sms_enabled') &&
(@$form_data['send_sms_notice'] == 1)
);
break;
case self::CSV_FIO:
$this->import_fio(
$id, $form->listing->value,
@$form_data['send_email_notice'] == 1,
@$form_data['send_sms_notice'] == 1
Settings::get('sms_enabled') &&
(@$form_data['send_sms_notice'] == 1)
);
break;
case self::CSV_UNICREDIT:
$this->import_unicredit(
$id, $form->listing->value,
@$form_data['send_email_notice'] == 1,
@$form_data['send_sms_notice'] == 1
Settings::get('sms_enabled') &&
(@$form_data['send_sms_notice'] == 1)
);
break;
default:
freenetis/branches/1.1/application/controllers/devices.php
$base_grid->callback_field('ip_address')
->callback('callback::ip_address_field');
$base_grid->link_field('subnet_id')
->link('subnets/show', 'subnet_name')
->label('Subnet');
if ($this->acl_check_view('Subnets_Controller', 'subnet'))
{
$base_grid->link_field('subnet_id')
->link('subnets/show', 'subnet_name')
->label('Subnet');
}
else
{
$base_grid->field('subnet_name')
->label('Subnet');
}
$actions = $base_grid->grouped_action_field();
freenetis/branches/1.1/application/libraries/MY_Controller.php
*/
// list of SMS messages
if ($this->acl_check_view('Settings_Controller', 'system'))
if (Settings::get('sms_enabled') &&
$this->acl_check_view('Settings_Controller', 'system'))
{
$menu->addItem(
'sms/show_all', __('SMS messages'),
......
*/
// list of phone operators
if ($this->acl_check_view('Settings_Controller', 'system'))
if (Settings::get('sms_enabled') &&
$this->acl_check_view('Settings_Controller', 'system'))
{
$menu->addItem(
'phone_operators/show_all', __('Phone operators'),
freenetis/branches/1.1/application/views/devices/show.php
<tr>
<th><?php echo __('Location address') ?></th>
<td>
<?php if ($this->acl_check_view('Address_points_Controller', 'address_point')): ?>
<a href="<?php echo url_lang::base() ?>address_points/show/<?php echo $device->address_point->id ?>"><?php echo $device->address_point; ?></a>
<?php else: ?>
<?php echo $device->address_point; ?>
<?php endif ?>
</td>
</tr>
<?php if ($gps != ''): ?>
freenetis/branches/1.1/application/views/devices/show_by_user.php
<h3>
<a name="device_<?php echo $id ?>_link" href="<?php echo url_lang::base() ?>devices/show/<?php echo $id ?>" title="<?php echo __('Show device') ?>"><?php echo __('device') ?> <?php echo $device['name'] ?> (<?php echo $device['type'] ?>)</a>
<img src="<?php echo url::base() ?>media/images/icons/ico_minus.gif" id="device_<?php echo $id ?>_button" class="device_button">
<?php echo html::anchor('devices/edit/' . $id, html::image(array('src' => 'media/images/icons/gtk_edit.png')), array('title' => __('Edit device'))) ?>
<?php echo html::anchor('devices/delete/' . $id, html::image(array('src' => 'media/images/icons/delete.png')), array('title' => __('Delete device'), 'class' => 'delete_link')) ?>
<?php if ($this->acl_check_edit(get_class($this), 'devices', $member_id)): ?>
<?php echo html::anchor('devices/edit/' . $id, html::image(array('src' => 'media/images/icons/gtk_edit.png')), array('title' => __('Edit device'))) ?>
<?php endif ?>
<?php if ($this->acl_check_delete(get_class($this), 'devices', $member_id)): ?>
<?php echo html::anchor('devices/delete/' . $id, html::image(array('src' => 'media/images/icons/delete.png')), array('title' => __('Delete device'), 'class' => 'delete_link')) ?>
<?php endif ?>
</h3>
<div id="device_<?php echo $id ?>" class="device">
......
<li class="ui-corner-all"><a href="#interfaces"><?php echo __('Interfaces') ?></a></li>
</ul>
<?php if ($this->acl_check_view(get_class($this), 'ip_address', $member_id)) { ?>
<?php if ($this->acl_check_view('Ip_addresses_Controller', 'ip_address', $member_id)): ?>
<div id="ip_addresses">
<?php echo $grid['ip_addresses'] ?>
</div>
<?php } ?>
<?php endif ?>
<?php if ($this->acl_check_view(get_class($this), 'iface', $member_id)) { ?>
<?php if ($this->acl_check_view('Ifaces_Controller', 'iface', $member_id)): ?>
<div id="interfaces">
<?php echo $grid['ifaces'] ?>
</div>
<?php } ?>
<?php endif ?>
</div>
<?php endforeach ?>
freenetis/branches/1.1/application/views/members/show.php
<td><?php echo __('Phone') ?></td>
<td>
<?php
if ($this->acl_check_new('Settings_Controller', 'system') && valid::phone($contact->value))
if (Settings::get('sms_enabled') && $this->acl_check_new('Settings_Controller', 'system') && valid::phone($contact->value))
{
echo html::anchor('sms/send/'.$contact->value, html::image(array('src' => 'media/images/icons/send_sms.png', 'alt' => __('Send SMS'), 'title' => __('Send SMS'))), array('title' => __('Send SMS')));
}
......
<br class = "clear" />
<br/>
<?php if (!empty($users_grid)): ?>
<h3><?php echo __('Users')?></h3>
<?php echo $users_grid ?>
<br />
<?php endif ?>
<?php if ($this->acl_check_edit('Messages_Controller', 'member')) { ?>
<?php if (!empty($redir_grid)): ?>
<h3><?php echo __('IP addresses')?></h3>
<?php echo $redir_grid ?>
<br />
<?php } ?>
<?php endif ?>
<?php if (Settings::get('voip_enabled')): ?>
<?php if (Settings::get('voip_enabled') && !empty($voip_grid)): ?>
<h3><?php echo __('VoIP')?></h3>
<?php echo $voip_grid ?>
<br />
<?php endif ?>
<?php if (!empty($membership_interrupts_grid)): ?>
<h3><?php echo __('Membership interrupts')?></h3>
<?php echo $membership_interrupts_grid ?>
<?php endif ?>
freenetis/branches/1.1/application/views/ifaces/show.php
</tr>
<tr>
<th><?php echo __('Name') ?></th>
<td><?php echo html::anchor('links/show/'.$iface->link->id, $iface->link->name)?></td>
<?php if ($this->acl_check_view('Links_Controller', 'link')): ?>
<td><?php echo html::anchor('links/show/'.$iface->link->id, $iface->link->name) ?></td>
<?php else: ?>
<td><?php echo $iface->link->name ?></td>
<?php endif ?>
</tr>
<tr>
<th><?php echo __('Medium') ?></th>
freenetis/branches/1.1/application/views/users/show.php
</tr>
</table>
<?php if ($admin_devices_grid || $engineer_devices_grid || $comments_grid): ?>
<div class="clear"></div>
<br /><br />
<?php if ($this->acl_check_view('Devices_Controller', 'devices')): ?>
<?php echo __('Show').': ' ?>
<?php echo __('Show').': ' ?>
<?php if ($admin_devices_grid): ?>
<a href="#admin-devices" id="admin-devices" class="switch-link"><?php echo __('Devices with user as admin') ?></a> |
<?php endif ?>
<?php if ($engineer_devices_grid): ?>
<a href="#engineer-devices" id="engineer-devices" class="switch-link"><?php echo __('Devices with user as engineer') ?></a> |
<?php endif ?>
<?php if ($comments_grid): ?>
<a href="#comments" id="comments" class="switch-link"><?php echo __('Comments of user') ?></a>
<?php endif ?>
<br /><br />
<?php if (!empty($admin_devices_grid)): ?>
<div id="admin-devices-box" class="switch-box">
<h3><?php echo __('Admin of devices') ?></h3>
<?php echo $admin_devices_grid ?>
</div>
<?php endif ?>
<?php if (!empty($engineer_devices_grid)): ?>
<div id="engineer-devices-box" class="switch-box">
<h3><?php echo __('Engineer of devices') ?></h3>
<br />
<?php echo $engineer_devices_grid ?>
</div>
<?php endif ?>
<?php if (!empty($comments_grid)): ?>
<div id="comments-box" class="switch-box">
<h3><?php echo __('Comments') ?></h3>
<br />
<?php echo $comments_grid ?>
</div>
<?php endif ?>
<?php endif ?>
freenetis/branches/1.1/application/views/js/__pieces/notification_activate.php
" <tr>" +
" <td>&nbsp;</td>" +
<?php if (Settings::get('redirection_enabled')): ?> " <td class=center><b><?php echo __("Redirection") ?>:</b></td>" + <?php endif ?>
" <td class=center><b><?php echo __("E-Mail") ?>:</b></td>" +
" <td class=center><b><?php echo __("SMS") ?>:</b></td>" +
" <td class=center><b><?php echo __("E-Mail") ?>:</b></td>" +
<?php if (Settings::get('sms_enabled')): ?> " <td class=center><b><?php echo __("SMS") ?>:</b></td>" + <?php endif ?>
" </tr>" +
" <tr>" +
" <td><?php echo __("For all items") ?>:</td>" +
<?php if (Settings::get('redirection_enabled')): ?> " <td class='state_change_all' id='state_change_all_redirection_activate'><img src='<?php echo url::base() ?>media/images/icons/activate.png'> <?php echo __("Activate") ?></td>" +<?php endif ?>
" <td class='state_change_all' id='state_change_all_email_activate'><img src='<?php echo url::base() ?>media/images/icons/activate.png'> <?php echo __("Activate") ?></td>" +
" <td class='state_change_all' id='state_change_all_sms_activate'><img src='<?php echo url::base() ?>media/images/icons/activate.png'> <?php echo __("Activate") ?></td>" +
<?php if (Settings::get('redirection_enabled')): ?> " <td class='state_change_all' id='state_change_all_redirection_activate'><img src='<?php echo url::base() ?>media/images/icons/activate.png'> <?php echo __("Activate") ?></td>" + <?php endif ?>
" <td class='state_change_all' id='state_change_all_email_activate'><img src='<?php echo url::base() ?>media/images/icons/activate.png'> <?php echo __("Activate") ?></td>" +
<?php if (Settings::get('sms_enabled')): ?> " <td class='state_change_all' id='state_change_all_sms_activate'><img src='<?php echo url::base() ?>media/images/icons/activate.png'> <?php echo __("Activate") ?></td>" + <?php endif ?>
" </tr>" +
" <tr>" +
" <td><?php echo __("For all items") ?>:</td>" +
<?php if (Settings::get('redirection_enabled')): ?> " <td class='state_change_all' id='state_change_all_redirection_keep'><img src='<?php echo url::base() ?>media/images/icons/keep.png'> <?php echo __("Without change") ?></td>" +<?php endif ?>
" <td class='state_change_all' id='state_change_all_email_keep'><img src='<?php echo url::base() ?>media/images/icons/keep.png'> <?php echo __("Without change") ?></td>" +
" <td class='state_change_all' id='state_change_all_sms_keep'><img src='<?php echo url::base() ?>media/images/icons/keep.png'> <?php echo __("Without change") ?></td>" +
<?php if (Settings::get('redirection_enabled')): ?> " <td class='state_change_all' id='state_change_all_redirection_keep'><img src='<?php echo url::base() ?>media/images/icons/keep.png'> <?php echo __("Without change") ?></td>" + <?php endif ?>
" <td class='state_change_all' id='state_change_all_email_keep'><img src='<?php echo url::base() ?>media/images/icons/keep.png'> <?php echo __("Without change") ?></td>" +
<?php if (Settings::get('sms_enabled')): ?> " <td class='state_change_all' id='state_change_all_sms_keep'><img src='<?php echo url::base() ?>media/images/icons/keep.png'> <?php echo __("Without change") ?></td>" + <?php endif ?>
" </tr>" +
" <tr>" +
" <td><?php echo __("For all items") ?>:</td>" +
freenetis/branches/1.1/application/views/contacts/show_by_user.php
echo html::anchor('contacts/add/' . $user_id, __('Add contact'), array('title' => __('Add contact'), 'class' => 'popup_link')) . "<br /><br />" ?>
<?php echo $grid_contacts; ?>
<?php if (Settings::get('phone_invoices_enabled')): ?>
<br /><br />
<h2><?php echo __('Private user contacts'); ?></h2><br />
<p><?php echo __('Private phone contacts of user, which are used in telephone invoices'); ?>.</p>
......
<?php if (!empty($grid_private_contacts)): ?>
<br /><br />
<?php echo $grid_private_contacts; ?>
<?php endif; ?>
<?php endif; ?>
<?php endif ?>
freenetis/branches/1.1/application/views/ip_addresses/show.php
<table class="extended" cellspacing="0" style="float:left; margin-left:10px;">
<tr>
<th><?php echo __('Subnet name') ?></th>
<?php if ($this->acl_check_view('Subnets_Controller', 'subnet')): ?>
<td><?php echo html::anchor('subnets/show/'.$ip_address->subnet_id, $ip_address->subnet->name) ?></td>
<?php else: ?>
<td><?php echo $ip_address->subnet->name ?></td>
<?php endif ?>
</tr>
<tr>
<th><?php echo __('Subnet network address') ?></th>

Také k dispozici: Unified diff