Ejemplo n.º 1
0
 private function system_edit($id)
 {
     if ($this->permissions['edit']) {
         $this->current_action = 'edit';
         $ajax['status'] = true;
         $data = array();
         $data['title'] = $this->lang->line("EDIT_USER");
         $data['resources'] = Query_helper::get_info($this->config->item('table_resources'), array('res_id value', 'res_name text'), array('visible = 1'));
         $data['user_info'] = Query_helper::get_info($this->config->item('table_users'), '*', array('id =' . $id), 1);
         $uisc_id = $data['user_info']['uisc_id'];
         $data['chairmen_info'] = Query_helper::get_info($this->config->item('table_entrepreneur_chairmen_info'), '*', array('uisc_id =' . $uisc_id), 1);
         $data['secretary_info'] = Query_helper::get_info($this->config->item('table_secretary_infos'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         $data['entrepreneur_info'] = Query_helper::get_info($this->config->item('table_entrepreneur_infos'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         $data['education_info'] = Query_helper::get_info($this->config->item('table_entrepreneur_education'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         $data['training_info'] = Query_helper::get_info($this->config->item('table_training'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 0);
         $data['investment_info'] = Query_helper::get_info($this->config->item('table_investment'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         $data['location_info'] = Query_helper::get_info($this->config->item('table_center_location'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         $data['resources_info'] = Query_helper::get_info($this->config->item('table_uisc_resources'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 0);
         $data['device_info'] = Query_helper::get_info($this->config->item('table_device_infos'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         $data['electricity_info'] = Query_helper::get_info($this->config->item('table_electricity'), '*', array('user_id =' . $id, 'uisc_id =' . $uisc_id), 1);
         //            $user_group_id = $data['user_info']['user_group_id'];
         //            $division_id = $data['user_info']['division'];
         //            $zilla_id = $data['user_info']['zilla'];
         //            $upazila_id = $data['user_info']['upazila'];
         //            //$unioun_id = $data['user_info']['unioun'];
         //            $city_corporation_id = $data['user_info']['citycorporation'];
         //            //$city_corporation_ward_id = $data['user_info']['citycorporationward'];
         //            $municipal_id = $data['user_info']['municipal'];
         //            //$municipal_ward_id = $data['user_info']['municipalward'];
         //
         //            $data['groups']=Query_helper::get_info($this->config->item('table_user_group'),array('id value','name_'.$this->get_language_code().' text'),array('status !=99'), 12);
         //            $data['divisions']=Query_helper::get_info($this->config->item('table_divisions'),array('divid value', 'divname text'), array());
         //            $data['zillas']=Query_helper::get_info($this->config->item('table_zillas'),array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = '.$division_id));
         //            $data['upazilas']=Query_helper::get_info($this->config->item('table_upazilas'),array('upazilaid value', 'upazilaname text'), array('visible = 1', 'zillaid = '.$zilla_id));
         //            $data['unions']=Query_helper::get_info($this->config->item('table_unions'),array('unionid value', 'unionname text'), array('visible = 1', 'zillaid = '.$zilla_id, 'upazilaid='.$upazila_id));
         //            $data['city_corporations']=Query_helper::get_info($this->config->item('table_city_corporations'),array('citycorporationid value', 'citycorporationname text'), array('visible = 1', 'zillaid = '.$zilla_id, 'divid='.$division_id));
         //            $data['city_corporation_words']=Query_helper::get_info($this->config->item('table_city_corporation_wards'),array('citycorporationwardid value', 'wardname text'), array('visible = 1', 'zillaid = '.$zilla_id, 'divid='.$division_id, 'citycorporationid = '.$city_corporation_id));
         //            $data['municipals']=Query_helper::get_info($this->config->item('table_municipals'),array('municipalid value', 'municipalname text'), array('visible = 1', 'zillaid = '.$zilla_id));
         //            $data['municipal_wards']=Query_helper::get_info($this->config->item('table_municipal_wards'),array('wardid value', 'wardname text'), array('visible = 1', 'zillaid = '.$zilla_id, 'municipalid = '.$municipal_id));
         $user = User_helper::get_user();
         if ($user->user_group_id == $this->config->item('UISC_GROUP_ID')) {
             $profile_status = User_helper::complete_user_profile_check();
             if (!$profile_status) {
                 $ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => "");
                 $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("user_management/user_profile_update/system_add_edit", $data, true));
             } else {
                 $ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => $this->load_view("top_menu", "", true));
                 $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("user_management/user_profile_update/system_add_edit", $data, true));
             }
         } else {
             $ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => $this->load_view("top_menu", "", true));
             $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("user_management/user_profile_update/system_add_edit", $data, true));
         }
         if ($this->message) {
             $ajax['system_message'] = $this->message;
         }
         $ajax['system_page_url'] = $this->get_encoded_url('user_management/user_profile_update/index/edit/' . $id);
         $this->jsonReturn($ajax);
     } else {
         $ajax['status'] = true;
         $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS");
         $this->jsonReturn($ajax);
     }
 }
Ejemplo n.º 2
0
<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
$CI =& get_instance();
$user = User_helper::get_user();
//echo "<pre>";
//print_r($user);
//echo "</pre>";
if ($user) {
    $profile_status = true;
    if ($user->user_group_level == $this->config->item('UISC_GROUP_ID')) {
        $profile_status = User_helper::complete_user_profile_check();
    }
    if (!$profile_status) {
        redirect(base_url() . 'home/dashboard');
    } else {
        //$CI->load_view('sidebar_left');
        $components = User_helper::get_task_module_component($CI->config->item('system_sidebar01'));
        //    echo "<pre>";
        //    print_r($components);
        //    echo "</pre>";
        ?>
        <div class="row">
            <div class="col-lg-12">
                <div class="top-nav"
                     style="clear:both; border-bottom:1px solid gray;display:inline-table;width:100%;text-align: center;">
                    <ul class="nav1">
                        <li><a href="<?php 
        echo base_url();
Ejemplo n.º 3
0
 public function dashboard_page($message = "")
 {
     $ajax['status'] = true;
     $user = User_helper::get_user();
     if ($user->user_group_level == $this->config->item('UISC_GROUP_ID')) {
         $profile_status = User_helper::complete_user_profile_check();
         if (!$profile_status) {
             $ajax['system_content'][] = array("id" => "#top_header", "html" => $this->load_view("header", "", true));
             $ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => "");
             $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("home", "", true));
             $ajax['system_content'][] = array("id" => "#system_header", "html" => $this->load_view("header", "", true));
             $ajax['system_content'][] = array("id" => "#system_wrapper_footer", "html" => $this->load_view("footer", "", true));
         } else {
             $ajax['system_content'][] = array("id" => "#top_header", "html" => $this->load_view("header", "", true));
             $ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => $this->load_view("top_menu", "", true));
             $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("home", "", true));
             $ajax['system_content'][] = array("id" => "#system_header", "html" => $this->load_view("header", "", true));
             $ajax['system_content'][] = array("id" => "#system_wrapper_footer", "html" => $this->load_view("footer", "", true));
         }
     } else {
         $ajax['system_content'][] = array("id" => "#top_header", "html" => $this->load_view("header", "", true));
         $ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => $this->load_view("top_menu", "", true));
         $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("home", "", true));
         $ajax['system_content'][] = array("id" => "#system_header", "html" => $this->load_view("header", "", true));
         $ajax['system_content'][] = array("id" => "#system_wrapper_footer", "html" => $this->load_view("footer", "", true));
     }
     if ($message) {
         $ajax['system_message'] = $message;
     }
     $ajax['system_page_url'] = base_url() . 'home/dashboard/';
     $ajax['system_page_title'] = $this->lang->line("DASHBOARD");
     $this->jsonReturn($ajax);
 }