Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 492

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

Pridany testovaci stranky pro nahled presmerovani napr. redirect/test/0. Rozsiren filtr u seznamu clenu.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/models/member.php
if ($key == 'street') $key = 's.street';
if ($key == 'town') $key = 't.town';
if ($key == 'name') $key = 'm.name';
if ($key == 'id') $key = 'm.id';
if ($key == 'comment') $key = 'm.comment';
if ($key == 'type' && $value == 0) continue;
if ($key != 'submit')
{
if ($where == '')
......
{
if ($key == 'street') $key = 's.'.$key;
if ($key == 'town') $key = 't.'.$key;
if ($key == 'id') $key = 'm.id';
if ($key == 'comment') $key = 'm.comment';
if ($key == 'type' && $value == 0) continue;
if ($key != 'submit')
{
if ($where == '')
freenetis/trunk/kohana/application/controllers/members.php
if (strtolower($order_by_direction) != 'asc' && strtolower($order_by_direction) != 'desc')
$order_by_direction = 'asc';
// types of members to filtering
$enum_types = new Enum_type_Model();
$types = $enum_types->get_values(Enum_type_Model::$member_type_id);
$types[0] = url_lang::lang('texts.All');
// creates fields for filtering members
$filter=new Table_Form(url_lang::base()."members/show_all", "get", array(
new Table_Form_Item('text','name','Name'),
new Table_Form_Item('text','town','Town'),
"tr",
new Table_Form_Item('text','variable_symbol','Variable symbol'),
new Table_Form_Item('text','street','Street'),
new Table_Form_Item('text','variable_symbol','Variable symbol'),
"tr", "td", "td", "td",
"tr",
new Table_Form_Item('text','id','ID'),
new Table_Form_Item('text','redirect','Redirection'),
"tr",
new Table_Form_Item('text','comment','Comment'),
new Table_Form_Item('select','type','Type', $types),
"tr",
new Table_Form_Item('submit','submit','Filter')
)
);
......
foreach ($this->input->get() as $key=>$value)
$arr_gets[] = $key.'='.$value;
$query_string = '?'.implode('&',$arr_gets);
// members
$model_members = new Member_Model();
$total_members = $model_members->count_all_members($filter->values());
if (($sql_offset = ($page - 1) * $limit_results) > $total_members)
freenetis/trunk/kohana/application/controllers/redirect.php
$view->content = $content;
$view->continue = $continue;
$view->render(true);
}
/**
* Function tests redirection.
* @param $redir
* @return unknown_type
*/
function test($redir = 0)
{
// initialization
$content = '';
$subnet_name = '';
$member_name = '';
$login = '';
$continue = 0;
$device_engineers = array();
$device_admins = array();
switch ($redir)
{
case 0:
$content = $this->setting->unknown_device;
break;
case 1:
$content = $this->setting->interrupt;
break;
case 2:
$content = $this->setting->debtor;
break;
case 4:
$content = $this->setting->payment_notice;
break;
case 8:
$content = $this->setting->optional_message;
break;
}
// view
$view = new View('redirect');
$view->title = url_lang::lang('texts.Redirection');
$view->subnet_name = $subnet_name;
$view->member_name = $member_name;
$view->login = $login;
$view->device_engineers = $device_engineers;
$view->device_admins = $device_admins;
$view->content = $content;
$view->continue = $continue;
$view->render(true);
}
/**

Také k dispozici: Unified diff