diff --git a/modules/admin/models/v_users.php b/modules/admin/models/v_users.php index 69727ec..be9bc95 100644 --- a/modules/admin/models/v_users.php +++ b/modules/admin/models/v_users.php @@ -9,8 +9,12 @@ class v_users { public $sur_name; public $birthday; public $entry_year; - public $gradation_year; + public $graduation_year; public $department_id; + public $speciality_id; + public $teaching_form; + public $education_qualification; + public $additional_info; function getName() { return $this->sur_name . ' '. $this->first_name; diff --git a/modules/profile/index.php b/modules/profile/index.php index 7bb9c95..b661e2f 100644 --- a/modules/profile/index.php +++ b/modules/profile/index.php @@ -8,6 +8,7 @@ function _index() LoadModel('admin', 'v_users'); LoadModel('account', 'department'); + LoadModel('account', 'speciality'); $me = LoadPlugin('User'); $user = $model->getRowByParam( @@ -28,8 +29,9 @@ function _index() } - $this->meta['title'] = $user->sur_name . ' ' . $user->first_name . '' . $user->last_name; + $this->meta['title'] = $user->sur_name . ' ' . $user->first_name . ' ' . $user->last_name; $this->data['user'] = $user; $this->data['department'] = $model->getById(new department(), $user->department_id); + $this->data['speciality'] = $model->getById(new speciality(), $user->speciality_id); } } \ No newline at end of file diff --git a/modules/profile/views/index.html b/modules/profile/views/index.html index 763b1f1..5f458d2 100644 --- a/modules/profile/views/index.html +++ b/modules/profile/views/index.html @@ -10,9 +10,13 @@

sur_name?> first_name?>
  • : entry_year?>
  • -
  • : gradation_year?>
  • +
  • : graduation_year?>
  • : birthday?>
  • : name?>
  • +
  • : name?>
  • +
  • : teaching_form?>
  • +
  • : education_qualification?>
  • +
  • : additional_info?>
  • \ No newline at end of file diff --git a/plugins/Graduates/index.php b/plugins/Graduates/index.php index b4735e4..18b8b2f 100755 --- a/plugins/Graduates/index.php +++ b/plugins/Graduates/index.php @@ -6,8 +6,8 @@ function get() { $sql = LoadPlugin('SafeMySQL'); - $result = $sql->getRow('SELECT * FROM users WHERE group_id = 2 ORDER BY RAND() LIMIT 1'); + $result = $sql->getRow('SELECT * FROM v_users WHERE group_id = 2 ORDER BY RAND() LIMIT 1'); - echo ''; + echo '

    '.$result['sur_name'].' '.$result['first_name'].'

    '; } } \ No newline at end of file