db chnages in visa_app
This commit is contained in:
parent
82edc661af
commit
e8e6054955
@ -58,8 +58,8 @@ $autoload['packages'] = array();
|
|||||||
|
|
|
|
||||||
| $autoload['libraries'] = array('user_agent' => 'ua');
|
| $autoload['libraries'] = array('user_agent' => 'ua');
|
||||||
*/
|
*/
|
||||||
$autoload['libraries'] = array();
|
//$autoload['libraries'] = array();
|
||||||
//$autoload['libraries'] = array('database', 'session','BaseController');
|
$autoload['libraries'] = array('database', 'session');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
@ -90,7 +90,7 @@ $autoload['drivers'] = array();
|
|||||||
|
|
|
|
||||||
| $autoload['helper'] = array('url', 'file');
|
| $autoload['helper'] = array('url', 'file');
|
||||||
*/
|
*/
|
||||||
$autoload['helper'] = array('url');
|
$autoload['helper'] = array('url', 'file','cias_helper');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $config['base_url'] = $base;
|
|||||||
| variable so that it is blank.
|
| variable so that it is blank.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['index_page'] = 'index.php';
|
$config['index_page'] = '';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@ -74,14 +74,10 @@ $active_group = 'default';
|
|||||||
$query_builder = TRUE;
|
$query_builder = TRUE;
|
||||||
|
|
||||||
|
|
||||||
// $hostname ="localhost";
|
$hostname ="localhost";
|
||||||
// $username ="root";
|
$username ="root";
|
||||||
// $password ="";
|
$password ="";
|
||||||
// $database ="mydb";
|
$database ="Visa_DB";
|
||||||
$hostname = 'sidharthindustries.com';
|
|
||||||
$username = 'kasiram9_Siddh';
|
|
||||||
$password = 'sidh@1234';
|
|
||||||
$database = 'kasiram9_SIADEV';
|
|
||||||
|
|
||||||
$db['default'] = array(
|
$db['default'] = array(
|
||||||
'dsn' => '',
|
'dsn' => '',
|
||||||
|
|||||||
@ -49,16 +49,48 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
| Examples: my-controller/index -> my_controller/index
|
| Examples: my-controller/index -> my_controller/index
|
||||||
| my-controller/my-method -> my_controller/my_method
|
| my-controller/my-method -> my_controller/my_method
|
||||||
*/
|
*/
|
||||||
$route['default_controller'] = 'Dashboard_Controller';
|
|
||||||
//$route['default_controller'] = 'Login';
|
$route['default_controller'] = 'Login_Controller';
|
||||||
|
|
||||||
$route['404_override'] = '';
|
$route['404_override'] = '';
|
||||||
$route['translate_uri_dashes'] = FALSE;
|
$route['translate_uri_dashes'] = FALSE;
|
||||||
|
|
||||||
$route['Routes'] = 'Dashboard_Controller/index';
|
$route['Routes'] = 'Dashboard_Controller/index';
|
||||||
$route['Dashboard'] = 'Dashboard_Controller/Dashboard';
|
$route['Dashboard'] = 'Dashboard_Controller/Dashboard';
|
||||||
$route['country_master'] = 'Dashboard_Controller/country_master';
|
$route['country_master'] = 'Dashboard_Controller/country_master';
|
||||||
|
$route['Add_country_master'] = 'Dashboard_Controller/Add_country_master';
|
||||||
|
|
||||||
$route['city_master'] = 'Dashboard_Controller/city_master';
|
$route['city_master'] = 'Dashboard_Controller/city_master';
|
||||||
|
$route['Add_city_master'] = 'Dashboard_Controller/Add_city_master';
|
||||||
|
|
||||||
$route['visa_type_master'] = 'Dashboard_Controller/visa_type_master';
|
$route['visa_type_master'] = 'Dashboard_Controller/visa_type_master';
|
||||||
|
$route['Add_visa_type_master'] = 'Dashboard_Controller/Add_visa_type_master';
|
||||||
|
|
||||||
$route['document_master'] = 'Dashboard_Controller/document_master';
|
$route['document_master'] = 'Dashboard_Controller/document_master';
|
||||||
|
$route['Add_document_master'] = 'Dashboard_Controller/Add_document_master';
|
||||||
|
|
||||||
$route['visa_type_master'] = 'Dashboard_Controller/visa_type_master';
|
$route['visa_type_master'] = 'Dashboard_Controller/visa_type_master';
|
||||||
$route['country_visa_details'] = 'Dashboard_Controller/country_visa_details';
|
$route['country_visa_details'] = 'Dashboard_Controller/country_visa_details';
|
||||||
|
|
||||||
|
|
||||||
|
$route['loginMe'] = 'Login_Controller/loginMe';
|
||||||
|
$route['forgotPassword'] = "Login_Controller/forgotPassword";
|
||||||
|
$route['resetPasswordUser'] = "Login_Controller/resetPasswordUser";
|
||||||
|
$route['resetPasswordConfirmUser'] = "Login_Controller/resetPasswordConfirmUser";
|
||||||
|
$route['createPasswordUser'] = "Login_Controller/createPasswordUser";
|
||||||
|
|
||||||
|
|
||||||
|
$route['logout'] = 'User_Controller/logout';
|
||||||
|
$route['userListing'] = 'User_Controller/userListing';
|
||||||
|
$route['addNew'] = "User_Controller/addNew";
|
||||||
|
$route['addNewUser'] = "User_Controller/addNewUser";
|
||||||
|
$route['editOld'] = "User_Controller/editOld";
|
||||||
|
$route['editUser'] = "User_Controller/editUser";
|
||||||
|
$route['deleteUser'] = "User_Controller/deleteUser";
|
||||||
|
$route['loadChangePass'] = "User_Controller/loadChangePass";
|
||||||
|
$route['changePassword'] = "User_Controller/changePassword";
|
||||||
|
$route['checkEmailExists'] = "User_Controller/checkEmailExists";
|
||||||
|
$route['login-history'] = "User_Controller/loginHistoy";
|
||||||
|
|
||||||
|
/* End of file routes.php */
|
||||||
|
/* Location: ./application/config/routes.php */
|
||||||
@ -14,6 +14,7 @@ class Dashboard_Controller extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
$this->load->model('Dashboard_Model');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -21,9 +22,7 @@ class Dashboard_Controller extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
$this->Dashboard();
|
||||||
|
|
||||||
$this->loadViews('Dashboard', NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,26 +30,186 @@ class Dashboard_Controller extends BaseController
|
|||||||
*/
|
*/
|
||||||
function Dashboard()
|
function Dashboard()
|
||||||
{
|
{
|
||||||
|
$this->global['pageTitle'] = 'Visa : Dashboard';
|
||||||
$this->loadViews('Dashboard', NULL);
|
$this->loadViews('Dashboard', $this->global,NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load the Country Master page
|
||||||
|
*/
|
||||||
function country_master(){
|
function country_master(){
|
||||||
$this->loadViews('country_master',NULL);
|
$this->global['pageTitle'] = 'Visa : Country Master';
|
||||||
|
$this->loadViews('country_master', $this->global,NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To Store Country Master Values
|
||||||
|
*/
|
||||||
|
function Add_country_master(){
|
||||||
|
|
||||||
|
|
||||||
|
$CountryMasterDatas =
|
||||||
|
array( 'CountryName'=>$this->input->post('CountryName'),
|
||||||
|
'CapitalCity'=>$this->input->post('CapitalCity'),
|
||||||
|
'CountryDescription'=>$this->input->post('Editor'));
|
||||||
|
|
||||||
|
$Added = $this->Dashboard_Model->Add_CountryMaster($CountryMasterDatas);
|
||||||
|
|
||||||
|
|
||||||
|
if( $Added >= 1 ){
|
||||||
|
echo "<script>alert('Saved Successfully!');</script>";
|
||||||
|
redirect ( 'country_master' );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "<script>alert('Saved Unsuccessfully!');</script>";
|
||||||
|
redirect ( 'country_master' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load the City Master page
|
||||||
|
*/
|
||||||
function city_master(){
|
function city_master(){
|
||||||
$this->loadViews('city_master',NULL);
|
$this->global['pageTitle'] = 'Visa : Country Master';
|
||||||
|
$this->loadViews('city_master', $this->global,NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To Store City Master Values
|
||||||
|
*/
|
||||||
|
function Add_city_master(){
|
||||||
|
|
||||||
|
$CityMasterDatas =
|
||||||
|
array( 'CityName'=>$this->input->post('CityName'),
|
||||||
|
'CityDescription'=>$this->input->post('CitiesDescription'));
|
||||||
|
|
||||||
|
$Added = $this->Dashboard_Model->Add_CityMaster($CityMasterDatas);
|
||||||
|
|
||||||
|
|
||||||
|
if( $Added >= 1 ){
|
||||||
|
echo "<script>alert('Saved Successfully!');</script>";
|
||||||
|
redirect ( 'city_master' );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "<script>alert('Saved Unsuccessfully!');</script>";
|
||||||
|
redirect ( 'city_master' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load the Visa Type Master page
|
||||||
|
*/
|
||||||
function visa_type_master(){
|
function visa_type_master(){
|
||||||
$this->loadViews('visa_type_master',NULL);
|
$this->global['pageTitle'] = 'Visa : Visa Type Master';
|
||||||
|
$this->loadViews('visa_type_master', $this->global,NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To Store Visa Type Master Values
|
||||||
|
*/
|
||||||
|
function Add_visa_type_master(){
|
||||||
|
|
||||||
|
$VisaTypeMasterDatas =
|
||||||
|
array( 'VisaName'=>$this->input->post('VisaName'),
|
||||||
|
'VisaDescription'=>$this->input->post('VisaDescription'));
|
||||||
|
|
||||||
|
$Added = $this->Dashboard_Model->Add_VisaType($VisaTypeMasterDatas);
|
||||||
|
|
||||||
|
|
||||||
|
if( $Added >= 1 ){
|
||||||
|
echo "<script>alert('Saved Successfully!');</script>";
|
||||||
|
redirect ( 'visa_type_master' );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "<script>alert('Saved Unsuccessfully!');</script>";
|
||||||
|
redirect ( 'visa_type_master' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load the Document page
|
||||||
|
*/
|
||||||
function document_master(){
|
function document_master(){
|
||||||
$this->loadViews('document_upload',NULL);
|
$this->global['pageTitle'] = 'Visa : Upload Document';
|
||||||
|
$this->loadViews('document_upload', $this->global,NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To Store Visa's File & Documents Datas
|
||||||
|
*/
|
||||||
|
function Add_document_master(){
|
||||||
|
|
||||||
|
$DocumentMasterDatas =
|
||||||
|
array( 'DocumentName'=>$this->input->post('DocumentName'),
|
||||||
|
'Document'=>$this->uploadFile(),
|
||||||
|
'DocumentDescription'=>$this->input->post('Description'));
|
||||||
|
|
||||||
|
$Added = $this->Dashboard_Model->Add_Document($DocumentMasterDatas);
|
||||||
|
|
||||||
|
|
||||||
|
if( $Added >= 1 ){
|
||||||
|
echo "<script>alert('Saved Successfully!');</script>";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "<script>alert('Saved Unsuccessfully!');</script>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To add employee revalant images(for profile pictures)
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* To upload IGR files
|
||||||
|
*/
|
||||||
|
function uploadFile()
|
||||||
|
{
|
||||||
|
$config['upload_path'] = 'Uploads';
|
||||||
|
$config['allowed_types'] = 'png|jpg|jpeg|pdf|docx';
|
||||||
|
$config['file_name'] = $_FILES['DocumentFile']['name'];
|
||||||
|
|
||||||
|
//Load upload library and initialize configuration
|
||||||
|
$this->load->library('upload',$config);
|
||||||
|
$this->upload->initialize($config);
|
||||||
|
|
||||||
|
|
||||||
|
if($this->upload->do_upload('DocumentFile'))
|
||||||
|
{
|
||||||
|
$uploadData = $this->upload->data();
|
||||||
|
$uploadfilename = $uploadData['file_name'];
|
||||||
|
return $uploadfilename;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error = array('error' => $this->upload->display_errors());
|
||||||
|
$uploadfilename = '';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load the Dashboard page
|
||||||
|
*/
|
||||||
function country_visa_details(){
|
function country_visa_details(){
|
||||||
$this->loadViews('country_visa_details',NULL);
|
$this->global['pageTitle'] = 'Visa : CountryWise Visa Details';
|
||||||
|
$data['records'] = $this->Dashboard_Model->Get_CountryMaster();
|
||||||
|
$this->loadViews('country_visa_details',$this->global,$data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
46
application/controllers/Error.php
Normal file
46
application/controllers/Error.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class : Error (ErrorController)
|
||||||
|
* Error class to redirect on errors
|
||||||
|
* @author : Kishor Mali
|
||||||
|
* @version : 1.1
|
||||||
|
* @since : 15 November 2016
|
||||||
|
*/
|
||||||
|
class Error extends CI_Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This is default constructor of the class
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Index Page for this controller.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$this->isLoggedIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to check the user is logged in or not
|
||||||
|
*/
|
||||||
|
function isLoggedIn()
|
||||||
|
{
|
||||||
|
$isLoggedIn = $this->session->userdata('isLoggedIn');
|
||||||
|
|
||||||
|
if(!isset($isLoggedIn) || $isLoggedIn != TRUE)
|
||||||
|
{
|
||||||
|
$this->load->view('login');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirect('pageNotFound');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
257
application/controllers/Login_Controller.php
Normal file
257
application/controllers/Login_Controller.php
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class : Login_Controller
|
||||||
|
* Login_Controller class to control to authenticate user credentials and starts user's session.
|
||||||
|
* @author : Suren
|
||||||
|
* @version : 1.1
|
||||||
|
* @since : 30 July 2018
|
||||||
|
*/
|
||||||
|
class Login_Controller extends CI_Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This is default constructor of the class
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->load->model('Login_Model');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Index Page for this controller.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$this->isLoggedIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to check the user is logged in or not
|
||||||
|
*/
|
||||||
|
function isLoggedIn()
|
||||||
|
{
|
||||||
|
$isLoggedIn = $this->session->userdata('isLoggedIn');
|
||||||
|
|
||||||
|
if(!isset($isLoggedIn) || $isLoggedIn != TRUE)
|
||||||
|
{
|
||||||
|
$this->load->view('login');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirect('/Dashboard');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to logged in user
|
||||||
|
*/
|
||||||
|
public function loginMe()
|
||||||
|
{
|
||||||
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|trim');
|
||||||
|
$this->form_validation->set_rules('password', 'Password', 'required|max_length[32]');
|
||||||
|
|
||||||
|
if($this->form_validation->run() == FALSE)
|
||||||
|
{
|
||||||
|
$this->index();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$email = $this->security->xss_clean($this->input->post('email'));
|
||||||
|
$password = $this->input->post('password');
|
||||||
|
|
||||||
|
$result = $this->Login_Model->loginMe($email, $password);
|
||||||
|
|
||||||
|
if(!empty($result))
|
||||||
|
{
|
||||||
|
$lastLogin = $this->Login_Model->lastLoginInfo($result->userId);
|
||||||
|
|
||||||
|
$sessionArray = array('userId'=>$result->userId,
|
||||||
|
'role'=>$result->roleId,
|
||||||
|
'roleText'=>$result->role,
|
||||||
|
'name'=>$result->name,
|
||||||
|
'lastLogin'=> $lastLogin->createdDtm,
|
||||||
|
'isLoggedIn' => TRUE
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->session->set_userdata($sessionArray);
|
||||||
|
|
||||||
|
unset($sessionArray['userId'], $sessionArray['isLoggedIn'], $sessionArray['lastLogin']);
|
||||||
|
|
||||||
|
$loginInfo = array("userId"=>$result->userId, "sessionData" => json_encode($sessionArray), "machineIp"=>$_SERVER['REMOTE_ADDR'], "userAgent"=>getBrowserAgent(), "agentString"=>$this->agent->agent_string(), "platform"=>$this->agent->platform());
|
||||||
|
|
||||||
|
$this->Login_Model->lastLogin($loginInfo);
|
||||||
|
|
||||||
|
redirect('/Dashboard');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->session->set_flashdata('error', 'Email or password mismatch');
|
||||||
|
|
||||||
|
redirect('/login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load forgot password view
|
||||||
|
*/
|
||||||
|
// public function forgotPassword()
|
||||||
|
// {
|
||||||
|
// $isLoggedIn = $this->session->userdata('isLoggedIn');
|
||||||
|
|
||||||
|
// if(!isset($isLoggedIn) || $isLoggedIn != TRUE)
|
||||||
|
// {
|
||||||
|
// $this->load->view('forgotPassword');
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// redirect('/Dashboard');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to generate reset password request link
|
||||||
|
*/
|
||||||
|
function resetPasswordUser()
|
||||||
|
{
|
||||||
|
$status = '';
|
||||||
|
|
||||||
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
$this->form_validation->set_rules('login_email','Email','trim|required|valid_email');
|
||||||
|
|
||||||
|
if($this->form_validation->run() == FALSE)
|
||||||
|
{
|
||||||
|
$this->forgotPassword();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$email = $this->security->xss_clean($this->input->post('login_email'));
|
||||||
|
|
||||||
|
if($this->Login_Model->checkEmailExist($email))
|
||||||
|
{
|
||||||
|
$encoded_email = urlencode($email);
|
||||||
|
|
||||||
|
$this->load->helper('string');
|
||||||
|
$data['email'] = $email;
|
||||||
|
$data['activation_id'] = random_string('alnum',15);
|
||||||
|
$data['createdDtm'] = date('Y-m-d H:i:s');
|
||||||
|
$data['agent'] = getBrowserAgent();
|
||||||
|
$data['client_ip'] = $this->input->ip_address();
|
||||||
|
|
||||||
|
$save = $this->Login_Model->resetPasswordUser($data);
|
||||||
|
|
||||||
|
if($save)
|
||||||
|
{
|
||||||
|
$data1['reset_link'] = base_url() . "resetPasswordConfirmUser/" . $data['activation_id'] . "/" . $encoded_email;
|
||||||
|
$userInfo = $this->Login_Model->getCustomerInfoByEmail($email);
|
||||||
|
|
||||||
|
if(!empty($userInfo)){
|
||||||
|
$data1["name"] = $userInfo[0]->name;
|
||||||
|
$data1["email"] = $userInfo[0]->email;
|
||||||
|
$data1["message"] = "Reset Your Password";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sendStatus = resetPasswordEmail($data1);
|
||||||
|
|
||||||
|
if($sendStatus){
|
||||||
|
$status = "send";
|
||||||
|
setFlashData($status, "Reset password link sent successfully, please check mails.");
|
||||||
|
} else {
|
||||||
|
$status = "notsend";
|
||||||
|
setFlashData($status, "Email has been failed, try again.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$status = 'unable';
|
||||||
|
setFlashData($status, "It seems an error while sending your details, try again.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$status = 'invalid';
|
||||||
|
setFlashData($status, "This email is not registered with us.");
|
||||||
|
}
|
||||||
|
redirect('/forgotPassword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to reset the password
|
||||||
|
* @param string $activation_id : This is unique id
|
||||||
|
* @param string $email : This is user email
|
||||||
|
*/
|
||||||
|
function resetPasswordConfirmUser($activation_id, $email)
|
||||||
|
{
|
||||||
|
// Get email and activation code from URL values at index 3-4
|
||||||
|
$email = urldecode($email);
|
||||||
|
|
||||||
|
// Check activation id in database
|
||||||
|
$is_correct = $this->Login_Model->checkActivationDetails($email, $activation_id);
|
||||||
|
|
||||||
|
$data['email'] = $email;
|
||||||
|
$data['activation_code'] = $activation_id;
|
||||||
|
|
||||||
|
if ($is_correct == 1)
|
||||||
|
{
|
||||||
|
$this->load->view('newPassword', $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirect('/login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to create new password for user
|
||||||
|
*/
|
||||||
|
function createPasswordUser()
|
||||||
|
{
|
||||||
|
$status = '';
|
||||||
|
$message = '';
|
||||||
|
$email = $this->input->post("email");
|
||||||
|
$activation_id = $this->input->post("activation_code");
|
||||||
|
|
||||||
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
$this->form_validation->set_rules('password','Password','required|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('cpassword','Confirm Password','trim|required|matches[password]|max_length[20]');
|
||||||
|
|
||||||
|
if($this->form_validation->run() == FALSE)
|
||||||
|
{
|
||||||
|
$this->resetPasswordConfirmUser($activation_id, urlencode($email));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$password = $this->input->post('password');
|
||||||
|
$cpassword = $this->input->post('cpassword');
|
||||||
|
|
||||||
|
// Check activation id in database
|
||||||
|
$is_correct = $this->Login_Model->checkActivationDetails($email, $activation_id);
|
||||||
|
|
||||||
|
if($is_correct == 1)
|
||||||
|
{
|
||||||
|
$this->Login_Model->createPasswordUser($email, $password);
|
||||||
|
|
||||||
|
$status = 'success';
|
||||||
|
$message = 'Password changed successfully';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$status = 'error';
|
||||||
|
$message = 'Password changed failed';
|
||||||
|
}
|
||||||
|
|
||||||
|
setFlashData($status, $message);
|
||||||
|
|
||||||
|
redirect("/login");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
369
application/controllers/User_Controller.php
Normal file
369
application/controllers/User_Controller.php
Normal file
@ -0,0 +1,369 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
require APPPATH . '/libraries/BaseController.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class : User_Controller
|
||||||
|
* User_Controller Class to control all user related operations.
|
||||||
|
* @author : Kishor Mali
|
||||||
|
* @version : 1.1
|
||||||
|
* @since : 15 November 2016
|
||||||
|
*/
|
||||||
|
class User_Controller extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This is default constructor of the class
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->load->model('User_Model');
|
||||||
|
$this->isLoggedIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to load the first screen of the user
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : Dashboard';
|
||||||
|
|
||||||
|
$this->loadViews("dashboard", $this->global, NULL , NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to load the user list
|
||||||
|
*/
|
||||||
|
function userListing()
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE)
|
||||||
|
{
|
||||||
|
$this->loadThis();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$searchText = $this->security->xss_clean($this->input->post('searchText'));
|
||||||
|
$data['searchText'] = $searchText;
|
||||||
|
|
||||||
|
$this->load->library('pagination');
|
||||||
|
|
||||||
|
$count = $this->User_Model->userListingCount($searchText);
|
||||||
|
|
||||||
|
$returns = $this->paginationCompress ( "userListing/", $count, 10 );
|
||||||
|
|
||||||
|
$data['userRecords'] = $this->User_Model->userListing($searchText, $returns["page"], $returns["segment"]);
|
||||||
|
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : User Listing';
|
||||||
|
|
||||||
|
$this->loadViews("users", $this->global, $data, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to load the add new form
|
||||||
|
*/
|
||||||
|
function addNew()
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE)
|
||||||
|
{
|
||||||
|
$this->loadThis();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->load->model('User_Model');
|
||||||
|
$data['roles'] = $this->User_Model->getUserRoles();
|
||||||
|
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : Add New User';
|
||||||
|
|
||||||
|
$this->loadViews("addNew", $this->global, $data, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to check whether email already exist or not
|
||||||
|
*/
|
||||||
|
function checkEmailExists()
|
||||||
|
{
|
||||||
|
$userId = $this->input->post("userId");
|
||||||
|
$email = $this->input->post("email");
|
||||||
|
|
||||||
|
if(empty($userId)){
|
||||||
|
$result = $this->User_Model->checkEmailExists($email);
|
||||||
|
} else {
|
||||||
|
$result = $this->User_Model->checkEmailExists($email, $userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($result)){ echo("true"); }
|
||||||
|
else { echo("false"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to add new user to the system
|
||||||
|
*/
|
||||||
|
function addNewUser()
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE)
|
||||||
|
{
|
||||||
|
$this->loadThis();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
$this->form_validation->set_rules('fname','Full Name','trim|required|max_length[128]');
|
||||||
|
$this->form_validation->set_rules('email','Email','trim|required|valid_email|max_length[128]');
|
||||||
|
$this->form_validation->set_rules('password','Password','required|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('cpassword','Confirm Password','trim|required|matches[password]|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('role','Role','trim|required|numeric');
|
||||||
|
$this->form_validation->set_rules('mobile','Mobile Number','required|min_length[10]');
|
||||||
|
|
||||||
|
if($this->form_validation->run() == FALSE)
|
||||||
|
{
|
||||||
|
$this->addNew();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$name = ucwords(strtolower($this->security->xss_clean($this->input->post('fname'))));
|
||||||
|
$email = $this->security->xss_clean($this->input->post('email'));
|
||||||
|
$password = $this->input->post('password');
|
||||||
|
$roleId = $this->input->post('role');
|
||||||
|
$mobile = $this->security->xss_clean($this->input->post('mobile'));
|
||||||
|
|
||||||
|
$userInfo = array('email'=>$email, 'password'=>getHashedPassword($password), 'roleId'=>$roleId, 'name'=> $name,
|
||||||
|
'mobile'=>$mobile, 'createdBy'=>$this->vendorId, 'createdDtm'=>date('Y-m-d H:i:s'));
|
||||||
|
|
||||||
|
$this->load->model('User_Model');
|
||||||
|
$result = $this->User_Model->addNewUser($userInfo);
|
||||||
|
|
||||||
|
if($result > 0)
|
||||||
|
{
|
||||||
|
$this->session->set_flashdata('success', 'New User created successfully');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->session->set_flashdata('error', 'User creation failed');
|
||||||
|
}
|
||||||
|
|
||||||
|
redirect('addNew');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used load user edit information
|
||||||
|
* @param number $userId : Optional : This is user id
|
||||||
|
*/
|
||||||
|
function editOld($userId = NULL)
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE || $userId == 1)
|
||||||
|
{
|
||||||
|
$this->loadThis();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($userId == null)
|
||||||
|
{
|
||||||
|
redirect('userListing');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['roles'] = $this->User_Model->getUserRoles();
|
||||||
|
$data['userInfo'] = $this->User_Model->getUserInfo($userId);
|
||||||
|
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : Edit User';
|
||||||
|
|
||||||
|
$this->loadViews("editOld", $this->global, $data, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to edit the user information
|
||||||
|
*/
|
||||||
|
function editUser()
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE)
|
||||||
|
{
|
||||||
|
$this->loadThis();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
$userId = $this->input->post('userId');
|
||||||
|
|
||||||
|
$this->form_validation->set_rules('fname','Full Name','trim|required|max_length[128]');
|
||||||
|
$this->form_validation->set_rules('email','Email','trim|required|valid_email|max_length[128]');
|
||||||
|
$this->form_validation->set_rules('password','Password','matches[cpassword]|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('cpassword','Confirm Password','matches[password]|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('role','Role','trim|required|numeric');
|
||||||
|
$this->form_validation->set_rules('mobile','Mobile Number','required|min_length[10]');
|
||||||
|
|
||||||
|
if($this->form_validation->run() == FALSE)
|
||||||
|
{
|
||||||
|
$this->editOld($userId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$name = ucwords(strtolower($this->security->xss_clean($this->input->post('fname'))));
|
||||||
|
$email = $this->security->xss_clean($this->input->post('email'));
|
||||||
|
$password = $this->input->post('password');
|
||||||
|
$roleId = $this->input->post('role');
|
||||||
|
$mobile = $this->security->xss_clean($this->input->post('mobile'));
|
||||||
|
|
||||||
|
$userInfo = array();
|
||||||
|
|
||||||
|
if(empty($password))
|
||||||
|
{
|
||||||
|
$userInfo = array('email'=>$email, 'roleId'=>$roleId, 'name'=>$name,
|
||||||
|
'mobile'=>$mobile, 'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:s'));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userInfo = array('email'=>$email, 'password'=>getHashedPassword($password), 'roleId'=>$roleId,
|
||||||
|
'name'=>ucwords($name), 'mobile'=>$mobile, 'updatedBy'=>$this->vendorId,
|
||||||
|
'updatedDtm'=>date('Y-m-d H:i:s'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->User_Model->editUser($userInfo, $userId);
|
||||||
|
|
||||||
|
if($result == true)
|
||||||
|
{
|
||||||
|
$this->session->set_flashdata('success', 'User updated successfully');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->session->set_flashdata('error', 'User updation failed');
|
||||||
|
}
|
||||||
|
|
||||||
|
redirect('userListing');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to delete the user using userId
|
||||||
|
* @return boolean $result : TRUE / FALSE
|
||||||
|
*/
|
||||||
|
function deleteUser()
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE)
|
||||||
|
{
|
||||||
|
echo(json_encode(array('status'=>'access')));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userId = $this->input->post('userId');
|
||||||
|
$userInfo = array('isDeleted'=>1,'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:s'));
|
||||||
|
|
||||||
|
$result = $this->User_Model->deleteUser($userId, $userInfo);
|
||||||
|
|
||||||
|
if ($result > 0) { echo(json_encode(array('status'=>TRUE))); }
|
||||||
|
else { echo(json_encode(array('status'=>FALSE))); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to load the change password screen
|
||||||
|
*/
|
||||||
|
function loadChangePass()
|
||||||
|
{
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : Change Password';
|
||||||
|
|
||||||
|
$this->loadViews("changePassword", $this->global, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to change the password of the user
|
||||||
|
*/
|
||||||
|
function changePassword()
|
||||||
|
{
|
||||||
|
$this->load->library('form_validation');
|
||||||
|
|
||||||
|
$this->form_validation->set_rules('oldPassword','Old password','required|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('newPassword','New password','required|max_length[20]');
|
||||||
|
$this->form_validation->set_rules('cNewPassword','Confirm new password','required|matches[newPassword]|max_length[20]');
|
||||||
|
|
||||||
|
if($this->form_validation->run() == FALSE)
|
||||||
|
{
|
||||||
|
$this->loadChangePass();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$oldPassword = $this->input->post('oldPassword');
|
||||||
|
$newPassword = $this->input->post('newPassword');
|
||||||
|
|
||||||
|
$resultPas = $this->User_Model->matchOldPassword($this->vendorId, $oldPassword);
|
||||||
|
|
||||||
|
if(empty($resultPas))
|
||||||
|
{
|
||||||
|
$this->session->set_flashdata('nomatch', 'Your old password not correct');
|
||||||
|
redirect('loadChangePass');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$usersData = array('password'=>getHashedPassword($newPassword), 'updatedBy'=>$this->vendorId,
|
||||||
|
'updatedDtm'=>date('Y-m-d H:i:s'));
|
||||||
|
|
||||||
|
$result = $this->User_Model->changePassword($this->vendorId, $usersData);
|
||||||
|
|
||||||
|
if($result > 0) { $this->session->set_flashdata('success', 'Password updation successful'); }
|
||||||
|
else { $this->session->set_flashdata('error', 'Password updation failed'); }
|
||||||
|
|
||||||
|
redirect('loadChangePass');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page not found : error 404
|
||||||
|
*/
|
||||||
|
function pageNotFound()
|
||||||
|
{
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||||
|
|
||||||
|
$this->loadViews("404", $this->global, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to show login history
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
*/
|
||||||
|
function loginHistoy($userId = NULL)
|
||||||
|
{
|
||||||
|
if($this->isAdmin() == TRUE)
|
||||||
|
{
|
||||||
|
$this->loadThis();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userId = ($userId == NULL ? $this->session->userdata("userId") : $userId);
|
||||||
|
|
||||||
|
$searchText = $this->input->post('searchText');
|
||||||
|
$fromDate = $this->input->post('fromDate');
|
||||||
|
$toDate = $this->input->post('toDate');
|
||||||
|
|
||||||
|
$data["userInfo"] = $this->User_Model->getUserInfoById($userId);
|
||||||
|
|
||||||
|
$data['searchText'] = $searchText;
|
||||||
|
$data['fromDate'] = $fromDate;
|
||||||
|
$data['toDate'] = $toDate;
|
||||||
|
|
||||||
|
$this->load->library('pagination');
|
||||||
|
|
||||||
|
$count = $this->User_Model->loginHistoryCount($userId, $searchText, $fromDate, $toDate);
|
||||||
|
|
||||||
|
$returns = $this->paginationCompress ( "login-history/".$userId."/", $count, 5, 3);
|
||||||
|
|
||||||
|
$data['userRecords'] = $this->User_Model->loginHistory($userId, $searchText, $fromDate, $toDate, $returns["page"], $returns["segment"]);
|
||||||
|
|
||||||
|
$this->global['pageTitle'] = 'CodeInsect : User Login History';
|
||||||
|
|
||||||
|
$this->loadViews("loginHistory", $this->global, $data, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class Welcome extends CI_Controller {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Index Page for this controller.
|
|
||||||
*
|
|
||||||
* Maps to the following URL
|
|
||||||
* http://example.com/index.php/welcome
|
|
||||||
* - or -
|
|
||||||
* http://example.com/index.php/welcome/index
|
|
||||||
* - or -
|
|
||||||
* Since this controller is set as the default controller in
|
|
||||||
* config/routes.php, it's displayed at http://example.com/
|
|
||||||
*
|
|
||||||
* So any other public methods not prefixed with an underscore will
|
|
||||||
* map to /index.php/welcome/<method_name>
|
|
||||||
* @see https://codeigniter.com/user_guide/general/urls.html
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$this->load->view('includes/Header', NULL);
|
|
||||||
$this->load->view('welcome_message', NULL);
|
|
||||||
$this->load->view('includes/Footer', NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
application/helpers/cias_helper.php
Normal file
152
application/helpers/cias_helper.php
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to print the content of any data
|
||||||
|
*/
|
||||||
|
function pre($data)
|
||||||
|
{
|
||||||
|
echo "<pre>";
|
||||||
|
print_r($data);
|
||||||
|
echo "</pre>";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to get the CI instance
|
||||||
|
*/
|
||||||
|
if(!function_exists('get_instance'))
|
||||||
|
{
|
||||||
|
function get_instance()
|
||||||
|
{
|
||||||
|
$CI = &get_instance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to generate the hashed password
|
||||||
|
* @param {string} $plainPassword : This is plain text password
|
||||||
|
*/
|
||||||
|
if(!function_exists('getHashedPassword'))
|
||||||
|
{
|
||||||
|
function getHashedPassword($plainPassword)
|
||||||
|
{
|
||||||
|
return password_hash($plainPassword, PASSWORD_DEFAULT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to generate the hashed password
|
||||||
|
* @param {string} $plainPassword : This is plain text password
|
||||||
|
* @param {string} $hashedPassword : This is hashed password
|
||||||
|
*/
|
||||||
|
if(!function_exists('verifyHashedPassword'))
|
||||||
|
{
|
||||||
|
function verifyHashedPassword($plainPassword, $hashedPassword)
|
||||||
|
{
|
||||||
|
return password_verify($plainPassword, $hashedPassword) ? true : false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method used to get current browser agent
|
||||||
|
*/
|
||||||
|
if(!function_exists('getBrowserAgent'))
|
||||||
|
{
|
||||||
|
function getBrowserAgent()
|
||||||
|
{
|
||||||
|
$CI = get_instance();
|
||||||
|
$CI->load->library('user_agent');
|
||||||
|
|
||||||
|
$agent = '';
|
||||||
|
|
||||||
|
if ($CI->agent->is_browser())
|
||||||
|
{
|
||||||
|
$agent = $CI->agent->browser().' '.$CI->agent->version();
|
||||||
|
}
|
||||||
|
else if ($CI->agent->is_robot())
|
||||||
|
{
|
||||||
|
$agent = $CI->agent->robot();
|
||||||
|
}
|
||||||
|
else if ($CI->agent->is_mobile())
|
||||||
|
{
|
||||||
|
$agent = $CI->agent->mobile();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$agent = 'Unidentified User Agent';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $agent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!function_exists('setProtocol'))
|
||||||
|
{
|
||||||
|
function setProtocol()
|
||||||
|
{
|
||||||
|
$CI = &get_instance();
|
||||||
|
|
||||||
|
$CI->load->library('email');
|
||||||
|
|
||||||
|
$config['protocol'] = PROTOCOL;
|
||||||
|
$config['mailpath'] = MAIL_PATH;
|
||||||
|
$config['smtp_host'] = SMTP_HOST;
|
||||||
|
$config['smtp_port'] = SMTP_PORT;
|
||||||
|
$config['smtp_user'] = SMTP_USER;
|
||||||
|
$config['smtp_pass'] = SMTP_PASS;
|
||||||
|
$config['charset'] = "utf-8";
|
||||||
|
$config['mailtype'] = "html";
|
||||||
|
$config['newline'] = "\r\n";
|
||||||
|
|
||||||
|
$CI->email->initialize($config);
|
||||||
|
|
||||||
|
return $CI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!function_exists('emailConfig'))
|
||||||
|
{
|
||||||
|
function emailConfig()
|
||||||
|
{
|
||||||
|
$CI->load->library('email');
|
||||||
|
$config['protocol'] = PROTOCOL;
|
||||||
|
$config['smtp_host'] = SMTP_HOST;
|
||||||
|
$config['smtp_port'] = SMTP_PORT;
|
||||||
|
$config['mailpath'] = MAIL_PATH;
|
||||||
|
$config['charset'] = 'UTF-8';
|
||||||
|
$config['mailtype'] = "html";
|
||||||
|
$config['newline'] = "\r\n";
|
||||||
|
$config['wordwrap'] = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!function_exists('resetPasswordEmail'))
|
||||||
|
{
|
||||||
|
function resetPasswordEmail($detail)
|
||||||
|
{
|
||||||
|
$data["data"] = $detail;
|
||||||
|
// pre($detail);
|
||||||
|
// die;
|
||||||
|
|
||||||
|
$CI = setProtocol();
|
||||||
|
|
||||||
|
$CI->email->from(EMAIL_FROM, FROM_NAME);
|
||||||
|
$CI->email->subject("Reset Password");
|
||||||
|
$CI->email->message($CI->load->view('email/resetPassword', $data, TRUE));
|
||||||
|
$CI->email->to($detail["email"]);
|
||||||
|
$status = $CI->email->send();
|
||||||
|
|
||||||
|
return $status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!function_exists('setFlashData'))
|
||||||
|
{
|
||||||
|
function setFlashData($status, $flashMsg)
|
||||||
|
{
|
||||||
|
$CI = get_instance();
|
||||||
|
$CI->session->set_flashdata($status, $flashMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
129
application/libraries/BaseController.php
Executable file → Normal file
129
application/libraries/BaseController.php
Executable file → Normal file
@ -3,11 +3,92 @@
|
|||||||
/**
|
/**
|
||||||
* Class : BaseController
|
* Class : BaseController
|
||||||
* Base Class to control over all the classes
|
* Base Class to control over all the classes
|
||||||
* @author : Kishor Mali
|
* @author : Suren
|
||||||
* @version : 1.1
|
* @version : 1.1
|
||||||
* @since : 15 November 2016
|
* @since : 27 July 2018
|
||||||
*/
|
*/
|
||||||
class BaseController extends CI_Controller {
|
class BaseController extends CI_Controller {
|
||||||
|
protected $role = '';
|
||||||
|
protected $vendorId = '';
|
||||||
|
protected $name = '';
|
||||||
|
protected $roleText = '';
|
||||||
|
protected $global = array ();
|
||||||
|
protected $lastLogin = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Takes mixed data and optionally a status code, then creates the response
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param array|NULL $data
|
||||||
|
* Data to output to the user
|
||||||
|
* running the script; otherwise, exit
|
||||||
|
*/
|
||||||
|
public function response($data = NULL) {
|
||||||
|
$this->output->set_status_header ( 200 )->set_content_type ( 'application/json', 'utf-8' )->set_output ( json_encode ( $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) )->_display ();
|
||||||
|
exit ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to check the user is logged in or not
|
||||||
|
*/
|
||||||
|
function isLoggedIn() {
|
||||||
|
$isLoggedIn = $this->session->userdata ( 'isLoggedIn' );
|
||||||
|
|
||||||
|
if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) {
|
||||||
|
redirect ( 'Login_Controller' );
|
||||||
|
} else {
|
||||||
|
$this->role = $this->session->userdata ( 'role' );
|
||||||
|
$this->vendorId = $this->session->userdata ( 'userId' );
|
||||||
|
$this->name = $this->session->userdata ( 'name' );
|
||||||
|
$this->roleText = $this->session->userdata ( 'roleText' );
|
||||||
|
$this->lastLogin = $this->session->userdata ( 'lastLogin' );
|
||||||
|
|
||||||
|
$this->global ['name'] = $this->name;
|
||||||
|
$this->global ['role'] = $this->role;
|
||||||
|
$this->global ['role_text'] = $this->roleText;
|
||||||
|
$this->global ['last_login'] = $this->lastLogin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to check the access
|
||||||
|
*/
|
||||||
|
// function isAdmin() {
|
||||||
|
// if ($this->role != ROLE_ADMIN) {
|
||||||
|
// return true;
|
||||||
|
// } else {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to check the access
|
||||||
|
*/
|
||||||
|
// function isTicketter() {
|
||||||
|
// if ($this->role != ROLE_ADMIN || $this->role != ROLE_MANAGER) {
|
||||||
|
// return true;
|
||||||
|
// } else {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to load the set of views
|
||||||
|
*/
|
||||||
|
function loadThis() {
|
||||||
|
$this->global ['pageTitle'] = 'Visa : Access Denied';
|
||||||
|
$this->load->view ( 'includes/Header', $this->global );
|
||||||
|
$this->load->view ( 'access' );
|
||||||
|
$this->load->view ( 'includes/Footer' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to logged out user from system
|
||||||
|
*/
|
||||||
|
function logout() {
|
||||||
|
$this->session->sess_destroy ();
|
||||||
|
redirect ( 'Login_Controller' );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to load views
|
* This function used to load views
|
||||||
@ -23,4 +104,48 @@ class BaseController extends CI_Controller {
|
|||||||
$this->load->view($viewName, $pageInfo);
|
$this->load->view($viewName, $pageInfo);
|
||||||
$this->load->view('includes/Footer', $footerInfo);
|
$this->load->view('includes/Footer', $footerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used provide the pagination resources
|
||||||
|
* @param {string} $link : This is page link
|
||||||
|
* @param {number} $count : This is page count
|
||||||
|
* @param {number} $perPage : This is records per page limit
|
||||||
|
* @return {mixed} $result : This is array of records and pagination data
|
||||||
|
*/
|
||||||
|
function paginationCompress($link, $count, $perPage = 10, $segment = SEGMENT) {
|
||||||
|
$this->load->library ( 'pagination' );
|
||||||
|
|
||||||
|
$config ['base_url'] = base_url () . $link;
|
||||||
|
$config ['total_rows'] = $count;
|
||||||
|
$config ['uri_segment'] = $segment;
|
||||||
|
$config ['per_page'] = $perPage;
|
||||||
|
$config ['num_links'] = 5;
|
||||||
|
$config ['full_tag_open'] = '<nav><ul class="pagination">';
|
||||||
|
$config ['full_tag_close'] = '</ul></nav>';
|
||||||
|
$config ['first_tag_open'] = '<li class="arrow">';
|
||||||
|
$config ['first_link'] = 'First';
|
||||||
|
$config ['first_tag_close'] = '</li>';
|
||||||
|
$config ['prev_link'] = 'Previous';
|
||||||
|
$config ['prev_tag_open'] = '<li class="arrow">';
|
||||||
|
$config ['prev_tag_close'] = '</li>';
|
||||||
|
$config ['next_link'] = 'Next';
|
||||||
|
$config ['next_tag_open'] = '<li class="arrow">';
|
||||||
|
$config ['next_tag_close'] = '</li>';
|
||||||
|
$config ['cur_tag_open'] = '<li class="active"><a href="#">';
|
||||||
|
$config ['cur_tag_close'] = '</a></li>';
|
||||||
|
$config ['num_tag_open'] = '<li>';
|
||||||
|
$config ['num_tag_close'] = '</li>';
|
||||||
|
$config ['last_tag_open'] = '<li class="arrow">';
|
||||||
|
$config ['last_link'] = 'Last';
|
||||||
|
$config ['last_tag_close'] = '</li>';
|
||||||
|
|
||||||
|
$this->pagination->initialize ( $config );
|
||||||
|
$page = $config ['per_page'];
|
||||||
|
$segment = $this->uri->segment ( $segment );
|
||||||
|
|
||||||
|
return array (
|
||||||
|
"page" => $page,
|
||||||
|
"segment" => $segment
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
69
application/models/Dashboard_Model.php
Normal file
69
application/models/Dashboard_Model.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Dashboard_Model extends CI_Model{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To store Country Related details into 'Tab_CountryMaster' table
|
||||||
|
* @param array $CountryMasterDatas : Its have all the Contry master datas
|
||||||
|
* @return $CountryMaster : This will return how many value are inserted (return as count)
|
||||||
|
*/
|
||||||
|
function Add_CountryMaster($CountryMasterDatas)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->db->insert('Tab_CountryMaster',$CountryMasterDatas);
|
||||||
|
$CountryMaster = $this->db->affected_rows();
|
||||||
|
|
||||||
|
return $CountryMaster;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To store City Related details into 'Tab_CityMaster' table
|
||||||
|
* @param array $CityMasterDatas : Its have all the City master datas
|
||||||
|
* @return $CityMaster : This will return how many value are inserted (return as count)
|
||||||
|
*/
|
||||||
|
function Add_CityMaster($CityMasterDatas)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->db->insert('Tab_CityMaster',$CityMasterDatas);
|
||||||
|
$CityMaster = $this->db->affected_rows();
|
||||||
|
|
||||||
|
return $CityMaster;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To store VisaType Related details into 'Tab_VisaTypeMaster' table
|
||||||
|
* @param array $VisaTypeMasterDatas : Its have all the City master datas
|
||||||
|
* @return $CityMaster : This will return how many value are inserted (return as count)
|
||||||
|
*/
|
||||||
|
function Add_VisaType($VisaTypeMasterDatas)
|
||||||
|
{
|
||||||
|
$this->db->insert('Tab_VisaTypeMaster',$VisaTypeMasterDatas);
|
||||||
|
$VisaTypeMaster = $this->db->affected_rows();
|
||||||
|
|
||||||
|
return $VisaTypeMaster;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To store Document Related details into 'Tab_Documents' table
|
||||||
|
* @param array $DocumentMasterDatas : Its have all the document master datas
|
||||||
|
* @return $Documents : This will return how many value are inserted (return as count)
|
||||||
|
*/
|
||||||
|
function Add_Document($DocumentMasterDatas)
|
||||||
|
{
|
||||||
|
$this->db->insert('Tab_Documents',$DocumentMasterDatas);
|
||||||
|
$Documents = $this->db->affected_rows();
|
||||||
|
|
||||||
|
return $Documents;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get_CountryMaster()
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('Tab_CountryMaster');
|
||||||
|
$query = $this->db->get();
|
||||||
|
$CountryMasterDatas = $query->result();
|
||||||
|
return $CountryMasterDatas;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,20 +0,0 @@
|
|||||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class Home_model extends CI_Model
|
|
||||||
{
|
|
||||||
function __construct(){
|
|
||||||
parent::__construct();
|
|
||||||
$this->load->database();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function NewListing()
|
|
||||||
{
|
|
||||||
$this->db->from('actor');
|
|
||||||
$query = $this->db->get();
|
|
||||||
$result = $query->result();
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
137
application/models/Login_Model.php
Normal file
137
application/models/Login_Model.php
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Login_model extends CI_Model
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to check the login credentials of the user
|
||||||
|
* @param string $email : This is email of the user
|
||||||
|
* @param string $password : This is encrypted password of the user
|
||||||
|
*/
|
||||||
|
function loginMe($email, $password)
|
||||||
|
{
|
||||||
|
$this->db->select('BaseTbl.userId, BaseTbl.password, BaseTbl.name, BaseTbl.roleId, Roles.role');
|
||||||
|
$this->db->from('Tab_Users as BaseTbl');
|
||||||
|
$this->db->join('Tab_Roles as Roles','Roles.roleId = BaseTbl.roleId');
|
||||||
|
$this->db->where('BaseTbl.email', $email);
|
||||||
|
$this->db->where('BaseTbl.isDeleted', 0);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
$user = $query->row();
|
||||||
|
|
||||||
|
if(!empty($user)){
|
||||||
|
if(verifyHashedPassword($password, $user->password)){
|
||||||
|
return $user;
|
||||||
|
} else {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to check email exists or not
|
||||||
|
* @param {string} $email : This is users email id
|
||||||
|
* @return {boolean} $result : TRUE/FALSE
|
||||||
|
*/
|
||||||
|
function checkEmailExist($email)
|
||||||
|
{
|
||||||
|
$this->db->select('userId');
|
||||||
|
$this->db->where('email', $email);
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$query = $this->db->get('Tab_Users');
|
||||||
|
|
||||||
|
if ($query->num_rows() > 0){
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to insert reset password data
|
||||||
|
* @param {array} $data : This is reset password data
|
||||||
|
* @return {boolean} $result : TRUE/FALSE
|
||||||
|
*/
|
||||||
|
function resetPasswordUser($data)
|
||||||
|
{
|
||||||
|
$result = $this->db->insert('Tab_ResetPassword', $data);
|
||||||
|
|
||||||
|
if($result) {
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to get customer information by email-id for forget password email
|
||||||
|
* @param string $email : Email id of customer
|
||||||
|
* @return object $result : Information of customer
|
||||||
|
*/
|
||||||
|
function getCustomerInfoByEmail($email)
|
||||||
|
{
|
||||||
|
$this->db->select('userId, email, name');
|
||||||
|
$this->db->from('Tab_Users');
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$this->db->where('email', $email);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to check correct activation deatails for forget password.
|
||||||
|
* @param string $email : Email id of user
|
||||||
|
* @param string $activation_id : This is activation string
|
||||||
|
*/
|
||||||
|
function checkActivationDetails($email, $activation_id)
|
||||||
|
{
|
||||||
|
$this->db->select('id');
|
||||||
|
$this->db->from('Tab_ResetPassword');
|
||||||
|
$this->db->where('email', $email);
|
||||||
|
$this->db->where('activation_id', $activation_id);
|
||||||
|
$query = $this->db->get();
|
||||||
|
return $query->num_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This function used to create new password by reset link
|
||||||
|
function createPasswordUser($email, $password)
|
||||||
|
{
|
||||||
|
$this->db->where('email', $email);
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$this->db->update('Tab_Users', array('password'=>getHashedPassword($password)));
|
||||||
|
$this->db->delete('Tab_ResetPassword', array('email'=>$email));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to save login information of user
|
||||||
|
* @param array $loginInfo : This is users login information
|
||||||
|
*/
|
||||||
|
function lastLogin($loginInfo)
|
||||||
|
{
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->insert('Tab_LastLogin', $loginInfo);
|
||||||
|
$this->db->trans_complete();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to get last login info by user id
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
* @return number $result : This is query result
|
||||||
|
*/
|
||||||
|
function lastLoginInfo($userId)
|
||||||
|
{
|
||||||
|
$this->db->select('BaseTbl.createdDtm');
|
||||||
|
$this->db->where('BaseTbl.userId', $userId);
|
||||||
|
$this->db->order_by('BaseTbl.id', 'DESC');
|
||||||
|
$this->db->limit(1);
|
||||||
|
$query = $this->db->get('Tab_LastLogin as BaseTbl');
|
||||||
|
|
||||||
|
return $query->row();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -1,124 +0,0 @@
|
|||||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class Login_model extends CI_Model
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function used to check the login credentials of the user
|
|
||||||
* @param string $email : This is email of the user
|
|
||||||
* @param string $password : This is encrypted password of the user
|
|
||||||
*/
|
|
||||||
function loginMe($email, $password)
|
|
||||||
{
|
|
||||||
$this->db->select('BaseTbl.userId, BaseTbl.password, Emp.EmpID,Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept');
|
|
||||||
$this->db->from('tbl_users as BaseTbl');
|
|
||||||
$this->db->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');
|
|
||||||
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
|
|
||||||
$this->db->join('T_DepartmentDetails as DEPT','Emp.Departmentcode = DEPT.DEPCode');
|
|
||||||
$this->db->where('BaseTbl.isDeleted !=',1);
|
|
||||||
$this->db->where('BaseTbl.email', $email);
|
|
||||||
$this->db->or_where('Emp.ContactNumber', $email);
|
|
||||||
$this->db->where('BaseTbl.isDeleted !=',1);
|
|
||||||
|
|
||||||
$query = $this->db->get();
|
|
||||||
|
|
||||||
|
|
||||||
$user = $query->result();
|
|
||||||
print_r($user);die;
|
|
||||||
if(!empty($user)){
|
|
||||||
if(verifyHashedPassword($password, $user[0]->password)){
|
|
||||||
return $user;
|
|
||||||
} else {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Accessdep($EmpID)
|
|
||||||
{
|
|
||||||
|
|
||||||
$this->db->select('Departmentcode as AssDep');
|
|
||||||
$this->db->from('T_AccessDepartments');
|
|
||||||
$this->db->where('EmpID', $EmpID);
|
|
||||||
|
|
||||||
|
|
||||||
$query = $this->db->get();
|
|
||||||
// print_r( $this->db->last_query());
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* get the user dtl
|
|
||||||
*/
|
|
||||||
function getuserid($mobileno,$emailid)
|
|
||||||
{
|
|
||||||
$this->db->select('UsrTbl.userId,UsrTbl.email,EmpTbl.ContactNumber,EmpTbl.FirstName');
|
|
||||||
$this->db->from('tbl_users as UsrTbl');
|
|
||||||
$this->db->join('T_Employee_Details as EmpTbl','UsrTbl.EmpID = EmpTbl.EmpID');
|
|
||||||
$this->db->where('EmpTbl.ContactNumber', $mobileno);
|
|
||||||
$this->db->where('UsrTbl.email',$emailid);
|
|
||||||
$this->db->where('UsrTbl.isDeleted', 0);
|
|
||||||
$res = $this->db->get();
|
|
||||||
return $res->result();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To update opt in our database
|
|
||||||
**/
|
|
||||||
function temp2($userId,$otp){
|
|
||||||
$this->db->set('OTP',$otp);
|
|
||||||
$this->db->where('userId',$userId);
|
|
||||||
$this->db->update('tbl_users');
|
|
||||||
$count = $this->db->affected_rows();
|
|
||||||
|
|
||||||
if($count > 0)
|
|
||||||
{
|
|
||||||
$subQuery = "select OTP from tbl_users where userId = '".$userId."'";
|
|
||||||
$query = $this->db->query($subQuery);
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To get user id
|
|
||||||
**/
|
|
||||||
function getuserdtl($phno){
|
|
||||||
$this->db->select('BaseTbl.userId');
|
|
||||||
$this->db->from('tbl_users as BaseTbl');
|
|
||||||
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
|
|
||||||
$this->db->where('Emp.ContactNumber', $phno);
|
|
||||||
$query = $this->db->get();
|
|
||||||
$result = $query->result();
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To update password and otp
|
|
||||||
**/
|
|
||||||
function resetpassword($Array,$userid){
|
|
||||||
|
|
||||||
$this->db->where('userId',$userid);
|
|
||||||
$this->db->update('tbl_users',$Array);
|
|
||||||
$count = $this->db->affected_rows();
|
|
||||||
return $count;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To update password only
|
|
||||||
**/
|
|
||||||
function updatepassword($userid,$password){
|
|
||||||
|
|
||||||
$this->db->set('password',$password);
|
|
||||||
$this->db->where('userId',$userid);
|
|
||||||
$this->db->update('tbl_users');
|
|
||||||
$count = $this->db->affected_rows();
|
|
||||||
return $count;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class NewModel extends CI_Model
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* To get the employee listing
|
|
||||||
* @return array $result : result of the query(returns as employee details)
|
|
||||||
*/
|
|
||||||
|
|
||||||
function __construct(){
|
|
||||||
parent::__construct();
|
|
||||||
$this->load->database();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function NewListing()
|
|
||||||
{
|
|
||||||
$this->db->from('actor');
|
|
||||||
$query = $this->db->get();
|
|
||||||
$result = $query->result();
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
268
application/models/User_Model.php
Normal file
268
application/models/User_Model.php
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class User_model extends CI_Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This function is used to get the user listing count
|
||||||
|
* @param string $searchText : This is optional search text
|
||||||
|
* @return number $count : This is row count
|
||||||
|
*/
|
||||||
|
function userListingCount($searchText = '')
|
||||||
|
{
|
||||||
|
$this->db->select('BaseTbl.userId, BaseTbl.email, BaseTbl.name, BaseTbl.mobile, Role.role');
|
||||||
|
$this->db->from('Tab_Users as BaseTbl');
|
||||||
|
$this->db->join('Tab_Roles as Role', 'Role.roleId = BaseTbl.roleId','left');
|
||||||
|
if(!empty($searchText)) {
|
||||||
|
$likeCriteria = "(BaseTbl.email LIKE '%".$searchText."%'
|
||||||
|
OR BaseTbl.name LIKE '%".$searchText."%'
|
||||||
|
OR BaseTbl.mobile LIKE '%".$searchText."%')";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
$this->db->where('BaseTbl.isDeleted', 0);
|
||||||
|
$this->db->where('BaseTbl.roleId !=', 1);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->num_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to get the user listing count
|
||||||
|
* @param string $searchText : This is optional search text
|
||||||
|
* @param number $page : This is pagination offset
|
||||||
|
* @param number $segment : This is pagination limit
|
||||||
|
* @return array $result : This is result
|
||||||
|
*/
|
||||||
|
function userListing($searchText = '', $page, $segment)
|
||||||
|
{
|
||||||
|
$this->db->select('BaseTbl.userId, BaseTbl.email, BaseTbl.name, BaseTbl.mobile, Role.role');
|
||||||
|
$this->db->from('Tab_Users as BaseTbl');
|
||||||
|
$this->db->join('Tab_Roles as Role', 'Role.roleId = BaseTbl.roleId','left');
|
||||||
|
if(!empty($searchText)) {
|
||||||
|
$likeCriteria = "(BaseTbl.email LIKE '%".$searchText."%'
|
||||||
|
OR BaseTbl.name LIKE '%".$searchText."%'
|
||||||
|
OR BaseTbl.mobile LIKE '%".$searchText."%')";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
$this->db->where('BaseTbl.isDeleted', 0);
|
||||||
|
$this->db->where('BaseTbl.roleId !=', 1);
|
||||||
|
$this->db->limit($page, $segment);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
$result = $query->result();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to get the user roles information
|
||||||
|
* @return array $result : This is result of the query
|
||||||
|
*/
|
||||||
|
function getUserRoles()
|
||||||
|
{
|
||||||
|
$this->db->select('roleId, role');
|
||||||
|
$this->db->from('Tab_Roles');
|
||||||
|
$this->db->where('roleId !=', 1);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to check whether email id is already exist or not
|
||||||
|
* @param {string} $email : This is email id
|
||||||
|
* @param {number} $userId : This is user id
|
||||||
|
* @return {mixed} $result : This is searched result
|
||||||
|
*/
|
||||||
|
function checkEmailExists($email, $userId = 0)
|
||||||
|
{
|
||||||
|
$this->db->select("email");
|
||||||
|
$this->db->from("Tab_Users");
|
||||||
|
$this->db->where("email", $email);
|
||||||
|
$this->db->where("isDeleted", 0);
|
||||||
|
if($userId != 0){
|
||||||
|
$this->db->where("userId !=", $userId);
|
||||||
|
}
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to add new user to system
|
||||||
|
* @return number $insert_id : This is last inserted id
|
||||||
|
*/
|
||||||
|
function addNewUser($userInfo)
|
||||||
|
{
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->insert('Tab_Users', $userInfo);
|
||||||
|
|
||||||
|
$insert_id = $this->db->insert_id();
|
||||||
|
|
||||||
|
$this->db->trans_complete();
|
||||||
|
|
||||||
|
return $insert_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to get user information by id
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
* @return array $result : This is user information
|
||||||
|
*/
|
||||||
|
function getUserInfo($userId)
|
||||||
|
{
|
||||||
|
$this->db->select('userId, name, email, mobile, roleId');
|
||||||
|
$this->db->from('Tab_Users');
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$this->db->where('roleId !=', 1);
|
||||||
|
$this->db->where('userId', $userId);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to update the user information
|
||||||
|
* @param array $userInfo : This is users updated information
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
*/
|
||||||
|
function editUser($userInfo, $userId)
|
||||||
|
{
|
||||||
|
$this->db->where('userId', $userId);
|
||||||
|
$this->db->update('Tab_Users', $userInfo);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to delete the user information
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
* @return boolean $result : TRUE / FALSE
|
||||||
|
*/
|
||||||
|
function deleteUser($userId, $userInfo)
|
||||||
|
{
|
||||||
|
$this->db->where('userId', $userId);
|
||||||
|
$this->db->update('Tab_Users', $userInfo);
|
||||||
|
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to match users password for change password
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
*/
|
||||||
|
function matchOldPassword($userId, $oldPassword)
|
||||||
|
{
|
||||||
|
$this->db->select('userId, password');
|
||||||
|
$this->db->where('userId', $userId);
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$query = $this->db->get('Tab_Users');
|
||||||
|
|
||||||
|
$user = $query->result();
|
||||||
|
|
||||||
|
if(!empty($user)){
|
||||||
|
if(verifyHashedPassword($oldPassword, $user[0]->password)){
|
||||||
|
return $user;
|
||||||
|
} else {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to change users password
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
* @param array $userInfo : This is user updation info
|
||||||
|
*/
|
||||||
|
function changePassword($userId, $userInfo)
|
||||||
|
{
|
||||||
|
$this->db->where('userId', $userId);
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$this->db->update('Tab_Users', $userInfo);
|
||||||
|
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to get user login history
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
*/
|
||||||
|
function loginHistoryCount($userId, $searchText, $fromDate, $toDate)
|
||||||
|
{
|
||||||
|
$this->db->select('BaseTbl.userId, BaseTbl.sessionData, BaseTbl.machineIp, BaseTbl.userAgent, BaseTbl.agentString, BaseTbl.platform, BaseTbl.createdDtm');
|
||||||
|
if(!empty($searchText)) {
|
||||||
|
$likeCriteria = "(BaseTbl.email LIKE '%".$searchText."%')";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
if(!empty($fromDate)) {
|
||||||
|
$likeCriteria = "DATE_FORMAT(BaseTbl.createdDtm, '%Y-%m-%d' ) >= '".date('Y-m-d', strtotime($fromDate))."'";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
if(!empty($toDate)) {
|
||||||
|
$likeCriteria = "DATE_FORMAT(BaseTbl.createdDtm, '%Y-%m-%d' ) <= '".date('Y-m-d', strtotime($toDate))."'";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
$this->db->where('BaseTbl.userId', $userId);
|
||||||
|
$this->db->from('Tab_LastLogin as BaseTbl');
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->num_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to get user login history
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
* @param number $page : This is pagination offset
|
||||||
|
* @param number $segment : This is pagination limit
|
||||||
|
* @return array $result : This is result
|
||||||
|
*/
|
||||||
|
function loginHistory($userId, $searchText, $fromDate, $toDate, $page, $segment)
|
||||||
|
{
|
||||||
|
$this->db->select('BaseTbl.userId, BaseTbl.sessionData, BaseTbl.machineIp, BaseTbl.userAgent, BaseTbl.agentString, BaseTbl.platform, BaseTbl.createdDtm');
|
||||||
|
$this->db->from('Tab_LastLogin as BaseTbl');
|
||||||
|
if(!empty($searchText)) {
|
||||||
|
$likeCriteria = "(BaseTbl.email LIKE '%".$searchText."%')";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
if(!empty($fromDate)) {
|
||||||
|
$likeCriteria = "DATE_FORMAT(BaseTbl.createdDtm, '%Y-%m-%d' ) >= '".date('Y-m-d', strtotime($fromDate))."'";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
if(!empty($toDate)) {
|
||||||
|
$likeCriteria = "DATE_FORMAT(BaseTbl.createdDtm, '%Y-%m-%d' ) <= '".date('Y-m-d', strtotime($toDate))."'";
|
||||||
|
$this->db->where($likeCriteria);
|
||||||
|
}
|
||||||
|
$this->db->where('BaseTbl.userId', $userId);
|
||||||
|
$this->db->order_by('BaseTbl.id', 'DESC');
|
||||||
|
$this->db->limit($page, $segment);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
$result = $query->result();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function used to get user information by id
|
||||||
|
* @param number $userId : This is user id
|
||||||
|
* @return array $result : This is user information
|
||||||
|
*/
|
||||||
|
function getUserInfoById($userId)
|
||||||
|
{
|
||||||
|
$this->db->select('userId, name, email, mobile, roleId');
|
||||||
|
$this->db->from('Tab_Users');
|
||||||
|
$this->db->where('isDeleted', 0);
|
||||||
|
$this->db->where('userId', $userId);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1,315 +0,0 @@
|
|||||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class User_model extends CI_Model
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to get the user listing count
|
|
||||||
* @param string $searchText : This is optional search text
|
|
||||||
* @param number $page : This is pagination offset
|
|
||||||
* @param number $segment : This is pagination limit
|
|
||||||
* @return array $result : This is result
|
|
||||||
*/
|
|
||||||
function userListing()
|
|
||||||
{
|
|
||||||
$this->db->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,
|
|
||||||
DEPT.DEPCode,DEPT.DepartmentName,role.role,user.userId');
|
|
||||||
$this->db->from('T_Employee_Details EMP');
|
|
||||||
$this->db->join('T_DepartmentDetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode');
|
|
||||||
$this->db->join('tbl_users user', 'user.EmpID = EMP.EmpID');
|
|
||||||
$this->db->join('tbl_roles role', 'user.roleId = role.roleId');
|
|
||||||
|
|
||||||
|
|
||||||
$this->db->where('user.isDeleted !=', 1);
|
|
||||||
|
|
||||||
$query = $this->db->get();
|
|
||||||
|
|
||||||
$result = $query->result();
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetRoleNameByUserID($UserId)
|
|
||||||
{
|
|
||||||
$subQuery = 'select roleId, role from tbl_roles
|
|
||||||
where roleId = (select roleId from tbl_users where userId=?)';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery, array($UserId));
|
|
||||||
|
|
||||||
|
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This function is used to get the user roles information
|
|
||||||
* @return array $result : This is result of the query
|
|
||||||
*/
|
|
||||||
function getUserRoles()
|
|
||||||
{
|
|
||||||
$this->db->select('roleId, role');
|
|
||||||
$this->db->from('tbl_roles');
|
|
||||||
$this->db->where("roleid <", 4);
|
|
||||||
$query = $this->db->get();
|
|
||||||
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to check whether email id is already exist or not
|
|
||||||
* @param {string} $email : This is email id
|
|
||||||
* @param {number} $userId : This is user id
|
|
||||||
* @return {mixed} $result : This is searched result
|
|
||||||
*/
|
|
||||||
function checkEmailExists($email, $userId = 0)
|
|
||||||
{
|
|
||||||
$this->db->select("email");
|
|
||||||
$this->db->from("tbl_users");
|
|
||||||
$this->db->where("email", $email);
|
|
||||||
$this->db->where("isDeleted", 0);
|
|
||||||
if($userId != 0){
|
|
||||||
$this->db->where("userId !=", $userId);
|
|
||||||
}
|
|
||||||
$query = $this->db->get();
|
|
||||||
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to add new user to system
|
|
||||||
* @return number $insert_id : This is last inserted id
|
|
||||||
*/
|
|
||||||
function addNewUser($userInfo)
|
|
||||||
{
|
|
||||||
|
|
||||||
$this->db->trans_start();
|
|
||||||
$this->db->insert('tbl_users', $userInfo);
|
|
||||||
|
|
||||||
$insert_id = $this->db->affected_rows();
|
|
||||||
|
|
||||||
$this->db->trans_complete();
|
|
||||||
|
|
||||||
return $insert_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function used to get user information by id
|
|
||||||
* @param number $userId : This is user id
|
|
||||||
* @return array $result : This is user information
|
|
||||||
*/
|
|
||||||
function getUserInfo($userId)
|
|
||||||
{
|
|
||||||
$this->db->select('userId, name, email, mobile, roleId,isDeleted');
|
|
||||||
$this->db->from('tbl_users');
|
|
||||||
$this->db->where('isDeleted', 0);
|
|
||||||
$this->db->where('roleId !=', 1);
|
|
||||||
$this->db->where('userId', $userId);
|
|
||||||
$query = $this->db->get();
|
|
||||||
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to update the user information
|
|
||||||
* @param array $userInfo : This is users updated information
|
|
||||||
* @param number $userId : This is user id
|
|
||||||
*/
|
|
||||||
function editUser($userInfo, $userId)
|
|
||||||
{
|
|
||||||
$this->db->where('EmpID', $userId);
|
|
||||||
$this->db->update('tbl_users', $userInfo);
|
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to delete the user information
|
|
||||||
* @param number $userId : This is user id
|
|
||||||
* @return boolean $result : TRUE / FALSE
|
|
||||||
*/
|
|
||||||
function deleteUser($userId, $userInfo)
|
|
||||||
{
|
|
||||||
$this->db->where('userId', $userId);
|
|
||||||
$this->db->update('tbl_users', $userInfo);
|
|
||||||
|
|
||||||
return $this->db->affected_rows();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to match users password for change password
|
|
||||||
* @param number $userId : This is user id
|
|
||||||
*/
|
|
||||||
function matchOldPassword($userId, $oldPassword)
|
|
||||||
{
|
|
||||||
$this->db->select('userId, password');
|
|
||||||
$this->db->where('userId', $userId);
|
|
||||||
$this->db->where('isDeleted', 0);
|
|
||||||
$query = $this->db->get('tbl_users');
|
|
||||||
|
|
||||||
$user = $query->result();
|
|
||||||
|
|
||||||
if(!empty($user)){
|
|
||||||
if(verifyHashedPassword($oldPassword, $user[0]->password)){
|
|
||||||
return $user;
|
|
||||||
} else {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is used to change users password
|
|
||||||
* @param number $userId : This is user id
|
|
||||||
* @param array $userInfo : This is user updation info
|
|
||||||
*/
|
|
||||||
function changePassword($userId, $userInfo)
|
|
||||||
{
|
|
||||||
$this->db->where('userId', $userId);
|
|
||||||
$this->db->where('isDeleted', 0);
|
|
||||||
$this->db->update('tbl_users', $userInfo);
|
|
||||||
|
|
||||||
return $this->db->affected_rows();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This function is used to get Employee details based on Employee ID Selection
|
|
||||||
* @return array $result : This is result of the query
|
|
||||||
*/
|
|
||||||
function GetEmployeeDetails($UserId)
|
|
||||||
{
|
|
||||||
//echo $UserId;
|
|
||||||
$subQuery = 'select EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName from
|
|
||||||
T_Employee_Details EMP join T_DepartmentDetails DEPT on
|
|
||||||
EMP.Departmentcode = DEPT.DEPCode where EMP.EmpID= (select EmpID from tbl_users where userId=?)';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery, array($UserId));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This function is used to get the All employees
|
|
||||||
* @return array $result : This is result of the query
|
|
||||||
*/
|
|
||||||
function getAllEmployees()
|
|
||||||
{
|
|
||||||
/*$this->db->select('EmpID,FirstName,LastName');
|
|
||||||
$this->db->from('T_Employee_Details');
|
|
||||||
$query = $this->db->get();
|
|
||||||
|
|
||||||
return $query->result(); */
|
|
||||||
$this->db->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName');
|
|
||||||
$this->db->from('T_Employee_Details EMP');
|
|
||||||
$this->db->join('T_DepartmentDetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode');
|
|
||||||
$this->db->where('EMP.IsActive ',1 );
|
|
||||||
$query = $this->db->get();
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function addAccess($userdept)
|
|
||||||
{
|
|
||||||
$this->db->trans_start();
|
|
||||||
$this->db->insert('T_AccessDepartments', $userdept);
|
|
||||||
|
|
||||||
$insert_id = $this->db->affected_rows();
|
|
||||||
|
|
||||||
$this->db->trans_complete();
|
|
||||||
|
|
||||||
return $insert_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function DeleteAccess($empid,$Depcode)
|
|
||||||
{
|
|
||||||
$this->db->where("Departmentcode",$Depcode);
|
|
||||||
$this->db->where("EmpID",$empid);
|
|
||||||
$this->db->delete('T_AccessDepartments');
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//this function used to delivery performances
|
|
||||||
|
|
||||||
function deliver_perform($fa,$aa,$m)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$sql="select ip_invoices.*,ip_invoice_items.item_quantity as qty,
|
|
||||||
ip_clients.* from ip_invoices
|
|
||||||
join ip_clients on ip_clients.client_id=ip_invoices.client_id
|
|
||||||
join ip_invoice_items on ip_invoice_items .invoice_id =ip_invoices.invoice_id
|
|
||||||
join ip_invoice_custom icf on icf.invoice_id = ip_invoices.invoice_id
|
|
||||||
where icf.invoice_custom_fieldid = 8 and ip_invoices.invoice_status_id != 1";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($fa and $aa != ''){
|
|
||||||
|
|
||||||
$sql.=" and (ip_invoices.invoice_date_created >= '".$fa."-04-01' and ip_invoices.invoice_date_created <= '".$aa."-03-31')";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($m!= ''){
|
|
||||||
|
|
||||||
$sql.=" and monthname(ip_invoices.invoice_date_created) = '".$m."'";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= " ORDER BY ip_invoices.invoice_date_created DESC";
|
|
||||||
$query = $this->db->query($sql);
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fincalYear()
|
|
||||||
{
|
|
||||||
$sql="SELECT
|
|
||||||
CASE WHEN MONTH(invoice_date_created)>=4 THEN
|
|
||||||
concat(YEAR(invoice_date_created), '-',YEAR(invoice_date_created)+1)
|
|
||||||
ELSE concat(YEAR(invoice_date_created)-1,'-', YEAR(invoice_date_created)) END AS financial_year
|
|
||||||
FROM ip_invoices
|
|
||||||
GROUP BY financial_year ";
|
|
||||||
|
|
||||||
$query = $this->db->query($sql);
|
|
||||||
//print_r($query->result());
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
*fav model
|
|
||||||
*/
|
|
||||||
function favouriteadd($favourite)
|
|
||||||
|
|
||||||
{ //echo $favourite['Menu_ID'];die;
|
|
||||||
if($favourite['Menu_ID'] !=''){
|
|
||||||
//echo "if";
|
|
||||||
|
|
||||||
// $this->db->where('id', $id);
|
|
||||||
// return $this->db->delete('employee');
|
|
||||||
$this->db->where('Menu_ID',$favourite['Menu_ID']);
|
|
||||||
$this->db->delete('T_fav_add');
|
|
||||||
|
|
||||||
}else{
|
|
||||||
//echo "else";
|
|
||||||
|
|
||||||
$this->db->insert('T_fav_add',$favourite);
|
|
||||||
$r = $this->db->affected_rows();
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,15 +1,46 @@
|
|||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
404
|
404 Error Page
|
||||||
<small>This is not the page you are looking for</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
|
<!-- <ol class="breadcrumb">
|
||||||
|
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
|
<li><a href="#">Examples</a></li>
|
||||||
|
<li class="active">404 error</li>
|
||||||
|
</ol> -->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row">
|
<div class="error-page">
|
||||||
<div class="col-xs-12 text-center">
|
<h2 class="headline text-yellow"> 404</h2>
|
||||||
<img src="<?php echo base_url() ?>assets/images/404.png" alt="Page Not Found Image" />
|
|
||||||
|
<div class="error-content">
|
||||||
|
<h3><i class="fa fa-warning text-yellow"></i> Oops! Page not found.</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We could not find the page you were looking for.
|
||||||
|
Meanwhile, you may <a href="<?php echo base_url(); ?>Routes">return to dashboard</a> or try using the search form.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form class="search-form">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" name="search" class="form-control" placeholder="Search">
|
||||||
|
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<button type="submit" name="submit" class="btn btn-warning btn-flat"><i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.input-group -->
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.error-page -->
|
||||||
</section>
|
</section>
|
||||||
</div>
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
47
application/views/500.php
Executable file
47
application/views/500.php
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
500 Error Page
|
||||||
|
</h1>
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
|
<li><a href="#">Examples</a></li>
|
||||||
|
<li class="active">500 error</li>
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="error-page">
|
||||||
|
<h2 class="headline text-red">500</h2>
|
||||||
|
|
||||||
|
<div class="error-content">
|
||||||
|
<h3><i class="fa fa-warning text-red"></i> Oops! Something went wrong.</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We will work on fixing that right away.
|
||||||
|
Meanwhile, you may <a href="../../index.html">return to dashboard</a> or try using the search form.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form class="search-form">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" name="search" class="form-control" placeholder="Search">
|
||||||
|
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<button type="submit" name="submit" class="btn btn-danger btn-flat"><i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.input-group -->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.error-page -->
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
87
application/views/UsersListing.php
Normal file
87
application/views/UsersListing.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<i class="fa fa-users"></i> User Management
|
||||||
|
<small>Add, Edit, Delete</small>
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 text-right">
|
||||||
|
<div class="form-group">
|
||||||
|
<a class="btn btn-primary" href="<?php echo base_url(); ?>addNew"><i class="fa fa-plus"></i> Add New</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title">Users List</h3>
|
||||||
|
<div class="box-tools">
|
||||||
|
<form action="<?php echo base_url() ?>userListing" method="POST" id="searchList">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" name="searchText" value="<?php echo $searchText; ?>" class="form-control input-sm pull-right" style="width: 150px;" placeholder="Search"/>
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<button class="btn btn-sm btn-default searchList"><i class="fa fa-search"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive no-padding">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tr>
|
||||||
|
<th>Id</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Mobile</th>
|
||||||
|
<th>Role</th>
|
||||||
|
<th class="text-center">Actions</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if(!empty($userRecords))
|
||||||
|
{
|
||||||
|
foreach($userRecords as $record)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $record->userId ?></td>
|
||||||
|
<td><?php echo $record->name ?></td>
|
||||||
|
<td><?php echo $record->email ?></td>
|
||||||
|
<td><?php echo $record->mobile ?></td>
|
||||||
|
<td><?php echo $record->role ?></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<a class="btn btn-sm btn-primary" href="<?= base_url().'login-history/'.$record->userId; ?>" title="Login history"><i class="fa fa-history"></i></a> |
|
||||||
|
<a class="btn btn-sm btn-info" href="<?php echo base_url().'editOld/'.$record->userId; ?>" title="Edit"><i class="fa fa-pencil"></i></a>
|
||||||
|
<a class="btn btn-sm btn-danger deleteUser" href="#" data-userid="<?php echo $record->userId; ?>" title="Delete"><i class="fa fa-trash"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
<div class="box-footer clearfix">
|
||||||
|
<?php echo $this->pagination->create_links(); ?>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function(){
|
||||||
|
jQuery('ul.pagination li a').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var link = jQuery(this).get(0).href;
|
||||||
|
var value = link.substring(link.lastIndexOf('/') + 1);
|
||||||
|
jQuery("#searchList").attr("action", baseURL + "userListing/" + value);
|
||||||
|
jQuery("#searchList").submit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -1,15 +1,45 @@
|
|||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
Access Denied
|
Access Denied
|
||||||
<small>You are not authorize user to use this</small>
|
|
||||||
</h1>
|
</h1>
|
||||||
|
<!-- <ol class="breadcrumb">
|
||||||
|
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||||
|
<li><a href="#">Examples</a></li>
|
||||||
|
<li class="active">404 error</li>
|
||||||
|
</ol> -->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row">
|
<div class="error-page">
|
||||||
<div class="col-xs-12 text-center">
|
<h2 class="headline text-yellow"> Access Denied</h2>
|
||||||
<img src="<?php echo base_url() ?>assets/images/access.png" alt="Access Denied Image" />
|
|
||||||
|
<div class="error-content">
|
||||||
|
<h3><i class="fa fa-warning text-yellow"></i> Oops! Page not found.</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You are not authorize user to use this
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form class="search-form">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" name="search" class="form-control" placeholder="Search">
|
||||||
|
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<button type="submit" name="submit" class="btn btn-warning btn-flat"><i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.input-group -->
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.error-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.error-page -->
|
||||||
</section>
|
</section>
|
||||||
</div>
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
125
application/views/addUser.php
Normal file
125
application/views/addUser.php
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<i class="fa fa-users"></i> User Management
|
||||||
|
<small>Add / Edit User</small>
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- left column -->
|
||||||
|
<div class="col-md-8">
|
||||||
|
<!-- general form elements -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title">Enter User Details</h3>
|
||||||
|
</div><!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
|
<?php $this->load->helper("form"); ?>
|
||||||
|
<form role="form" id="addUser" action="<?php echo base_url() ?>addNewUser" method="post" role="form">
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="fname">Full Name</label>
|
||||||
|
<input type="text" class="form-control required" value="<?php echo set_value('fname'); ?>" id="fname" name="fname" maxlength="128">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">Email address</label>
|
||||||
|
<input type="text" class="form-control required email" id="email" value="<?php echo set_value('email'); ?>" name="email" maxlength="128">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input type="password" class="form-control required" id="password" name="password" maxlength="20">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="cpassword">Confirm Password</label>
|
||||||
|
<input type="password" class="form-control required equalTo" id="cpassword" name="cpassword" maxlength="20">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="mobile">Mobile Number</label>
|
||||||
|
<input type="text" class="form-control required digits" id="mobile" value="<?php echo set_value('mobile'); ?>" name="mobile" maxlength="10">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="role">Role</label>
|
||||||
|
<select class="form-control required" id="role" name="role">
|
||||||
|
<option value="0">Select Role</option>
|
||||||
|
<?php
|
||||||
|
if(!empty($roles))
|
||||||
|
{
|
||||||
|
foreach ($roles as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->roleId ?>" <?php if($rl->roleId == set_value('role')) {echo "selected=selected";} ?>><?php echo $rl->role ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
|
||||||
|
<div class="box-footer">
|
||||||
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
||||||
|
<input type="reset" class="btn btn-default" value="Reset" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?php
|
||||||
|
$this->load->helper('form');
|
||||||
|
$error = $this->session->flashdata('error');
|
||||||
|
if($error)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $this->session->flashdata('error'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
$success = $this->session->flashdata('success');
|
||||||
|
if($success)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $this->session->flashdata('success'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script src="<?php echo base_url(); ?>assets/js/addUser.js" type="text/javascript"></script>
|
||||||
250
application/views/changePassword.php
Normal file
250
application/views/changePassword.php
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.designinput {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
.slide-up {
|
||||||
|
display: inline-block;
|
||||||
|
width: 260px;
|
||||||
|
padding: 10px 0 10px 30px;
|
||||||
|
font-family: "Open Sans", sans;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #377D6A;
|
||||||
|
background: #efefef;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 3px;
|
||||||
|
outline: 0;
|
||||||
|
text-indent: 80px;
|
||||||
|
transition: all .3s ease-in-out;
|
||||||
|
}
|
||||||
|
.slide-up::-webkit-input-placeholder {
|
||||||
|
color: #efefef;
|
||||||
|
text-indent: 0;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
.slide-up + label {
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
transform: translateX(0);
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
padding: 10px 15px;
|
||||||
|
text-shadow: 0 1px 0 rgba(19, 74, 70, 0.4);
|
||||||
|
transition: all .3s ease-in-out;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.slide-up + label:before, .slide-up + label:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -1;
|
||||||
|
transition: all .3s ease-in-out;
|
||||||
|
}
|
||||||
|
.slide-up + label:before {
|
||||||
|
top: 6px;
|
||||||
|
left: 5px;
|
||||||
|
right: 5px;
|
||||||
|
bottom: 6px;
|
||||||
|
background: #df2769;
|
||||||
|
}
|
||||||
|
.slide-up + label:after {
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgb(177, 177, 177);
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(1) .slide-up {
|
||||||
|
text-indent: 105px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(3) .slide-up {
|
||||||
|
text-indent: 125px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(1) .slide-up:focus,
|
||||||
|
span:nth-child(1) .slide-up:active,
|
||||||
|
span:nth-child(3) .slide-up:focus,
|
||||||
|
span:nth-child(3) .slide-up:active {
|
||||||
|
text-indent: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-up:focus,
|
||||||
|
.slide-up:active {
|
||||||
|
color: #377D6A;
|
||||||
|
text-indent: 0;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.slide-up:focus::-webkit-input-placeholder,
|
||||||
|
.slide-up:active::-webkit-input-placeholder {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
.slide-up:focus + label,
|
||||||
|
.slide-up:active + label {
|
||||||
|
transform: translateY(-100%);
|
||||||
|
}
|
||||||
|
.slide-up:focus + label:before,
|
||||||
|
.slide-up:active + label:before {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.slide-up:focus + label:after,
|
||||||
|
.slide-up:active + label:after {
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.btn-primary:hover, .btn-primary:active, .btn-primary.hover{
|
||||||
|
background-color: #087322;
|
||||||
|
}
|
||||||
|
.btn-primary12:hover, .btn-primary12:active, .btn-primary12.hover{
|
||||||
|
background-color: #FFC107;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.btn-primary{
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(18, 187, 23, 0.75);
|
||||||
|
border-color: rgba(18, 187, 23, 0.75);
|
||||||
|
box-shadow: 0 2px 2px 0 rgba(233,30,99,.14), 0 3px 1px -2px rgba(233,30,99,.2), 0 1px 5px 0 rgba(233,30,99,.12);
|
||||||
|
/*position: relative;*/
|
||||||
|
padding: 10px 19px;
|
||||||
|
margin: 0.3125rem 1px;
|
||||||
|
min-width: auto;
|
||||||
|
font-size: 1.20rem;
|
||||||
|
font-weight: 800;
|
||||||
|
line-height: 1.428571;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
vertical-align: middle;
|
||||||
|
letter-spacing: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 0;
|
||||||
|
border-radius: .2rem;
|
||||||
|
outline: 0;
|
||||||
|
transition: box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1);
|
||||||
|
/*will-change: box-shadow,transform;*/
|
||||||
|
}
|
||||||
|
.btn-primary12{
|
||||||
|
color: #fff;
|
||||||
|
background-color:#f2b865;
|
||||||
|
border-color: #f2b865;
|
||||||
|
box-shadow: 0 2px 2px 0 rgba(233,30,99,.14), 0 3px 1px -2px rgba(233,30,99,.2), 0 1px 5px 0 rgba(233,30,99,.12);
|
||||||
|
/*position: relative;*/
|
||||||
|
padding: 10px 19px;
|
||||||
|
margin: 0.3125rem 1px;
|
||||||
|
min-width: auto;
|
||||||
|
font-size: 1.20rem;
|
||||||
|
font-weight: 800;
|
||||||
|
line-height: 1.428571;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
vertical-align: middle;
|
||||||
|
letter-spacing: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 0;
|
||||||
|
border-radius: .2rem;
|
||||||
|
outline: 0;
|
||||||
|
transition: box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1);
|
||||||
|
/*will-change: box-shadow,transform;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.or-button{
|
||||||
|
position: relative;
|
||||||
|
margin: -13px;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 5px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 38px;
|
||||||
|
}
|
||||||
|
.box-title-box{
|
||||||
|
margin-left: 18px;
|
||||||
|
background: linear-gradient(60deg,#ec407a,#d81b60);
|
||||||
|
box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(233,30,99,.4);
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 13px;
|
||||||
|
margin-top: -50px;
|
||||||
|
margin-right: 15px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
<div class="content-wrapper" style="background-color: #eee;">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
</section>
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content" style="margin-top: 50px;">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-offset-1 col-md-10">
|
||||||
|
<div class="box box-solid" style="box-shadow:0 1px 4px 0 rgba(0,0,0,.14);padding: 20px;">
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="row">
|
||||||
|
<h3 class="box-title-box">Change Password</h3>
|
||||||
|
</div>
|
||||||
|
<!-- form start -->
|
||||||
|
<form role="form" action="<?php echo base_url() ?>changePassword" method="post" style="padding:40px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 designinput">
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="slide-up" id="inputOldPassword" name="oldPassword" type="password" placeholder="Old password" maxlength="20" required /><label for="inputPassword1">Old Password</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr><br>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5 designinput">
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="slide-up" id="inputPassword1" name="newPassword" type="password" placeholder="New password" maxlength="20" required /><label for="inputPassword1">New Password</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-5 designinput">
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="slide-up" id="inputPassword2" name="cNewPassword"type="password" placeholder="Confirm password" maxlength="20" width="48" required><label for="inputPassword2">Confirm New Password</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding-top:15px;">
|
||||||
|
<div class="col-md-offset-8 col-md-4">
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
<div class="or-button">Or</div>
|
||||||
|
<button type="submit" class="btn btn-primary12">Reset</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
|
</div>
|
||||||
|
<!-- ./col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?php echo base_url(); ?>assets/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
@ -200,11 +200,11 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<h3 class="box-title-box">City Master</h3>
|
<h3 class="box-title-box">City Master</h3>
|
||||||
</div>
|
</div>
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
<form role="form" style="padding:40px;">
|
<form role="form" action="<?php echo base_url() ?>Add_city_master" method="post" style="padding:40px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5 designinput">
|
<div class="col-md-5 designinput">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="slide-up" id="card" type="text" placeholder="Enter city name" /><label for="card">City Name</label>
|
<input class="slide-up" id="card" name="CityName" type="text" placeholder="Enter city name" /><label for="City Name">City Name</label>
|
||||||
|
|
||||||
<!--<label for="exampleInputcountryname">Country Name</label>
|
<!--<label for="exampleInputcountryname">Country Name</label>
|
||||||
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
||||||
@ -214,14 +214,14 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label for="Description">Description</label>
|
<label for="Description">Description</label>
|
||||||
<textarea class="form-control" rows="3" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
<textarea class="form-control" rows="3" name="CitiesDescription" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="padding-top:15px;">
|
<div class="row" style="padding-top:15px;">
|
||||||
<div class="col-md-offset-8 col-md-4">
|
<div class="col-md-offset-8 col-md-4">
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
<div class="or-button">Or</div>
|
<div class="or-button">Or</div>
|
||||||
<button type="submit" class="btn btn-primary12">Reset</button>
|
<button type="reset" class="btn btn-primary12">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -200,11 +200,11 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<h3 class="box-title-box">Country Master</h3>
|
<h3 class="box-title-box">Country Master</h3>
|
||||||
</div>
|
</div>
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
<form role="form" style="padding:40px;">
|
<form role="form" action="<?php echo base_url() ?>Add_country_master" method="post" style="padding:40px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5 designinput">
|
<div class="col-md-5 designinput">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="slide-up" id="card" type="text" placeholder="Enter country name" /><label for="card">Country Name</label>
|
<input class="slide-up" id="card" name="CountryName" type="text" placeholder="Enter country name" /><label for="CountryName">Country Name</label>
|
||||||
|
|
||||||
<!--<label for="exampleInputcountryname">Country Name</label>
|
<!--<label for="exampleInputcountryname">Country Name</label>
|
||||||
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
||||||
@ -212,7 +212,7 @@ span:nth-child(3) .slide-up:active {
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 designinput">
|
<div class="col-md-5 designinput">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="slide-up" id="expires" type="text" placeholder="Enter country capital" /><label for="expires">Country Capital</label>
|
<input class="slide-up" id="expires" name="CapitalCity" type="text" placeholder="Enter country capital" /><label for="expires">Country Capital</label>
|
||||||
|
|
||||||
<!--<label for="exampleInputcountrycapital">Country Capital</label>
|
<!--<label for="exampleInputcountrycapital">Country Capital</label>
|
||||||
<input type="text" class="form-control" id="exampleInputcountrycapital" placeholder="Enter country capital">-->
|
<input type="text" class="form-control" id="exampleInputcountrycapital" placeholder="Enter country capital">-->
|
||||||
@ -222,7 +222,7 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label for="Description">Description</label>
|
<label for="Description">Description</label>
|
||||||
<textarea id="editor1" name="editor1" rows="10" cols="120">
|
<textarea id="editor1" name="Editor" rows="10" cols="120">
|
||||||
This is my textarea to be replaced with CKEditor.
|
This is my textarea to be replaced with CKEditor.
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
@ -239,7 +239,7 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<div class="col-md-offset-6 col-md-4">
|
<div class="col-md-offset-6 col-md-4">
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
<div class="or-button">Or</div>
|
<div class="or-button">Or</div>
|
||||||
<button type="submit" class="btn btn-primary12">Reset</button>
|
<button type="reset" class="btn btn-primary12">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -200,11 +200,11 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<h3 class="box-title-box">Document Master</h3>
|
<h3 class="box-title-box">Document Master</h3>
|
||||||
</div>
|
</div>
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
<form role="form" style="padding:40px;">
|
<form role="form" action="<?php echo base_url() ?>Add_document_master" method="post" style="padding:40px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5 designinput">
|
<div class="col-md-5 designinput">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="slide-up" id="card" type="text" placeholder="Enter visa name" /><label for="card">Document Name</label>
|
<input class="slide-up" id="card" name="DocumentName" type="text" placeholder="Enter Document name" /><label for="card">Document Name</label>
|
||||||
|
|
||||||
<!--<label for="exampleInputcountryname">Country Name</label>
|
<!--<label for="exampleInputcountryname">Country Name</label>
|
||||||
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
||||||
@ -214,7 +214,7 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputcountryname">Document Upload</label>
|
<label for="exampleInputcountryname">Document Upload</label>
|
||||||
|
|
||||||
<input id="card" type="file" />
|
<input type="file" name="DocumentFile" id="Document" accept=".JPG,.PNG,.PDF" />
|
||||||
|
|
||||||
<!--<label for="exampleInputcountryname">Country Name</label>
|
<!--<label for="exampleInputcountryname">Country Name</label>
|
||||||
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
||||||
@ -224,14 +224,14 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label for="Description">Description</label>
|
<label for="Description">Description</label>
|
||||||
<textarea class="form-control" rows="3" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
<textarea class="form-control" rows="3" name="Description" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="padding-top:15px;">
|
<div class="row" style="padding-top:15px;">
|
||||||
<div class="col-md-offset-8 col-md-4">
|
<div class="col-md-offset-8 col-md-4">
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
<div class="or-button">Or</div>
|
<div class="or-button">Or</div>
|
||||||
<button type="submit" class="btn btn-primary12">Reset</button>
|
<button type="reset" class="btn btn-primary12">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -250,3 +250,22 @@ span:nth-child(3) .slide-up:active {
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.content-wrapper -->
|
<!-- /.content-wrapper -->
|
||||||
|
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?php echo base_url(); ?>assets/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// function readURL(input) {
|
||||||
|
// if (input.files && input.files[0]) {
|
||||||
|
// var reader = new FileReader();
|
||||||
|
|
||||||
|
// reader.onload = function (e) {
|
||||||
|
// $('#profilepicture')
|
||||||
|
// .attr('src', e.target.result)
|
||||||
|
// .width(180)
|
||||||
|
// .height(180);
|
||||||
|
// };
|
||||||
|
|
||||||
|
// reader.readAsDataURL(input.files[0]);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
</script>
|
||||||
149
application/views/editUser.php
Normal file
149
application/views/editUser.php
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$userId = '';
|
||||||
|
$name = '';
|
||||||
|
$email = '';
|
||||||
|
$mobile = '';
|
||||||
|
$roleId = '';
|
||||||
|
|
||||||
|
if(!empty($userInfo))
|
||||||
|
{
|
||||||
|
foreach ($userInfo as $uf)
|
||||||
|
{
|
||||||
|
$userId = $uf->userId;
|
||||||
|
$name = $uf->name;
|
||||||
|
$email = $uf->email;
|
||||||
|
$mobile = $uf->mobile;
|
||||||
|
$roleId = $uf->roleId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<i class="fa fa-users"></i> User Management
|
||||||
|
<small>Add / Edit User</small>
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- left column -->
|
||||||
|
<div class="col-md-8">
|
||||||
|
<!-- general form elements -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title">Enter User Details</h3>
|
||||||
|
</div><!-- /.box-header -->
|
||||||
|
<!-- form start -->
|
||||||
|
|
||||||
|
<form role="form" action="<?php echo base_url() ?>editUser" method="post" id="editUser" role="form">
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="fname">Full Name</label>
|
||||||
|
<input type="text" class="form-control" id="fname" placeholder="Full Name" name="fname" value="<?php echo $name; ?>" maxlength="128">
|
||||||
|
<input type="hidden" value="<?php echo $userId; ?>" name="userId" id="userId" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">Email address</label>
|
||||||
|
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email" value="<?php echo $email; ?>" maxlength="128">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input type="password" class="form-control" id="password" placeholder="Password" name="password" maxlength="20">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="cpassword">Confirm Password</label>
|
||||||
|
<input type="password" class="form-control" id="cpassword" placeholder="Confirm Password" name="cpassword" maxlength="20">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="mobile">Mobile Number</label>
|
||||||
|
<input type="text" class="form-control" id="mobile" placeholder="Mobile Number" name="mobile" value="<?php echo $mobile; ?>" maxlength="10">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="role">Role</label>
|
||||||
|
<select class="form-control" id="role" name="role">
|
||||||
|
<option value="0">Select Role</option>
|
||||||
|
<?php
|
||||||
|
if(!empty($roles))
|
||||||
|
{
|
||||||
|
foreach ($roles as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->roleId; ?>" <?php if($rl->roleId == $roleId) {echo "selected=selected";} ?>><?php echo $rl->role ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
|
||||||
|
<div class="box-footer">
|
||||||
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
||||||
|
<input type="reset" class="btn btn-default" value="Reset" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?php
|
||||||
|
$this->load->helper('form');
|
||||||
|
$error = $this->session->flashdata('error');
|
||||||
|
if($error)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $this->session->flashdata('error'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
$success = $this->session->flashdata('success');
|
||||||
|
if($success)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $this->session->flashdata('success'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>
|
||||||
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>VISA | Dashboard</title>
|
<title> <?php echo $pageTitle; ?></title>
|
||||||
<!-- Tell the browser to be responsive to screen width -->
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
<!-- Bootstrap 3.3.7 -->
|
<!-- Bootstrap 3.3.7 -->
|
||||||
@ -87,10 +87,10 @@
|
|||||||
<!-- Menu Footer-->
|
<!-- Menu Footer-->
|
||||||
<li class="user-footer">
|
<li class="user-footer">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<a href="#" class="btn btn-default btn-flat">Profile</a>
|
<a href="<?php echo base_url(); ?>loadChangePass" class="btn btn-default btn-flat"><i class="fa fa-key"></i> Change Password</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="#" class="btn btn-default btn-flat">Sign out</a>
|
<a href="<?php echo base_url(); ?>logout" class="btn btn-default btn-flat"><i class="fa fa-sign-out"></i> Sign out</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pull-left info">
|
<div class="pull-left info">
|
||||||
<p>Visa Employee</p>
|
<p>Visa Employee</p>
|
||||||
<a href="<?php echo base_url(); ?>assets/#"><i class="fa fa-circle text-success"></i> Online</a>
|
<a href="<?php echo base_url(); ?>#"><i class="fa fa-circle text-success"></i> Online</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- search form -->
|
<!-- search form -->
|
||||||
@ -154,7 +154,7 @@
|
|||||||
<li><a href="<?php echo base_url(); ?>document_master"><i class="fa fa-file"></i>Document Master</a></li>
|
<li><a href="<?php echo base_url(); ?>document_master"><i class="fa fa-file"></i>Document Master</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li>
|
||||||
<a href="<?php echo base_url(); ?>country_visa_details">
|
<a href="<?php echo base_url(); ?>country_visa_details">
|
||||||
<i class="fa fa-globe"></i> <span>Country Visa Details</span>
|
<i class="fa fa-globe"></i> <span>Country Visa Details</span>
|
||||||
<span class="pull-right-container">
|
<span class="pull-right-container">
|
||||||
|
|||||||
77
application/views/lockscreen.php
Executable file
77
application/views/lockscreen.php
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>AdminLTE 2 | Lockscreen</title>
|
||||||
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
<link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.min.css">
|
||||||
|
<!-- Ionicons -->
|
||||||
|
<link rel="stylesheet" href="../../bower_components/Ionicons/css/ionicons.min.css">
|
||||||
|
<!-- Theme style -->
|
||||||
|
<link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
|
||||||
|
|
||||||
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<!-- Google Font -->
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||||
|
</head>
|
||||||
|
<body class="hold-transition lockscreen">
|
||||||
|
<!-- Automatic element centering -->
|
||||||
|
<div class="lockscreen-wrapper">
|
||||||
|
<div class="lockscreen-logo">
|
||||||
|
<a href="../../index2.html"><b>Admin</b>LTE</a>
|
||||||
|
</div>
|
||||||
|
<!-- User name -->
|
||||||
|
<div class="lockscreen-name">John Doe</div>
|
||||||
|
|
||||||
|
<!-- START LOCK SCREEN ITEM -->
|
||||||
|
<div class="lockscreen-item">
|
||||||
|
<!-- lockscreen image -->
|
||||||
|
<div class="lockscreen-image">
|
||||||
|
<img src="../../dist/img/user1-128x128.jpg" alt="User Image">
|
||||||
|
</div>
|
||||||
|
<!-- /.lockscreen-image -->
|
||||||
|
|
||||||
|
<!-- lockscreen credentials (contains the form) -->
|
||||||
|
<form class="lockscreen-credentials">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="password" class="form-control" placeholder="password">
|
||||||
|
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<button type="button" class="btn"><i class="fa fa-arrow-right text-muted"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- /.lockscreen credentials -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.lockscreen-item -->
|
||||||
|
<div class="help-block text-center">
|
||||||
|
Enter your password to retrieve your session
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="login.html">Or sign in as a different user</a>
|
||||||
|
</div>
|
||||||
|
<div class="lockscreen-footer text-center">
|
||||||
|
Copyright © 2014-2016 <b><a href="https://adminlte.io" class="text-black">Almsaeed Studio</a></b><br>
|
||||||
|
All rights reserved
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.center -->
|
||||||
|
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
51
application/views/login.php
Executable file → Normal file
51
application/views/login.php
Executable file → Normal file
@ -7,15 +7,15 @@
|
|||||||
<!-- Tell the browser to be responsive to screen width -->
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
<!-- Bootstrap 3.3.7 -->
|
<!-- Bootstrap 3.3.7 -->
|
||||||
<link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="assets/bower_components/font-awesome/css/font-awesome.min.css">
|
||||||
<!-- Ionicons -->
|
<!-- Ionicons -->
|
||||||
<link rel="stylesheet" href="../../bower_components/Ionicons/css/ionicons.min.css">
|
<link rel="stylesheet" href="assets/bower_components/Ionicons/css/ionicons.min.css">
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
|
<link rel="stylesheet" href="assets/dist/css/AdminLTE.min.css">
|
||||||
<!-- iCheck -->
|
<!-- iCheck -->
|
||||||
<link rel="stylesheet" href="../../plugins/iCheck/square/blue.css">
|
<link rel="stylesheet" href="assets/plugins/iCheck/square/blue.css">
|
||||||
<style>
|
<style>
|
||||||
.login-box{
|
.login-box{
|
||||||
|
|
||||||
@ -77,15 +77,41 @@
|
|||||||
<!-- /.login-logo -->
|
<!-- /.login-logo -->
|
||||||
<div class="login-box-body">
|
<div class="login-box-body">
|
||||||
<p class="login-box-msg">Sign in to start your session</p>
|
<p class="login-box-msg">Sign in to start your session</p>
|
||||||
|
<?php $this->load->helper('form'); ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$this->load->helper('form');
|
||||||
|
$error = $this->session->flashdata('error');
|
||||||
|
if($error)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $error; ?>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
$success = $this->session->flashdata('success');
|
||||||
|
if($success)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo $success; ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<form action="../../index2.html" method="post">
|
<form action="<?php echo base_url(); ?>loginMe" method="post">
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||||
<input type="email" class="form-control" placeholder="Email">
|
<input type="email" class="form-control" placeholder="Email" name="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||||
<input type="password" class="form-control" placeholder="Password">
|
<input type="password" class="form-control" placeholder="Password" name="password" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!--<div class="col-xs-8">
|
<!--<div class="col-xs-8">
|
||||||
@ -97,7 +123,8 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<div class="col-xs-offset-4 col-xs-4">
|
<div class="col-xs-offset-4 col-xs-4">
|
||||||
<button type="submit" class="btn btn-primary btn-block btn-flat">LETS GO</button>
|
<!-- <button type="submit" class="btn btn-primary btn-block btn-flat">LETS GO</button> -->
|
||||||
|
<input type="submit" class="btn btn-primary btn-block btn-flat" value="LETS GO" />
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
@ -121,11 +148,11 @@
|
|||||||
<!-- /.login-box -->
|
<!-- /.login-box -->
|
||||||
|
|
||||||
<!-- jQuery 3 -->
|
<!-- jQuery 3 -->
|
||||||
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
|
<script src="assets/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
<!-- Bootstrap 3.3.7 -->
|
<!-- Bootstrap 3.3.7 -->
|
||||||
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
<script src="assets/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
<!-- iCheck -->
|
<!-- iCheck -->
|
||||||
<script src="../../plugins/iCheck/icheck.min.js"></script>
|
<script src="assets/plugins/iCheck/icheck.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('input').iCheck({
|
$('input').iCheck({
|
||||||
|
|||||||
89
application/views/loginHistory.php
Normal file
89
application/views/loginHistory.php
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/datepicker/datepicker3.css" />
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<i class="fa fa-users"></i> Login History
|
||||||
|
<small>track login history</small>
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<form action="<?php echo base_url() ?>login-history" method="POST" id="searchList">
|
||||||
|
<div class="col-md-2 col-md-offset-4 form-group">
|
||||||
|
<input for="fromDate" type="text" name="fromDate" value="<?php echo $fromDate; ?>" class="form-control datepicker" placeholder="From Date"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 form-group">
|
||||||
|
<input id="toDate" type="text" name="toDate" value="<?php echo $toDate; ?>" class="form-control datepicker" placeholder="To Date"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 form-group">
|
||||||
|
<input id="searchText" type="text" name="searchText" value="<?php echo $searchText; ?>" class="form-control" placeholder="Search Text"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 form-group">
|
||||||
|
<button type="submit" class="btn btn-md btn-default btn-block searchList pull-right"><i class="fa fa-search"></i></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?= $userInfo->name." : ".$userInfo->email ?></h3>
|
||||||
|
<div class="box-tools">
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive no-padding">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tr>
|
||||||
|
<th>Session Data</th>
|
||||||
|
<th>IP Address</th>
|
||||||
|
<th>User Agent</th>
|
||||||
|
<th>Agent Full String</th>
|
||||||
|
<th>Platform</th>
|
||||||
|
<th>Date-Time</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if(!empty($userRecords))
|
||||||
|
{
|
||||||
|
foreach($userRecords as $record)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $record->sessionData ?></td>
|
||||||
|
<td><?php echo $record->machineIp ?></td>
|
||||||
|
<td><?php echo $record->userAgent ?></td>
|
||||||
|
<td><?php echo $record->agentString ?></td>
|
||||||
|
<td><?php echo $record->platform ?></td>
|
||||||
|
<td><?php echo $record->createdDtm ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div><!-- /.box-body -->
|
||||||
|
<div class="box-footer clearfix">
|
||||||
|
<?php echo $this->pagination->create_links(); ?>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<script src="<?php echo base_url(); ?>assets/plugins/datepicker/bootstrap-datepicker.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function(){
|
||||||
|
jQuery('ul.pagination li a').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var link = jQuery(this).get(0).href;
|
||||||
|
jQuery("#searchList").attr("action", link);
|
||||||
|
jQuery("#searchList").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
jQuery('.datepicker').datepicker({
|
||||||
|
autoclose: true,
|
||||||
|
format : "dd-mm-yyyy"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -199,11 +199,11 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<h3 class="box-title-box">Visa Type Master</h3>
|
<h3 class="box-title-box">Visa Type Master</h3>
|
||||||
</div>
|
</div>
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
<form role="form" style="padding:40px;">
|
<form role="form" action="<?php echo base_url() ?>Add_visa_type_master" method="post" style="padding:40px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5 designinput">
|
<div class="col-md-5 designinput">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="slide-up" id="card" type="text" placeholder="Enter visa name" /><label for="card">Visa Name</label>
|
<input class="slide-up" id="card" name="VisaName" type="text" placeholder="Enter visa name" /><label for="card">Visa Name</label>
|
||||||
|
|
||||||
<!--<label for="exampleInputcountryname">Country Name</label>
|
<!--<label for="exampleInputcountryname">Country Name</label>
|
||||||
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
|
||||||
@ -213,14 +213,14 @@ span:nth-child(3) .slide-up:active {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label for="Description">Description</label>
|
<label for="Description">Description</label>
|
||||||
<textarea class="form-control" rows="3" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
<textarea class="form-control" rows="3" name="VisaDescription" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="padding-top:15px;">
|
<div class="row" style="padding-top:15px;">
|
||||||
<div class="col-md-offset-8 col-md-4">
|
<div class="col-md-offset-8 col-md-4">
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
<div class="or-button">Or</div>
|
<div class="or-button">Or</div>
|
||||||
<button type="submit" class="btn btn-primary12">Reset</button>
|
<button type="reset" class="btn btn-primary12">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user