Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 457

Přidáno uživatelem Jiří Sviták před asi 15 roky(ů)

Oprava filtru u clenu.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/models/member.php
$where = '';
foreach($filter_values as $key => $value)
{
if ($key == 'street') $key = 's.'.$key;
if ($key == 'town') $key = 't.'.$key;
if ($key != 'submit')
{
if ($where == '')
......
$where = '';
foreach($filter_values as $key => $value)
{
if ($key == 'street') $key = 's.'.$key;
if ($key == 'town') $key = 't.'.$key;
if ($key != 'submit')
{
if ($where == '')
......
}
}
return self::$db->query("SELECT COUNT(*) AS total
FROM members
FROM members m
LEFT JOIN address_points ap ON m.address_point_id = ap.id
LEFT JOIN streets s ON ap.street_id = s.id
LEFT JOIN towns t ON ap.town_id = t.id
$where
")->current()->total;
}
freenetis/trunk/kohana/application/controllers/bank_transfers.php
$form->input('text')->label(url_lang::lang('texts.Text'))->rules('required');
// bank transfer
$form->group('')->label(url_lang::lang('texts.Bank transfer'));
$form->dropdown('destination')->label(url_lang::lang('texts.Destination account').':')->options($arr_bas)->rules('required');
$form->dropdown('destination')->label(url_lang::lang('texts.Counter-account').':')->options($arr_bas)->rules('required');
$form->input('variable_symbol')->label(url_lang::lang('texts.Variable symbol'.':'));
$form->input('constant_symbol')->label(url_lang::lang('texts.Constant symbol'.':'));
$form->input('specific_symbol')->label(url_lang::lang('texts.Specific symbol'.':'));
......
}
// double-entry transfer
$transfer = new Transfer_Model();
$transfer->user_id = $this->session->get('user_id');
$transfer->origin_id = $origin_account;
$transfer->destination_id = $destination_account;
$transfer->datetime = $form_data['datetime'];
freenetis/trunk/kohana/application/controllers/email.php
public function index()
{
if (!$this->acl_check_2D('freenetis', 'write_email')) Controller::error(1);
if (!$this->acl_check_2D('freenetis', 'write_email'))
Controller::error(ERROR);
if ($this->input->post('address') == NULL || $this->input->post('email_member_id') == NULL)
Controller::warning(1);
Controller::warning(PARAMETER);
$te = new TextEditor();
$te->setWidth(656);
......
$te->setFieldName('editor');
$te->setContent(($this->input->post('editor') == NULL) ? '' : $this->input->post('editor') );
$view = new View('template');
$view->header = new View('base/header');
$view->header->title = url_lang::lang('texts.write email');
$view->header->menu = Controller::render_menu();
$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->input->post('email_from') == NULL) ? 'no-reply@freenetis.slfree.net' : $this->input->post('email_from');
$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->footer = new View('base/footer');
$view->render(TRUE);
}
public function send()
{
if (!$this->acl_check_2D('freenetis', 'write_email')) Controller::error(1);
if (!$this->acl_check_2D('freenetis', 'write_email'))
Controller::error(ERROR);
if ($this->input->post('email_from') == NULL || $this->input->post('email_to') == NULL || $this->input->post('email_member_id') == NULL)
Controller::warning(1);
Controller::warning(PARAMETER);
// Use connect() method to load Swiftmailer and connect using the parameters set in the email config file
$swift = email::connect();
......
$content.= form::submit('submit', url_lang::lang('texts.Back'), 'class="submit"');
$content.= form::close();
Controller::error(2, $content);
Controller::error(EMAIL, $content);
}
// Disconnect

Také k dispozici: Unified diff