Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 880

Přidáno uživatelem Michal Kliment před více než 13 roky(ů)

Merge testingu do trunku.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php
'dependent transfer' => 'Závislý převod',
'deposit' => 'Vklad',
'description' => 'Popis',
'describe what you have been doing, when the error came out' => 'Popište jakou akci jste prováděl(a), když se objevila tato chyba',
'deselect all' => 'Zrušit výběr',
'destination' => 'Destinace',
'destination account' => 'Cílový účet',
......
'forgotten password' => 'Zapomenuté heslo',
'format' => 'Formát',
'former member' => 'Bývalý člen',
'forum' => 'fórum',
'forward dns' => 'Dopředné DNS',
'forward dns zone file was successfully generated' => 'Dopředný zónový soubor DNS byl úspěšně vygenerován',
'forward records' => 'Dopředné záznamy',
......
'please choose language' => 'Prosím vyberte jazyk',
'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 report this error as bug to our' => 'Nahlaště prosím tuto chybu jako bug na naše',
'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í',
'please use button to save form' => 'Použijte prosím tlačítko pro uložení formuláře',
'polarization' => 'Polarizace',
......
'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í',
'send error report' => 'Zaslat chybové hlášení',
'send money to other account' => 'Poslat peníze na jiný účet',
'send sms' => 'Pošli SMS',
'send sms message' => 'Poslat SMS zprávu',
......
'sent message' => 'Odeslaná zpráva',
'september' => 'Září',
'service' => 'Služba',
'server error' => 'Chyba serveru',
'settings' => 'Nastavení',
'settings for configuration files has been successfully updated' => 'Nastavení pro kofigurační soubory bylo úspěšně upraveno',
'setup config' => 'Nastavení konfigurace',
......
'test mode' => 'Testovací mód',
'testing driver' => 'Test ovladače',
'text to parse' => 'Text k parsování',
'thank you for your error report' => 'Děkujeme Vám za hlášení chyby',
'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ý',
......
'users of regular members' => 'Uživatelé řádných členů',
'users phone invoice has been deleted' => 'Uživazelova telefonní faktura byla smazána',
'using ctrl+a copy text to input' => 'Použitím CTRL+A zkopírujte text do vstupního pole',
'using form bellow' => 'tímto formulářem',
'vacating member' => 'Přerušené členství',
'value' => 'Hodnota',
'value for earning' => 'Hodnota pro příjem',
......
'you will need to know the following items before proceeding' => 'Budete potřebovat znát následující položky před pokračováním:',
'your ip address has not been found in database' => 'Vaše IP adresa nebyla nalezena v databázi.',
'your accout has been locked' => 'Váš účet byl uzamčen.',
'your email' => 'Váš email',
'your mysql password' => 'Vaše MySQL heslo.',
'your mysql username' => 'Vaše MySQL uživatelské jméno.',
'your name' => 'Vaše jméno',
'your work has been added' => 'Vaše práce byla přidána',
'your work has been approved' => 'Vaše práce byla schválena',
'your work has been deleted' => 'Vaše práce byla smazána',
freenetis/trunk/kohana/application/controllers/email.php
<?php
/**
* Email controller.
*
......
* @license GNU GPLv3
* @license http://www.gnu.org/licenses/gpl.txt
*/
class Email_Controller extends Controller
{
public function index()
{
if (!$this->acl_check_2D('freenetis', 'write_email'))
Controller::error(ACCESS);
if (!$this->acl_check_2D('freenetis', 'write_email'))
Controller::error(ACCESS);
if ($this->input->post('address') == NULL || $this->input->post('email_member_id') == NULL)
Controller::warning(PARAMETER);
if ($this->input->post('address') == NULL || $this->input->post('email_member_id') == NULL)
Controller::warning(PARAMETER);
$te = new TextEditor();
$te = new TextEditor();
$te->setWidth(656);
$te->setHeight(480);
$te->setFieldName('editor');
$te->setContent(($this->input->post('editor') == NULL) ? '' : $this->input->post('editor') );
$view = new View('main');
$view->title = url_lang::lang('texts.Write email');
$view->content = new View('email/email_write');
$view->content->editorHead = $te->getHeadHtml();
$view->content->editorFieldName = $te->getFieldName();
$view->content->email_from = $this->settings->get('email_default_email');
$view->content->email_to = $this->input->post('address');
$view->content->subject = ($this->input->post('subject') == NULL) ? '' : $this->input->post('subject');
$view->content->editor = $te->getHtml();
$view->content->email_member_id = $this->input->post('email_member_id');
$view->render(TRUE);
$te->setContent(($this->input->post('editor') == NULL) ? '' : $this->input->post('editor'));
$view = new View('main');
$view->title = url_lang::lang('texts.Write email');
$view->content = new View('email/email_write');
$view->content->editorHead = $te->getHeadHtml();
$view->content->editorFieldName = $te->getFieldName();
$view->content->email_from = $this->settings->get('email_default_email');
$view->content->email_to = $this->input->post('address');
$view->content->subject = ($this->input->post('subject') == NULL) ? '' : $this->input->post('subject');
$view->content->editor = $te->getHtml();
$view->content->email_member_id = $this->input->post('email_member_id');
$view->render(TRUE);
}
public function send()
{
{
if (!$this->acl_check_2D('freenetis', 'write_email'))
Controller::error(ACCESS);
if ($this->input->post('email_from') == NULL || $this->input->post('email_to') == NULL || $this->input->post('email_member_id') == NULL)
Controller::warning(PARAMETER);
if ($this->input->post('email_from') == NULL || $this->input->post('email_to') == NULL || $this->input->post('email_member_id') == NULL)
Controller::warning(PARAMETER);
// Use connect() method to load Swiftmailer and connect using the parameters set in the email config file
$swift = email::connect();
// Use connect() method to load Swiftmailer and connect using the parameters set in the email config file
$swift = email::connect();
// From, subject and HTML message
$from = $this->input->post('email_from');
$subject = 'FreeNetIS - '.$this->input->post('subject');
$message = '<html><body>'.$this->input->post('editor').'</body></html>';
// Build recipient lists
$recipients = new Swift_RecipientList;
$recipients->addTo($this->input->post('email_to'));
// From, subject and HTML message
$from = $this->input->post('email_from');
$subject = 'FreeNetIS - ' . $this->input->post('subject');
// Build the HTML message
$message = new Swift_Message($subject, $message, "text/html");
$message = '<html><body>' . $this->input->post('editor') . '</body></html>';
// Build recipient lists
$recipients = new Swift_RecipientList;
$recipients->addTo($this->input->post('email_to'));
// Attachment
//$swiftfile = new Swift_File('/backups/dump-' . date("d-m-Y") . '.tar.gz');
//$attachment = new Swift_Message_Attachment($swiftfile);
//$message->attach($attachment);
// Build the HTML message
$message = new Swift_Message($subject, $message, "text/html");
if ($swift->send($message, $recipients, $from))
{
url::redirect(url_lang::base().'members/show/'.$this->input->post('email_member_id'));
}
else
{
$content = form::open(url_lang::base().'email');
$content.= form::hidden('email_member_id', $this->input->post('email_member_id'));
$content.= form::hidden('address', $this->input->post('email_to'));
$content.= form::hidden('email_from', $this->input->post('email_from'));
$content.= form::hidden('subject', $this->input->post('subject'));
$content.= form::hidden('editor', $this->input->post('editor'));
$content.= form::submit('submit', url_lang::lang('texts.Back'), 'class="submit"');
$content.= form::close();
Controller::error(EMAIL, $content);
}
// Attachment
//$swiftfile = new Swift_File('/backups/dump-' . date("d-m-Y") . '.tar.gz');
//$attachment = new Swift_Message_Attachment($swiftfile);
//$message->attach($attachment);
// Disconnect
$swift->disconnect();
}
}
if ($swift->send($message, $recipients, $from))
{
url::redirect(url_lang::base() . 'members/show/' . $this->input->post('email_member_id'));
}
else
{
$content = form::open(url_lang::base() . 'email');
$content.= form::hidden('email_member_id', $this->input->post('email_member_id'));
$content.= form::hidden('address', $this->input->post('email_to'));
$content.= form::hidden('email_from', $this->input->post('email_from'));
$content.= form::hidden('subject', $this->input->post('subject'));
$content.= form::hidden('editor', $this->input->post('editor'));
$content.= form::submit('submit', url_lang::lang('texts.Back'), 'class="submit"');
$content.= form::close();
Controller::error(EMAIL, $content);
}
// Disconnect
$swift->disconnect();
}
/**
* Send email to developers wia AJAX.
* If send was successful it prints: '1' else it prints '0'
* @see Email address of developers is in file /index.php in constant DEVELOPER_EMAIL_ADDRESS
* @author Ondřej Fibich
*/
public function send_email_to_developers()
{
// Use connect() method to load Swiftmailer and connect using the parameters set in the email config file
$swift = email::connect();
// From, subject and HTML message
$email = @$_POST['uemail'];
$name = @$_POST['uname'];
$message = @$_POST['message'];
$url = @$_POST['url'];
$error = @$_POST['error'];
$description = @$_POST['udescription'];
$edescription = @$_POST['description'];
$detail = @$_POST['detail'];
$trace = @$_POST['trace'];
$line = @$_POST['line'];
$file = @$_POST['file'];
$subject = 'Freenetis error report';
$message = '<html><body>' .
'<h1>Bug report from: ' . $url . '</h1>' .
'<p>Bug reported by: <b>' . $name . '</b>, description from user:</p>' .
'<p style="margin-left: 15px">' . nl2br($description) . '</p>' .
'<h2>' . $error . '</h2>' .
'<p>' . htmlspecialchars_decode($edescription) . '</p>' .
'<p class="message">' . htmlspecialchars_decode($message) . '</p>' .
'<p class="detail">' . htmlspecialchars_decode($detail) . '</p>' .
'<div>' . htmlspecialchars_decode($trace) . '</div>' .
'</body></html>';
// Build recipient lists
$recipients = new Swift_RecipientList;
$recipients->addTo(DEVELOPER_EMAIL_ADDRESS);
// Build the HTML message
$message = new Swift_Message($subject, $message, "text/html");
// Send
$swift->send($message, $recipients, $email);
$swift->disconnect();
// Redirect
$this->session->set_flash('message', url_lang::lang('texts.Thank you for your error report').'!');
url::redirect(url::base());
}
}
freenetis/trunk/kohana/system/views/kohana_error_page.php
.backtrace pre {background:#eee;}
/* ]]> */
</style>
<?php echo html::stylesheet('media/css/tables.css', 'screen') ?>
<?php echo html::stylesheet('media/css/forms.css', 'screen') ?>
<!--[if IE]>
<?php echo html::stylesheet('media/css/forms.css', 'screen') ?>
<![endif]-->
<!--
This is a little <script> does two things:
1. Prevents a strange bug that can happen in IE when using the <style> tag
2. Accounts for PHP's relative anchors in errors
-->
<script type="text/javascript">document.write('<base href="http://php.net/" />')</script>
<?php echo html::script('media/js/jquery.min', FALSE) ?>
<script type="text/javascript"><!--
$(document).ready(function ()
{
// toogle trace path
$('#link_stack_trace').click(function ()
{
$(this).hide();
$('#stack_trace_message').show();
return false;
});
// on click on tetx area remove text and delete this trigger
$('textarea').focus(function ()
{
$(this).text('');
$(this).focus(function () {});
return false;
});
});
--></script>
</head>
<body>
<div id="wrap">
<h1><?php echo $error ?></h1>
<p><?php echo $description ?></p>
<p class="message"><?php echo $message ?></p>
<?php if ($line != FALSE AND $file != FALSE): ?>
<p class="detail"><?php echo Kohana::lang('core.error_message', $line, $file) ?></p>
<?php endif; ?>
<?php if (isset($trace)): ?>
<h2><?php echo Kohana::lang('core.stack_trace') ?></h2>
<?php echo $trace ?>
<?php endif; ?>
<p id="stats"><?php echo Kohana::lang('core.stats_footer') ?></p>
</div>
<div id="wrap">
<h1><?php echo url_lang::lang('texts.Server error') ?></h1>
<p><?php echo url_lang::lang('texts.Please report this error as bug to our') ?> <a href="http://vyuka.slfree.net/course/view.php?id=12"><?php echo url_lang::lang('texts.forum') ?></a>, <?php echo url_lang::lang('texts.using form bellow') ?>:</p>
<form action="<?php echo url_lang::base() ?>email/send_email_to_developers" class="form" method="post" style="margin-bottom: 20px">
<table cellspacing="4" class="form">
<tr>
<td><label for="uname"><?php echo url_lang::lang('texts.Your name') ?>:</label></td>
<td><input type="text" name="uname" /></td>
</tr>
<tr>
<td><label for="uemail"><?php echo url_lang::lang('texts.Your email') ?>:</label></td>
<td><input type="text" name="uemail" /></td>
</tr>
<tr>
<td><label for="udescription"><?php echo url_lang::lang('texts.Description') ?>:</label></td>
<td><textarea name="udescription" style="width: 380px; height: 100px;"><?php echo url_lang::lang('texts.Describe what you have been doing, when the error came out') ?>...</textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="<?php echo url_lang::lang('texts.Send error report') ?>" /></td>
</tr>
<input type="hidden" name="line" value="<?php echo ($line ? $line : 0); ?>" />
<input type="hidden" name="file" value="<?php echo ($file ? $line : 0); ?>" />
<input type="hidden" name="url" value="<?php echo url_lang::current() ?>" />
<input type="hidden" name="error" value="<?php echo htmlspecialchars($error) ?>" />
<input type="hidden" name="description" value="<?php echo htmlspecialchars($description) ?>" />
<input type="hidden" name="detail" value="<?php echo htmlspecialchars(Kohana::lang('core.error_message', $line, $file)) ?>" />
<input type="hidden" name="trace" value="<?php if (isset($trace)) echo htmlspecialchars($trace); ?>" />
</table>
</form>
<h2><?php echo $error ?></h2>
<p><?php echo $description ?></p>
<p class="message"><?php echo $message ?></p>
<?php if ($line != FALSE AND $file != FALSE): ?>
<p class="detail"><?php echo Kohana::lang('core.error_message', $line, $file) ?></p>
<?php endif; ?>
<?php if (isset($trace)): ?>
<h3><?php echo Kohana::lang('core.stack_trace') ?></h3>
<p><a href="#" id="link_stack_trace">Display stack trace informations</a></p>
<div id="stack_trace_message" style="display: none;"><?php echo $trace ?></div>
<?php endif; ?>
<p id="stats"><?php echo Kohana::lang('core.stats_footer') ?></p>
</div>
</body>
</html>
freenetis/trunk/kohana/index.php
//if (!file_exists('./config'.EXT))
//header('location: setup-config.php');
// Mail to developers
define('DEVELOPER_EMAIL_ADDRESS', 'developers@freenetis.org');
require SYSPATH.'core/Bootstrap'.EXT;

Také k dispozici: Unified diff