Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 360

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

Debordelizace - vsechny view tykajici se uzivatelu presunuty do spolecne slozky users. Smazany nektere stare a nepotrebne view. Opraveny pristupove funkce v kontroleru uzivatelu...

Zobrazit rozdíly:

freenetis/trunk/kohana/application/controllers/users.php
$model_users = new User_Model();
$filter=new Table_Form(url_lang::base()."users/show_all", "get", array(
$filter=new Table_Form(url_lang::base()."users/show_all", "get", array(
new Table_Form_Item('text','name','Name'),
new Table_Form_Item('text','surname','Surname'),
"tr",
new Table_Form_Item('text','email','Email'),
new Table_Form_Item('text','phone','Phone'),
"tr",
new Table_Form_Item('text','login','Login name'),
new Table_Form_Item('text','member_name','Member'),
new Table_Form_Item('text','surname','Surname'),
"tr",
new Table_Form_Item('text','email','Email'),
new Table_Form_Item('text','phone','Phone'),
"tr",
new Table_Form_Item('text','login','Login name'),
new Table_Form_Item('text','member_name','Member'),
"tr", "td", "td", "td",
new Table_Form_Item('submit','submit','Filter')
new Table_Form_Item('submit','submit','Filter')
)
);
......
$arr_gets = array();
foreach ($this->input->get() as $key=>$value) $arr_gets[] = $key.'='.$value;
$query_string = '?'.implode('&',$arr_gets);
$query_string = '?'.implode('&',$arr_gets);
$grid = new Grid(url_lang::base().'users', url_lang::lang('texts.List of all users'),array(
//'separator' => '',
......
{
$user_model=new User_Model($user_id);
$member_id = $user_model->member_id;
// access control
if (!$this->acl_check_delete(get_class($this),'users',$member_id)) Controller::error(1);
if ($member_id == $_SESSION['member_id'])
{
if (!$this->gacl_class->acl_check('freenetis', 'delete_own', 'all', $_SESSION['username'])) Controller::error(1);
}
else
{
if (!$this->gacl_class->acl_check('freenetis', 'delete_all', 'all', $_SESSION['username'])) Controller::error(1);
}
if ($user_model->delete())
{
$this->session->set_flash('message', url_lang::lang('texts.User successfully deleted.'));
......
$view->form = new View('registration');
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('users_edit');
$view->content = new View('users/edit');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
$view->header->title = url_lang::lang('texts.Display member');
......
$arr_contact_types[$i] = $enum_type_model->get_value($contact->type);
}
$model_works = new Job_Model();
//echo "jmeno je ". $model_users->member->name;
// ********** VIEW WORKS **********
$grid = new Grid(url_lang::base().'members', null,array(
'separator' => '<br /><br />',
'use_paginator' => false,
'use_selector' => false
),'work_grid_template');
if ($this->acl_check_new(get_class($this),'work',$model_users->member_id))
$grid->add_new_button(url_lang::base().'users/add_work/'.$user_id, url_lang::lang('texts.Add new work'));
$grid->field('id')->label('ID');
$grid->field('description')->label(url_lang::lang('texts.Description'));
$grid->field('hours')->label(url_lang::lang('texts.Hours'));
$grid->action_field('u_name')->label(url_lang::lang('texts.Confirmed by'))->url(url_lang::base().'users/edit')->action(url_lang::lang('texts.Show transfer'));
$grid->action_field('transfer_id')->label(url_lang::lang('texts.Money transfer'))->url(url_lang::base().'accounts/trans_detail')->action(url_lang::lang('texts.Edit'))->nextval($model_users->member_id);
$grid->action_field('id') ->label(url_lang::lang('texts.Edit'))->url(url_lang::base().'users/edit_work')->action(url_lang::lang('texts.Edit'));
$grid->action_field('id') ->label(url_lang::lang('texts.Delete'))->url(url_lang::base().'users/delete_work')->action(url_lang::lang('texts.Delete'))->script('onclick="return potvrd(\''.url_lang::lang('texts.delete_work').'\');"');;
//print_r($model_works->get_wokrs($user_id)->current());die();
$grid->datasource( $model_works->get_jobs($user_id) );
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('users_show');
$view->content = new View('users/show');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
$view->header->title = url_lang::lang('texts.Display user');
......
$view->content->user_data = $model_users;
$view->content->contacts = $contacts;
$view->content->contact_types = $arr_contact_types;
$view->content->works = $grid ;
$view->content->message = $this->session->get_once('message');
$view->render(TRUE);
......
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('users_add');
$view->content = new View('users/add');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
$view->header->title = url_lang::lang('texts.Add new user');
......
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('users_contacts');
$view->content = new View('users/aditional_contacts');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
......
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('chngpass');
$view->content = new View('users/chngpass');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
......
} // end of chngpass function
function add_work($user_id = null)
{
$model_users = new User_Model($user_id);
if (!$this->acl_check_new(get_class($this),'work',$model_users->member_id)) Controller::error(1);
if (isset($user_id))
{
$form = new Forge(url_lang::base().'users/add_work/'.$user_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->group('')->label(url_lang::lang('texts.Basic information'));
$form->textarea('description')->label(url_lang::lang('texts.Description').':')->rules('required|length[0,250]');
$form->input('hours')->label(url_lang::lang('texts.Number of the hours').':')->rules('required|length[0,10]|valid_numeric');
$form->submit('submit')->value(url_lang::lang('texts.Add'));
special::required_forge_style($form, ' *', 'required');
if($form->validate())
{
$form_data = $form->as_array();
$work_data = new Job_Model();
foreach($form_data as $key => $value)
{
$work_data->$key = htmlspecialchars($value);
}
$work_data->user_id = $user_id;
unset($form_data);
if ($work_data->save())
{
$this->session->set_flash('message', url_lang::lang('texts.Work successfully added.'));
}
else
{
$this->session->set_flash('message', url_lang::lang('texts.Error - cant add new work.'));
}
url::redirect(url_lang::base().'users/show/'.(int)$user_id);
}
else
{
$view->form = new View('registration');
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('work_add');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
$view->header->title = url_lang::lang('texts.Add new work');
// $view->header->other_styles = html::stylesheet('media/css/forms.css');
$view->content->user_id = $user_id;
$view->content->heading = url_lang::lang('texts.Add new work');
$view->content->form = $form->html();
$view->render(TRUE);
}
}
else
{
Controller::warning(1);
}
} // end of add_work function
function edit_work($work_id = null)
{
if (isset($work_id))
{
$work_data = new Job_Model($work_id);
$model_users = new User_Model($work_data->user_id);
if (!$this->acl_check_edit(get_class($this),'work',$model_users->member_id)) Controller::error(1);
$form = new Forge(url_lang::base().'users/edit_work/'.$work_id, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->group('')->label(url_lang::lang('texts.Basic information'));
$form->textarea('description')->label(url_lang::lang('texts.Description').':')->rules('required|length[0,250]')->value($work_data->description);
$form->input('hours')->label(url_lang::lang('texts.Number of the hours').':')->rules('required|length[0,10]|valid_numeric')->value($work_data->hours);
$form->submit('submit')->value(url_lang::lang('texts.Edit'));
special::required_forge_style($form, ' *', 'required');
if($form->validate())
{
$form_data = $form->as_array();
foreach($form_data as $key => $value)
{
$work_data->$key = htmlspecialchars($value);
}
unset($form_data);
if ($work_data->save())
{
$this->session->set_flash('message', url_lang::lang('texts.Work successfully updated.'));
}
else
{
$this->session->set_flash('message', url_lang::lang('texts.Error - cant update work.'));
}
url::redirect(url_lang::base().'users/show/'.(int)$work_data->user_id);
}
else
{
$view->form = new View('registration');
$view = new View('template');
$view->header = new View('base/header');
$view->content = new View('work_add');
$view->footer = new View('base/footer');
$view->header->menu = Controller::render_menu();
$view->header->title = url_lang::lang('texts.Add new work');
// $view->header->other_styles = html::stylesheet('media/css/forms.css');
$view->content->user_id = $work_data->user_id;
$view->content->form = $form->html();
$view->content->heading = url_lang::lang('texts.Edit the work');
$view->render(TRUE);
}
}
else
{
Controller::warning(1);
}
} // end of edit_work function
function delete_work($work_id = null)
{
if (isset($work_id))
{
$work_data = new Job_Model($work_id);
$user_id = $work_data->user_id;
$model_users = new User_Model($user_id);
if ($user_id == $_SESSION['user_id'] || $model_users->member_id == $_SESSION['member_id'])
{
if (!$this->gacl_class->acl_check('freenetis', 'delete_own', 'all', $_SESSION['username'],get_class($this),'delete_work')) Controller::error(1);
}
else
{
if (!$this->gacl_class->acl_check('freenetis', 'delete_all', 'all', $_SESSION['username'])) Controller::error(1);
}
if ($work_data->delete())
{
$this->session->set_flash('message', url_lang::lang('texts.Work successfully deleted.'));
}
else
{
$this->session->set_flash('message', url_lang::lang('texts.Error - cant delete work.'));
}
url::redirect(url_lang::base().'users/show/'.(int)$user_id);
}
else
{
Controller::warning(1);
}
} // end of delete_work function
/********************************************
*********** CALLBACK FUNCTIONS **************
*********************************************/
freenetis/trunk/kohana/application/views/users_contacts.php
<h2><?php echo url_lang::lang('texts.Administration of additional contacts') ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to the user')) ?>
<br /><br />
<?php echo $infotext ?>
<br />
<br />
<?php echo form::open(url_lang::base().'users/aditional_contacts/'.$user_id) ?>
<table class="extended" cellspacing="0">
<tr <?php echo count($contacts)>0 ? '' : 'style="display:none;"' ?>>
<th>
<?php echo url_lang::lang('texts.Type of contact') ?>
</th>
<th>
<?php echo url_lang::lang('texts.Contact value') ?>
</th>
<th>
&nbsp;
</th>
</tr>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<td><?php echo '<select name="type[]" style="width:100px;" /> : ' ?>
<?php foreach ($contact_types as $key => $contact_type):?>
<?php echo '<option value="'.$key.'"';
if($contact->type == $key) echo ' selected';
echo '>'.$contact_type.'</option>' ?>
<?php endforeach; ?>
</select> : </td>
<td><?php echo '<input type="text" name="value[]" maxlength="255" value="'.$contact->value.'" />' ?></td>
<td><a href="#" onclick="delete_row(this)"><?php echo url_lang::lang('texts.Delete this contact') ?></a></td>
</tr>
<?php endforeach; ?>
<tr>
<td>
<a href="#" onclick="add_row(this, new Array('<?php echo implode("','",$arr_keys) ?>'), new Array('<?php echo implode("','",$contact_types) ?>'),'<?php echo url_lang::lang('texts.Delete this contact') ?>')"><?php echo url_lang::lang('texts.Add new contact') ?></a>
</td>
<td colspan="2">
<input id="contactsubmit" type="submit" value="<?php echo url_lang::lang('texts.Save changes') ?>" name="contactsubmit" />
</td>
</tr>
</table>
<?php echo form::close() ?>
<?php
?>
freenetis/trunk/kohana/application/views/users_filter.php
<?php print form::open(); ?>
<table>
<tr>
<td><label for="filter_name"><?php echo url_lang::lang('texts.Name') ?>:</label></td>
<td><input type="text" id="filter_name" name="filter_name" value="" /> </td>
<td><label for="filter_surname"><?php echo url_lang::lang('texts.Surname');?>:</label></td>
<td><input type="text" id="filter_surname" name="filter_surname" value="" /></td>
</tr>
<tr>
<td><label for="filter_email">Email:</label></td>
<td><input type="text" id="filter_email" name="filter_email" value="" /></td>
<td></td>
<td><input type="submit" value="Filter" /></td>
</tr>
</table>
</form>
freenetis/trunk/kohana/application/views/users_add.php
<h2><?php echo url_lang::lang('texts.Add new user') ?></h2><br />
<?php echo html::anchor(url_lang::base().'members/show/'.$member_id,url_lang::lang('texts.Back to the member.')) ?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/works_unconfirmed.php
<h2><?php echo url_lang::lang('texts.Unconfirmed works') ?></h2><br />
<?php echo $message ? '<br /><div class="message">'.$message.'</div>' : '' ?>
<?php echo $grid?>
freenetis/trunk/kohana/application/views/work_add.php
<h2><?php echo $heading ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to the user.')) ?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/users_edit.php
<h2><?php echo url_lang::lang('texts.Editing of user').' '.$user_data->pre_title.' '.$user_data->name.' '.$user_data->middle_name.' '.$user_data->surname.' '.$user_data->post_title ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_data->id,url_lang::lang('texts.Back to this user')) ?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/chngpass.php
<h2><?php echo url_lang::lang('texts.Change password') ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to this user.')) ?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/works_confirm.php
<h2><?php echo url_lang::lang('texts.Work confirmation') ?></h2><br />
<?php echo html::anchor(url_lang::base().'works/uncorfirmed',url_lang::lang('texts.Back')).' | '. html::anchor(url_lang::base().'users/show/'.$work_data->user_id,url_lang::lang('texts.Show user').' '.$work_data->user->surname.' '.$work_data->user->name) ?>
<br />
<br />
<strong><?php echo url_lang::lang('texts.User identification') ?>:</strong>
<p><?php echo $work_data->user->pre_title.' '.$work_data->user->name.' '.$work_data->user->middle_name.' '.$work_data->user->surname.' '.$work_data->user->post_title; ?></p>
<br />
<strong><?php echo url_lang::lang('texts.Work description') ?>:</strong> <p><?php echo $work_data->description; ?></p>
<br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/work_grid_template.php
<h2><?php echo url_lang::lang('texts.My works') ?></h2>
<?php if (isset($add_button)){ echo '<br />'.$add_button; }?>
<?php echo $separator ?>
<table class="main" cellspacing="0">
<tr>
<?php
foreach ($fields as $field) :
if ($field instanceof Order_Field) : ?>
<th>
<?php echo html::anchor($field->return_link,$field->label) ?>
</th>
<?php else : ?>
<th><?php echo $field->label?></th>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<!-- table body -->
<?php $i = 0; ?>
<?php if (count($items)>0 && !is_numeric($items)) foreach ($items as $item) : ?>
<?php
if ($i % 2) $class_tr = ' class="even"';
else $class_tr = '';
$i++;
?>
<tr <?php echo $class_tr ?>>
<?php foreach ($fields as $field) :
if ($field->style != '') $style_td = $field->style;
else $style_td = '';
if ($field instanceof Action_Field) :
$property = $field->name; ?>
<td <?php echo $style_td?>><?php if($field->name == 'transfer_id') echo ($item->$property) ? html::anchor($field->url.'/'.$item->$property.'/'.$field->nextval,url_lang::lang('texts.Show transfer')) : '&nbsp;'; elseif ($field->name == 'u_name') echo ($item->$property) ? $item->$property : '&nbsp;'; else echo html::anchor($field->url.'/'.$item->$property.'/'.$field->nextval, $field->action, $field->script)?></td>
<?php elseif ($field->bool != ''): ?>
<td <?php echo $style_td?>><?php echo $field->bool[(bool)$item->$field] ?></td>
<?php else: ?>
<td <?php echo $style_td?>><?php echo trim($item->$field)!='' ? $item->$field : '&nbsp;' ?></td>
<?php endif;
endforeach; ?>
</tr>
<?php endforeach;
else echo '<tr><td colspan="'.count($fields).'">'.url_lang::lang('texts.There are no items yet.').'</td></tr>';
?>
<!-- table footer -->
</table>
<?php echo $paginator; ?>
<?php echo $selector; ?>
freenetis/trunk/kohana/application/views/users_show.php
<h2><?php echo url_lang::lang('texts.User').' '.$user_data->pre_title.' '.$user_data->name.' '.$user_data->middle_name.' '.$user_data->surname.' '.$user_data->post_title ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'edit_own', 'all', $_SESSION['username'],get_class($this),'users')) OR ($this->gacl_class->acl_check('freenetis', 'edit_all', 'all', $_SESSION['username'],get_class($this),'users')))
$links[] = html::anchor(url_lang::base().'users/edit/'.$user_data->id,url_lang::lang('texts.Edit user'));
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'edit_own', 'all', $_SESSION['username'],get_class($this),'password')) OR ($this->gacl_class->acl_check('freenetis', 'edit_all', 'all', $_SESSION['username'],get_class($this),'password')))
$links[] = html::anchor(url_lang::base().'users/chngpass/'.$user_data->id,url_lang::lang('texts.Change password'));
echo implode (' | ', $links)
?>
<br /><br />
<table class="extended" cellspacing="0" style="float:left">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Basic information') ?></th>
</tr>
<tr>
<th>ID</th>
<td><?php echo $user_data->id ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Username') ?></th>
<td><?php echo $user_data->login ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Name') ?></th>
<td><?php echo $user_data->pre_title.' '.$user_data->name.' '.$user_data->middle_name.' '.$user_data->surname.' '.$user_data->post_title ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Members name') ?></th>
<td><?php echo html::anchor(url_lang::base().'members/show/'.$user_data->member_id,$user_data->member->name) ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Type') ?></th>
<td><?php echo $user_data->type ?></td>
</tr>
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Contact information') ?></th>
</tr>
<tr>
<th>E-mail</th>
<td><?php echo $user_data->email ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Phone') ?></th>
<td><?php echo $user_data->phone ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Address') ?></th>
<td><?php echo $user_data->member->street.' '.$user_data->member->street_number.'<br />'.$user_data->member->ZIP_code.' '.$user_data->member->town ?></td>
</tr>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<th><?php echo $contact_types[$i] ?></th>
<td><?php echo $contact->value ?></td>
</tr>
<?php endforeach; ?>
<?php
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'new_own', 'all', $_SESSION['username'],'Users_Controller','aditional_contacts')) OR ($this->gacl_class->acl_check('freenetis', 'new_all', 'all', $_SESSION['username'],'Users_Controller','aditional_contacts')))
{
?>
<tr>
<td colspan="2"><?php echo html::anchor(url_lang::base().'users/aditional_contacts/'.$user_data->id,url_lang::lang('texts.Administrate additional contacts')) ?></td>
</tr>
<?php } ?>
</table>
<table class="extended" cellspacing="0" style="float:left; margin-left:25px;">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Additional information') ?></th>
</tr>
<?php
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'view_own', 'all', $_SESSION['username'],'Members_Controller','qos_ceil')) OR $this->gacl_class->acl_check('freenetis', 'view_all', 'all', $_SESSION['username'],'Members_Controller','qos_ceil'))
{ ?>
<tr>
<th><?php echo url_lang::lang('texts.qos ceil') ?></th>
<td><?php echo trim($user_data->member->qos_ceil)!='' ? $user_data->member->qos_ceil : '&nbsp;'; ?></td>
</tr>
<?php } ?>
<?php
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'view_own', 'all', $_SESSION['username'],'Members_Controller','qos_rate')) OR $this->gacl_class->acl_check('freenetis', 'view_all', 'all', $_SESSION['username'],'Members_Controller','qos_rate'))
{ ?>
<tr>
<th><?php echo url_lang::lang('texts.qos rate') ?></th>
<td><?php echo trim($user_data->member->qos_rate)!='' ? $user_data->member->qos_rate : '&nbsp;'; ?></td>
</tr>
<?php } ?>
<tr>
<th><?php echo url_lang::lang('texts.Birthday') ?></th>
<td><?php echo $user_data->birthday ?></td>
</tr>
<?php
//if ($this->gacl_class->acl_check('freenetis', 'view_own', 'all', $_SESSION['username'],get_class($this),'view_comment'))
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'view_own', 'all', $_SESSION['username'],get_class($this),'comment')) OR ($this->gacl_class->acl_check('freenetis', 'view_all', 'all', $_SESSION['username'],get_class($this),'comment')))
{ ?>
<tr>
<th><?php echo url_lang::lang('texts.Comment') ?></th>
<td><?php echo trim($user_data->comment)!='' ? $user_data->comment : '&nbsp;'; ?></td>
</tr>
<?php } ?>
</table>
<br class="clear" /><br />
<?php
if (($user_data->member_id == $_SESSION['member_id'] && $this->gacl_class->acl_check('freenetis', 'view_own', 'all', $_SESSION['username'],'Users_Controller','work')) OR ($this->gacl_class->acl_check('freenetis', 'view_all', 'all', $_SESSION['username'],'Users_Controller','work')))
echo $works;
?>
freenetis/trunk/kohana/application/views/users/show.php
<h2><?php echo url_lang::lang('texts.User').' '.$user_data->pre_title.' '.$user_data->name.' '.$user_data->middle_name.' '.$user_data->surname.' '.$user_data->post_title ?></h2><br />
<?php echo $message ? '<div class="message">'.$message.'</div>' : '' ?>
<?php
$links = array();
if ($this->acl_check_edit(get_class($this),'users',$user_data->member_id))
$links[] = html::anchor(url_lang::base().'users/edit/'.$user_data->id,url_lang::lang('texts.Edit user'));
if ($this->acl_check_edit(get_class($this),'password',$user_data->member_id))
$links[] = html::anchor(url_lang::base().'users/chngpass/'.$user_data->id,url_lang::lang('texts.Change password'));
echo implode (' | ', $links)
?>
<br /><br />
<table class="extended" cellspacing="0" style="float:left">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Basic information') ?></th>
</tr>
<tr>
<th>ID</th>
<td><?php echo $user_data->id ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Username') ?></th>
<td><?php echo $user_data->login ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Name') ?></th>
<td><?php echo $user_data->pre_title.' '.$user_data->name.' '.$user_data->middle_name.' '.$user_data->surname.' '.$user_data->post_title ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Members name') ?></th>
<td><?php echo html::anchor(url_lang::base().'members/show/'.$user_data->member_id,$user_data->member->name) ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Type') ?></th>
<td><?php echo ($user_data->type==1) ? url_lang::lang('texts.Member') : url_lang::lang('texts.User') ?></td>
</tr>
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Contact information') ?></th>
</tr>
<tr>
<th>E-mail</th>
<td><?php echo $user_data->email ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Phone') ?></th>
<td><?php echo $user_data->phone ?></td>
</tr>
<tr>
<th><?php echo url_lang::lang('texts.Address') ?></th>
<td><?php echo $user_data->member->street.' '.$user_data->member->street_number.'<br />'.$user_data->member->ZIP_code.' '.$user_data->member->town ?></td>
</tr>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<th><?php echo $contact_types[$i] ?></th>
<td><?php echo $contact->value ?></td>
</tr>
<?php endforeach; ?>
<?php
if ($this->acl_check_new(get_class($this),'aditional_contacts',$user_data->member_id))
{
?>
<tr>
<td colspan="2"><?php echo html::anchor(url_lang::base().'users/aditional_contacts/'.$user_data->id,url_lang::lang('texts.Administrate additional contacts')) ?></td>
</tr>
<?php } ?>
</table>
<table class="extended" cellspacing="0" style="float:left; margin-left:25px;">
<tr>
<th colspan="2"><?php echo url_lang::lang('texts.Additional information') ?></th>
</tr>
<?php
if ($this->acl_check_view('Members_Controller','qos_ceil',$user_data->member_id))
{ ?>
<tr>
<th><?php echo url_lang::lang('texts.qos ceil') ?></th>
<td><?php echo trim($user_data->member->qos_ceil)!='' ? $user_data->member->qos_ceil : '&nbsp;'; ?></td>
</tr>
<?php } ?>
<?php
if ($this->acl_check_view('Members_Controller','qos_rate',$user_data->member_id))
{ ?>
<tr>
<th><?php echo url_lang::lang('texts.qos rate') ?></th>
<td><?php echo trim($user_data->member->qos_rate)!='' ? $user_data->member->qos_rate : '&nbsp;'; ?></td>
</tr>
<?php } ?>
<tr>
<th><?php echo url_lang::lang('texts.Birthday') ?></th>
<td><?php echo $user_data->birthday ?></td>
</tr>
<?php
if ($this->acl_check_view(get_class($this),'comment',$user_data->member_id))
{ ?>
<tr>
<th><?php echo url_lang::lang('texts.Comment') ?></th>
<td><?php echo trim($user_data->comment)!='' ? $user_data->comment : '&nbsp;'; ?></td>
</tr>
<?php } ?>
</table>
<br class="clear" /><br />
freenetis/trunk/kohana/application/views/users/aditional_contacts.php
<h2><?php echo url_lang::lang('texts.Administration of additional contacts') ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to the user')) ?>
<br /><br />
<?php echo $infotext ?>
<br />
<br />
<?php echo form::open(url_lang::base().'users/aditional_contacts/'.$user_id) ?>
<table class="extended" cellspacing="0">
<tr <?php echo count($contacts)>0 ? '' : 'style="display:none;"' ?>>
<th>
<?php echo url_lang::lang('texts.Type of contact') ?>
</th>
<th>
<?php echo url_lang::lang('texts.Contact value') ?>
</th>
<th>
&nbsp;
</th>
</tr>
<?php foreach ($contacts as $i => $contact):?>
<tr>
<td><?php echo '<select name="type[]" style="width:100px;" /> : ' ?>
<?php foreach ($contact_types as $key => $contact_type):?>
<?php echo '<option value="'.$key.'"';
if($contact->type == $key) echo ' selected';
echo '>'.$contact_type.'</option>' ?>
<?php endforeach; ?>
</select> : </td>
<td><?php echo '<input type="text" name="value[]" maxlength="255" value="'.$contact->value.'" />' ?></td>
<td><a href="#" onclick="delete_row(this)"><?php echo url_lang::lang('texts.Delete this contact') ?></a></td>
</tr>
<?php endforeach; ?>
<tr>
<td>
<a href="#" onclick="add_row(this, new Array('<?php echo implode("','",$arr_keys) ?>'), new Array('<?php echo implode("','",$contact_types) ?>'),'<?php echo url_lang::lang('texts.Delete this contact') ?>')"><?php echo url_lang::lang('texts.Add new contact') ?></a>
</td>
<td colspan="2">
<input id="contactsubmit" type="submit" value="<?php echo url_lang::lang('texts.Save changes') ?>" name="contactsubmit" />
</td>
</tr>
</table>
<?php echo form::close() ?>
<?php
?>
freenetis/trunk/kohana/application/views/users/edit.php
<h2><?php echo url_lang::lang('texts.Editing of user').' '.$user_data->pre_title.' '.$user_data->name.' '.$user_data->middle_name.' '.$user_data->surname.' '.$user_data->post_title ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_data->id,url_lang::lang('texts.Back to this user')) ?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/users/chngpass.php
<h2><?php echo url_lang::lang('texts.Change password') ?></h2><br />
<?php echo html::anchor(url_lang::base().'users/show/'.$user_id,url_lang::lang('texts.Back to this user.')) ?>
<br /><br />
<?php echo $form?>
freenetis/trunk/kohana/application/views/users/add.php
<h2><?php echo url_lang::lang('texts.Add new user') ?></h2><br />
<?php echo html::anchor(url_lang::base().'members/show/'.$member_id,url_lang::lang('texts.Back to the member.')) ?>
<br /><br />
<?php echo $form?>

Také k dispozici: Unified diff