Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 746

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

Přidán kontrolel forgotten_password pro získání zapomentutého hesla. Oprava odesílání e-mailu.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/i18n/cs_CZ/validation.php
'digit' => 'číslice',
'numeric' => 'číslo',
'phone_cs_CZ' => 'číslo ve středoevropském tvaru',
'phone' => 'číslo ve středoevropském tvaru',
'suffix' => 'příponu',
'valid_suffix' => 'Přípona musí začínat lomítkem a musí končit lomítkem.',
freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php
'engineer' => 'Technik',
'engineer has been successfully removed from this device' => 'Technik byl úspěšně odebrán od tohoto zařízení.',
'engineers' => 'Technici',
'enter new password please' => 'Prosím, vložte nové heslo',
'entrance date' => 'Datum vstupu',
'entrance_date' => 'Datum vstupu',
'entrance fee' => 'Vstupní příspěvek',
......
'first number can\'t be larger then second number' => 'První číslo nesmí být větší než druhé číslo',
'first or last day of month is not valid' => 'První nebo poslední den v měsíci není správně.',
'for smtp settings only' => 'Pouze pro nastavení SMTP.',
'forgotten password' => 'Zapomenuté heslo',
'format' => 'Formát',
'former member' => 'Bývalý člen',
'forward dns' => 'Dopředné DNS',
......
'group selection by same phone number' => 'Sdružovat výběry dle telefoních čísel',
'groups of users' => 'Skupiny uživatelů',
'growth of members' => 'Růst členů',
'hello' => 'Dobrý den',
'help' => 'Nápověda',
'help register' => 'Registr nápovědy',
'help text not found' => 'Text nápovědy nenalezen.',
......
'invoice number' => 'Číslo faktury',
'invoices' => 'Faktury',
'invoices nr' => 'Počet faktur',
'in your e-mail was sent a confirmation message' => 'Na váš e-mail byla odeslána potvrzovací zpráva',
'ip address' => 'IP adresa',
'ip address already exists' => 'IP adresa už existuje.',
'ip address detail' => 'Detail IP adresy',
......
'message is active, cannot be deleted' => 'Zpráva je aktivní, nemůže být smazána',
'message name' => 'Název zprávy',
'messages for redirection' => 'Zprávy pro přesměrování',
'method' => 'Metoda',
'middle name' => 'Prostřední jméno',
'minimal duration of interrupt is one month' => 'Minimální délka přerušení je jeden měsíc',
'minimal suggest amount' => 'Minimální navrhovaná částka',
......
'new device engineer has been successfully saved' => 'Nový technik zařízení byl úspěšně uložen.',
'new member' => 'Nový člen',
'new password' => 'Nové heslo',
'new password can be changed to the following link' => 'Nové heslo si můžete změnit na následujícím odkazu',
'new password into the information system can be obtained via e-mail or sms message' => 'Nové heslo do informačního systému můžete získat pomocí e-mailu nebo SMS zprávy',
'new transfer' => 'Nový převod',
'new transfer from account' => 'Nový převod z účtu',
'next' => 'Další',
......
'please contact administrator' => 'Prosím kontaktujte administrátora.',
'please choose carefully your number' => 'Prosím vybírejte číslo opatrně!',
'please choose language' => 'Prosím vyberte jazyk',
'please fill in the form with information about your association' => 'Prosím, vyplňte formulář údaji o vašem sdružení.',
'please enter the code you received in an sms message' => 'Prosím vložte kód, který jste obdrželi v SMS zprávě',
'please fill in the form with information about your association' => 'Prosím, vyplňte formulář údaji o vašem sdružení',
'please select a method of obtaining a password and follow the instructions' => 'Prosím zvolte způsob získání hesla a pokračujte dle instrukcí',
'polarization' => 'Polarizace',
'port' => 'Port',
'port detail' => 'Detail portu',
......
'reply' => 'Odpovědět',
'request' => 'Požadavek',
'request for membership' => 'Žádost o členství',
'reguest is invalid or expired' => 'Žádost je neplatná nebo expirovala',
'requests' => 'Požadavky',
'resize' => 'Změnit velikost',
'restore membership' => 'Obnovit členství',
......
'self-cancelable' => 'Samozrušitelná',
'self-cancelable message' => 'Samozrušitelná zpráva',
'self-registration' => 'Samo-registrace',
'sending message failed' => 'Odeslání zprávy selhalo',
'send date' => 'Datum odeslání',
'send e-mail' => 'Pošli e-mail',
'send e-mail notification after expiration' => 'Poslat zprávu na e-mail po vypršení přesměrování',
......
'sms message list' => 'Seznam SMS zpráv',
'sms messages' => 'SMS zprávy',
'sms message has been successfully added' => 'SMS zpráva byla úspěšně pridána.',
'sms settings' => 'SMS nastavení',
'some phones wasn\'t founded' => 'Některé telefony nebyly nalezeny',
'specific symbol' => 'Specifický symbol',
'someone from the ip address %s, probably you, requested to change your password' => 'někdo, patrně Vy, žádal z IP %s o změnu vašeho hesla',
'specific symbol' => 'Specifický symbol',
'start amount' => 'Počáteční částka',
'static ip' => 'Statická IP',
'state' => 'Stav',
......
'the first bank account information' => 'Údaje o prvním bankovním účtu',
'the name of the database you want to run freenetis in' => 'Název databáze, do které chcete FreeNetIS nainstalovat.',
'the parsed account is unknown' => 'Parsovaný účet je neznámý',
'the request has been sent to your e-mail' => 'Žádost byla odeslána na Váš e-mail',
'the transfer successfully done' => 'Převod úspěšně dokončen',
'there are no items yet' => 'Neobsahuje žádné záznamy.',
'third-degree certified engineers' => 'Certifikovaní technici třetího stupně',
freenetis/trunk/kohana/application/helpers/valid.php
*
* @param string phone number to check
* @return boolean
*/
public static function phone($number)
{
// Remove all non-digit characters from the number
......
// If the length is not 10, it's not a valid number
return (strlen($number) === 10);
}*/
/**
* Checks if a czech phone number is valid.
*
* @param string phone number to check
* @return boolean
*/
public static function phone($number)
{
// Remove all non-digit characters from the number
$number = preg_replace('/\D+/', '', $number);
if (strlen($number) == 9 OR strlen($number) == 12)
return true;
return false;
}
/**
/**
* Checks if a czech phone number is valid.
*
* @param string phone number to check
freenetis/trunk/kohana/application/helpers/email.php
(Settings::get('email_password')=='') or $connection->setPassword(Settings::get('email_password'));
// Set the timeout to 5 seconds
$connection->setTimeout(5);
$connection->setTimeout(15);
break;
case 'sendmail':
// Create a sendmail connection
......
);
// Set the timeout to 5 seconds
$connection->setTimeout(5);
$connection->setTimeout(15);
break;
default:
// Use the native connection
freenetis/trunk/kohana/application/controllers/installation.php
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
// login
$form->group('')->label(url_lang::lang('texts.login data'));
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('required|length[3,50]')->value('admin');
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('required|length[3,50]')->value('admin')->callback(array($this, 'valid_username'));
$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);
// association
......
$form->input('quarter')->label(url_lang::lang('texts.quarter').':')->rules('length[1,50]');
$form->input('zip_code')->label(url_lang::lang('texts.zip code').':')->rules('required|length[5,10]');
$form->input('gps')->label(url_lang::lang('texts.gps').':')->rules('length[5,30]');
$form->input('phone')->label(url_lang::lang('texts.phone').':')->rules('required|length[9,40]')->callback(array($this, 'valid_phone'));
$form->input('phone')->label(url_lang::lang('texts.phone').':')->rules('required|length[9,9]')->callback(array($this, 'valid_phone'));
$form->input('email')->label(url_lang::lang('texts.email').':')->rules('length[3,50]');
// bank account
$form->group('')->label(url_lang::lang('texts.The first bank account information'));
......
}
}
function valid_username($input)
{
$user_model=new User_Model();
if (preg_match('/^[a-z]{1}[a-z0-9]+$/',$input->value) == 0)
{
$input->add_error('required', url_lang::lang('texts.Login must contains only a-z and 0-9 and starts with literal.'));
}
}
/**
* Function checks validity of phone number.
* @param $input
freenetis/trunk/kohana/application/controllers/registration.php
{
$input->add_error('required', url_lang::lang('texts.Username already exists in database'));
}
else if (!ereg("^[a-z][a-z0-9]*[_]{0,1}[a-z0-9]+$", $input->value))
else if (preg_match('/^[a-z]{1}[a-z0-9]+$/',$input->value) == 0)
{
$input->add_error('required', url_lang::lang('texts.Login must contains only a-z and 0-9 and starts with literal.'));
}
freenetis/trunk/kohana/application/controllers/forgotten_password.php
<?php defined('SYSPATH') or die('No direct script access.');
class Forgotten_password_Controller extends Controller
{
public static $METHOD_EMAIL = 0;
public static $METHOD_SMS = 1;
public function index()
{
if (!$this->settings->get('forgotten_password'))
url::redirect(url_lang::base().'login');
if ($this->session->get('user_id', 0))
url::redirect(url_lang::base().'login');
if ($this->input->get('request') != NULL)
{
self::change_password($this->input->get('request'));
}
else if ($this->input->get('method') == 'phone')
{
self::phone();
}
else
{
$message = url_lang::lang('texts.New password into the information system can be obtained via e-mail or SMS message').
'. '.url_lang::lang('texts.Please select a method of obtaining a password and follow the instructions').'.';
$form = new Forge(url_lang::base()."forgotten_password", '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->radio('method')->label(url_lang::lang('texts.Method').':')->options(array(self::$METHOD_EMAIL=>url_lang::lang('texts.E-mail'),self::$METHOD_SMS=>'SMS '.url_lang::lang('texts.Message')))->default(self::$METHOD_EMAIL);
$form->input('login')->label(url_lang::lang('texts.username').':')->rules('required|length[3,50]')->callback(array($this, 'valid_username'));;
$form->input('email')->label(url_lang::lang('texts.email').':')->rules('length[4,50]|valid_email');
$form->input('phone')->label(url_lang::lang('texts.phone').':')->rules('length[9,12]|valid_phone');
// submit button
$form->submit('submit')->value(url_lang::lang('texts.Send'));
special::required_forge_style($form, ' *', 'required');
if ($form->validate())
{
$form_data = $form->as_array();
foreach($form_data as $key => $value)
{
$form_data[$key] = htmlspecialchars($value);
}
$user = ORM::factory('user')->where('login', $form_data['login'])->find();
//print'<pre>';
//print_r($user);
//print'</pre>';
$msg_err_email = '<b>'.url_lang::lang('texts.Login or e-mail do not match with data in information system').'.'.'</b>';
$msg_err_sms = '<b>'.url_lang::lang('texts.Login or phone do not match with data in information system').'.'.'</b>';
//if login was not found
if ($user->id == 0)
{
if ($form_data['method'] == self::$METHOD_EMAIL)
$message = $msg_err_email;
else if ($form_data['method'] == self::$METHOD_SMS)
$message = $msg_err_sms;
}//if login was found and method is email
else if ($form_data['method'] == self::$METHOD_EMAIL)
{
if ($user->email == $form_data['email'] && $user->email != '')
{
$hash = text::random('numeric', 10);
$user->password_request = $hash;
$user->save();
// From, subject and HTML message
$from = $this->settings->get('email_default_email');
$to = ($form_data['email']);
$subject = 'FreeNetIS - '.url_lang::lang('texts.Forgotten password');
$e_message = '<html><body>'.
url_lang::lang('texts.Hello').' '.$user->login.',<BR /><BR />'.
url_lang::lang('texts.someone from the IP address %s, probably you, requested to change your password', server::remote_addr()).'. '.
url_lang::lang('texts.New password can be changed to the following link').':<BR /><BR />'.
html::anchor(url_lang::base().'forgotten_password?request='.$hash, url_lang::base().'forgotten_password?request='.$hash).
'<BR />'.
'<BR />'.
url_lang::lang('mail.welcome').':<BR />';
'</body></html>';
if (email::send($to, $from, $subject, $e_message, true))
{
$message = url_lang::lang('texts.The request has been sent to your e-mail').'.';
}
else
{
$message = url_lang::lang('texts.Sending message failed').'!';
}
}
else
$message = $msg_err_email;
}//if login was found and method is SMS
else if ($form_data['method'] == self::$METHOD_SMS)
{
if ($user->phone == $form_data['phone'] && $user->phone != '')
{
$hash = text::random('numeric', 10);
//TODO - sms sending...
url::redirect(url_lang::base().'forgotten_password?method=phone');
}
}
$view = new View('forgotten_password');
$view->title = url_lang::lang('texts.Forgotten password');
$view->message = $message;
$view->form = null;
$view->render(TRUE);
}
else
{
$view = new View('forgotten_password');
$view->title = url_lang::lang('texts.Forgotten password');
$view->message = $message;
$view->form = $form->html();
$view->render(TRUE);
}
}
}
/**
* Method shows form dialog for tipping SMS code.
*/
private function phone()
{
$form = new Forge(url_lang::base()."forgotten_password?method=phone", '', 'GET', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->input('request')->label(url_lang::lang('texts.Code').':')->rules('length[10,10]|required|valid_digit');
// submit button
$form->submit('submit')->value(url_lang::lang('texts.Send'));
special::required_forge_style($form, ' *', 'required');
$message = url_lang::lang('texts.Please enter the code you received in an SMS message').'.';
if ($form->validate())
{
$form_data = $form->as_array();
foreach($form_data as $key => $value)
{
$form_data[$key] = htmlspecialchars($value);
}
url::redirect(url_lang::base().'forgotten_password?request='.$form_data['request']);
}
else
{
$view = new View('forgotten_password');
$view->title = url_lang::lang('texts.Forgotten password');
$view->message = $message;
$view->form = $form->html();
$view->render(TRUE);
}
}
/**
* Method shows form dialog for password change. For both metod (SMS and e-mail) is there same dialog
* @param <type> $hash
*/
private function change_password($hash)
{
$user = ORM::factory('user')->where('password_request', $hash)->find();
if ($user->id == 0)
{
$view = new View('forgotten_password');
$view->title = url_lang::lang('texts.Forgotten password');
$view->message = url_lang::lang('texts.Reguest is invalid or expired').'.';
$view->form = null;
$view->render(TRUE);
}
else
{
$form = new Forge(url_lang::base()."forgotten_password?request=".$hash, '', 'GET', 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[3,50]');
$form->password('confirm_password')->label(url_lang::lang('texts.Confirm new password').':')->rules('required|length[3,50]')->matches($form->password);
// submit button
$form->submit('submit')->value(url_lang::lang('texts.Send'));
special::required_forge_style($form, ' *', 'required');
$message = url_lang::lang('texts.Enter new password please').'.';
if ($form->validate())
{
$form_data = $form->as_array();
foreach($form_data as $key => $value)
{
$form_data[$key] = htmlspecialchars($value);
}
$user->password = sha1($form_data['password']);
$user->password_request = null;
$user->save();
$view = new View('forgotten_password');
$view->title = url_lang::lang('texts.Forgotten password');
$view->message = url_lang::lang('texts.Password has been successfully changed.');
$view->form = null;
$view->render(TRUE);
}
else
{
$view = new View('forgotten_password');
$view->title = url_lang::lang('texts.Forgotten password');
$view->message = $message;
$view->form = $form->html();
$view->render(TRUE);
}
}
}
public function valid_username($input)
{
$user_model=new User_Model();
if (preg_match('/^[a-z]{1}[a-z0-9]+$/',$input->value) == 0)
{
$input->add_error('required', url_lang::lang('texts.Login must contains only a-z and 0-9 and starts with literal.'));
}
}
}
freenetis/trunk/kohana/application/controllers/settings.php
// self-registration
$this->form->radio('self_registration')->label(url_lang::lang('texts.Self-registration').':')->options(array('1'=>url_lang::lang('texts.Yes'),'0'=>url_lang::lang('texts.No')))->default($this->settings->get('self_registration'));
// forgotten password
$this->form->radio('forgotten_password')->label(url_lang::lang('texts.Forgotten password').':')->options(array('1'=>url_lang::lang('texts.Yes'),'0'=>url_lang::lang('texts.No')))->default($this->settings->get('forgotten_password'));
$this->form->group('')->label(url_lang::lang('texts.E-mail settings'));
$this->form->input('email_default_email')->label(url_lang::lang('texts.Default e-mail').':')->rules('length[3,100]|valid_email')->value($this->settings->get('email_default_email'));
freenetis/trunk/kohana/application/controllers/login.php
$error = $this->session->get_once('err_message');
$login->error = $error;
$login->registration = html::anchor(url_lang::base().'registration', url_lang::lang('texts.New member'));
$login->forgotten_password = html::anchor(url_lang::base().'forgotten_password', url_lang::lang('texts.Forgotten password'));
$login->render(TRUE);
}
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql.php
// array of sql queries that upgrade database
$upgrade_sql[get_SVN_rev()] = array(
"ALTER TABLE `phone_invoice_users` ADD INDEX ( `phone_invoice_id` );",
"ALTER TABLE `phone_invoice_users` ADD FOREIGN KEY ( `phone_invoice_id` ) REFERENCES `phone_invoices` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_invoice_users` CHANGE `user_id` `user_id` INT( 11 ) NOT NULL COMMENT 'ID of user or zero if user was not assigned yet'",
"ALTER TABLE `phone_calls` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_connections` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_fixed_calls` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_pays` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_roaming_sms_messages` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_sms_messages` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_vpn_calls` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_calls` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_connections` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_fixed_calls` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_pays` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_roaming_sms_messages` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_sms_messages` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_vpn_calls` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;"
" ALTER TABLE `users` ADD `password_request` VARCHAR( 10 ) DEFAULT NULL AFTER `password`; "
);
?>
freenetis/trunk/kohana/application/upgrade_sql/upgrade_sql_740.php
<?php
$upgrade_sql[740] = array(
"ALTER TABLE `phone_invoice_users` ADD INDEX ( `phone_invoice_id` );",
"ALTER TABLE `phone_invoice_users` ADD FOREIGN KEY ( `phone_invoice_id` ) REFERENCES `phone_invoices` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_invoice_users` CHANGE `user_id` `user_id` INT( 11 ) NOT NULL COMMENT 'ID of user or zero if user was not assigned yet'",
"ALTER TABLE `phone_calls` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_connections` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_fixed_calls` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_pays` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_roaming_sms_messages` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_sms_messages` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_vpn_calls` CHANGE `phone_invoice_users_id` `phone_invoice_user_id` INT( 11 ) NOT NULL ;",
"ALTER TABLE `phone_calls` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_connections` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_fixed_calls` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_pays` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_roaming_sms_messages` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_sms_messages` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;",
"ALTER TABLE `phone_vpn_calls` ADD FOREIGN KEY ( `phone_invoice_user_id` ) REFERENCES `phone_invoice_users` ( `id` ) ON DELETE CASCADE ;"
);
?>
freenetis/trunk/kohana/application/libraries/MY_Controller.php
// test if visitor is logged in, or he accesses public controllers like registration, redirect, installation
if (!$this->session->get('user_id', 0) && url_lang::current()!='login' &&
url_lang::current()!='forgotten_password' &&
url_lang::current() != 'registration' && url_lang::current()!='scheduler/run' && strpos(url_lang::current(), 'redirect')===false && url_lang::current()!='installation')
{
// Not logged in - redirect to login page
freenetis/trunk/kohana/application/views/forgotten_password.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title ?> | <?php echo $this->settings->get('title') ?></title>
<?php echo html::stylesheet('media/css/installation.css') ?>
</head>
<body>
<div id="main">
<h1><span><?php echo $this->settings->get('title') ?></span></h1>
<div class="flags">
<?php echo special::create_language_flags(array('cs' => 'Česky', 'en' => 'English')) ?>
</div>
<div id="main-padd">
<div id="content">
<h2><?php echo $title ?></h2><br />
<p><?php echo $message?></p>
<br />
<?php echo $form ?>
<p><?php echo html::anchor(url_lang::base().'login', '&laquo; '.url_lang::lang('texts.back to login')) ?></p>
</div>
<div class="clear"></div>
</div>
</div><br />
</body>
</html>
freenetis/trunk/kohana/application/views/login.php
// if self-registration is allow, prints anchor
echo ($this->settings->get('self_registration')) ? '<p class="registration">'.$registration.'</p>' : ''
?>
<?php
// if self-registration is allow, prints anchor
echo ($this->settings->get('forgotten_password')) ? '<p class="registration">'.$forgotten_password.'</p>' : ''
?>
<?php echo form::close() ?>
</div>
<div class="clear"></div>

Také k dispozici: Unified diff