$priority = $this->user_model->fetch_user_priority_by_system_code('seo');
$user_options = array();
$user_options[''] = lang('all');
foreach ($users as $user) {
    $user_options[$user->u_id] = $user->u_name;
}
$filters = array(array('type' => 'dropdown', 'field' => 'type', 'options' => $options, 'method' => '='), NULl);
$CI =& get_instance();
if ($priority > 1 || $CI->is_super_user()) {
    $filters[] = array('type' => 'dropdown', 'field' => 'user.id', 'options' => $user_options, 'method' => '=');
} else {
    $filters[] = NULL;
}
$filters[] = array('type' => 'input', 'field' => 'integral');
$filters[] = NULL;
$filters[] = array('type' => 'date', 'field' => 'created_date', 'method' => 'from_to');
if ($CI->is_super_user() || $priority > 1) {
    $title = lang('integral');
} else {
    $user_id = get_current_user_id();
    $total_integral = fetch_user_all_integrals($user_id);
    $title = lang('my_integral') . '(' . $total_integral . ')';
}
echo block_header($title);
echo $this->block->generate_pagination('seo_integral');
$config = array('filters' => $filters);
echo form_open();
echo $this->block->generate_reset_search($config);
echo $this->block->generate_table($head, $data, $filters, 'seo_integral');
echo form_close();
echo $this->block->generate_pagination('seo_integral');
Example #2
0
<?php

$data = array();
$data[] = array('label' => lang('login_name'), 'value' => $user->login_name);
$data[] = array('label' => lang('role'), 'value' => $this->role_level_model->fetch_role_name_by_id($user->role));
$config = array('name' => 'myname', 'id' => 'myname', 'value' => $user->name, 'maxlength' => '50', 'size' => '20');
$data[] = array('label' => block_required_mark(lang('myname')), 'value' => form_input($config));
$integral = fetch_user_all_integrals($user->id);
if ($integral > 0) {
    $data[] = array('label' => lang('my_integral'), 'value' => $integral);
}
$config = array('name' => 'name_en', 'id' => 'name_en', 'value' => $user->name_en, 'maxlength' => '50', 'size' => '20');
$data[] = array('label' => lang('english_name'), 'value' => form_input($config));
$config = array('name' => 'phone', 'id' => 'phone', 'value' => $user->phone, 'maxlength' => '50', 'size' => '30');
$data[] = array('label' => lang('phone'), 'value' => form_input($config) . lang('phone_example'));
$config = array('name' => 'platform1', 'id' => 'platform1', 'value' => $user->platform1, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('platform1'), 'value' => form_input($config) . lang('case_example'));
$config = array('name' => 'platform2', 'id' => 'platform2', 'value' => $user->platform2, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('platform2'), 'value' => form_input($config));
$config = array('name' => 'email', 'id' => 'email', 'value' => $user->email, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('email'), 'value' => form_input($config) . lang('email_example'));
$config = array('name' => 'email_pwd', 'id' => 'email_pwd', 'value' => $user->email_pwd, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('email_pwd'), 'value' => form_input($config));
$config = array('name' => 'msn', 'id' => 'msn', 'value' => $user->msn, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('msn'), 'value' => form_input($config) . lang('msn_example'));
$config = array('name' => 'msn_pwd', 'id' => 'msn_pwd', 'value' => $user->msn_pwd, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('msn_pwd'), 'value' => form_input($config));
$config = array('name' => 'skype', 'id' => 'skype', 'value' => $user->skype, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('skype'), 'value' => form_input($config));
$config = array('name' => 'skype_pwd', 'id' => 'skype_pwd', 'value' => $user->skype_pwd, 'maxlength' => '50', 'size' => '50');
$data[] = array('label' => lang('skype_pwd'), 'value' => form_input($config));