Commit 91a82db4 by Trần Văn Minh

Thêm module organization(đơn vị/Tổ chức)

parent 6ff33eb4
...@@ -89,7 +89,7 @@ $autoload['drivers'] = array(); ...@@ -89,7 +89,7 @@ $autoload['drivers'] = array();
| |
| $autoload['helper'] = array('url', 'file'); | $autoload['helper'] = array('url', 'file');
*/ */
$autoload['helper'] = array('url','file','form','security','string','inflector','directory','download','user','multi_language', 'common', 'pagination'); $autoload['helper'] = array('url','file','form','security','string','inflector','directory','download','user','multi_language', 'common', 'pagination','accounttype');
/* /*
| ------------------------------------------------------------------- | -------------------------------------------------------------------
......
...@@ -139,7 +139,7 @@ class Admin extends CI_Controller ...@@ -139,7 +139,7 @@ class Admin extends CI_Controller
} }
$page_data['page_name'] = 'users'; $page_data['page_name'] = 'users';
$page_data['page_title'] = get_phrase('student'); $page_data['page_title'] = get_phrase('user');
$page_data['users'] = $this->user_model->get_user($param2); $page_data['users'] = $this->user_model->get_user($param2);
$this->load->view('backend/index', $page_data); $this->load->view('backend/index', $page_data);
} }
...@@ -1068,4 +1068,77 @@ class Admin extends CI_Controller ...@@ -1068,4 +1068,77 @@ class Admin extends CI_Controller
$question_json = $this->input->post('itemJSON'); $question_json = $this->input->post('itemJSON');
$this->crud_model->sort_question($question_json); $this->crud_model->sort_question($question_json);
} }
public function organization($param1 = "", $param2 = "")
{
if ($this->session->userdata('admin_login') != true) {
redirect(site_url('login'), 'refresh');
}
if ($param1 == 'add') {
$this->crud_model->add_organ();
$this->session->set_flashdata('flash_message', get_phrase('data_added_successfully'));
redirect(site_url('admin/organization'), 'refresh');
} elseif ($param1 == "edit") {
$this->crud_model->edit_organ($param2);
$this->session->set_flashdata('flash_message', get_phrase('data_updated_successfully'));
redirect(site_url('admin/organization'), 'refresh');
} elseif ($param1 == "delete") {
$this->crud_model->delete_organ($param2);
$this->session->set_flashdata('flash_message', get_phrase('data_deleted'));
redirect(site_url('admin/organization'), 'refresh');
}
$page_data['page_name'] = 'organization';
$page_data['organization'] = get_phrase('organization');
$page_data['organization'] = $this->crud_model->get_organization($param2);
$this->load->view('backend/index', $page_data);
}
public function organ_form($param1 = "", $param2 = "")
{
if ($this->session->userdata('admin_login') != true) {
redirect(site_url('login'), 'refresh');
}
if ($param1 == "add_organ") {
$page_data['page_name'] = 'organ_add';
$page_data['organization'] = $this->crud_model->get_organization()->result_array();
$page_data['page_title'] = get_phrase('add_organ');
}
if ($param1 == "edit_organ") {
$page_data['page_name'] = 'organ_edit';
$page_data['page_title'] = get_phrase('edit_organ');
$page_data['organization'] = $this->crud_model->get_organization()->result_array();
$page_data['organ_id'] = $param2;
}
$this->load->view('backend/index', $page_data);
}
public function sub_organization_by_organ_id($organ_id = 0)
{
if ($this->session->userdata('admin_login') != true) {
redirect(site_url('login'), 'refresh');
}
$organ_id = $this->input->post('organ_id');
redirect(site_url("admin/sub_organization/$organ_id"), 'refresh');
}
public function sub_organ_form($param1 = "", $param2 = "")
{
if ($this->session->userdata('admin_login') != true) {
redirect(site_url('login'), 'refresh');
}
if ($param1 == 'add_sub_organ') {
$page_data['page_name'] = 'sub_organ_add';
$page_data['page_title'] = get_phrase('add_sub_organ');
} elseif ($param1 == 'edit_sub_organ') {
$page_data['page_name'] = 'sub_organ_edit';
$page_data['page_title'] = get_phrase('edit_sub_organ');
$page_data['sub_organ_id'] = $param2;
}
$page_data['organization'] = $this->crud_model->get_organization();
$this->load->view('backend/index', $page_data);
}
} }
...@@ -36,6 +36,9 @@ class Login extends CI_Controller { ...@@ -36,6 +36,9 @@ class Login extends CI_Controller {
$row = $query->row(); $row = $query->row();
$this->session->set_userdata('user_id', $row->id); $this->session->set_userdata('user_id', $row->id);
$this->session->set_userdata('role_id', $row->role_id); $this->session->set_userdata('role_id', $row->role_id);
$this->session->set_userdata('organization_id', $row->organization_id);
$this->session->set_userdata('is_supper_admin', $row->is_supper_admin);
$this->session->set_userdata('account_type', $row->account_type);
$this->session->set_userdata('role', get_user_role('user_role', $row->id)); $this->session->set_userdata('role', get_user_role('user_role', $row->id));
$this->session->set_userdata('name', $row->first_name.' '.$row->last_name); $this->session->set_userdata('name', $row->first_name.' '.$row->last_name);
$this->session->set_flashdata('flash_message', get_phrase('welcome').' '.$row->first_name.' '.$row->last_name); $this->session->set_flashdata('flash_message', get_phrase('welcome').' '.$row->first_name.' '.$row->last_name);
...@@ -57,6 +60,7 @@ class Login extends CI_Controller { ...@@ -57,6 +60,7 @@ class Login extends CI_Controller {
$data['last_name'] = html_escape($this->input->post('last_name')); $data['last_name'] = html_escape($this->input->post('last_name'));
$data['email'] = html_escape($this->input->post('email')); $data['email'] = html_escape($this->input->post('email'));
$data['password'] = sha1($this->input->post('password')); $data['password'] = sha1($this->input->post('password'));
$data['organization_id'] =$this->input->post('organization_id');
$verification_code = md5(rand(100000000, 200000000)); $verification_code = md5(rand(100000000, 200000000));
$data['verification_code'] = $verification_code; $data['verification_code'] = $verification_code;
......
...@@ -1816,4 +1816,101 @@ class Crud_model extends CI_Model { ...@@ -1816,4 +1816,101 @@ class Crud_model extends CI_Model {
$this->db->update('users', $data); $this->db->update('users', $data);
return $progress; return $progress;
} }
public function get_organization($param1 = "") {
if ($param1 != "") {
$this->db->where('id', $param1);
}
$this->db->where('parent_id', 0);
return $this->db->get('organization');
}
public function get_organization_all($param1 = "", $is_supper_admin = "") {
if($is_supper_admin == 0) {
if ($param1 != "" && $param1 != array()) {
$this->db->where_in('id', $param1);
} else {
$organization_id = $this->session->userdata('organization_id');
$this->db->where('id', $organization_id);
}
return $this->db->get('organization');
} else
return $this->db->get('organization');
}
public function get_organ_details_by_id($id) {
return $this->db->get_where('organization', array('id' => $id));
}
public function get_organ_id($slug = "") {
$organ_details = $this->db->get_where('organization', array('slug' => $slug))->row_array();
return $organ_details['id'];
}
public function add_organ() {
$data['code'] = html_escape($this->input->post('code'));
$data['name'] = html_escape($this->input->post('name'));
$data['address'] = html_escape($this->input->post('address'));
$data['phone'] = html_escape($this->input->post('phone'));
$data['parent_id'] = html_escape($this->input->post('parent_id'));
$data['slug'] = slugify(html_escape($this->input->post('name')));
if ($this->input->post('parent_id') == 0) {
// Font awesome class adding
if ($_POST['font_awesome_class'] != "") {
$data['font_awesome_class'] = html_escape($this->input->post('font_awesome_class'));
}else {
$data['font_awesome_class'] = 'fas fa-chess';
}
// category thumbnail adding
if (!file_exists('uploads/thumbnails/organization_thumbnails')) {
mkdir('uploads/thumbnails/organization_thumbnails', 0777, true);
}
if ($_FILES['organization_thumbnail']['name'] == "") {
$data['thumbnail'] = 'organization-thumbnail.png';
}else {
$data['thumbnail'] = md5(rand(10000000, 20000000)).'.jpg';
move_uploaded_file($_FILES['organization_thumbnail']['tmp_name'], 'uploads/thumbnails/organization_thumbnails/'.$data['thumbnail']);
}
}
$data['created_at'] = date('Y-m-d H:i:s');
$data['updated_at'] = date('Y-m-d H:i:s');
$this->db->insert('organization', $data);
}
public function edit_organ($param1) {
$data['name'] = html_escape($this->input->post('name'));
$data['parent_id'] = html_escape($this->input->post('parent_id'));
$data['slug'] = slugify(html_escape($this->input->post('name')));
$data['address'] = html_escape($this->input->post('address'));
$data['phone'] = html_escape($this->input->post('phone'));
if ($this->input->post('parent_id') == 0) {
// Font awesome class adding
if ($_POST['font_awesome_class'] != "") {
$data['font_awesome_class'] = html_escape($this->input->post('font_awesome_class'));
}else {
$data['font_awesome_class'] = 'fas fa-chess';
}
// organization thumbnail adding
if (!file_exists('uploads/thumbnails/organization_thumbnails')) {
mkdir('uploads/thumbnails/organization_thumbnails', 0777, true);
}
if ($_FILES['organization_thumbnail']['name'] != "") {
$data['thumbnail'] = md5(rand(10000000, 20000000)).'.jpg';
move_uploaded_file($_FILES['organization_thumbnail']['tmp_name'], 'uploads/thumbnails/organization_thumbnails/'.$data['thumbnail']);
}
}
$data['updated_at'] = date('Y-m-d H:i:s');
$this->db->where('id', $param1);
$this->db->update('organization', $data);
}
public function delete_organ($organ_id) {
$this->db->where('id', $organ_id);
$this->db->delete('organization');
}
public function get_sub_organization($parent_id = "") {
return $this->db->get_where('organization', array('parent_id' => $parent_id))->result_array();
}
} }
...@@ -14,14 +14,40 @@ class User_model extends CI_Model { ...@@ -14,14 +14,40 @@ class User_model extends CI_Model {
public function get_admin_details() { public function get_admin_details() {
return $this->db->get_where('users', array('role_id' => 1)); return $this->db->get_where('users', array('role_id' => 1));
} }
public function get_user($user_id = 0) { public function get_user($user_id = 0) {
if ($user_id > 0) { if ($user_id > 0) {
$this->db->where('id', $user_id); $this->db->where('id', $user_id);
} }
$this->db->where('role_id', 2); // lấy danh sách các đơn vị tổ chức cùng nhánh
$organization_id = $this->session->userdata('organization_id');
$arr = all_child_organization($organization_id);
array_push($arr, $organization_id);
if ($this->session->userdata('account_type') < 4) {
if ($this->session->userdata('is_supper_admin') == 0){
if($this->session->userdata('account_type') == 1) {
$where = "account_type != 1";
$this->db->where($where);
$this->db->where_in('organization_id', $arr);
} else if($this->session->userdata('account_type') == 2) {
$where = "account_type > 2";
$this->db->where($where);
$this->db->where_in('organization_id', $arr);
} else if($this->session->userdata('account_type') == 3) {
$where = "account_type > 3";
$this->db->where($where);
$this->db->where_in('organization_id', $arr);
}
return $this->db->get('users');
} else {
$where = "id !=".$this->session->userdata('user_id');
$this->db->where($where);
return $this->db->get('users'); return $this->db->get('users');
} }
} else {
return 0;
}
}
public function get_all_user($user_id = 0) { public function get_all_user($user_id = 0) {
if ($user_id > 0) { if ($user_id > 0) {
...@@ -37,6 +63,14 @@ class User_model extends CI_Model { ...@@ -37,6 +63,14 @@ class User_model extends CI_Model {
}else { }else {
$data['first_name'] = html_escape($this->input->post('first_name')); $data['first_name'] = html_escape($this->input->post('first_name'));
$data['last_name'] = html_escape($this->input->post('last_name')); $data['last_name'] = html_escape($this->input->post('last_name'));
$data['organization_id'] = html_escape($this->input->post('organization_id'));
$account_type = html_escape($this->input->post('account_type'));
if ($account_type == 0) {
$data['account_type'] = 1;
$data['is_supper_admin'] = 1;
} else {
$data['account_type'] = $account_type;
}
$data['email'] = html_escape($this->input->post('email')); $data['email'] = html_escape($this->input->post('email'));
$data['password'] = sha1(html_escape($this->input->post('password'))); $data['password'] = sha1(html_escape($this->input->post('password')));
$social_link['facebook'] = html_escape($this->input->post('facebook_link')); $social_link['facebook'] = html_escape($this->input->post('facebook_link'));
...@@ -44,7 +78,12 @@ class User_model extends CI_Model { ...@@ -44,7 +78,12 @@ class User_model extends CI_Model {
$social_link['linkedin'] = html_escape($this->input->post('linkedin_link')); $social_link['linkedin'] = html_escape($this->input->post('linkedin_link'));
$data['social_links'] = json_encode($social_link); $data['social_links'] = json_encode($social_link);
$data['biography'] = $this->input->post('biography'); $data['biography'] = $this->input->post('biography');
if($account_type <= 3) {
$data['role_id'] = 1;
} else{
$data['role_id'] = 2; $data['role_id'] = 2;
}
$data['parent_id'] = $this->session->userdata['user_id'];
$data['date_added'] = strtotime(date("Y-m-d H:i:s")); $data['date_added'] = strtotime(date("Y-m-d H:i:s"));
$data['wishlist'] = json_encode(array()); $data['wishlist'] = json_encode(array());
$data['watch_history'] = json_encode(array()); $data['watch_history'] = json_encode(array());
...@@ -101,6 +140,14 @@ class User_model extends CI_Model { ...@@ -101,6 +140,14 @@ class User_model extends CI_Model {
if (isset($_POST['email'])) { if (isset($_POST['email'])) {
$data['email'] = html_escape($this->input->post('email')); $data['email'] = html_escape($this->input->post('email'));
} }
$data['organization_id'] = html_escape($this->input->post('organization_id'));
$account_type = html_escape($this->input->post('account_type'));
if ($account_type == 0) {
$data['account_type'] = 1;
$data['is_supper_admin'] = 1;
} else {
$data['account_type'] = $account_type;
}
$social_link['facebook'] = html_escape($this->input->post('facebook_link')); $social_link['facebook'] = html_escape($this->input->post('facebook_link'));
$social_link['twitter'] = html_escape($this->input->post('twitter_link')); $social_link['twitter'] = html_escape($this->input->post('twitter_link'));
$social_link['linkedin'] = html_escape($this->input->post('linkedin_link')); $social_link['linkedin'] = html_escape($this->input->post('linkedin_link'));
......
...@@ -42,6 +42,23 @@ ...@@ -42,6 +42,23 @@
</ul> </ul>
</li> </li>
<li class="side-nav-item <?php if ($page_name == 'organization' || $page_name == 'organ_add' || $page_name == 'organ_edit' ): ?> active <?php endif; ?>">
<a href="javascript: void(0);" class="side-nav-link <?php if ($page_name == 'organization' || $page_name == 'organ_add' || $page_name == 'organ_edit' ): ?> active <?php endif; ?>">
<i class="dripicons-network-3"></i>
<span> <?php echo get_phrase('organization'); ?> </span>
<span class="menu-arrow"></span>
</a>
<ul class="side-nav-second-level" aria-expanded="false">
<li class = "<?php if($page_name == 'organization' || $page_name == 'organ_edit') echo 'active'; ?>">
<a href="<?php echo site_url('admin/organization'); ?>"><?php echo get_phrase('organization'); ?></a>
</li>
<li class = "<?php if($page_name == 'organ_add') echo 'active'; ?>">
<a href="<?php echo site_url('admin/organ_form/add_organ'); ?>"><?php echo get_phrase('add_new_organization'); ?></a>
</li>
</ul>
</li>
<li class="side-nav-item"> <li class="side-nav-item">
<a href="<?php echo site_url('admin/courses'); ?>" class="side-nav-link <?php if ($page_name == 'courses' || $page_name == 'course_add' || $page_name == 'course_edit')echo 'active';?>"> <a href="<?php echo site_url('admin/courses'); ?>" class="side-nav-link <?php if ($page_name == 'courses' || $page_name == 'course_add' || $page_name == 'course_edit')echo 'active';?>">
<i class="dripicons-archive"></i> <i class="dripicons-archive"></i>
......
<?php
$organization_id = $this->session->userdata('organization_id');
$number = $this->session->userdata('account_type');
$is_supper_admin = $this->session->userdata('is_supper_admin');
$children_org = all_child_organization($organization_id);
$organization = $this->crud_model->get_organization_all($children_org,$is_supper_admin)->result_array();
$result = account_type($number, $is_supper_admin, $children_org);
?>
<?php
function children_orgs($organization, $parent_id = 0, $text = "")
{
foreach($organization as $k=>$organ)
{
if($organ['parent_id'] == $parent_id)
{
echo '<option value=\''.$organ['id'].'\'';
if($is_supper_admin == 0) {
if($organ['id'] == $organization_id) echo 'disabled'; };
echo '>'.$text.' '.$organ['name'].'</option>';
$id = $organ['id'];
unset($organization[$k]);
children_orgs($organization, $id, $text."--");
}
}
}
?>
<div class="row "> <div class="row ">
<div class="col-xl-12"> <div class="col-xl-12">
<div class="card"> <div class="card">
...@@ -12,8 +38,7 @@ ...@@ -12,8 +38,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h4 class="header-title mb-3"><?php echo get_phrase('student_add_form'); ?></h4> <h4 class="header-title mb-3"><?php echo get_phrase('user_add_form'); ?></h4>
<form class="required-form" action="<?php echo site_url('admin/users/add'); ?>" enctype="multipart/form-data" method="post"> <form class="required-form" action="<?php echo site_url('admin/users/add'); ?>" enctype="multipart/form-data" method="post">
<div id="progressbarwizard"> <div id="progressbarwizard">
<ul class="nav nav-pills nav-justified form-wizard-header mb-3"> <ul class="nav nav-pills nav-justified form-wizard-header mb-3">
...@@ -70,6 +95,48 @@ ...@@ -70,6 +95,48 @@
</div> </div>
</div> </div>
<div class="form-group row mb-3"> <div class="form-group row mb-3">
<label class="col-md-3 col-form-label" for="parent"><?php echo get_phrase('organization'); ?></label>
<div class="col-md-9">
<select class="form-control select2" data-toggle="select2" name="organization_id" id="organization_id">
<?php if(count($organization) > 1) { ?>
<option value="2"><?php echo get_phrase('none'); ?></option>
<?php
if($children_org != array()) {
if($is_supper_admin == 0) {
children_orgs($organization, $organization_id);
} else {
children_orgs($organization);
}
} else {
foreach ($organization as $organ): ?>
<option value="<?php echo $organ['id']; ?>" <?php if($organ['parent_id'] == 0) echo 'disabled'; ?>><?php echo $organ['name']; ?></option>
<?php endforeach; }
} else
// khi số đơn vị/tổ chức = 1
{ foreach ($organization as $organ): ?>
<option value="<?php echo $organ['id']; ?>" <?php if($organ['parent_id'] == 0) echo 'disabled'; ?>><?php echo $organ['name']; ?></option>
<?php endforeach; }?>
</select>
</div>
</div>
<?php if ($number <= 3) { ?>
<div class="form-group row mb-3">
<label class="col-md-3 col-form-label" for="parent"><?php echo get_phrase('account_type'); ?></label>
<div class="col-md-9">
<select class="form-control select2" data-toggle="select2" name="account_type" id="account_type">
<?php if(count($result) > 1) {?>
<option value="4"><?php echo get_phrase('none'); ?></option>
<?php foreach ($result as $data): ?>
<option value="<?php echo $data['id']; ?>"><?php echo get_phrase($data['name']); ?></option>
<?php endforeach;
} else foreach ($result as $data): ?>
<option value="<?php echo $data['id']; ?>"><?php echo get_phrase($data['name']); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<?php } ?>
<div class="form-group row mb-3">
<label class="col-md-3 col-form-label" for="linkedin_link"><?php echo get_phrase('biography'); ?></label> <label class="col-md-3 col-form-label" for="linkedin_link"><?php echo get_phrase('biography'); ?></label>
<div class="col-md-9"> <div class="col-md-9">
<textarea name="biography" id = "summernote-basic" class="form-control"></textarea> <textarea name="biography" id = "summernote-basic" class="form-control"></textarea>
......
<?php <?php
$user_data = $this->db->get_where('users', array('id' => $user_id))->row_array(); $user_data = $this->db->get_where('users', array('id' => $user_id))->row_array();
$social_links = json_decode($user_data['social_links'], true); $social_links = json_decode($user_data['social_links'], true);
$is_supper_admin = $this->session->userdata('is_supper_admin');
$children_org = all_child_organization($user_data['organization_id']);
$organization = $this->crud_model->get_organization_all($children_org,$is_supper_admin)->result_array();
$number = $this->session->userdata('account_type');
$result = account_type($number, $is_supper_admin, $children_org);
?> ?>
<div class="row "> <div class="row ">
<div class="col-xl-12"> <div class="col-xl-12">
...@@ -74,6 +79,38 @@ ...@@ -74,6 +79,38 @@
</div> </div>
</div> </div>
<div class="form-group row mb-3"> <div class="form-group row mb-3">
<label class="col-md-3 col-form-label" for="parent"><?php echo get_phrase('organization'); ?></label>
<div class="col-md-9">
<select class="form-control select2" data-toggle="select2" name="organization_id" id="organization_id">
<option value="2"><?php echo get_phrase('none'); ?></option>
<?php foreach ($organization as $organ):
if($children_org != array()) {?>
<option value="<?php echo $organ['id']; ?>"
<?php if ($is_supper_admin == 1){} else { if($organ['id'] == $organization_id || $organ['parent_id'] == 0) echo 'disabled'; }
if($organ['id'] == $user_data['organization_id']) echo 'selected' ?>><?php echo $organ['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $organ['id']; ?>"
<?php if($organ['parent_id'] == 0) echo 'disabled';
if($organ['id'] == $user_data['organization_id']) echo 'selected' ?>><?php echo $organ['name']; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
<?php if ($number <= 2) { ?>
<div class="form-group row mb-3">
<label class="col-md-3 col-form-label" for="parent"><?php echo get_phrase('account_type'); ?></label>
<div class="col-md-9">
<select class="form-control select2" data-toggle="select2" name="account_type" id="account_type">
<option value="3"><?php echo get_phrase('none'); ?></option>
<?php
foreach ($result as $data): ?>
<option value="<?php echo $data['id']; ?>" <?php if($data['id'] == $user_data['account_type']) echo 'selected';?>><?php echo $data['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<?php } ?>
<div class="form-group row mb-3">
<label class="col-md-3 col-form-label" for="linkedin_link"><?php echo get_phrase('biography'); ?></label> <label class="col-md-3 col-form-label" for="linkedin_link"><?php echo get_phrase('biography'); ?></label>
<div class="col-md-9"> <div class="col-md-9">
<textarea name="biography" id = "summernote-basic" class="form-control"><?php echo $user_data['biography']; ?></textarea> <textarea name="biography" id = "summernote-basic" class="form-control"><?php echo $user_data['biography']; ?></textarea>
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h4 class="page-title"> <i class="mdi mdi-apple-keyboard-command title_icon"></i> <?php echo $page_title; ?> <h4 class="page-title"> <i class="mdi mdi-apple-keyboard-command title_icon"></i> <?php echo $page_title; ?>
<a href = "<?php echo site_url('admin/user_form/add_user_form'); ?>" class="btn btn-outline-primary btn-rounded alignToTitle"><i class="mdi mdi-plus"></i><?php echo get_phrase('add_student'); ?></a> <?php
if($this->session->userdata('account_type') != 4) { ?>
<a href = "<?php echo site_url('admin/user_form/add_user_form'); ?>" class="btn btn-outline-primary btn-rounded alignToTitle"><i class="mdi mdi-plus"></i><?php echo get_phrase('add_user'); ?></a>
<?php }?>
</h4> </h4>
</div> <!-- end card body--> </div> <!-- end card body-->
</div> <!-- end card --> </div> <!-- end card -->
...@@ -35,7 +38,7 @@ ...@@ -35,7 +38,7 @@
<td> <td>
<img src="<?php echo $this->user_model->get_user_image_url($user['id']);?>" alt="" height="50" width="50" class="img-fluid rounded-circle img-thumbnail"> <img src="<?php echo $this->user_model->get_user_image_url($user['id']);?>" alt="" height="50" width="50" class="img-fluid rounded-circle img-thumbnail">
</td> </td>
<td><?php echo $user['first_name'].' '.$user['last_name']; ?></td> <td><?php echo $user['first_name'].' '.$user['last_name']. '<br> <span class="text-muted">( '.get_phrase(name_account_type($user['account_type'])).' )</span>'; ?></td>
<td><?php echo $user['email']; ?></td> <td><?php echo $user['email']; ?></td>
<td> <td>
<?php <?php
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<link href="<?php echo base_url('assets/backend/css/font-awesome-icon-picker/fontawesome-iconpicker.min.css') ?>" rel="stylesheet" type="text/css" /> <link href="<?php echo base_url('assets/backend/css/font-awesome-icon-picker/fontawesome-iconpicker.min.css') ?>" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css">
<link href="<?php echo base_url('assets/backend/css/override.css') ?>" rel="stylesheet" type="text/css" /> <link href="<?php echo base_url('assets/backend/css/override-be.css') ?>" rel="stylesheet" type="text/css" />
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> --> <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> -->
<script src="<?php echo base_url('assets/backend/js/jquery-3.3.1.min.js'); ?>" charset="utf-8"></script> <script src="<?php echo base_url('assets/backend/js/jquery-3.3.1.min.js'); ?>" charset="utf-8"></script>
......
<?php
$organization = $this->crud_model->get_organization_all()->result_array();
?>
<section class="category-header-area"> <section class="category-header-area">
<div class="container-lg"> <div class="container-lg">
<div class="row"> <div class="row">
...@@ -79,6 +83,15 @@ ...@@ -79,6 +83,15 @@
<label for="registration-password"><span class="input-field-icon"><i class="fas fa-lock"></i></span> <?php echo get_phrase('password'); ?>:</label> <label for="registration-password"><span class="input-field-icon"><i class="fas fa-lock"></i></span> <?php echo get_phrase('password'); ?>:</label>
<input type="password" class="form-control" name = "password" id="registration-password" placeholder="<?php echo get_phrase('password'); ?>" value="" required> <input type="password" class="form-control" name = "password" id="registration-password" placeholder="<?php echo get_phrase('password'); ?>" value="" required>
</div> </div>
<div class="form-group">
<label for="parent"><?php echo get_phrase('organization'); ?></label>
<select class="form-control select2" data-toggle="select2" name="organization_id" id="organization_id">
<option value="2"><?php echo get_phrase('none'); ?></option>
<?php foreach ($organization as $organ): ?>
<option value="<?php echo $organ['id']; ?>"><?php echo $organ['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div> </div>
</div> </div>
<div class="content-update-box"> <div class="content-update-box">
......
<?php <?php
$social_links = json_decode($user_details['social_links'], true); $social_links = json_decode($user_details['social_links'], true);
?> $organization = $this->crud_model->get_organization_all()->result_array();
?>
<section class="page-header-area my-course-area"> <section class="page-header-area my-course-area">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
...@@ -57,6 +58,15 @@ ...@@ -57,6 +58,15 @@
<label for="Biography"><?php echo get_phrase('biography'); ?>:</label> <label for="Biography"><?php echo get_phrase('biography'); ?>:</label>
<textarea class="form-control author-biography-editor" name = "biography" id="Biography"><?php echo $user_details['biography']; ?></textarea> <textarea class="form-control author-biography-editor" name = "biography" id="Biography"><?php echo $user_details['biography']; ?></textarea>
</div> </div>
<div class="form-group">
<label for="parent"><?php echo get_phrase('organization'); ?></label>
<select class="form-control select2" data-toggle="select2" name="organization_id" id="organization_id">
<option value="2"><?php echo get_phrase('none'); ?></option>
<?php foreach ($organization as $organ): ?>
<option value="<?php echo $organ['id']; ?>" <?php if( $user_details['organization_id'] == $organ['id']) echo 'selected'; ?>><?php echo $organ['name']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div> </div>
<div class="link-group"> <div class="link-group">
<div class="form-group"> <div class="form-group">
......
div.topnav-navbar-dark { div.topnav-navbar-dark {
background-color: #4d91ea !important; background-color: #4d91ea !important;
} }
/* .navbar-custom .topbar-right-menu .nav-link {
background-color: #5995e2 !important;
}
.topnav-navbar-dark .nav-user {
border: 1px solid #90b1dd;
} */
img.card-img-top {
height: 193px;
}
\ No newline at end of file
...@@ -11,16 +11,27 @@ ul.footer-menu li a.nav-link { color: white !important; font-weight: bold ;} ...@@ -11,16 +11,27 @@ ul.footer-menu li a.nav-link { color: white !important; font-weight: bold ;}
/* .mobile-main-nav{ /* .mobile-main-nav{
background: #505763; background: #505763;
} */ } */
/* .main-nav-wrap>ul>li{ /* @media (max-width:767px){
.mobile-main-nav {
background: #ffffff;
}
ul.mobile-main-nav .has-children{
background: #505763;
}
} */
.main-nav-wrap>ul>li>a{
min-width: 100px; min-width: 100px;
} }
.main-nav-wrap>ul>li>ul{ /* .main-nav-wrap>ul>li>ul{
background: #505763; background: #505763;
} }
.main-nav-wrap>ul>li>ul>li ul{ .main-nav-wrap>ul>li>ul>li ul{
background: #505763; background: #5b6472;
} }
.mobile-main-nav .go-back-menu a, .mobile-main-nav .go-back-menu a,
.mobile-main-nav .category > .go-back a{ .mobile-main-nav .category > .go-back a{
background-color: #414a5a; background-color: #414a5a;
} */ }
\ No newline at end of file .course-box .course-image .img-fluid {
height: 262.5px;
} */
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment