Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 639

Přidáno uživatelem Roman Ševčík před asi 14 roky(ů)

Mnoho změn v kontroleru pro VoIP.....

Zobrazit rozdíly:

freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php
'your mysql username' => 'Vaše MySQL uživatelské jméno.',
'zip code' => 'PSČ',
'zip_code' => 'PSČ'
);
);
freenetis/trunk/kohana/application/i18n/cs_CZ/help.php
<?php defined('SYSPATH') or die('No direct access allowed.');
$lang = array
(
);
freenetis/trunk/kohana/application/controllers/voip.php
url::redirect(url_lang::base().'voip/show_all');
}
function show_all($limit_results = 500, $order_by = 'user_id', $order_by_direction = 'asc', $page_word = null, $page = 1)
function show_all($limit_results = 500, $order_by = 'user_id', $order_by_direction = 'asc', $page_word = null, $page = 1)
{
if (!$this->acl_check_view('VoIP_Controller', 'voip'))
Controller::error(ACCESS);
......
if (strtolower($order_by_direction) != 'asc' && strtolower($order_by_direction) != 'desc')
$order_by_direction = 'asc';
$model_voip_sip = new Voip_sip_Model();
$model_voip_sip = new Voip_sip_Model();
$total_voip_sip = $model_voip_sip->count_all_records();
if (($sql_offset = ($page - 1) * $limit_results) > $total_voip_sip)
$sql_offset = 0;
......
$grid->order_field('id')->label('ID');
$grid->order_field('name')->label(url_lang::lang('texts.Number'));
//$grid->action_field('id')->label(url_lang::lang('texts.VoIP'))->url(url_lang::base().'voip/show')->action(url_lang::lang('texts.Show'));
$grid->action_field('user_id')->label(url_lang::lang('texts.Account'))->url(url_lang::base().'voip/show')->action(url_lang::lang('texts.Show'));
$grid->action_field('user_id')->label(url_lang::lang('texts.Account'))->url(url_lang::base().'voip/show')->action(url_lang::lang('texts.Show'));
$grid->action_field('user_id')->label(url_lang::lang('texts.User'))->url(url_lang::base().'users/show')->action(url_lang::lang('texts.Show'));
$grid->datasource($all_voip_sip);
$grid->datasource($all_voip_sip);
$view = new View('main');
$view->title = $headline;
$view->content = $grid;
$view->render(TRUE);
}
function show($user_id = NULL)
function show($user_id = NULL)
{
if (!isset($user_id))
Controller::warning(PARAMETER);
if (!isset($user_id))
Controller::warning(PARAMETER);
$voip_sip = new Voip_sip_Model();
$voip_sip = new Voip_sip_Model();
//check existence of number
$voip = $voip_sip->get_record_by_user_limited($user_id);
$voip = $voip_sip->get_record_by_user_limited($user_id);
if ($voip->count() == 0)
Controller::error(4);
if ($voip->count() == 0)
Controller::error(4);
$voip = $voip_sip->get_record_by_user($user_id);;
$voip = $voip_sip->get_record_by_user($user_id);;
// if (!this->acl_check_view('VoIP_Controller', 'voip', $voip_sip->user->member_id)) Controller:error(ACCESS);
if ($voip->count() == 0)
Controller::error(RECORD);
if ($voip->count() == 0)
Controller::error(RECORD);
$config = new Config_Model();
$config->get_value_from_name('voip_sip_server');
$sip_server = $config->get_value_from_name('voip_sip_server');
$config = new Config_Model();
$config->get_value_from_name('voip_sip_server');
$sip_server = $config->get_value_from_name('voip_sip_server');
$voip = $voip_sip->get_record_by_user($user_id);
$voip = $voip_sip->get_record_by_user($user_id);
$voip = $voip->current();
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
$voip = $voip->current();
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
if(( $voip->regseconds - time()) > 1)
$link_status = true;
else
$link_status = false;
if(( $voip->regseconds - time()) > 1)
$link_status = true;
else
$link_status = false;
$view = new View('main');
$view->title = url_lang::lang('texts.Show VoIP');
$view->content = new View('voip/show');
$view->content->headline = url_lang::lang('texts.Show VoIP');
$view->content->voip = $voip;
$view->content->sip_server = $sip_server;
$view->content->link_status = $link_status;
$view->content->ipaddr = $voip->ipaddr;
$view->content->port = $voip->port;
$view->content->regseconds = ($voip->regseconds - time()< 0 )?'0':$voip->regseconds - time();
$view->content->voicemail = $voicemail;
$view->render(true);
$view = new View('main');
$view->title = url_lang::lang('texts.Show VoIP account');
$view->content = new View('voip/show');
$view->content->headline = url_lang::lang('texts.Show VoIP');
$view->content->voip = $voip;
$view->content->sip_server = $sip_server;
$view->content->link_status = $link_status;
$view->content->ipaddr = $voip->ipaddr;
$view->content->port = $voip->port;
$view->content->regseconds = ($voip->regseconds - time()< 0 )?'0':$voip->regseconds - time();
$view->content->voice_email = $voicemail->email;
$view->content->voice_status = $voicemail->active;
$view->render(true);
}
}
function change_password($user_id = NULL)
function change_password($user_id = NULL)
{
if (!isset($user_id))
Controller::warning(1);
$voip_sip = new Voip_sip_Model();
$voip = $voip_sip->get_record_by_user_limited($user_id);
$voip = ORM::factory('voip_sip')->find_by_user_id($user_id);
if (count($voip) == 0)
Controller::error(RECORD);
if ($voip->count() == 0)
Controller::error(4);
$voip = $voip_sip->find_by_user_id($user_id);
$this->user_id = $user_id;
$form = new Forge(url_lang::base()."voip/change_password/".$user_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
......
$voip_sip = new Voip_sip_Model();
$voip = $voip_sip->find_by_user_id($user_id);
$user = ORM::factory('user')->where('id', $user_id)->find();
$username = text::cs_utf2ascii($user->name.' '.$user->surname);
$voip->callerid = $username.' <'.$voip->name.'>';
$voip->secret = $form_data['password'];
if ($voip->save())
......
else
{
$view = new View('main');
$view->title = url_lang::lang('texts.Change VoIP password');
$view->title = url_lang::lang('texts.Change password');
$view->content = new View('voip/change_password');
$view->content->form = $form->html();
$view->content->account = $voip->name;
$view->content->user_id = $user_id;
$view->content->message = $this->session->get_once('message');
$view->content->password = $voip->secret;
$view->render(TRUE);
}
......
}
function edit_voicemail($user_id = NULL)
function change_voicemail_password($user_id = NULL)
{
if (!isset($user_id))
Controller::warning(1);
$voip_sip = new Voip_sip_Model();
$voip = $voip_sip->get_record_by_user_limited($user_id);
$voip = ORM::factory('voip_sip')->find_by_user_id($user_id);
if ($voip->count() == 0)
Controller::error(4);
if (count($voip) == 0)
Controller::error(RECORD);
$voip = $voip_sip->find_by_user_id($user_id);
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
$form = new Forge(url_lang::base()."voip/edit_voicemail/".$user_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form = new Forge(url_lang::base()."voip/change_voicemail_password/".$user_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->password('password')->label(url_lang::lang('texts.New password').':')->rules('required|length[4,4]|valid_digit');
$form->password('confirm_password')->label(url_lang::lang('texts.Confirm new password').':')->rules('required|length[4,4]|valid_digit')->matches($form->password);
$form->input('email')->label(url_lang::lang('texts.email').':')->rules('length[6,50]|required')->value($voicemail->email)->callback(array($this,'valid_voip_voicemail_email'));
$form->password('confirm_password')->label(url_lang::lang('texts.Confirm new password').':')->rules('required|length[4,4]|valid_digit')->matches($form->password);
$form->submit('submit')->value(url_lang::lang('texts.Change'));
if($form->validate())
......
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
$voicemail->password = $form_data['password'];
if ($voicemail->save())
{
$this->session->set_flash('message', url_lang::lang('texts.Password has been successfully changed.'));
}
else
{
$this->session->set_flash('message', url_lang::lang('texts.Error - cant change password.'));
}
url::redirect(url_lang::base().'voip/change_voicemail_password/'.$user_id);
}
else
{
$view = new View('main');
$view->title = url_lang::lang('texts.Change voicemail password');
$view->content = new View('voip/change_voicemail_password');
$view->content->account = $voip->name;
$view->content->form = $form->html();
$view->content->user_id = $user_id;
$view->content->message = $this->session->get_once('message');
$view->render(TRUE);
}
}
function edit_voicemail($user_id = NULL)
{
if (!isset($user_id))
Controller::warning(1);
$voip = ORM::factory('voip_sip')->find_by_user_id($user_id);
if (count($voip) == 0)
Controller::error(RECORD);
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
$form = new Forge(url_lang::base()."voip/edit_voicemail/".$user_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->input('email')->label(url_lang::lang('texts.email').':')->rules('length[6,50]|required|valid_email')->value($voicemail->email);
$form->submit('submit')->value(url_lang::lang('texts.Edit'));
if($form->validate())
{
$form_data = $form->as_array();
$voip_sip = new Voip_sip_Model();
$voip = $voip_sip->find_by_user_id($user_id);
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
$voicemail->email = $form_data['email'];
if ($voicemail->save())
......
else
{
$view = new View('main');
$view->title = url_lang::lang('texts.Edit VoIP voicemail');
$view->title = url_lang::lang('texts.Edit voicemail');
$view->content = new View('voip/edit_voicemail');
$view->content->account = $voip->name;
$view->content->form = $form->html();
$view->content->user_id = $user_id;
$view->content->message = $this->session->get_once('message');
......
}
}
function edit_member_limit($member_id = NULL)
function change_member_limit($member_id = NULL)
{
if (!isset($member_id))
Controller::warning(PARAMETER);
......
if (!$has_driver || ($b_account == null))
Controller::error(RECORD);
$form = new Forge(url_lang::base()."voip/edit_member_limit/".$member_id, '', 'POST', array('id' => 'article_form'));
$form = new Forge(url_lang::base()."voip/change_member_limit/".$member_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->input('limit')->label(url_lang::lang('texts.Limit').':')->rules('length[1,6]|valid_digit')->value($member->voip_billing_limit)->callback(array($this,'valid_timit'));;
......
$this->session->set_flash('message', url_lang::lang('texts.Error - cant change limit.'));
}
url::redirect(url_lang::base().'voip/edit_member_limit/'.$member_id);
url::redirect(url_lang::base().'voip/change_member_limit/'.$member_id);
}
else
......
if ($this->acl_check_view('Members_Controller','members', $member_id))
$links[] = html::anchor(url_lang::base().'members/show/'.$member_id, url_lang::lang('texts.Back to the member'));
$message = $this->session->get_once('message');
$headline = url_lang::lang('texts.Edit member limit');
$view = new View('main');
$view->title = $headline;
$view->content = new View('form');
$view->content->headline = $headline;
$view->title = url_lang::lang('texts.Change member limit');
$view->content = new View('voip/change_member_limit');
$view->content->member = $member->name;
$view->content->member_id = $member_id;
$view->content->form = $form->html();
$view->content->member_id = $member_id;
$view->content->link_back = implode (' | ', $links);
if ($message)
$view->content->message = $message;
$view->content->aditional_info = url_lang::lang('texts.Information').' : '.url_lang::lang('texts.0 means unlimited limit.');
$view->content->message = $this->session->get_once('message');
$view->render(TRUE);
}
}
}
function edit_member_type($member_id = NULL)
{
......
Controller::error(RECORD);
$form = new Forge(url_lang::base()."voip/edit_member_type/".$member_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
......
$form->dropdown('type')->label(url_lang::lang('texts.Type').':')->options($types)->selected($member->voip_billing_type);
$form->submit('submit')->value(url_lang::lang('texts.Change'));
$form->submit('submit')->value(url_lang::lang('texts.Change'));
if($form->validate())
{
......
if (!isset($user_id))
Controller::warning(1);
//kontrola existence cisla voip
//kontrola existence cisla voip
$user = ORM::factory('user')->find_by_id($user_id);
if ($user->id == 0)
......
if (!isset($user_id))
Controller::warning(1);
//kontrola existence usera
//kontrola existence usera
$user = ORM::factory('user')->find_by_id($user_id);
if ($user->id == 0)
Controller::error(4);
if ($this->input->post('ranges') != NULL)
if ($this->input->post('ranges') != NULL)
{
$number = $this->input->post('ranges');
$user = ORM::factory('user')->where('id', $user_id)->find();
$user = ORM::factory('user')->where('id', $user_id)->find();
$username = text::cs_utf2ascii($user->name.' '.$user->surname);
$voip_new = new Voip_sip_Model();
$voip_new->name = $number;
$voip_new->user_id = $user_id;
$voip_new->callerid = $username.' <'.$number.'>';
$voip_new->mailbox = $number;
$voip_new->secret = security::generate_password();
$voip_new->username = $number;
$voip_new->save();
$username = text::cs_utf2ascii($user->name.' '.$user->surname);
$voip_new = new Voip_sip_Model();
$voip_new->name = $number;
$voip_new->user_id = $user_id;
$voip_new->callerid = $username.' <'.$number.'>';
$voip_new->mailbox = $number;
$voip_new->secret = security::generate_password();
$voip_new->username = $number;
$voip_new->save();
$voicemail = new Voip_voicemail_user_Model();
$voicemail->customer_id = $number;
$voicemail->mailbox = $number;
$voicemail->password = security::generate_numeric_password(4);
$voicemail->fullname = $username;
$voicemail->email =$user->email;
$voicemail->save();
}
$voicemail = new Voip_voicemail_user_Model();
$voicemail->customer_id = $number;
$voicemail->mailbox = $number;
$voicemail->password = security::generate_numeric_password(4);
$voicemail->fullname = $username;
$voicemail->email =$user->email;
$voicemail->save();
}
$voip_sip = new Voip_sip_Model();
$voip_sip = new Voip_sip_Model();
//check existence of number
//check existence of number
$voip = $voip_sip->get_record_by_user_limited($user_id);
if ($voip->count() != 0)
......
}
function valid_voip_voicemail_email($input)
{
if(!valid::email($input->value) == true)
$input->add_error('required', url_lang::lang('texts.Must be a valid e-mail'));
}
/**
* Function validates amount of limit.
* @param $input
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql_635.php
<?php
// array of sql queries that upgrade database
$upgrade_sql[625] = array(
"CREATE ALGORITHM = UNDEFINED VIEW `account_outbounds` AS SELECT a. * , IFNULL( SUM( amount ) , 0 ) AS outbound
FROM accounts a
LEFT JOIN transfers t ON a.id = t.origin_id
GROUP BY a.id",
"CREATE ALGORITHM = UNDEFINED VIEW `account_inbounds` AS SELECT a . * , IFNULL( SUM( amount ) , 0 ) AS inbound
FROM account_outbounds a
LEFT JOIN transfers t ON a.id = t.destination_id
GROUP BY a.id",
"CREATE ALGORITHM = UNDEFINED VIEW `account_balances` AS SELECT a . * , (
inbound - outbound
) AS balance
FROM account_inbounds a",
"CREATE TABLE `bank_statements` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`bank_account_id` INT NOT NULL ,
`user_id` INT NOT NULL ,
`extension` VARCHAR( 10 ) NULL DEFAULT NULL ,
`from` DATETIME NULL DEFAULT NULL ,
`to` DATETIME NULL DEFAULT NULL ,
`opening_balance` DOUBLE NULL DEFAULT NULL ,
`closing_balance` DOUBLE NULL DEFAULT NULL
) ENGINE = InnoDB;",
"ALTER TABLE `bank_transfers` ADD `bank_statement_id` INT NULL AFTER `transfer_id`",
"CREATE TABLE `messages` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`text` TEXT NULL DEFAULT NULL ,
`type` TINYINT NULL DEFAULT NULL ,
`priority` INT NULL DEFAULT NULL ,
`system` TINYINT NULL DEFAULT NULL ,
`self_cancel` TINYINT NULL DEFAULT NULL
) ENGINE = InnoDB COMMENT = 'messages used for redirection';",
"CREATE TABLE `messages_ip_addresses` (
`message_id` INT NOT NULL COMMENT 'redirection message',
`ip_address_id` INT NOT NULL COMMENT 'redirected ip address',
`user_id` INT NOT NULL COMMENT 'user id of admin who redirects',
`comment` TEXT NULL DEFAULT NULL COMMENT 'personal comment from admin for redirected user',
PRIMARY KEY ( `message_id` , `ip_address_id` )
) ENGINE = InnoDB COMMENT = 'junction table between redirected ip address and message of redirection';"
);
?>
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql.php
// array of sql queries that upgrade database
$upgrade_sql[get_SVN_rev()] = array(
"CREATE ALGORITHM = UNDEFINED VIEW `account_outbounds` AS SELECT a. * , IFNULL( SUM( amount ) , 0 ) AS outbound
FROM accounts a
LEFT JOIN transfers t ON a.id = t.origin_id
GROUP BY a.id",
"CREATE ALGORITHM = UNDEFINED VIEW `account_inbounds` AS SELECT a . * , IFNULL( SUM( amount ) , 0 ) AS inbound
FROM account_outbounds a
LEFT JOIN transfers t ON a.id = t.destination_id
GROUP BY a.id",
"CREATE ALGORITHM = UNDEFINED VIEW `account_balances` AS SELECT a . * , (
inbound - outbound
) AS balance
FROM account_inbounds a",
"CREATE TABLE `bank_statements` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`bank_account_id` INT NOT NULL ,
`user_id` INT NOT NULL ,
`extension` VARCHAR( 10 ) NULL DEFAULT NULL ,
`from` DATETIME NULL DEFAULT NULL ,
`to` DATETIME NULL DEFAULT NULL ,
`opening_balance` DOUBLE NULL DEFAULT NULL ,
`closing_balance` DOUBLE NULL DEFAULT NULL
) ENGINE = InnoDB;",
"ALTER TABLE `bank_transfers` ADD `bank_statement_id` INT NULL AFTER `transfer_id`",
"CREATE TABLE `messages` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`text` TEXT NULL DEFAULT NULL ,
`type` TINYINT NULL DEFAULT NULL ,
`priority` INT NULL DEFAULT NULL ,
`system` TINYINT NULL DEFAULT NULL ,
`self_cancel` TINYINT NULL DEFAULT NULL
) ENGINE = InnoDB COMMENT = 'messages used for redirection';",
"CREATE TABLE `messages_ip_addresses` (
`message_id` INT NOT NULL COMMENT 'redirection message',
`ip_address_id` INT NOT NULL COMMENT 'redirected ip address',
`user_id` INT NOT NULL COMMENT 'user id of admin who redirects',
`comment` TEXT NULL DEFAULT NULL COMMENT 'personal comment from admin for redirected user',
PRIMARY KEY ( `message_id` , `ip_address_id` )
) ENGINE = InnoDB COMMENT = 'junction table between redirected ip address and message of redirection';"
"ALTER TABLE `voip_voicemail_users` ADD `active` TINYINT NOT NULL DEFAULT '1' AFTER `customer_id` ;"
);
?>
freenetis/trunk/kohana/application/views/members_show.php
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Current credit') ?></th>
<td><?php echo $billing_account->ballance.' '.$billing_account->currency.(($member_data->member_id != 1)?html::anchor(url_lang::base().'transfers/add_voip/'.$account->id, '&nbsp;&nbsp;-&nbsp;&nbsp;'.url_lang::lang('texts.Recharge')):''); ?></td>
<td><?php echo $billing_account->ballance.' '.$billing_account->currency.(($member_data->member_id != 1)? '&nbsp;&nbsp;-&nbsp;&nbsp;'.html::anchor(url_lang::base().'transfers/add_voip/'.$account->id, url_lang::lang('texts.Recharge')):''); ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Limit') ?></th>
<td><?php echo $billing_account->limit.' '.$billing_account->currency.'&nbsp;&nbsp;-&nbsp;&nbsp;'.html::anchor(url_lang::base().'voip/edit_member_limit/'.$member_data->member_id, url_lang::lang('texts.Change')); ?></td>
<td><?php echo $billing_account->limit.' '.$billing_account->currency.'&nbsp;&nbsp;-&nbsp;&nbsp;'.html::anchor(url_lang::base().'voip/change_member_limit/'.$member_data->member_id, url_lang::lang('texts.Change')); ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Type') ?></th>
freenetis/trunk/kohana/application/views/voip/edit_member_limit.php
<h2><?php echo url_lang::lang('texts.Edit member limit') ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
$links[] = html::anchor(url_lang::base().'members/show/'.$member_id, url_lang::lang('texts.Back to the member'));
echo implode (' | ', $links)
?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/voip/change_member_limit.php
<h2><?php echo url_lang::lang('texts.Member limit').' '.$member ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
$links[] = html::anchor(url_lang::base().'members/show/'.$member_id, url_lang::lang('texts.Back to the member'));
echo implode (' | ', $links)
?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/voip/edit_voicemail.php
<h2><?php echo url_lang::lang('texts.Edit VoIP voicemail') ?></h2><br />
<h2><?php echo url_lang::lang('texts.Voicemail for VoIP account').' '.$account ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
freenetis/trunk/kohana/application/views/voip/change_voicemail_password.php
<h2><?php echo url_lang::lang('texts.Voicemail password for VoIP account').' '.$account ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
$links[] = html::anchor(url_lang::base().'voip/show/'.$user_id, url_lang::lang('texts.Back to VoIP account'));
echo implode (' | ', $links)
?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/voip/show.php
<h2>
<?php echo url_lang::lang('texts.VoIP').' '.$voip->name ?>
<?php echo url_lang::lang('texts.VoIP account').' '.$voip->name ?>
</h2>
<br />
<?php
$links[] = html::anchor(url_lang::base().'users/show/'.$voip->user_id, url_lang::lang('texts.Back to the user'));
$links[] = html::anchor(url_lang::base().'voip/change_password/'.$voip->user_id, url_lang::lang('texts.Change VoIP password'));
$links[] = html::anchor(url_lang::base().'voip/edit_voicemail/'.$voip->user_id, url_lang::lang('texts.Edit VoIP voicemail'));
$links[] = html::anchor(url_lang::base().'voip/edit_voicemail/'.$voip->user_id, url_lang::lang('texts.Edit voicemail'));
echo implode (' | ', $links);?>
......
<br />
<table class="extended" style="margin-right:10px; float:left; width:360px;">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Login information') ?></th>
<th colspan="2"><?php echo url_lang::lang('texts.Login data') ?></th>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.username') ?></th>
......
</tr>
<tr>
<th><?php echo url_lang::lang('texts.password') ?></th>
<td><?php echo '<b>********</b>'.' &nbsp;&nbsp;&nbsp;&nbsp; '.html::anchor(url_lang::base().'voip/change_password/'.$voip->user_id, url_lang::lang('texts.Change')); ?></td>
<td><?php echo html::anchor(url_lang::base().'voip/change_password/'.$voip->user_id, url_lang::lang('texts.Change')); ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Display name') ?></th>
<th><?php echo url_lang::lang('texts.CLIP data') ?></th>
<td><?php echo $voip->callerid ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Domain') ?></th>
<th><?php echo url_lang::lang('texts.Proxy server') ?></th>
<td><?php echo $sip_server ?></td>
</tr>
</table>
<table class="extended" cellspacing="0" style="width:360px;">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Link status') ?></th>
<th colspan="2"><?php echo url_lang::lang('texts.Phone registration status') ?></th>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Status') ?></th>
......
<td><?php echo $port ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Registration expires') ?></th>
<th><?php echo url_lang::lang('texts.Expiry time of registration') ?></th>
<td><?php echo $regseconds.' s' ?></td>
</tr>
</table>
<br />
<table class="extended" style="width:360px;">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Voicemail information') ?></th>
<th colspan="2"><?php echo url_lang::lang('texts.Voicemail data') ?></th>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Password') ?></th>
<td><?php echo $voicemail->password ?></td>
<th><?php echo url_lang::lang('texts.Status') ?></th>
<td><?php echo ($voice_status == 1)?'<b style="color:green;">'.url_lang::lang('texts.Active').'</b>':'<b style="color:red;">'.url_lang::lang('texts.Inactive').'</b>'; ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.password') ?></th>
<td><?php echo html::anchor(url_lang::base().'voip/change_voicemail_password/'.$voip->user_id, url_lang::lang('texts.Change')); ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.email') ?></th>
<td><?php echo $voicemail->email ?></td>
<td><?php echo $voice_email ?></td>
</tr>
</table>
freenetis/trunk/kohana/application/views/voip/change_password.php
<h2><?php echo url_lang::lang('texts.Change VoIP password') ?></h2><br />
<h2><?php echo url_lang::lang('texts.Password for VoIP account').' '.$account; ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
......
?>
<br /><br />
<?php echo url_lang::lang('texts.Current VoIP password is') ?> <b><?php echo $password ?></b>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/voip/add.php
<?php
$links = array();
$links[] = html::anchor(url_lang::base().'users/show/'.$user_id, url_lang::lang('texts.Back to user'));
$links[] = html::anchor(url_lang::base().'users/show/'.$user_id, url_lang::lang('texts.Back to the user'));
echo implode (' | ', $links)
?>
<br />
<br />
<?php echo url_lang::lang('texts.Warning').': '.url_lang::lang('texts.If you choose your VoIP number there is no chance how to take it back. Please vote your number carefully.'); ?><br />
<?php echo url_lang::lang('texts.Warning').': '.url_lang::lang('texts.Activated number has not been changed.').' '.url_lang::lang('texts.Please choose carefully your number.'); ?><br />
<br />
<br />
<?php echo form::open(url_lang::base().'/voip/add/'.$user_id, array('method'=>'post')); ?>
<table>
<tr>
<td><?php echo url_lang::lang('texts.Number ranges'.':'); ?></td>
<td><?php echo url_lang::lang('texts.Number interval').':'; ?></td>
<td><?php echo $ranges; ?></td>
<td><?php echo form::submit(array('submit' => 'activate', 'value' => url_lang::lang('texts.Activate'), 'class' => 'submit')); ?></td>
</tr>

Také k dispozici: Unified diff