private function system_edit() { if ($this->permissions['edit']) { $user = User_helper::get_user(); $id = $user->id; $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("PASSWORD_CHANGE"); $data['userInfo'] = Query_helper::get_info($this->config->item('table_users'), '*', array('id =' . $id), 1); $data['entrepreneurInfo'] = Query_helper::get_info($this->config->item('table_entrepreneur_infos'), '*', array('user_id =' . $id), 1); $data['groups'] = Query_helper::get_info($this->config->item('table_user_group'), array('id value', 'name_' . $this->get_language_code() . ' text'), array('status !=99')); $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("profile/user_profile_update/system_add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('profile/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); } }
private function system_add() { if ($this->permissions['add']) { $this->current_action = 'add'; $ajax['status'] = true; $data = array(); $user = User_helper::get_user(); $data['title'] = $this->lang->line("NOTICE_CREATE_TITLE"); $data['NoticeInfo'] = array('id' => '', 'notice_title' => '', 'notice_details' => '', 'upload_file' => '', 'viewer_group_id' => '', 'status' => $this->config->item('STATUS_ACTIVE')); $data['notice_viewers'] = array(''); $data['user_groups'] = $this->notice_create_model->get_user_groups(); if ($user->user_group_level == $this->config->item('SUPER_ADMIN_GROUP_ID') || $user->user_group_level == $this->config->item('A_TO_I_GROUP_ID') || $user->user_group_level == $this->config->item('DONOR_GROUP_ID') || $user->user_group_level == $this->config->item('MINISTRY_GROUP_ID')) { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array()); } else { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array('divid =' . $user->division)); } $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1')); $data['upazilas'] = Query_helper::get_info($this->config->item('table_upazilas'), array('upazilaid value', 'upazilaname text'), array('visible = 1')); $data['unions'] = Query_helper::get_info($this->config->item('table_unions'), array('unionid value', 'unionname text'), array('visible = 1')); $data['municipals'] = Query_helper::get_info($this->config->item('table_municipals'), array('municipalid value', 'municipalname text'), array('visible = 1')); $data['municipal_wards'] = Query_helper::get_info($this->config->item('table_municipal_wards'), array('wardid value', 'wardname text'), array('visible = 1')); $data['city_corporations'] = Query_helper::get_info($this->config->item('table_city_corporations'), array('citycorporationid value', 'citycorporationname text'), array('visible = 1')); $data['city_corporation_words'] = Query_helper::get_info($this->config->item('table_city_corporation_wards'), array('citycorporationwardid value', 'wardname text'), array('visible = 1')); $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("notice_management/notice_create/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('notice_management/notice_create/index/add'); $this->jsonReturn($ajax); } else { $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit() { if ($this->permissions['edit']) { $user = User_helper::get_user(); $id = $user->id; $uisc_id = $user->uisc_id; $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("EDIT_PROFILE"); $data['uisc_detail'] = $this->Profile_view_model->get_uisc_info($id, $uisc_id); $data['secretary'] = $this->Profile_view_model->get_secretary_info($id, $uisc_id); $data['chairmen_info'] = Query_helper::get_info($this->config->item('table_entrepreneur_chairmen_info'), '*', array('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); $data['resources'] = $this->Profile_view_model->get_resource_info($id, $uisc_id); $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("profile/profile_view/system_add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('profile/profile_view/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
public function user_info() { $id = $_POST['id']; $data['users'] = Query_helper::get_info($this->config->item('table_users'), '*', array('status = ' . $this->config->item('STATUS_ACTIVE'), "id = " . $id), 1); $ajax['system_content'][] = array("id" => "#user_model_body", "html" => $this->load_view("common/user_info", $data, true)); $this->jsonReturn($ajax); }
public function get_product_list_by_category() { $category_id = $this->input->post('category_id'); $products = Query_helper::get_info($this->config->item('table_product'), array('product_name value', 'product_name text'), array('category_id=' . $category_id), 0, 0, 'product_name'); $ajax['status'] = true; $ajax['system_content'][] = array("id" => "#product_name", "html" => $this->load_view("dropdown", array('drop_down_options' => $products), true)); $this->jsonReturn($ajax); }
public function get_municipal_ward() { $zilla_id = $this->input->post('zilla_id'); $municipal_id = $this->input->post('municipal_id'); $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)); $ajax['status'] = true; $ajax['system_content'][] = array("id" => "#user_municipal_ward_id", "html" => $this->load_view("dropdown", array('drop_down_options' => $municipal_wards), true)); $this->jsonReturn($ajax); }
public function index() { $user = User_helper::get_user(); $data['divisions'] = array(); $data['display_divisions'] = false; $data['default_divisions'] = true; $data['zillas'] = array(); $data['display_zillas'] = false; $data['default_zillas'] = true; $data['upazilas'] = array(); $data['display_upazilas'] = false; $data['default_upazilas'] = true; $data['unions'] = array(); $data['display_unions'] = false; $data['default_unions'] = true; if ($user->user_group_id == $this->config->item('SUPER_ADMIN_GROUP_ID') || $user->user_group_id == $this->config->item('A_TO_I_GROUP_ID') || $user->user_group_id == $this->config->item('DONOR_GROUP_ID') || $user->user_group_id == $this->config->item('MINISTRY_GROUP_ID')) { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array()); $data['display_divisions'] = true; $data['default_divisions'] = true; } else { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array('divid =' . $user->division)); $data['display_divisions'] = true; $data['default_divisions'] = false; $data['display_zillas'] = true; if ($user->user_group_id == $this->config->item('DIVISION_GROUP_ID')) { $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = ' . $user->division)); $data['default_zillas'] = true; $data['display_upazilas'] = false; } else { $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = ' . $user->division, 'zillaid =' . $user->zilla)); $data['default_zillas'] = false; $data['display_upazilas'] = true; if ($user->user_group_id == $this->config->item('DISTRICT_GROUP_ID')) { $data['upazilas'] = Query_helper::get_info($this->config->item('table_upazilas'), array('upazilaid value', 'upazilaname text'), array('visible = 1', 'zillaid = ' . $user->zilla)); $data['default_upazilas'] = true; //$data['display_unions']=true; } else { $data['upazilas'] = Query_helper::get_info($this->config->item('table_upazilas'), array('upazilaid value', 'upazilaname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'upazilaid = ' . $user->upazila)); $data['default_upazilas'] = false; $data['display_unions'] = true; $data['unions'] = Query_helper::get_info($this->config->item('table_unions'), array('unionid value', 'unionname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'upazilaid=' . $user->upazila)); $data['default_unions'] = true; //TODO //increase report menu for union users } } } $ajax['status'] = true; $data['title'] = $this->lang->line("REPORT_UISC_REGISTRATION_TITLE"); $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("report/registered_union_list", $data, true)); $ajax['system_page_url'] = $this->get_encoded_url('report/registered_union_list'); $this->jsonReturn($ajax); }
public function index() { $user = User_helper::get_user(); $data['divisions'] = array(); $data['display_divisions'] = false; $data['default_divisions'] = true; $data['zillas'] = array(); $data['display_zillas'] = false; $data['default_zillas'] = true; $data['municipal'] = array(); $data['display_city_corporation'] = false; $data['default_city_corporation'] = true; $data['city_corporation_ward'] = array(); $data['display_city_corporation_ward'] = false; $data['default_city_corporation_ward'] = true; if ($user->user_group_level == $this->config->item('SUPER_ADMIN_GROUP_ID') || $user->user_group_level == $this->config->item('A_TO_I_GROUP_ID') || $user->user_group_level == $this->config->item('DONOR_GROUP_ID') || $user->user_group_level == $this->config->item('MINISTRY_GROUP_ID')) { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array()); $data['display_divisions'] = true; $data['default_divisions'] = true; } else { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array('divid =' . $user->division)); $data['display_divisions'] = true; $data['default_divisions'] = false; $data['display_zillas'] = true; if ($user->user_group_level == $this->config->item('DIVISION_GROUP_ID')) { $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = ' . $user->division)); $data['default_zillas'] = true; $data['display_city_corporation'] = false; } else { $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = ' . $user->division, 'zillaid =' . $user->zilla)); $data['default_zillas'] = false; $data['display_city_corporation'] = true; if ($user->user_group_level == $this->config->item('DISTRICT_GROUP_ID')) { $data['city_corporations'] = Query_helper::get_info($this->config->item('table_city_corporations'), array('citycorporationid value', 'citycorporationname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'divid=' . $user->division)); $data['default_city_corporation'] = true; //$data['display_unions']=true; } else { $data['city_corporations'] = Query_helper::get_info($this->config->item('table_city_corporations'), array('citycorporationid value', 'citycorporationname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'divid=' . $user->division, 'citycorporationid=' . $user->citycorporation)); $data['default_city_corporation'] = false; $data['display_city_corporation_ward'] = true; $data['city_corporation_words'] = Query_helper::get_info($this->config->item('table_city_corporation_wards'), array('citycorporationwardid value', 'wardname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'divid=' . $user->division, 'citycorporationid = ' . $user->citycorporation)); $data['default_city_corporation_ward'] = true; //TODO //increase report menu for union users } } } $ajax['status'] = true; $data['title'] = $this->lang->line("REPORT_COUNTRY_WISE_CITY_CORPORATION_MONTHLY_INCOME_TITLE"); $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("report/country_wise_city_corporation_monthly_income_list", $data, true)); $ajax['system_page_url'] = $this->get_encoded_url('report/country_wise_city_corporation_monthly_income_list'); $this->jsonReturn($ajax); }
public function index() { $user = User_helper::get_user(); $data['divisions'] = array(); $data['display_divisions'] = false; $data['default_divisions'] = true; $data['zillas'] = array(); $data['display_zillas'] = false; $data['default_zillas'] = true; $data['municipal'] = array(); $data['display_municipal'] = false; $data['default_municipal'] = true; $data['municipal_ward'] = array(); $data['display_municipal_ward'] = false; $data['default_municipal_ward'] = true; if ($user->user_group_level == $this->config->item('SUPER_ADMIN_GROUP_ID') || $user->user_group_level == $this->config->item('A_TO_I_GROUP_ID') || $user->user_group_level == $this->config->item('DONOR_GROUP_ID') || $user->user_group_level == $this->config->item('MINISTRY_GROUP_ID')) { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array()); $data['display_divisions'] = true; $data['default_divisions'] = true; } else { $data['divisions'] = Query_helper::get_info($this->config->item('table_divisions'), array('divid value', 'divname text'), array('divid =' . $user->division)); $data['display_divisions'] = true; $data['default_divisions'] = false; $data['display_zillas'] = true; if ($user->user_group_level == $this->config->item('DIVISION_GROUP_ID')) { $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = ' . $user->division)); $data['default_zillas'] = true; $data['display_municipal'] = false; } else { $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('visible = 1', 'divid = ' . $user->division, 'zillaid =' . $user->zilla)); $data['default_zillas'] = false; $data['display_municipal'] = true; if ($user->user_group_level == $this->config->item('DISTRICT_GROUP_ID')) { $data['municipals'] = Query_helper::get_info($this->config->item('table_municipals'), array('municipalid value', 'municipalname text'), array('visible = 1', 'zillaid = ' . $user->zilla)); $data['default_municipal'] = true; //$data['display_unions']=true; } else { $data['municipals'] = Query_helper::get_info($this->config->item('table_municipals'), array('municipalid value', 'municipalname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'municipalid = ' . $user->municipal)); $data['default_municipal'] = false; $data['display_municipal_ward'] = true; $data['municipal_wards'] = Query_helper::get_info($this->config->item('table_municipal_wards'), array('wardid value', 'wardname text'), array('visible = 1', 'zillaid = ' . $user->zilla, 'municipalid = ' . $user->municipal)); $data['default_municipal_ward'] = true; //TODO //increase report menu for union users } } } $ajax['status'] = true; //$data['title']=$this->lang->line("REPORT_CABINET_MUNICIPAL_SERVICE_HOLDER_INCOME_TITLE"); //$ajax['system_content'][]=array("id"=>"#system_wrapper_top_menu","html"=>$this->load_view("top_menu","",true)); $ajax['system_content'][] = array("id" => "#go_location", "html" => $this->load_view("report/cabinet/cabinet_municipal_service_holder_income_list", $data, true)); //$ajax['system_page_url']=$this->get_encoded_url('report/cabinet/cabinet_municipal_service_holder_income_list'); $this->jsonReturn($ajax); }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("EDIT_KEYWORD"); $data['keywordDetail'] = Query_helper::get_info($this->config->item('table_system_keyword'), '*', array('id =' . $id, 'status !=99'), 1); $ajax['system_content'][] = array("id" => "#system_content", "html" => $this->load_view("system_setup/system_keyword/system_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('system_setup/system_keyword/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("MEDIA_UPLOAD_TITLE"); $data['MediaInfo'] = Query_helper::get_info($this->config->item('table_media'), '*', array('id =' . $id), 1); $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("media/media_upload/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('media/media_upload/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function dcms_list() { if ($this->permissions['list']) { $this->current_action = 'list'; $ajax['status'] = true; //$ajax['system_content'][] = array("id" => "#system_wrapper_top_menu", "html" => $this->load_view("top_menu", "", true)); $data['services'] = Query_helper::get_info($this->config->item('table_api_services'), '*', array('status =1')); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("esheba_management/external_service/list", $data, true)); //approval/entrepreneur_approval/dcms_list if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('esheba_management/services/index/list'); //approval/Entrepreneur_approval $ajax['system_page_title'] = $this->lang->line("SERVICES"); $this->jsonReturn($ajax); } else { $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
public function index($service_id) { $user = User_helper::get_user(); $time = time(); $service_info = Query_helper::get_info($this->config->item('table_api_services'), '*', array('status =1', 'id =' . $service_id), 1); if ($service_info) { $data['auth_token'] = random_string('unique') . $time; $data['user_id'] = $user->id; $data['service_id'] = $service_id; $data['time'] = $time; $data['status'] = 1; $id = Query_helper::add($this->config->item('table_api_auth_token'), $data); if ($id) { redirect($service_info['service_url'] . $data['auth_token'], 'refresh'); } else { echo "Unable to save data"; } } else { echo "invalid service"; } }
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['divisionInfo'] = Query_helper::get_info($this->config->item('table_divisions'), '*', array('divid =' . $id), 1); $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("basic_setup/division_create/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('basic_setup/division_create/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit() { if ($this->permissions['edit']) { $user = User_helper::get_user(); $id = $user->id; $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("SECRET_QUESTION_CHANGE"); $data['userInfo'] = Query_helper::get_info($this->config->item('table_users'), '*', array('id =' . $id), 1); $data['questions'] = Query_helper::get_info($this->config->item('table_questions'), array('id value', 'question text'), array('status = 1')); $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("profile/secret_question_change/system_add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('profile/secret_question_change/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("EDIT_SUPPLIER"); $data['supplier_info'] = Query_helper::get_info($this->config->item('table_supplier'), '*', array('id =' . $id), 1); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("asset_management/supplier/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('asset_management/supplier/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("EDIT_TICKET_RESOLVE"); $data['ticket'] = Query_helper::get_info($this->config->item('table_ticket_assign'), '*', array('id =' . $id), 1); $data['users'] = Query_helper::get_info($this->config->item('table_users'), array('id value', 'name_bn text'), array('status = ' . $this->config->item('STATUS_ACTIVE'), "id = " . $data['ticket']['user_id'])); $data['ticket_status'] = Query_helper::get_info($this->config->item('table_ticket_resolve_status'), array('id value', 'name text'), array('status = ' . $this->config->item('STATUS_ACTIVE'))); $data['ticket_issue'] = $this->ticket_resolve_model->get_ticket_assign($data['ticket']['id']); $data['user_info'] = Query_helper::get_info($this->config->item('table_users'), '*', array('id = ' . $data['ticket_issue']['user_id']), '1'); // $data['product_info']=Query_helper::get_info($this->config->item('table_product'),'*', array('id = '. $data['ticket_issue']['product_id']),'1'); $data['product_info'] = $this->Common_model->get_product_info_by_id($data['ticket_issue']['product_id']); // print_r($data['user_info']);die(); $data['comments'] = $this->ticket_resolve_model->get_ticket_comments($data['ticket']['ticket_issue_id']); //$data['comments']=Query_helper::get_info($this->config->item('table_ticket_resolve_comment'),'*',array('ticket_issue_id ='.$data['ticket']['ticket_issue_id']),1); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("ticket_management/ticket_resolve/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('ticket_management/ticket_resolve/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
public function get_modules_by_component_id() { $component_id = $this->input->post('component_id'); $modules = Query_helper::get_info($this->config->item('table_module'), array('id value', 'name_' . $this->get_language_code() . ' text'), array('component_id = ' . $component_id, 'status !=99')); $ajax['status'] = true; $ajax['system_content'][] = array("id" => "#module_options", "html" => $this->load_view("dropdown", array('drop_down_options' => $modules), true)); $this->jsonReturn($ajax); }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("EDIT_MODULE"); $data['module_info'] = Query_helper::get_info($this->config->item('table_module'), '*', array('id =' . $id, 'status !=99'), 1); $data['components_list'] = Query_helper::get_info($this->config->item('table_component'), array('id value', 'name_' . $this->get_language_code() . ' text'), array('status !=99')); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("system_setup/module/system_add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('system_setup/module/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_save() { $user = User_helper::get_user(); $id = $this->input->post("id"); if ($id > 0) { if (!$this->permissions['edit']) { $ajax['status'] = false; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); die; } } else { if (!$this->permissions['add']) { $ajax['status'] = false; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); die; } } if (!$this->check_validation()) { $ajax['status'] = false; $ajax['system_message'] = $this->message; $this->jsonReturn($ajax); } else { $zilla_detail = $this->input->post('zilla_detail'); if ($id > 0) { //$zilla_detail['update_by']=$user->id; //$zilla_detail['update_date']=time(); $this->db->trans_start(); //DB Transaction Handle START Query_helper::update($this->config->item('table_zillas'), $zilla_detail, array("id = " . $id)); $this->db->trans_complete(); //DB Transaction Handle END if ($this->db->trans_status() === TRUE) { $this->message = $this->lang->line("MSG_UPDATE_SUCCESS"); $save_and_new = $this->input->post('system_save_new_status'); if ($save_and_new == 1) { $this->system_add(); } else { $this->system_list(); } } else { $ajax['status'] = false; $ajax['system_message'] = $this->lang->line("MSG_UPDATE_FAIL"); $this->jsonReturn($ajax); } } else { //$zilla_detail['create_by']=$user->id; //$zilla_detail['create_date']=time(); $divid = $zilla_detail['divid']; $zillas = Query_helper::get_info($this->config->item('table_zillas'), array('MAX(zillaid) as max_zilla_id'), array("divid = " . $divid)); if (strlen($zillas[0]['max_zilla_id'] + 1) == 1) { $zillaid = "0" . ($zillas[0]['max_zilla_id'] + 1); } else { $zillaid = $zillas[0]['max_zilla_id'] + 1; } $zilla_detail['zillaid'] = $zillaid; $this->db->trans_start(); //DB Transaction Handle START Query_helper::add($this->config->item('table_zillas'), $zilla_detail); $this->db->trans_complete(); //DB Transaction Handle END if ($this->db->trans_status() === TRUE) { $this->message = $this->lang->line("MSG_CREATE_SUCCESS"); $save_and_new = $this->input->post('system_save_new_status'); if ($save_and_new == 1) { $this->system_add(); } else { $this->system_list(); } } else { $ajax['status'] = false; $ajax['system_message'] = $this->lang->line("MSG_CREATE_FAIL"); $this->jsonReturn($ajax); } } } }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("EDIT_PRODUCT"); $data['product'] = Query_helper::get_info($this->config->item('table_product'), '*', array('id =' . $id), 1); $data['category'] = Query_helper::get_list($this->config->item('table_product_category'), 'category_name', array('status = 1')); $data['manufacture'] = Query_helper::get_list($this->config->item('table_manufacture'), 'manufacture_name', array('status = 1')); $data['supplier'] = Query_helper::get_list($this->config->item('table_supplier'), 'company_name', array('status = 1')); $data['warehouse'] = Query_helper::get_list($this->config->item('table_warehouse'), 'warehouse_name', array('status = 1')); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("asset_management/product/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('asset_management/product/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
public function education_classescollege() { $classes = $this->input->post('classes'); $educationlevel = Query_helper::get_info($this->config->item('table_classes'), array('id value', 'name text'), array('education_level_id = ' . $classes)); $ajax['status'] = true; $ajax['system_content'][] = array("id" => "#classes", "html" => $this->load_view("dropdown", array('drop_down_options' => $educationlevel), true)); $this->jsonReturn($ajax); }
private function details($user_id) { if ($this->permissions['view']) { if (is_array($user_id)) { $user_id = System_helper::Get_Bng_to_Eng($user_id[0]); } $this->current_action = 'batch_details'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("VIEW_DETAILS_TICKET_ASSIGN"); $data['ticket'] = Query_helper::get_info($this->config->item('table_ticket_assign'), '*', array('user_id =' . $user_id), 1); //, 'status ='.$this->config->item('STATUS_INACTIVE') $data['users'] = Query_helper::get_info($this->config->item('table_users'), array('id value', 'name_bn text'), array('status = ' . $this->config->item('STATUS_ACTIVE'), "id = " . $user_id)); $data['ticket_issues'] = $this->ticket_assign_model->get_ticket_assign($user_id); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("ticket_management/ticket_assign/details", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('ticket_management/ticket_assign/index/batch_details/' . $user_id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function dcms_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = "EDIT_SERVICE"; $data['service'] = Query_helper::get_info($this->config->item('table_api_services'), '*', ['id =' . $id], 1); $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("basic_setup/services/add_edit", $data, true)); //approval/entrepreneur_approval/dcms_search if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('basic_setup/services/index/edit/' . $id); //approval/entrepreneur_approval/index/add $this->jsonReturn($ajax); } else { $ajax['status'] = false; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
foreach ($zilla['upazilla'] as $upazilla) { ?> <tr> <th colspan="<?php echo $numDays + 4; ?> " class="text-center"> <?php echo $upazilla['upazilla_name'] . $this->lang->line('UPAZILLA_NAME'); ?> <br> <?php echo !isset($upazilas) ? $this->config->item('month')[$month] . '-' . System_helper::Get_Eng_to_Bng($year) . "<br/>" : ""; ?> <?php echo $this->lang->line('TOTAL_UNION') . ' ' . System_helper::Get_Eng_to_Bng(count(Query_helper::get_info($this->config->item('table_unions'), 'rowid', array('zillaid =' . $zilla['zilla_id'], 'upazilaid =' . $upazilla['upazilla_id'])))); ?> </th> </tr> <tr> <th><?php echo $this->lang->line('UNION'); ?> </th> <th><?php echo $this->lang->line('CENTER'); ?> </th> <?php for ($d = 1; $d <= $numDays; $d++) { ?>
> <?php if (isset($uisc_id) && $uisc_id > 0) { if ($upazila > 0) { $center_type_udc = $this->config->item('ONLINE_UNION_GROUP_ID'); $udcs = Query_helper::get_info($this->config->item('table_uisc_infos'), array('id value', 'uisc_name text'), array('uisc_type = ' . $center_type_udc, 'zilla = ' . $zilla, 'upazilla = ' . $upazila, 'union = ' . $union)); $CI->load_view("dropdown", array('drop_down_options' => $udcs, 'drop_down_selected' => $uisc_id)); } if ($citycorporation > 0) { $center_type_cdc = $this->config->item('ONLINE_CITY_CORPORATION_WORD_GROUP_ID'); $cdcs = Query_helper::get_info($this->config->item('table_uisc_infos'), array('id value', 'uisc_name text'), array('uisc_type = ' . $center_type_cdc, 'zilla = ' . $zilla, 'citycorporation = ' . $citycorporation, 'citycorporationward = ' . $citycorporationward)); $CI->load_view("dropdown", array('drop_down_options' => $cdcs, 'drop_down_selected' => $uisc_id)); } if ($municipal > 0) { $center_type_pdc = $this->config->item('ONLINE_MUNICIPAL_WORD_GROUP_ID'); $pdcs = Query_helper::get_info($this->config->item('table_uisc_infos'), array('id value', 'uisc_name text'), array('uisc_type = ' . $center_type_pdc, 'zilla = ' . $zilla, 'municipal = ' . $municipal, 'municipalward = ' . $municipalward)); $CI->load_view("dropdown", array('drop_down_options' => $pdcs, 'drop_down_selected' => $uisc_id)); } ?> <input type="hidden" name="digital_center" value="<?php echo $uisc_id; ?> " /> <?php } ?> </select> </div> </div>
public static function get_div_zilla_upazilla($element_id) { $CI =& get_instance(); $user = User_helper::get_user(); if ($user->user_group_level == $CI->config->item('SUPER_ADMIN_GROUP_ID') || $user->user_group_level == $CI->config->item('A_TO_I_GROUP_ID') || $user->user_group_level == $CI->config->item('DONOR_GROUP_ID') || $user->user_group_level == $CI->config->item('MINISTRY_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_divisions'), array('divname name'), array('divid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } } elseif ($user->user_group_level == $CI->config->item('DIVISION_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_zillas'), array('zillaname name'), array('divid = ' . $user->division, 'zillaid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } } elseif ($user->user_group_level == $CI->config->item('DISTRICT_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_upazilas'), array('upazilaname name'), array('zillaid = ' . $user->zilla, 'upazilaid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } } elseif ($user->user_group_level == $CI->config->item('UPAZILLA_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_unions'), array('unionname name'), array('zillaid = ' . $user->zilla, 'upazilaid = ' . $user->upazila, 'unionid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } } elseif ($user->user_group_level == $CI->config->item('UNION_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_unions'), array('unionname name'), array('zillaid = ' . $user->zilla, 'upazilaid = ' . $user->upazila, 'unionid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } } elseif ($user->user_group_level == $CI->config->item('CITY_CORPORATION_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_city_corporations'), array('citycorporationname name'), array('zillaid = ' . $user->zilla, 'citycorporationid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } $CI->db->where('invoices.divid', $user->division); $CI->db->where('invoices.zillaid', $user->zilla); $CI->db->where('invoices.citycorporationid', $user->citycorporation); } elseif ($user->user_group_level == $CI->config->item('MUNICIPAL_GROUP_ID')) { $element = Query_helper::get_info($CI->config->item('table_municipals'), array('municipalname name'), array('zillaid = ' . $user->zilla, 'municipalid = ' . $element_id)); if (isset($element[0]['name'])) { $name = $element[0]['name']; } else { $name = ''; } } else { $name = ''; } return $name ? $name : ''; }
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['userInfo'] = Query_helper::get_info($this->config->item('table_users'), '*', array('id =' . $id), 1); $user_group_id_level = Query_helper::get_info($this->config->item('table_user_group'), '*', array('id =' . $data['userInfo']['user_group_id']), 1); $data['userInfo']['user_group_level'] = $user_group_id_level['level']; $this->db->from($this->config->item('table_user_group')); $this->db->where('status != 99'); $this->db->select("concat_ws('-', id, level) value", false); $this->db->select("name_" . $this->get_language_code() . " text"); $data['groups'] = $this->db->get()->result_array(); $data['designations'] = Query_helper::get_info($this->config->item('table_designation'), array('id value', 'name_bn text'), array()); $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("user_management/user_create/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('user_management/user_create/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("NOTICE_CREATE_TITLE"); $data['NoticeInfo'] = Query_helper::get_info($this->config->item('table_notice'), '*', array('id =' . $id), 1); $data['user_groups'] = $this->notice_create_model->get_user_group(); $data['notice_viewers'] = $this->notice_create_model->get_notice_view_group($id); $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("notice_management/notice_create/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('notice_management/notice_create/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }
private function system_edit($id) { if ($this->permissions['edit']) { $this->current_action = 'edit'; $ajax['status'] = true; $data = array(); $data['title'] = $this->lang->line("MUNICIPAL_CREATE_WARD_TITLE"); $data['municipal_info'] = Query_helper::get_info($this->config->item('table_municipals'), '*', array('rowid =' . $id), 1); $data['zillas'] = Query_helper::get_info($this->config->item('table_zillas'), array('zillaid value', 'zillaname text'), array('zillaid=' . $data['municipal_info']['zillaid'])); $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("basic_setup/municipal_ward_create/add_edit", $data, true)); if ($this->message) { $ajax['system_message'] = $this->message; } $ajax['system_page_url'] = $this->get_encoded_url('basic_setup/municipal_ward_create/index/edit/' . $id); $this->jsonReturn($ajax); } else { $ajax['status'] = true; $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS"); $this->jsonReturn($ajax); } }