Autologin recommitted Ctrl : ps

This commit is contained in:
VE10-Sanjeev 2023-11-10 12:09:32 +05:30
parent 33e80256c0
commit 8471014f05
2 changed files with 39 additions and 39 deletions

View File

@ -1842,26 +1842,26 @@ public function filterSalesPDList_post() {
// MwiseSales@yahoo.com#sine1234
// $2y$10$n4dEVCXJ2Oho9KJUnhss/.LAXTyXN60dz332ZRPNp4VpY8J.Ue7ly
// .. if($saltkey != ''){
// .. log_message('ERROR','## A) saltkey Found : '.$saltkey);
// .. if(password_verify("Smc@123$", $saltkey)){
// .. log_message('ERROR','## B) toMakeCetNewSalesPd Fns Going to Call');
if($saltkey != ''){
log_message('ERROR','## A) saltkey Found : '.$saltkey);
if(password_verify("Smc@123$", $saltkey)){
log_message('ERROR','## B) toMakeCetNewSalesPd Fns Going to Call');
$this->toMakeCetNewSalesPd($this->get());
// .. }else{
// .. log_message('ERROR','## B) Invaild saltkey/Token ');
// .. $response['status']=false;
// .. $response['error']="Access denied ! Invaild Salt key";
// .. $this->response($response,REST_Controller::HTTP_UNAUTHORIZED);
// .. exit;
// .. }
// .. }
// .. else{
// .. log_message('ERROR','## A) saltkey Not Found : '.$saltkey);
// .. $response['status']=false;
// .. $response['error']="Access denied ! Salt key Not Found!";
// .. $this->response($response,REST_Controller::HTTP_UNAUTHORIZED);
// .. exit;
// .. }
}else{
log_message('ERROR','## B) Invaild saltkey/Token ');
$response['status']=false;
$response['error']="Access denied ! Invaild Salt key";
$this->response($response,REST_Controller::HTTP_UNAUTHORIZED);
exit;
}
}
else{
log_message('ERROR','## A) saltkey Not Found : '.$saltkey);
$response['status']=false;
$response['error']="Access denied ! Salt key Not Found!";
$this->response($response,REST_Controller::HTTP_UNAUTHORIZED);
exit;
}
}
public function toMakeCetNewSalesPd($array)
@ -1888,21 +1888,21 @@ public function filterSalesPDList_post() {
/************lender id,shortname******************/
// .. for dynamic serial number creation don't delete it.
// .. $lender_short_name = $this->Sales_PD_Model->selectCustomRecords(array('short_name'), array('entity_id' => $lenderid), ENTITY);
// for dynamic serial number creation don't delete it.
$lender_short_name = $this->Sales_PD_Model->selectCustomRecords(array('short_name'), array('entity_id' => $lenderid), ENTITY);
/************product id,name,abbr******************/
// .. for dynamic serial number creation don't delete it.
// .. if ($productname) {
// .. $product_short_name = preg_replace('/[^A-Za-z0-9\-]/', '', strtoupper($productname));
// .. $product_where_condition = array('isactive' => 1);
// .. if ($usersemailid) {
// .. $product_where_condition['abbr like'] = '%' . $product_short_name . '%';
// .. }
// for dynamic serial number creation don't delete it.
if ($productname) {
$product_short_name = preg_replace('/[^A-Za-z0-9\-]/', '', strtoupper($productname));
$product_where_condition = array('isactive' => 1);
if ($usersemailid) {
$product_where_condition['abbr like'] = '%' . $product_short_name . '%';
}
// .. $product_id = $this->Sales_PD_Model->selectCustomRecords(array('product_id'), $product_where_condition, PRODUCTS);
// .. $product_id = $product_id[0]['product_id'];
// .. }
$product_id = $this->Sales_PD_Model->selectCustomRecords(array('product_id'), $product_where_condition, PRODUCTS);
$product_id = $product_id[0]['product_id'];
}
/************user id******************/
$columns = array('USERPROFILE.userid', 'ROLES.role_id', 'USERPROFILEROLES.user_role', 'ROLES.role_name');
@ -1956,13 +1956,13 @@ public function filterSalesPDList_post() {
$count = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'), array('lender_id' => $lenderid, 'product_id' => $product_id, 'isactive' => 1), SALES_PD_DATA);
// .. dynamic number serial number creation don't delete it.
// .. $salepd_serial_no = count($lender_short_name) ? $lender_short_name[0]['short_name'] : 'UNKNOWN';
// .. $salepd_serial_no .= $product_id ? '-' . $product_short_name : '-UNKNOWN';
// .. $salepd_serial_no .= '-' . (++$count[0]['count']);
// dynamic number serial number creation don't delete it.
$salepd_serial_no = count($lender_short_name) ? $lender_short_name[0]['short_name'] : 'UNKNOWN';
$salepd_serial_no .= $product_id ? '-' . $product_short_name : '-UNKNOWN';
$salepd_serial_no .= '-' . (++$count[0]['count']);
// .. static
$salepd_serial_no = "MWISE-".strtoupper($productname).'-' . (++$count[0]['count']);
// .. $salepd_serial_no = "MWISE-".strtoupper($productname).'-' . (++$count[0]['count']);
log_message('ERROR', '## 1) random string : ' . $randomString . ' serial No : ' . $salepd_serial_no);
/*************Inserting Here ******************/
@ -2083,7 +2083,7 @@ public function filterSalesPDList_post() {
// echo $token;
// $token = base64_encode('mwisesales1@sine.com#test1234'."#".$user_id."#".$role_id);
// $redirect_uri = "http://localhost:4200/#/auto?token=".$token; // For Localhost
$redirect_uri = "https://demo.pdgenie.com/salespdpwa/#/auto?token=" . $token; // For Testing
$redirect_uri = "https://demo.pdgenie.com/salespd/#/auto?token=" . $token; // For Testing
}
log_message('ERROR', '## 8) Redirect B4 '.$auth_user_id."#".$auth_password."#".$user_id."#".$role_id."#".$current_date."#".$usersemailid."#".$salepdid);
// MwiseSales@yahoo.com#sine1234#293#19#06/07/2023 16:02:57#mwisesales1@sine.com#904

View File

@ -106,8 +106,8 @@ class satellite_image
// Google Library - GCP
$CI->load->library('Googlecloud');
$gcpBucketName = GCP_BUCKET_NAME;
$prefixToObject = ENVIRONMENT == 'production' ? "":"sales-pd-demo";
$objectName = $prefixToObject."/pd".$pdid."/images/satellite.png";
$prefixToObject = ENVIRONMENT == 'production' ? "":"sales-pd-demo/";
$objectName = $prefixToObject."pd".$pdid."/images/satellite.png";
$result = $CI->googlecloud->uploadFileToGCPBucket($gcpBucketName,$objectName,$source);
if($result == true){
$image_inserted++;