<?php
namespace ApplicationBundle\Controller;
use ApplicationBundle\Constants\EmployeeConstant;
use ApplicationBundle\Constants\GeneralConstant;
use ApplicationBundle\Constants\HumanResourceConstant;
use ApplicationBundle\Entity\ApplicantDetails;
use ApplicationBundle\Entity\Employee;
use ApplicationBundle\Entity\EmployeeDetails;
use ApplicationBundle\Entity\SysDepartment;
use ApplicationBundle\Entity\SysUser;
use ApplicationBundle\Interfaces\LoginInterface;
use ApplicationBundle\Modules\Authentication\Constants\UserConstants;
use ApplicationBundle\Modules\HumanResource\HumanResource;
use ApplicationBundle\Modules\System\MiscActions;
use ApplicationBundle\Modules\System\System;
use ApplicationBundle\Modules\User\Company;
use ApplicationBundle\Modules\User\Position;
use ApplicationBundle\Modules\User\Users;
use CompanyGroupBundle\Entity\EmsSite;
use CompanyGroupBundle\Entity\EntityApplicantDetails;
use CompanyGroupBundle\Modules\UserEntity\EntityUserM;
use Endroid\QrCode\Builder\BuilderInterface;
use Endroid\QrCodeBundle\Response\QrCodeResponse;
use Google_Client;
use Google_Service_Oauth2;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGenerator;
// honeyBee web routing controller
class PublicPagesController extends GenericController implements LoginInterface
{
// HoneybeeWeb upto this
public function ReturnJsonForListenerAction(Request $request, $dataStr = '')
{
$session = $request->getSession();
$dataStrFromSess = $session->get('jsonStrForListenerData');
$dataJson = json_decode($dataStrFromSess, true);
$session->set('jsonStrForListenerData', null);
if ($dataJson == null) $dataJson = [];
return new JsonResponse($dataJson);
}
public function ZktEcoHandshakeAction(Request $request): Response
{
// ZKTeco sends heartbeat GET without POST body
ob_clean();
// Get device
$deviceSN = $request->get('SN', '');
if ($request->getMethod() === "GET") {
} else {
$em_goc = $this->getDoctrine()->getManager('company_group');
$em = $this->getDoctrine()->getManager();
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$device = $em_goc->getRepository('CompanyGroupBundle:Device')->findOneBy([
'deviceSerial' => $deviceSN
]);
// ZKTeco sends logs via POST
$content = $request->getContent();
// Example: OP=ATTLOG&PIN=25&Time=2025-11-27%2012%3A20%3A33&...
parse_str($content, $data); // Convert POST body to array
if ($request->get('table', '') === 'ATTLOG') {
if ($device) {
$app = $em_goc->getRepository('CompanyGroupBundle:CompanyGroup')->findOneBy([
'appId' => $device->getAppId()
]);
if ($app) //can go local
{
$goc = [
'dbName' => $app->getDbName(),
'dbUser' => $app->getDbUser(),
'dbPass' => $app->getDbPass(),
'dbHost' => $app->getDbHost(),
'serverAddress' => $app->getCompanyGroupServerAddress(),
'port' => $app->getCompanyGroupServerPort() ?: 80,
'appId' => $app->getAppId(),
// 'serverId' => $entry->getServerId(),
];
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc['dbName'],
$goc['dbUser'],
$goc['dbPass'],
$goc['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
$options = array(
'notification_enabled' => $this->container->getParameter('notification_enabled'),
'notification_server' => $this->container->getParameter('notification_server'),
);
// if($device->getDeviceMarker()=='_ZKTECO_GEN_')
if (1) {
$raw = trim($request->getContent());
// Multiple lines? split them
$lines = preg_split('/\r\n|\r|\n/', $raw);
foreach ($lines as $line) {
$line = trim($line);
if ($line === "") continue;
// Split on ANY whitespace
$parts = preg_split('/\s+/', $line);
if (count($parts) < 3) {
continue; // invalid line
}
$pin = $parts[0];
$date = $parts[1];
$time = $parts[2];
$verify = $parts[3] ?? null;
$status = $parts[4] ?? null;
$workcode = $parts[5] ?? null;
$timestamp = new \DateTime("$date $time ".$device->getTimezoneStr());
$empId = $pin;
$userId = 0;
$today = new \DateTime();
// $dtTs = $today->format('U');
$dtTs = $timestamp->format('U');
$appId = $app->getAppId();
$statusToMarker = array(
0 => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_IN,
1 => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_OUT,
2 => HumanResourceConstant::ATTENDANCE_MARKER_GENERAL_TRACKING,
3 => HumanResourceConstant::ATTENDANCE_MARKER_GENERAL_TRACKING,
4 => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_OUT,
5 => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_OUT,
);
$employee = $em->getRepository(Employee::class)->createQueryBuilder('A')
->where(" A.idsByDevice like '" . $device->getDeviceSerial() . "_" . $pin . "' or " .
" A.idsByDevice like '%," . $device->getDeviceSerial() . "_" . $pin . ",%' or " .
" A.idsByDevice like '" . $device->getDeviceSerial() . "_" . $pin . ",%' or " .
" A.idsByDevice like '%," . $device->getDeviceSerial() . "_" . $pin . "'"
)
->getQuery()
->setMaxResults(1)
->getResult();
if (!empty($employee))
$empId = $employee[0]->getEmployeeId();
if ($device->getClockInDetection() == 1)
$markerId = $statusToMarker[$status];
else
$markerId = HumanResourceConstant::ATTENDANCE_MARKER_START_WORKING_FORCED;
$response = MiscActions::autoAttendanceGeneral($em, $empId, $userId, $appId, $dtTs, $options, 0, $markerId);
}
}
} else if ($systemType == '_CENTRAL_') {
} else {
}
// return new Response('OK', 200, [
// "Content-Type" => "text/plain; charset=ascii"
// ]);
}
// MiscActions::ProcessQrData($em_goc, $em, $data);
/// get the app id
/// if in same server then connect to that app dbase and find employee id
// Save attendance log
// $data['PIN']
// $data['Time']
// $data['WorkCode'] (optional)
// Example saving logic here…
}
return new Response("OK", 200, [
"Content-Type" => "text/plain; charset=ascii"
]);
}
// Define the desired TimeZone (360 minutes for UTC+06:00)
$timeZoneMinutes = "+06:00";
// Get the current time on your server and format it for the device
$currentTime = date('Y-m-dTH:i:s');
if ($request->get('options', '') == 'all')
$r = "GET OPTION FROM: $deviceSN\r\n" .
"Stamp=9999\r\n" .
"OpStamp=" . time() . "\r\n" .
"ErrorDelay=60\r\n" .
"Delay=30\r\n" .
"ResLogDay=18250\r\n" .
"ResLogDelCount=10000\r\n" .
"ResLogCount=50000\r\n" .
"TransTimes=00:00;14:05\r\n" .
"TransInterval=1\r\n" .
"TransFlag=1111000000\r\n" .
// "Time=$currentTime\r\n" .
"TimeZone=$timeZoneMinutes\r\n" .
"Realtime=1\r\n" .
"Encrypt=0";
// return $r;
else if ($request->get('type', '') == 'time') {
$r = "Time=" . $currentTime . $timeZoneMinutes;
} else
$r = "OK\r\n";
// $r .= "C:SET OPTION TimeZone $timeZoneMinutes\r\n";
// $r .= "C:SET TIME " . $currentTime . "\r\n";
return new Response($r, 200, [
"Content-Type" => "text/plain; charset=ascii"
]);
// return new Response('OK', 200, [
// "Content-Type" => "text/plain; charset=ascii"
// ]);
/* $xml = '<?xml version="1.0" encoding="UTF-8"?><Response><Status>OK</Status></Response>';*/
//
// return new Response(
// $xml,
// Response::HTTP_OK,
// [
// 'Content-Type' => 'application/xml; charset=UTF-8'
// ]
// );
}
public function ZktEcoGetRequestAction(Request $request): Response
{
ob_clean();
return new Response('OK', 200, [
"Content-Type" => "text/plain; charset=ascii"
]);
$deviceSN = $request->get('SN', '');
$em_goc = $this->getDoctrine()->getManager('company_group');
$em = $this->getDoctrine()->getManager();
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$device = $em_goc->getRepository('CompanyGroupBundle:Device')->findOneBy([
'deviceSerial' => $deviceSN
]);
// Default timezone (fallback)
$tzString = 'UTC';
if ($device && $device->getTimezoneStr()) {
$tzString = $device->getTimezoneStr();
}
// Format correct time
$tz = new \DateTimeZone($tzString);
$now = new \DateTime('now', $tz);
$formatted = $now->format('Y-m-d H:i:s');
// Define the desired TimeZone (360 minutes for UTC+06:00)
$timeZoneMinutes = 360;
// Get the current time on your server and format it for the device
$currentTime = $now->format('U');
// $now->modify('-5 days');
$r = "";
// $r = "OK\r\n";
// $r .= "C:SET OPTION TimeZone $timeZoneMinutes\r\n";
// $r .= "C:SET TIME " . $currentTime . "\r\n";
$r .= "C:401:SET OPTIONS " .
"DateTime=" . $now->format('U') .
// "DateTime=1764929449" .
// "\r\n".
// ",".
// "ServerTZ=" . $tzString.
"\r\n";
return new Response($r, 200, [
"Content-Type" => "text/plain; charset=ascii"
]);
// ZKTeco TIME sync command
$cmd = "SET TIME=" . $formatted . "\n";
$cmd = "CMD=SET OPTIONS&DateTime=" . $now->format('U') . '&TZ=' . $tzString;
return new Response('OK', 200, [
"Content-Type" => "text/plain; charset=ascii"
]);
// return new Response($cmd, 200, [
// "Content-Type" => "text/plain; charset=ascii"
// ]);
// return new Response('', 200, [
// "Content-Type" => "text/plain; charset=ascii"
// ]);
}
public function ZktEcoDeviceCmdAction(Request $request): Response
{
ob_clean();
// Device is asking for commands → return OK only
$responseString = "OK";
$response = new Response($responseString);
return $response;
}
public function ZktEcoRtDataAction(Request $request): Response
{
$type = $request->query->get('type');
$sn = $request->query->get('SN');
// If device is asking for time
// if ($type === 'time')
if (0) {
// Example: Bangladesh time
ob_clean();
$deviceSN = $request->get('SN', '');
$em_goc = $this->getDoctrine()->getManager('company_group');
$em = $this->getDoctrine()->getManager();
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$device = $em_goc->getRepository('CompanyGroupBundle:Device')->findOneBy([
'deviceSerial' => $deviceSN
]);
// Default timezone (fallback)
$tzString = 'UTC';
if ($device && $device->getTimezoneStr()) {
$tzString = $device->getTimezoneStr();
}
// Format correct time
$tz = new \DateTimeZone($tzString);
$now = new \DateTime('now', $tz);
$formatted = $now->format('Y-m-d H:i:s');
// Define the desired TimeZone (360 minutes for UTC+06:00)
$timeZoneMinutes = 360;
// Get the current time on your server and format it for the device
$currentTime = $now->format('U');
$r = "";
// $r = "OK\r\n";
// $r .= "C:SET OPTION TimeZone $timeZoneMinutes\r\n";
// $r .= "C:SET TIME " . $currentTime . "\r\n";
$r .= "DateTime=" . $now->format('U') .
// "DateTime=1764929449" .
// "\r\n".
// ",".
// "ServerTZ=" . $tzString.
"";
return new Response($r, 200, [
"Content-Type" => "text/plain; charset=ascii"
]);
}
// Default fallback for other rtdata
return new Response('OK', 200, ['Content-Type' => 'text/plain']);
}
public function ScanQrAction(Request $request, $version = '')
{
$session = $request->getSession();
$firstData = $request->getContent();
$data = json_decode($firstData, true);
$appId = [];
if (json_last_error() === JSON_ERROR_NONE) {
// JSON is valid
if (isset($data['appId']))
$appId = $data['appId'];
} else
$data = $firstData;
$em_goc = $this->getDoctrine()->getManager('company_group');
$em = $this->getDoctrine()->getManager();
if ($appId != 0) {
$companies = $em_goc->getRepository('CompanyGroupBundle:CompanyGroup')->findBy([
'appId' => $appId
]);
foreach ($companies as $entry) {
$goc = [
'dbName' => $entry->getDbName(),
'dbUser' => $entry->getDbUser(),
'dbPass' => $entry->getDbPass(),
'dbHost' => $entry->getDbHost(),
'serverAddress' => $entry->getCompanyGroupServerAddress(),
'port' => $entry->getCompanyGroupServerPort() ?: 80,
'appId' => $entry->getAppId(),
// 'serverId' => $entry->getServerId(),
];
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc['dbName'],
$goc['dbUser'],
$goc['dbPass'],
$goc['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
}
}
MiscActions::ProcessQrData($em_goc, $em, $data);
return new JsonResponse(
array(
'postData' => $request->request->all(),
'getData' => $request->query->all(),
'contentData' => $request->getContent(),
)
);
}
public function GetGlobalIdFromEmployeeIdAction(Request $request, $version = '')
{
$session = $request->getSession();
$appId = $request->request->get('appId', 0);
$empId = $request->request->get('employeeId', 0);
$em_goc = $this->getDoctrine()->getManager('company_group');
$em = $this->getDoctrine()->getManager();
if ($appId != 0) {
$entry = $em_goc->getRepository('CompanyGroupBundle:CompanyGroup')->findOneBy([
'appId' => $appId
]);
$goc = [
'dbName' => $entry->getDbName(),
'dbUser' => $entry->getDbUser(),
'dbPass' => $entry->getDbPass(),
'dbHost' => $entry->getDbHost(),
'serverAddress' => $entry->getCompanyGroupServerAddress(),
'port' => $entry->getCompanyGroupServerPort() ?: 80,
'appId' => $entry->getAppId(),
// 'serverId' => $entry->getServerId(),
];
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc['dbName'],
$goc['dbUser'],
$goc['dbPass'],
$goc['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
$employee = $this->getDoctrine()->getManager()
->getRepository("ApplicationBundle:Employee")
->findOneBy(array(
'employeeId' => $empId
));
if ($employee) {
$user = $this->getDoctrine()->getManager()
->getRepository("ApplicationBundle:SysUser")
->findOneBy(array(
'userId' => $employee->getUserId()
));
if ($user)
return new JsonResponse(array('globalId' => $user->getGlobalId()));
}
}
return new JsonResponse(array('globalId' => 0));
}
public function VerifyEmailForAppAction(Request $request, $encData = '', $remoteVerify = 0)
{
// $userCategory=$request->request->has('userCategory');
$encryptedData = [];
$errorField = '';
$message = '';
$userType = '';
$otpExpireSecond = 180;
$otpExpireTs = 0;
$otp = '';
$otpActionId = $request->request->get('otpAction', UserConstants::OTP_ACTION_CONFIRM_EMAIL);
if ($encData != '')
$encryptedData = json_decode($this->get('url_encryptor')->decrypt($encData), true);
// $encryptedData = $this->get('url_encryptor')->decrypt($encData);
$userCategory = '_BUDDYBEE_USER_';
if (isset($encryptedData['userCategory']))
$userCategory = $encryptedData['userCategory'];
else
$userCategory = $request->request->get('userCategory', '_BUDDYBEE_USER_');
$em = $this->getDoctrine()->getManager('company_group');
$em_goc = $this->getDoctrine()->getManager('company_group');
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$ownServerId = $this->container->hasParameter('server_id') ? $this->container->getParameter('server_id') : '_NONE_';
$twig_file = '@Authentication/pages/views/find_account_buddybee.html.twig';
$twigData = [];
$email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
$email_address = $request->request->get('email', '');
$email_twig_data = [];
$appendCode = $request->request->get('appendCode', $request->query->get('appendCode', ''));
if ($request->isMethod('POST')) {
//set an otp and its expire and send mail
$email_address = $request->request->get('email');
$userObj = null;
$userData = [];
{
$userType = UserConstants::USER_TYPE_APPLICANT;
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'email' => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'oAuthEmail' => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'username' => $email_address
)
);
}
}
if ($userObj) {
$email_address = $userObj->getEmail();
if ($email_address == null || $email_address == '')
$email_address = $userObj->getOAuthEmail();
// triggerResetPassword:
// type: integer
// nullable: true
$otpData = MiscActions::GenerateOtp($otpExpireSecond);
$otp = $otpData['otp'];
$otpExpireTs = $otpData['expireTs'];
$userObj->setOtp($otpData['otp']);
$userObj->setOtpActionId($otpActionId);
$userObj->setOtpExpireTs($otpData['expireTs']);
$em_goc->flush();
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
'image' => $userObj->getImage(),
'firstName' => $userObj->getFirstname(),
'lastName' => $userObj->getLastname(),
'phone' => $userObj->getPhone(),
// 'appId'=>$userObj->getUserAppId(),
);
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
$email_twig_data = [
'page_title' => 'Find Account',
'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
'errorField' => $errorField,
'otp' => $otpData['otp'],
'otpExpireSecond' => $otpExpireSecond,
'otpActionId' => $otpActionId,
'otpActionTitle' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionTitle'],
'otpActionDescForMail' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionDescForMail'],
'otpExpireTs' => $otpData['expireTs'],
'systemType' => $systemType,
'userCategory' => $userCategory,
'userData' => $userData
];
$email_twig_data['success'] = true;
} else {
$message = "Oops! Could not find your account";
$email_twig_data['success'] = false;
}
}
if ($email_twig_data['success'] == true && GeneralConstant::EMAIL_ENABLED == 1) {
$bodyHtml = '';
$bodyTemplate = $email_twig_file;
$bodyData = $email_twig_data;
$attachments = [];
$forwardToMailAddress = $email_address;
// $upl_dir = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/temp/' . 'ledger' . '.pdf'
$new_mail = $this->get('mail_module');
$new_mail->sendMyMail(array(
'senderHash' => '_CUSTOM_',
// 'senderHash'=>'_CUSTOM_',
'forwardToMailAddress' => $forwardToMailAddress,
'subject' => 'Account Verification',
// 'fileName' => 'Order#' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.pdf',
'attachments' => $attachments,
'toAddress' => $forwardToMailAddress,
'fromAddress' => 'no-reply@ourhoneybee.eu',
'userName' => 'no-reply@ourhoneybee.eu',
'password' => 'Honeybee@0112',
'smtpServer' => 'smtp.hostinger.com',
'smtpPort' => 465,
// 'emailBody' => $bodyHtml,
'mailTemplate' => $bodyTemplate,
'templateData' => $bodyData,
// 'embedCompanyImage' => 1,
// 'companyId' => $companyId,
// 'companyImagePath' => $company_data->getImage()
));
}
if ($email_twig_data['success'] == true && GeneralConstant::NOTIFICATION_ENABLED == 1 && $userData['phone'] != '' && $userData['phone'] != null) {
if ($systemType == '_BUDDYBEE_') {
$searchVal = ['_OTP_', '_EXPIRE_MINUTES_', '_APPEND_CODE_'];
$replaceVal = [$otp, floor($otpExpireSecond / 60), $appendCode];
$msg = 'Use OTP _OTP_ for BuddyBee. Your OTP will expire in _EXPIRE_MINUTES_ minutes
_APPEND_CODE_';
$msg = str_replace($searchVal, $replaceVal, $msg);
$emitMarker = '_SEND_TEXT_TO_MOBILE_';
$sendType = 'all';
$socketUserIds = [];
System::SendSmsBySocket($this->container->getParameter('notification_enabled'), $msg, $userData['phone'], $emitMarker, $sendType, $socketUserIds);
} else {
}
}
$encData = array(
"userType" => $userType,
"otp" => '',
// "otp"=>$otp,
"otpExpireTs" => $otpExpireTs,
"otpActionId" => $otpActionId,
"userCategory" => $userCategory,
"userId" => $userData['id'],
"systemType" => $systemType,
"email" => $email_address,
);
$encDataStr = $this->get('url_encryptor')->encrypt(json_encode($encData));
$response = new JsonResponse(array(
'templateData' => $twigData,
'message' => $message,
"otp" => '',
// "otp" => $otp,
"encData" => $encDataStr,
"otpExpireTs" => $otpExpireTs,
// 'actionData' => $email_twig_data,
'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
)
);
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
}
public function EmployeeAddUsingQrCodeErpServerAction(Request $request)
{
$em_goc = $this->getDoctrine()->getManager('company_group');
$app = $em_goc->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $request->request->get('appId'),
)
);
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$app->getDbName(),
$app->getDbUser(),
$app->getDbPass(),
$app->getDbHost(),
true
);
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('ApplicationBundle:SysUser')
->findOneBy(
array(
'globalId' => $request->request->get('globalId'),
)
);
if (!$user)
$user = new SysUser();
$user->setGlobalId($request->request->get('globalId'));
$user->setUsername($request->request->get('username'));
$user->setEmail($request->request->get('email'));
$user->setName($request->request->get('firstname'));
$user->setUserType($request->request->get('userType'));
$user->setUserAppId($request->request->get('appId'));
$user->setUserCompanyId(1);
$user->setStatus(1);
$user->setDefaultRoute('');
$em->persist($user);
$em->flush();
$employee = $em->getRepository('ApplicationBundle:Employee')
->findOneBy(
array(
'userId' => $user->getUserId(),
)
);
if (!$employee) {
$employee = new Employee();
if ($request->request->get('email') && $request->request->get('firstname') && $request->request->get('lastname')) {
$employee->setEmail($request->request->get('email'));
$employee->setFirstName($request->request->get('firstname'));
$employee->setLastName($request->request->get('lastname'));
$employee->setCompanyId($request->request->get('companyId'));
$employee->setStatus(1);
$employee->setUserId($user->getUserId());
$em->persist($employee);
$em->flush();
} else {
return new JsonResponse([
'status' => 'error',
'message' => 'Missing employee data',
]);
}
}
$employeeDetails = $em->getRepository('ApplicationBundle:EmployeeDetails')
->findOneBy(
array(
'userId' => $user->getUserId(),
)
);
if (!$employeeDetails) {
$employeeDetails = new EmployeeDetails();
if ($request->request->get('email') && $request->request->get('firstname') && $request->request->get('lastname')) {
$employeeDetails->setId($employee->getEmployeeId());
$employeeDetails->setEmail($request->request->get('email'));
$employeeDetails->setFirstname($request->request->get('firstname'));
$employeeDetails->setLastname($request->request->get('lastname'));
$employeeDetails->setUsername($request->request->get('username'));
$employeeDetails->setUserId($employee->getUserId());
$employeeDetails->setEmpStatus(1);
$em->persist($employeeDetails);
$em->flush();
} else {
return new JsonResponse([
'status' => 'error',
'message' => 'Missing employee data',
]);
}
}
return new JsonResponse([
'status' => 'success',
'message' => 'Employee Added Successfully',
]);
}
public function GetEmployeeDataByAppAction(Request $request, $id = 0)
{
$session = $request->getSession();
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$globalId = $request->get('globalId', 0);
$appId = $request->get('appId', 0);
$userId = $request->get('userId', 0);
$employeeId = 0;
$gocDataList = [];
$gocDataListByAppId = [];
$appIds = $request->get('appIds', $appId);
$userIds = $request->get('userIds', $userId);
$em = $this->getDoctrine()->getManager('company_group');
$em->getConnection()->connect();
$connected = $em->getConnection()->isConnected();
$returnData = [];
if ($connected) {
$findByQuery = array(
'active' => 1
);
if ($appIds !== '_UNSET_')
$findByQuery['appId'] = $appIds;
$gocList = $this->getDoctrine()->getManager('company_group')
->getRepository("CompanyGroupBundle:CompanyGroup")
->findBy($findByQuery);
foreach ($gocList as $entry) {
$d = array(
'name' => $entry->getName(),
'id' => $entry->getId(),
'image' => $entry->getImage(),
'companyGroupHash' => $entry->getCompanyGroupHash(),
'dbName' => $entry->getDbName(),
'dbUser' => $entry->getDbUser(),
'dbPass' => $entry->getDbPass(),
'dbHost' => $entry->getDbHost(),
'appId' => $entry->getAppId(),
'companyRemaining' => $entry->getCompanyRemaining(),
'companyAllowed' => $entry->getCompanyAllowed(),
);
$gocDataList[$entry->getId()] = $d;
$gocDataListByAppId[$entry->getAppId()] = $d;
}
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$gocDataListByAppId[$appId]['dbName'],
$gocDataListByAppId[$appId]['dbUser'],
$gocDataListByAppId[$appId]['dbPass'],
$gocDataListByAppId[$appId]['dbHost'],
$reset = true);
$em = $this->getDoctrine()->getManager();
$user = $em
->getRepository('ApplicationBundle:SysUser')
->findOneBy(
array(
'globalId' => $globalId
)
);
if ($user) {
$employee = $em
->getRepository('ApplicationBundle:Employee')
->findOneBy(
array(
'userId' => $user->getUserId()
)
);
if ($employee) {
$employeeDetails = $em
->getRepository('ApplicationBundle:EmployeeDetails')
->findOneBy(
array(
'id' => $employee->getEmployeeId()
)
);
if ($employeeDetails) {
$department = $em->getRepository('ApplicationBundle:SysDepartment')->findOneBy(
array(
'departmentId' => $employee->getDepartmentId()
)
);
if ($department)
$returnData['department'] = $department->getDepartmentName();
else
$returnData['department'] = '';
$position = $em->getRepository('ApplicationBundle:SysDepartmentPosition')->findOneBy(
array(
'positionId' => $employee->getPositionId()
)
);
if ($position)
$returnData['position'] = $position->getPositionName();
else
$returnData['position'] = '';
$branch = $em->getRepository('ApplicationBundle:Branch')->findOneBy(
array(
'branchId' => $employee->getBranchId()
)
);
if ($branch)
$returnData['branch'] = $branch->getName();
else
$returnData['branch'] = '';
$supervisor = $em->getRepository('ApplicationBundle:SysUser')->findOneBy(
array(
'userId' => $employee->getSupervisorId()
)
);
if ($supervisor)
$returnData['supervisor'] = $supervisor->getName();
else
$returnData['supervisor'] = '';
$returnData['joiningDate'] = $employeeDetails->getJoiningDate()->format('F d, Y');
$returnData['employeeId'] = 'E' . str_pad($appId, 5, '0', STR_PAD_LEFT) . str_pad($employee->getEmployeeId(), 8, '0', STR_PAD_LEFT);
$returnData['employeeCode'] = $employeeDetails->getEmpCode() ?? '';
$returnData['employmentType'] = EmployeeConstant::$employeeType[$employeeDetails->getEmpType()] ?? '';
$returnData['appId'] = $appId;
$returnData['appName'] = $gocDataListByAppId[$appId]['name'];
$returnData['appImage'] = $gocDataListByAppId[$appId]['image'];
}
}
}
}
return new JsonResponse(array(
'success' => !empty($returnData),
'returnData' => $returnData,
));
}
public function PublicProfilePageAction(Request $request, $id = 0)
{
$em = $this->getDoctrine()->getManager();
$session = $request->getSession();
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$globalId = 0;
$appId = 0;
$employeeId = 0;
if ($systemType == '_CENTRAL_') {
if (strpos($id, 'E') !== false) {
}
$urlToCall = GeneralConstant::HONEYBEE_CENTRAL_SERVER . '/employee/profile/' . $id . '?returnJson=1';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 0,
CURLOPT_URL => $urlToCall,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_HTTPHEADER => array(),
CURLOPT_POSTFIELDS => []
));
$retData = curl_exec($curl);
$errData = curl_error($curl);
curl_close($curl);
$data = $em->getRepository(EntityApplicantDetails::class)->find($id);
return $this->render('@HoneybeeWeb/pages/public_profile.html.twig', array(
'page_title' => 'Employee Profile',
'details' => $data,
'genderList' => EmployeeConstant::$sex,
'bloodGroupList' => EmployeeConstant::$BloodGroup,
));
} else if ($systemType == '_ERP_') {
if (strpos($id, 'E') !== false) {
}
$employee = $em->getRepository('ApplicationBundle:Employee')->findOneBy(
array(
'employeeId' => $id
));
if ($employee) {
$user = $em->getRepository('ApplicationBundle:SysUser')->findOneBy(
array(
'userId' => $employee->getUserId()
));
if ($user)
$globalId = $user->getGlobalId();
}
if ($request->query->get('returnJson', 0) == 1)
return new JsonResponse(array(
'globalId' => $globalId
));
else {
if ($globalId == 0 || $globalId == null) {
return $this->redirectToRoute('permission_denied_page');
} else {
return $this->redirect(GeneralConstant::HONEYBEE_CENTRAL_SERVER . '/profile/public/' . $globalId);
}
}
}
}
public function GenerateQrAction(Request $request, $url = '')
{
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$customQrUrl = $request->query->get('url', $url);
$company = $request->query->get('company');
$appid = $request->query->get('appid');
$companyId = $request->query->get('companyId');
$userType = $request->query->get('userType');
$absoluteUrl = $this->generateUrl('dashboard', [], UrlGenerator::ABSOLUTE_URL);
$companyDetails = $em_goc->getRepository("CompanyGroupBundle:CompanyGroup")->findOneBy(
array(
'appId' => $appid
));
// $companyImage = rtrim($absoluteUrl, '/') . '/' . ltrim($companyDetails->getImage(), '/');
$companyImage = $companyDetails->getImage();
if ($companyImage) {
$companyImage = rtrim($absoluteUrl, '/') . '/' . ltrim($companyImage, '/');
} else {
$companyImage = '';
}
$userTypeNames = [
1 => 'Admin',
2 => 'User',
3 => 'Management',
];
$userTypeName = isset($userTypeNames[$userType]) ? $userTypeNames[$userType] : 'Unknown';
$finalUrl = $customQrUrl == '' ? "https://ourhoneybee.eu/add_employee_by_qr?company=" . urlencode($company) .
"&appid=" . urlencode($appid) .
"&companyId=" . urlencode($companyId) .
"&companyImage=" . urlencode($companyImage) .
"&userType=" . urlencode($userType) : $customQrUrl;
if ($request->get('htmlView', 0) == 1) {
return $this->render('@Application/inc/snippets/qr_div.html.twig',
array(
'page_title' => 'Bee Codes',
// 'export'=>'pdf,print',
'data' => [],
'isHtml' => $request->get('htmlView', 0),
'customQrUrl' => $customQrUrl,
'url' => $finalUrl
)
);
} else {
$html = $this->renderView('@Application/inc/snippets/qr_div.html.twig',
array(
'page_title' => 'Bee Codes',
// 'export'=>'pdf,print',
'data' => [],
'isHtml' => $request->get('htmlView', 0),
'customQrUrl' => $customQrUrl,
'url' => $finalUrl
)
);
return new JsonResponse(array(
'html' => $html,
'customQrUrl' => $customQrUrl,
'url' => $finalUrl,
'companyImage' => $companyImage,
'userTypeName' => $userTypeName,
));
}
}
public function NewPasswordAction(Request $request, $encData = '')
{
// $userCategory=$request->request->has('userCategory');
$encryptedData = [];
$errorField = '';
$message = '';
$userType = '';
$otpExpireSecond = 180;
$session = $request->getSession();
if ($encData != '')
$encryptedData = json_decode($this->get('url_encryptor')->decrypt($encData), true);
// $encryptedData = $this->get('url_encryptor')->decrypt($encData);
$otp = isset($encryptedData['otp']) ? $encryptedData['otp'] : 0;
$password = isset($encryptedData['password']) ? $encryptedData['password'] : 0;
$otpActionId = isset($encryptedData['otpActionId']) ? $encryptedData['otpActionId'] : 0;
$userId = isset($encryptedData['userId']) ? $encryptedData['userId'] : $session->get(UserConstants::USER_ID);
$userCategory = isset($encryptedData['userCategory']) ? $encryptedData['userCategory'] : '_BUDDYBEE_USER_';
// $em = $this->getDoctrine()->getManager('company_group');
$em_goc = $this->getDoctrine()->getManager('company_group');
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$twig_file = 'ApplicationBundle:pages/login:find_account_buddybee.html.twig';
$twigData = [];
$email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
$email_twig_data = [];
if ($request->isMethod('POST')) {
$otp = $request->request->get('otp', $otp);
$password = $request->request->get('password', $password);
$otpActionId = $request->request->get('otpActionId', $otpActionId);
$userId = $request->request->get('userId', $userId);
$userCategory = $request->request->get('userCategory', $userCategory);
$email_address = $request->request->get('email');
if ($systemType == '_ERP_') {
$gocId = $session->get(UserConstants::USER_GOC_ID);
if ($gocId != 0 && $gocId != "") {
$gocDbName = $session->get(UserConstants::USER_DB_NAME);
$gocDbUser = $session->get(UserConstants::USER_DB_USER);
$gocDbPass = $session->get(UserConstants::USER_DB_PASS);
$gocDbHost = $session->get(UserConstants::USER_DB_HOST);
// $connector = $this->container->get('application_connector');
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$gocDbName,
$gocDbUser,
$gocDbPass,
$gocDbHost,
$reset = false);
}
$em = $this->getDoctrine()->getManager();
if ($userCategory == '_APPLICANT_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'applicantId' => $userId
)
);
if ($userObj) {
if ($userObj->getTriggerResetPassword() == 1) {
$encodedPassword = $this->container->get('sha256salted_encoder')->encodePassword($password, $userObj->getSalt());
$userObj->setPassword($encodedPassword);
$userObj->setTempPassword('');
$userObj->setTriggerResetPassword(0);
$em_goc->flush();
$email_twig_data['success'] = true;
$message = "";
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
'image' => $userObj->getImage(),
'firstName' => $userObj->getFirstname(),
'lastName' => $userObj->getLastname(),
// 'appId'=>$userObj->getUserAppId(),
);
} else {
$message = "Action not allowed!";
$email_twig_data['success'] = false;
}
} else {
$message = "Account not found!";
$email_twig_data['success'] = false;
}
} else {
$userType = $session->get(UserConstants::USER_TYPE);
$userObj = $em->getRepository('ApplicationBundle:SysUser')->findOneBy(
array(
'userId' => $userId
)
);
if ($userObj) {
if ($userObj->getTriggerResetPassword() == 1) {
$encodedPassword = $this->container->get('sha256salted_encoder')->encodePassword($password, $userObj->getSalt());
$userObj->setPassword($encodedPassword);
$userObj->setTempPassword('');
$userObj->setTriggerResetPassword(0);
$em->flush();
$email_twig_data['success'] = true;
$message = "";
} else {
$message = "Action not allowed!";
$email_twig_data['success'] = false;
}
} else {
$message = "Account not found!";
$email_twig_data['success'] = false;
}
}
if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
$response = new JsonResponse(array(
'templateData' => $twigData,
'message' => $message,
'actionData' => $email_twig_data,
'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
)
);
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
} else if ($email_twig_data['success'] == true) {
// $twig_file = '@Authentication/pages/views/reset_password_success_buddybee.html.twig';
// $twigData = [
// 'page_title' => 'Reset Successful',
// 'encryptedData' => $encryptedData,
// 'message' => $message,
// 'userType' => $userType,
// 'errorField' => $errorField,
//
// ];
// return $this->render(
// $twig_file,
// $twigData
// );
return $this->redirectToRoute('dashboard');
}
} else if ($systemType == '_BUDDYBEE_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'applicantId' => $userId
)
);
if ($userObj) {
if ($userObj->getTriggerResetPassword() == 1) {
$encodedPassword = $this->container->get('sha256salted_encoder')->encodePassword($password, $userObj->getSalt());
$userObj->setPassword($encodedPassword);
$userObj->setTempPassword('');
$userObj->setTriggerResetPassword(0);
$em_goc->flush();
$email_twig_data['success'] = true;
$message = "";
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
'image' => $userObj->getImage(),
'firstName' => $userObj->getFirstname(),
'lastName' => $userObj->getLastname(),
// 'appId'=>$userObj->getUserAppId(),
);
} else {
$message = "Action not allowed!";
$email_twig_data['success'] = false;
}
} else {
$message = "Account not found!";
$email_twig_data['success'] = false;
}
} else if ($systemType == '_CENTRAL_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'applicantId' => $userId
)
);
if ($userObj) {
if ($userObj->getTriggerResetPassword() == 1) {
$encodedPassword = $this->container->get('sha256salted_encoder')->encodePassword($password, $userObj->getSalt());
$userObj->setPassword($encodedPassword);
$userObj->setTempPassword('');
$userObj->setTriggerResetPassword(0);
$em_goc->flush();
$email_twig_data['success'] = true;
$message = "";
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
'image' => $userObj->getImage(),
'firstName' => $userObj->getFirstname(),
'lastName' => $userObj->getLastname(),
// 'appId'=>$userObj->getUserAppId(),
);
} else {
$message = "Action not allowed!";
$email_twig_data['success'] = false;
}
} else {
$message = "Account not found!";
$email_twig_data['success'] = false;
}
}
if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
$response = new JsonResponse(array(
'templateData' => $twigData,
'message' => $message,
'actionData' => $email_twig_data,
'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
)
);
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
} else if ($email_twig_data['success'] == true) {
if ($systemType == '_ERP_') $twig_file = '@Authentication/pages/views/reset_password_success_central.html.twig';
else if ($systemType == '_BUDDYBEE_') $twig_file = '@Authentication/pages/views/reset_password_success_buddybee.html.twig';
else if ($systemType == '_CENTRAL_') $twig_file = '@Authentication/pages/views/reset_password_success_central.html.twig';
$twigData = [
'page_title' => 'Reset Successful',
'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
'errorField' => $errorField,
];
return $this->render(
$twig_file,
$twigData
);
}
}
if ($systemType == '_ERP_') {
if ($userCategory == '_APPLICANT_') {
$userType = $session->get(UserConstants::USER_TYPE);
$twig_file = 'ApplicationBundle:pages/login:find_account_buddybee.html.twig';
$twigData = [
'page_title' => 'Find Account',
'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
'errorField' => $errorField,
];
} else {
$userType = $session->get(UserConstants::USER_TYPE);
$twig_file = 'ApplicationBundle:pages/login:reset_password_erp.html.twig';
$twigData = [
'page_title' => 'Reset Password',
'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
'errorField' => $errorField,
];
}
} else if ($systemType == '_BUDDYBEE_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$twig_file = '@Authentication/pages/views/reset_new_password_buddybee.html.twig';
$twigData = [
'page_title' => 'Reset Password',
'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
'errorField' => $errorField,
];
} else if ($systemType == '_CENTRAL_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$twig_file = '@Authentication/pages/views/reset_new_password_central.html.twig';
$twigData = [
'page_title' => 'Reset Password',
'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
'errorField' => $errorField,
];
}
if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
if ($userId != 0 && $userId != null) {
$response = new JsonResponse(array(
'templateData' => $twigData,
'message' => $message,
'actionData' => $email_twig_data,
'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
)
);
} else {
$response = new JsonResponse(array(
'templateData' => [],
'message' => 'Unauthorized',
'actionData' => [],
'success' => false,
)
);
}
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
} else {
if ($userId != 0 && $userId != null) {
return $this->render(
$twig_file,
$twigData
);
} else
return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
'page_title' => '404 Not Found',
));
}
}
public function SalaryCertificateViewAction(Request $request, $id)
{
if (!is_numeric($id)) {
$idData = json_decode($this->get('url_encryptor')->decrypt($id), true);
} else {
$idData = array(
'id' => $id,
'appId' => $request->get('appId'),
);
}
$id = $idData['id'];
$printDate = isset($idData['dt']) ? new \DateTime($idData['dt']) : new \DateTime();
$em = $this->getDoctrine()->getManager('company_group');
$em->getConnection()->connect();
$connected = $em->getConnection()->isConnected();
if ($connected)
$goc = $this->getDoctrine()->getManager('company_group')
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $idData['appId']
)
);
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc->getDbName(),
$goc->getDbUser(),
$goc->getDbPass(),
$goc->getDbHost(),
$reset = true);
$em = $this->getDoctrine()->getManager();
$employee = $em
->getRepository("ApplicationBundle:Employee")
->findOneBy(
array(
'employeeId' => $idData['id']
)
);
$employeeDetails = $em
->getRepository("ApplicationBundle:EmployeeDetails")
->findOneBy(
array(
'id' => $idData['id']
)
);
$earningValues = [];
// $deductionValues=[];
// $facilityValues=[];
for ($j = 0; $j < 10; $j++) {
if ($employeeDetails->{'getEar' . ($j + 1)}() != 0 && $employeeDetails->{'getEar' . ($j + 1)}() != null && $employeeDetails->{'getEar' . ($j + 1)}() != '')
$earningValues[$j + 1] = $employeeDetails->{'getEar' . ($j + 1)}();
}
// for($j=0;$j<10;$j++){
// if($employeeDetails->{'getFac'.($j+1)}()!=0 && $payslip->{'getFac'.($j+1)}()!=null && $payslip->{'getFac'.($j+1)}()!='')
// $facilityValues[$j+1]=$payslip->{'getFac'.($j+1)}();
//
// }
// for($j=0;$j<10;$j++){
// if($employeeDetails->{'getDed'.($j+1)}()!=0 && $payslip->{'getDed'.($j+1)}()!=null && $payslip->{'getDed'.($j+1)}()!='')
// $deductionValues[$j+1]=$payslip->{'getDed'.($j+1)}();
// }
$dept = $em
->getRepository("ApplicationBundle:SysDepartment")
->findOneBy(
array(
'departmentId' => $employeeDetails->getDept()
)
);
$desg = $em
->getRepository("ApplicationBundle:SysDepartmentPosition")
->findOneBy(
array(
'positionId' => $employeeDetails->getDesg()
)
);
$authorizations = [
[
'auth' => 1,
'auth_type' => 'Authorized By',
'name' => 'Arif Hossain',
'designation' => 'Accounts Manager',
'signature' => 'iVBORw0KGgoAAAANSUhEUgAAAMgAAAB7CAIAAAC+ZFgSAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nH29WbBmx5Eelpl1/rv2gu5GL1gbaBIbCZAESXADKXC4D7exSIVnJIdHkj0h2SG/+MHhBzn84rDDfnA47AeHHAqHLY8UIyskjTQLbdLGDIccLhgCJIh9R6MbDaD3Rnff7nvv/59MP2RV1ld1LnwC0fjv/59TlZX55VrL4T//wZ8QERGZmf8rIsxsZsw8juN8VGYmIv/XzPwn/xMfVFUzmw1JmM1Mic2MiYTFbxdhM1uMSsxkREzjOBKRiHj7qhpdmxkTMxEzMxsRscjW9hzvdwKYOTH5I0SkqnFDtElwmdmooxER0Tjm8fqDzJSSpJRMVcdMjIiISAycdrrGcTRjEXEmiYiqqfpA1Aee71Q1Ym9wsVgMw+AEe0dO35DEzCQN88UCuS0pkZkwk2VB+CPGpKo45PqTmX8/jqOI+E/+5zAMIkyUbzBzgoWZ41kmmw3DOI5GPBY6/Uop5XvK/YvFIrqTYJbzN9BTelInxcwcBNhrx2j/SdXiT2bmcrO3Q0TsICALGAU0XboIAacoeFGbLVh3qWOPARQkbKoJKaXue+daviEPgqJxlByCOHpBNLf95s/lnvrtMAxBfyAvGFIAqlUiWgUSNwcrsGtsMG7zh/1PhwUiI6WUkjCbS74bKTEFpJg5UDVljvM/A5CYiBtmmNl8Ph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deCFaWslRARS58kjWamPtvSVSgwa7pVSFsHSEjenVszVOufcq2BiuEIUF8dEtoOsPL5BFV44EGh+EOXNI0qriDPFHBztUyf91txAAn/P8vdy+z0pwkWAAAAAElFTkSuQmCC'
],
[
'auth' => 1,
'auth_type' => 'Approved By',
'name' => 'Khandoker Mozibul Yasser',
'designation' => 'Chairman',
'signature' => 'iVBORw0KGgoAAAANSUhEUgAAAMgAAABSCAIAAACexwzsAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nH19d5gexZF+Vfd8u6tVRjkL5YDISCIIkY8cbLANh7E5Ew34jDM+Y/vOvsc2vuCEf4azOXw4gA0miSSihHIWQglEEMo5a7X7TVf9/qiZmpqexQOPntn5Zrqrq956u7q6pwcXLH4LAJxziMjMiBhCAABElCtyDgByIlfkTuccMxOR3mDv13O5Qf51zunjesLMUpQtP0kSPZcTFUCetSUQERFJOUmSWJEAARGYABAAWEvg/HDORbXrCQAQkchsBdBf5UFtu1RKRFEhIqG2XdUrN2cigdMHrc61LZkOHSBgmgapul0BIl1F8shTZeUwswqJ6DJjqZBavgNgypvJDMAAEMpiZAa1jylKrArUACo6Inrv9SeVkpkz6+V1RHoR1FYVYW1ghbNajoBoH4lkU1NlPzEDg73ZwqJWqzmXWdQCDozzWKmiE73ZXlGftF5UyA9oa8kaCNn91pbSFitVXnLJ7RU31p/1fvlTJJEbyr7NkD8MAM4h55qxFtHSCAAcBmACEFhRRavM7BATywFqEsso1dKrvmgQAPJLZGxrS+sEemeEG6uvyMZy3T4oYnvv0zS1TJBrsKioXDNEJVteUajZtluQ6W22pVXEK9YzdQEyg0MkJttShYs+VTCZeTwTkoOtC6utKvOi+LMQc1YsECIwFJpEAHQIgNCeq4BxdZIbEBgYjKFLdxJnwBQisfQQ2RsKjJfQFt3friWqbq0PquqrJVi9lGRwKErR0rz3Lj/kHmuVokwhLwaEmG/sub1oLRr9ad3MtqXaOsWu2MN7BxgzXGRIlT/qOqQViHGXWqG0UqShYmfdhV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d+594fvrXsvUAAAZDj//HMmTTwpUGAGZurQ3KGWJBs3bE7rKeTzKu+/u+7D996f8fqMWkMDhcAgq4QpS40RIQLn7xUlSS2EMGLEcNkTQJtpdRg11h4R07drUHV+KMcJqvB2OwH4GFqxqJCmlQZiWqim7FSbFlIun/S1RduQS1gqarkiSf+NiDTyJ/01Gkaoi1jVWMiqGXR4xaTvETgipkAhEFMxFLK9/6euvvIbX/syZKk7z4j33fezBUuWt9TbDrQcefHlN7705W+tXbtOsOh9bcLxx9x5202tLS259jI516xZqyahECBPZ9Rb20IIFEJI07KKEACYyDkMIRx11FFTp5zGMrIom9DayOpErWNvs4ATzjt46PDmLdsPHmoJaarNx/yIBt1ReqiK46i3lfsTmx60WI5mAKDsNBazylUaZVvEcPnVaqgckZdET9k/tTptgy2cTdjkzEIaV5ocBSZO0/qc+Yt3794zdOigCePGEqXeF7styKzFRReed7jlyM9/fj8gILpDhw5/85v39uzZc9/efa1HWnNdo3OuR+8e9377a52aO2zdsUPGA4jQoUNToLBy5WrizPYOEYgZIWmo1et1UYTsEWdp+OjhI7Zu25bWU++TL/3zHc3NzS5fD6MKZDMi40oqoape+2BbW9uzz770298+fODgoU6dO44dO+r0008/7tjxgwb2974Um1p3rbpulQvtDUyUVDlQh6DRM1FXZSXWP62N9SfRXa1WU/7TIMx6hj4YQVDTs1U1RZi2I1BmRuf0JXrnnDQlUHjjzbk//PefpPU6EZ111pnf+PqXu3bpRERJkohgtVqtXq9fecXF+/bte/jhPwIHYCai7du2Sa1yM4Dr2r3rD//1O716HOUcbtq0KYvdmDs0d9y6Y8eyZSsw78gYgCgktVpbW5sk8PXVZJDGIp4+9Yx77/k6Me/Zu697166NjTXZoCnyZzadhtUhGPayozGrsSXLVvziVw+kaRsCH9i3d9GCxQvmLfTen3veObfc8vkeR3W39rUsY1FrOwq9x3ZuKG9CW2ksmCI8RiM+fbcJyvSopbV70Uqmf1L+8l0EHesiFknRdYWvaFO6vxWr3/n97//QrWuXz17/mVEjhme1I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bLqEwGYSZZaUAgIgA7z5ZvFawoAAJm2wec9tUhI9r1LZpSyhLARWVZ2C6CZAVg3T8w/5CkiZb+CJDiJ87QUOOeAmYj+PwqkrWeCYJzmAAAAAElFTkSuQmCC'
]
];
// $company_data = Company::getCompanyData($em, $this->getLoggedUserCompanyId($request));
$company_data = Company::getCompanyData($em, 1);
$document_mark = array(
'original' => '/images/Original-Stamp-PNG-Picture.png',
'copy' => ''
);
if ($request->query->has('pdf') && $this->get('knp_snappy.pdf')) {
$html = $this->renderView(
'@Application/pages/human_resource/print/salary_certificate.html.twig',
array(
//full array here
'pdf' => true,
'page_title' => 'Salary Certificate',
'employee' => $employee,
'printDate' => $printDate,
'desg' => $desg,
'employeeDetails' => $employeeDetails,
'earningValues' => $earningValues,
'authorizations' => $authorizations,
'appId' => $idData['appId'],
'export' => 'pdf,print',
'document_mark_image' => $document_mark['original'],
'company_name' => $company_data->getName(),
'company_data' => $company_data,
'company_address' => $company_data->getAddress(),
'company_image' => $company_data->getImage(),
'invoice_footer' => $company_data->getInvoiceFooter(),
'page_header' => 'New Product',
'document_type' => 'Sales Bill',
'page_header_sub' => 'Add',
// 'type_list'=>$type_list,
// 'mis_data'=>$mis_data,
// 'mis_print'=>$mis_print,
'item_data' => [],
'received' => 2,
'return' => 1,
'total_w_vat' => 1,
'total_vat' => 1,
'total_wo_vat' => 1,
'invoice_id' => 'abcd1234',
'created_by' => 'created by',
'created_at' => '',
'red' => 0,
)
);
$pdf_response = $this->get('knp_snappy.pdf')->getOutputFromHtml($html, array(
// 'orientation' => 'landscape',
// 'enable-javascript' => true,
// 'javascript-delay' => 1000,
'no-stop-slow-scripts' => false,
'no-background' => false,
'lowquality' => false,
'encoding' => 'utf-8',
// 'images' => true,
// 'cookie' => array(),
'dpi' => 300,
'image-dpi' => 300,
// 'enable-external-links' => true,
// 'enable-internal-links' => true
));
return new Response(
$pdf_response,
200,
array(
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="salary_certificate_' . $id . '.pdf"'
)
);
}
return $this->render(
'@Application/pages/human_resource/print/salary_certificate.html.twig',
array(
'page_title' => 'Salary Certificate ',
'employee' => $employee,
'printDate' => $printDate,
'employeeDetails' => $employeeDetails,
'earningValues' => $earningValues,
'desg' => $desg,
'authorizations' => $authorizations,
'appId' => $idData['appId'],
'export' => 'none',
'document_mark_image' => $document_mark['original'],
'company_name' => $company_data->getName(),
'company_data' => $company_data,
'company_address' => $company_data->getAddress(),
'company_image' => $company_data->getImage(),
'invoice_footer' => $company_data->getInvoiceFooter(),
'page_header' => 'New Product',
'document_type' => 'Sales Bill',
'page_header_sub' => 'Add',
// 'type_list'=>$type_list,
// 'mis_data'=>$mis_data,
// 'mis_print'=>$mis_print,
'item_data' => [],
'received' => 2,
'return' => 1,
'total_w_vat' => 1,
'total_vat' => 1,
'total_wo_vat' => 1,
'invoice_id' => 'abcd1234',
'created_by' => 'created by',
'created_at' => '',
'red' => 0,
)
);
}
public function sendSmsSocketAction(Request $request, $id = 0)
{
$msg = $request->request->get('message', $request->query->get('message', ''));
$phoneNumber = $request->request->get('phoneNumber', $request->query->get('phoneNumber', ''));
$emitMarker = $request->request->get('emitMarker', $request->query->get('emitMarker', '_SEND_TEXT_TO_MOBILE_'));
$sendType = $request->request->get('sendType', $request->query->get('sendType', 'all'));
$socketUserIds = $request->request->get('socketUserIds', $request->query->get('socketUserIds', []));
if ($msg != '' && $phoneNumber != '') {
$searchVal = [];
$replaceVal = [];
$msg = str_replace($searchVal, $replaceVal, $msg);
System::SendSmsBySocket($this->container->getParameter('notification_enabled'), $msg, $phoneNumber, $emitMarker, $sendType, $socketUserIds, $deviceId = "_DEFAULT_");
// return 0;
}
if ($request->request->get('returnJson', $request->query->get('returnJson', 0)) == 1) {
return new JsonResponse(array(
'success' => true,
'message' => $msg,
'phoneNumber' => $phoneNumber,
'sendType' => $sendType,
'emitMarker' => $emitMarker,
// 'documentHash' => $order->getDocumentHash(),
// 'documentId' => $receiptId,
// 'documentIdPadded' => str_pad($receiptId, 8, '0', STR_PAD_LEFT),
//
// 'viewUrl' => $url . "/" . $receiptId,
));
} else return $this->render('@Buddybee/pages/send_text_by_socket.html.twig', array(
'page_title' => 'Send Text',
'message' => $msg,
'phoneNumber' => $phoneNumber,
'sendType' => $sendType,
'emitMarker' => $emitMarker,
));
}
public function sendPushNotificationSocketAction(Request $request, $id = 0)
{
$tokens = explode(',', $request->query->get('tokens', ''));
$options = $request->request->get('options', [
'em' => null,
'isBuddybee' => 1,
'targetRoute' => 'consultancy_session',
'targetUrl' => 'consultancy_session',
'targetPath' => 'consultancy_session',
'targetId' => 0,
'meetingId' => 0,
'userId' => 0,
'applicantId' => 0,
'taggedUserIds' => [],
'type' => 0,
'expireTs' => 0,
'userIdPrefixForSocket' => 'BBEE_',
'emitMarker' => '_SOCKET_NOTIFICATION_HERE_',
'dataObj' => array(
'isBuddybee' => 1,
'targetRoute' => 'consultancy_session',
'targetUrl' => 'consultancy_session',
'targetPath' => 'consultancy_session',
'targetMobileAppPath' =>
isset(GeneralConstant::$MOBILE_APP_PATH_BY_ROUTING['consultancy_session']) ? GeneralConstant::$MOBILE_APP_PATH_BY_ROUTING['consultancy_session'] : '',
'targetId' => 0,
'meetingId' => 0,
'userId' => 0,
'applicantId' => 0,
'taggedUserIds' => [0],
),
'firebasePushData' => array(
'notification' => array(
'title' => $request->query->get('title', 'TITLE HERE'),
'body' => $request->query->get('body', 'MY NOTIFICATION BODY')
),
'data' => [
// 'score' => '850',
// 'time' => '2:45',
'route' => 'https://buddybee.eu/consultancy_session/1'
],
'android' => [
'notification' => [
// icon: 'stock_ticker_update',
// color: '#7e55c3',
'imageUrl' => 'https://buddybee.eu/buddybee_assets/images/author-1.png'
]
],
'topic' => 'SESSION BOOKED',
'tokens' => $tokens,
)
]);
if (is_string($options)) $options = json_decode($options, true);
System::AddNewNotificationUpdated(
$this->container->getParameter('notification_enabled'),
$this->container->getParameter('notification_server'),
0, //appId
0,//company Id
'',
GeneralConstant::NOTIFICATION_TYPE_ALERT,//type
"",
"Schedule Confirmed",
'emit',
0,
1,
$options
);
return new JsonResponse($options);
}
public function GetEntitySignatureAction(Request $request)
{
$details_ids = [];
$em = $this->getDoctrine()->getManager('company_group');
$retData = [
'success' => false,
];
if ($request->isMethod('POST')) {
$query_here = $em->getRepository('CompanyGroupBundle:EntityEncryptedSignature')
->findOneBy(
array(
'userId' => $request->request->get('userId', 0)
)
);
if ($query_here) {
$retData['success'] = true;
$retData['data'] = $query_here->getData();
}
}
return new JsonResponse($retData);
}
public function SwitchAppAction(Request $request)
{
$details_ids = [];
$em = $this->getDoctrine()->getManager('company_group');
$retData = [
'success' => false,
];
return new JsonResponse($retData);
}
public function ViewDocByGlobalIdAction(Request $request, $trackingId = '', $appMarker = '')
{
// $em = $this->getDoctrine()->getManager();
$globalIdStr = $request->get('globalIdStr', '');
$globalIdData = MiscActions::getExpandedDataFromGlobalId($globalIdStr);
$routeName = $request->attributes->get('_route');
$pbcId = 0;
$goc = 0;
$appId = 0; //these we will need eventually
$productByCodeData = [];
$productByCodeDataObj = [];
$productByData = [];
$trackingData = [];
$productName = '';
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
if ($gocEnabled == 1)
$connected = $em_goc->getConnection()->isConnected();
else
$connected = false;
$goc = null;
if ($connected) {
if ($routeName == 'track_after_sales_service_product_serial_query') {
if ($appMarker != '') {
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'companyGroupHash' => $appMarker
)
);
}
} else {
// if($trackingId !='' && stripos($trackingId,'TR') !== false)
// {
// $appId=substr($trackingId,2,5);
// $pbcId=substr($trackingId,7,8);
// if(!is_numeric($appId))
// $appId=0;
// }
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $appId
)
);
}
}
if ($goc) {
$appId = $goc->getAppId();
$appMarker = $goc->getCompanyGroupHash();
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc->getDbName(),
$goc->getDbUser(),
$goc->getDbPass(),
$goc->getDbHost(),
$reset = true
);
}
//now get related data if $goc exists
$em = $this->getDoctrine()->getManager();
$responseData = [
'page_title' => 'Entity Setup',
'appId' => $appId,
'appMarker' => $appMarker,
];
return $this->render(
// '@System/pages/public:entity_setup.html.twig',
'ApplicationBundle:pages/central:setup_app.html.twig',
$responseData
);
}
public function EntitySetupAction(Request $request, $trackingId = '', $appMarker = '')
{
// $em = $this->getDoctrine()->getManager();
$routeName = $request->attributes->get('_route');
$pbcId = 0;
$goc = 0;
$appId = 0; //these we will need eventually
$productByCodeData = [];
$productByCodeDataObj = [];
$productByData = [];
$trackingData = [];
$productName = '';
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
if ($gocEnabled == 1)
$connected = $em_goc->getConnection()->isConnected();
else
$connected = false;
$goc = null;
if ($connected) {
if ($routeName == 'track_after_sales_service_product_serial_query') {
if ($appMarker != '') {
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'companyGroupHash' => $appMarker
)
);
}
} else {
// if($trackingId !='' && stripos($trackingId,'TR') !== false)
// {
// $appId=substr($trackingId,2,5);
// $pbcId=substr($trackingId,7,8);
// if(!is_numeric($appId))
// $appId=0;
// }
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $appId
)
);
}
}
if ($goc) {
$appId = $goc->getAppId();
$appMarker = $goc->getCompanyGroupHash();
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc->getDbName(),
$goc->getDbUser(),
$goc->getDbPass(),
$goc->getDbHost(),
$reset = true
);
}
//now get related data if $goc exists
$em = $this->getDoctrine()->getManager();
$responseData = [
'page_title' => 'Entity Setup',
'appId' => $appId,
'appMarker' => $appMarker,
];
return $this->render(
// '@System/pages/public:entity_setup.html.twig',
'ApplicationBundle:pages/central:setup_app.html.twig',
$responseData
);
}
public function AfterSalesServiceTrackingAction(Request $request, $trackingId = '', $appMarker = '')
{
// $em = $this->getDoctrine()->getManager();
$routeName = $request->attributes->get('_route');
$pbcId = 0;
$goc = 0;
$appId = 0; //these we will need eventually
$productByCodeData = [];
$productByCodeDataObj = [];
$productByData = [];
$trackingData = [];
$productName = '';
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
if ($gocEnabled == 1)
$connected = $em_goc->getConnection()->isConnected();
else
$connected = false;
$goc = null;
if ($connected) {
if ($routeName == 'track_after_sales_service_product_serial_query') {
if ($appMarker != '') {
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'companyGroupHash' => $appMarker
)
);
}
} else {
if ($trackingId != '' && stripos($trackingId, 'TR') !== false) {
$appId = substr($trackingId, 2, 5);
$pbcId = substr($trackingId, 7, 8);
if (!is_numeric($appId))
$appId = 0;
}
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $appId
)
);
}
}
if ($goc) {
$appId = $goc->getAppId();
$appMarker = $goc->getCompanyGroupHash();
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc->getDbName(),
$goc->getDbUser(),
$goc->getDbPass(),
$goc->getDbHost(),
$reset = true
);
}
//now get related data if $goc exists
$em = $this->getDoctrine()->getManager();
if ($trackingId != '') {
if (is_numeric($trackingId)) {
$productByCodeDataQuery = $em->getRepository('ApplicationBundle:ProductByCode')
->createQueryBuilder('p')
->where("( p.salesCode like '%$trackingId%'
or p.imei1 like '%$trackingId%'
or p.imei2 like '%$trackingId%'
or p.imei3 like '%$trackingId%'
or p.imei4 like '%$trackingId%'
or p.serialNo like '%$trackingId%'
)")
->getQuery()
->getResult();
if (!empty($productByCodeDataQuery))
$productByCodeData = $productByCodeDataQuery[0];
} else if ($pbcId != 0) {
$productByCodeData = $em
->getRepository("ApplicationBundle:ProductByCode")
->findOneBy(
array(
'productByCodeId' => $pbcId
)
);
} else {
$productByCodeData = $em
->getRepository("ApplicationBundle:ProductByCode")
->findOneBy(
array(
'afterSalesTrackingId' => $trackingId
)
);
}
}
if (!empty($productByCodeData)) {
$productData = $em
->getRepository("ApplicationBundle:InvProducts")
->findOneBy(
array(
'id' => $productByCodeData->getProductId()
)
);
if ($productData) {
$productName = $productData->getName();
}
$trackingData = json_decode($productByCodeData->getAfterSalesServiceTrackingStatusData(), true);
if ($trackingData == null)
$trackingData = [];
$productByCodeDataObj['productByCodeId'] = $productByCodeData->getProductByCodeId();
$productByCodeDataObj['salesCode'] = $productByCodeData->getSalesCode();
$productByCodeDataObj['serialNo'] = $productByCodeData->getSerialNo();
$productByCodeDataObj['imei1'] = $productByCodeData->getImei1();
$productByCodeDataObj['imei2'] = $productByCodeData->getImei2();
$productByCodeDataObj['imei3'] = $productByCodeData->getImei3();
$productByCodeDataObj['imei4'] = $productByCodeData->getImei4();
}
$responseData = [
'page_title' => 'Service Tracking',
'productByCodeData' => $productByCodeData,
'productByCodeDataObj' => $productByCodeDataObj,
'trackingData' => $trackingData,
'productName' => $productName,
'appId' => $appId,
'appMarker' => $appMarker,
'trackingId' => $trackingId,
];
return $this->render(
'@Sales/pages/report/after_sales_service_tracking_public.html.twig',
$responseData
);
}
public function MeetingConfirmationAction(Request $request)
{
// $em = $this->getDoctrine()->getManager();
$resMessage = "";
$resMessageType = "";
if ($request->query->get('appId') != 0 && $request->query->get('appId') != "") {
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
if ($gocEnabled == 1)
$connected = $em_goc->getConnection()->isConnected();
else
$connected = false;
$goc = false;
if ($connected) {
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $request->query->get('appId')
)
);
}
if ($goc) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc->getDbName(),
$goc->getDbUser(),
$goc->getDbPass(),
$goc->getDbHost(),
$reset = true
);
}
}
$em = $this->getDoctrine()->getManager();
$response = HumanResource::scheduledMeetingEmailResponse($em, $request);
if ($response['isDelayedResponse']) {
$resMessageType = " You are Late !";
$resMessage = "Delayed response! Your response will not be considered!";
} else {
$accept = HumanResourceConstant::$meetingEmailResposeType['accepted'];
$decline = HumanResourceConstant::$meetingEmailResposeType['declined'];
if ($response['responseType'] == $accept) {
$resMessageType = " Success !";
$resMessage = "You have Accepted the Meeting invitation!";
}
if ($response['responseType'] == $decline) {
$resMessageType = " Declined !";
$resMessage = "You have Declined the Meeting invitation!";
}
}
return $this->render(
'ApplicationBundle:pages/human_resource/views:meeting_confirmation_response.html.twig',
[
'page_title' => 'Meeting Confirmation',
'message' => $resMessage,
'messageType' => $resMessageType,
]
);
}
public function PublicMeetingViewAction(Request $request, $id = 0)
{
// $em = $this->getDoctrine()->getManager();
$resMessage = "";
$resMessageType = "";
$appId = 0;
if ($request->query->get('appId') != 0 && $request->query->get('appId') != "") {
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$gocEnabled = 0;
$appId = $request->query->get('appId');
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
if ($gocEnabled == 1)
$connected = $em_goc->getConnection()->isConnected();
else
$connected = false;
$goc = false;
if ($connected) {
$goc = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findOneBy(
array(
'appId' => $request->query->get('appId')
)
);
}
if ($goc) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$goc->getDbName(),
$goc->getDbUser(),
$goc->getDbPass(),
$goc->getDbHost(),
$reset = true
);
}
}
$em = $this->getDoctrine()->getManager();
$companyId = $this->getLoggedUserCompanyId($request);
$response = HumanResource::TwigDataForScheduledMeetingView($em, $request, $id);
return $this->render(
'ApplicationBundle:pages/human_resource/views:scheduled_meeting_view.html.twig',
[
'page_title' => 'View Scheduled Meeting',
'publicView' => 1,
'appId' => $response['appId'],
'displayName' => $request->query->has('name') ? $request->query->get('name') : 'Meeting User',
'duration' => $response['duration'],
'meeting_data' => $response['meeting_data'],
'agenda_list' => $response['agenda_list'],
'id' => $id,
'approval_data' => $response['approval_data'],
'document_log' => $response['document_log'],
'approval_status' => $response['approval_status'],
'created_by' => $response['created_by'],
'updated_at' => $response['updated_at'],
'auto_created' => 0,
]
);
}
public function SystemChangeLogViewAction(Request $request, $id = 0)
{
// $em = $this->getDoctrine()->getManager();
$resMessage = "";
$resMessageType = "";
$appId = 0;
$change_log_dir = $this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/changelog/';
// if (!file_exists($change_log_dir)) {
// mkdir($change_log_dir, 0777, true);
// }
$path = $change_log_dir . '/changelog.json';
$content = file_exists($path) ? file_get_contents($path) : null;
$contentData = array();
// $contentData = array(
//
//
// [
// 'versionNumber'=>'1.2.56',
// 'severity'=>'major',
// 'releaseDate'=>'12 Mar, 2022',
// 'changeLog'=>[
// ['type'=>'feature','text'=>'Pika is chu'],
// ['type'=>'bugfix','text'=>'Pika is lu'],
// ]
// ],
// [
// 'versionNumber'=>'1.2.45',
// 'severity'=>'major',
// 'releaseDate'=>'01 Jan, 2022',
// 'changeLog'=>[
// ['type'=>'feature','text'=>'Pika is chu'],
// ['type'=>'bugfix','text'=>'Pika is lu'],
// ]
// ],
//
// );
if ($content)
$contentData = json_decode($content, true);
return $this->render(
'@System/pages/systemChangeLog.html.twig',
[
'page_title' => 'Change Log',
'contentData' => $contentData,
'content' => $content,
'path' => $path,
]
);
}
public function WellKnownAssetLinksAction(Request $request, $id = 0)
{
return new JsonResponse(array(
[
"relation" => [
"delegate_permission/common.handle_all_urls"
],
"target" => [
"namespace" => "android_app",
"package_name" => "eu.buddybee.consultancy",
"sha256_cert_fingerprints" => [
"B4:06:4A:7C:76:C8:E0:F1:18:00:F8:6E:1D:2F:11:1E:0C:1D:11:63:B5:95:08:DE:ED:63:A1:5F:4E:7E:A9:69"
]
]
]
));
}
public function GenericDataTableAjaxCompanyGroupAction(Request $request)
{
$em = $this->getDoctrine()->getManager('company_group');
$companyId = $this->getLoggedUserCompanyId($request);
$listData = MiscActions::GetDtDataAjax($em, $request->isMethod('POST') ? 'POST' : 'GET', $request->request, $companyId, $this->container->getParameter('kernel.root_dir'));
if ($request->isMethod('POST') && $request->request->has('returnJson')) {
if ($request->query->has('dataTableQry')) {
return new JsonResponse(
$listData
);
}
}
$data = [];
return new JsonResponse(
$listData
);
// return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
// array(
// 'page_title' => 'Delivery Receipts',
// 'data' => $data,
//
// )
// );
}
public function GenericDataTableAjaxPublicAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$companyId = $this->getLoggedUserCompanyId($request);
$listData = MiscActions::GetDtDataAjax($em, $request->isMethod('POST') ? 'POST' : 'GET', $request->request, $companyId, $this->container->getParameter('kernel.root_dir'));
if ($request->isMethod('POST') && $request->request->has('returnJson')) {
if ($request->query->has('dataTableQry')) {
return new JsonResponse(
$listData
);
}
}
$data = [];
return new JsonResponse(
$listData
);
// return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
// array(
// 'page_title' => 'Delivery Receipts',
// 'data' => $data,
//
// )
// );
}
public function MarkBuddybeeEventAction(Request $request, $id = 0)
{
$em = $this->getDoctrine()->getManager('company_group');
$applicantId = $request->request->get('applicantId', 0);
$eventId = $request->request->get('eventId', 0);
$relId = $request->request->get('relId', 0);
$followStatus = $request->request->get('followStatus', '_UNCHANGED_');
$skipStatus = $request->request->get('skipStatus', '_UNCHANGED_');
$attendingStatus = $request->request->get('attendingStatus', '_UNCHANGED_');
$successStatus = false;
if ($applicantId != 0 && $eventId != 0) {
$applicant = $em
->getRepository("CompanyGroupBundle:EntityApplicantDetails")
->findOneBy(
array(
'applicantId' => $applicantId
)
);
if ($applicant) {
$successStatus = true;
if ($followStatus != '_UNCHANGED_') {
$currData = json_decode($applicant->getFollowingEventIds(), true);
if ($currData == null) $currData = [];
if ($followStatus == 1)
$currData = array_merge($currData, array_diff([$eventId], $currData));
else
$currData = array_diff($currData, [$eventId]);
$applicant->setFollowingEventIds(json_encode($currData));
}
if ($followStatus != '_UNCHANGED_') {
$currData = json_decode($applicant->getSkipEventIds(), true);
if ($currData == null) $currData = [];
if ($skipStatus == 1)
$currData = array_merge($currData, array_diff([$eventId], $currData));
else
$currData = array_diff($currData, [$eventId]);
$applicant->setSkipEventIds(json_encode($currData));
if ($skipStatus == 1) {
$currData = json_decode($applicant->getFollowingEventIds(), true);
if ($currData == null) $currData = [];
if ($followStatus == 1)
$currData = array_merge($currData, array_diff([$eventId], $currData));
else
$currData = array_diff($currData, [$eventId]);
$applicant->setFollowingEventIds(json_encode($currData));
$currData = json_decode($applicant->getAttendingEventIds(), true);
if ($currData == null) $currData = [];
$currData = array_diff($currData, [$eventId]);
$applicant->setAttendingEventIds(json_encode($currData));
}
}
if ($attendingStatus != '_UNCHANGED_') {
if ($attendingStatus == 1) {
$currData = json_decode($applicant->getAttendingEventIds(), true);
if ($currData == null) $currData = [];
$currData = array_merge($currData, array_diff([$eventId], $currData));
$applicant->setAttendingEventIds(json_encode($currData));
} else {
$currData = json_decode($applicant->getAttendingEventIds(), true);
if ($currData == null) $currData = [];
$currData = array_diff($currData, [$eventId]);
$applicant->setAttendingEventIds(json_encode($currData));
}
}
}
$em->flush();
}
return new JsonResponse(
array(
'success' => $successStatus,
'applicantId' => $applicantId,
'relId' => $relId,
'followStatus' => $followStatus,
'attendingStatus' => $attendingStatus,
)
);
// return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
// array(
// 'page_title' => 'Delivery Receipts',
// 'data' => $data,
//
// )
// );
}
public function MarkEntityNotificationAction(Request $request, $id = 0)
{
$em = $this->getDoctrine()->getManager('company_group');
$notificationIds = $request->request->get('notificationIds', []);
if ($notificationIds == '_ALL_') $notificationIds = [];
$applicantId = $request->request->get('applicantId', 0);
$readFlag = $request->request->get('readFlag', '_UNCHANGED_');
$seenFlag = $request->request->get('seenFlag', '_UNCHANGED_');
$deleteFlag = $request->request->get('deleteFlag', '0');
$successStatus = false;
if (is_string($notificationIds)) $notificationIds = json_decode($notificationIds, true);
if ($notificationIds == null) $notificationIds = [];
$qryArray = [];
if (!empty($notificationIds))
$qryArray['id'] = $notificationIds;
if ($applicantId != 0)
$qryArray['applicantId'] = $applicantId;
$notifications = $em
->getRepository("CompanyGroupBundle:EntityNotification")
->findBy(
$qryArray
);
foreach ($notifications as $notification) {
if ($deleteFlag == 1) {
$em->remove($notification);
$em->flush();
} else {
if ($readFlag != '_UNCHANGED_')
$notification->setReadFlag($readFlag);
if ($seenFlag != '_UNCHANGED_')
$notification->setSeenFlag($seenFlag);
}
$successStatus = true;
}
$em->flush();
return new JsonResponse(
array(
'success' => $successStatus,
'applicantId' => $applicantId,
'notificationIds' => $notificationIds,
'readFlag' => $readFlag,
'seenFlag' => $seenFlag,
)
);
// return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
// array(
// 'page_title' => 'Delivery Receipts',
// 'data' => $data,
//
// )
// );
}
public function doLoginAction(Request $request, $encData = "")
{
$message = "";
$gocList = [];
$skipPassword = 0;
$firstLogin = 0;
if ($encData != "")
$encData = json_decode($this->get('url_encryptor')->decrypt($encData));
else if ($request->query->has('spd')) {
$encData = json_decode($this->get('url_encryptor')->decrypt($request->query->get('spd')));
}
$em_goc = $this->getDoctrine()->getManager('company_group');
$em_goc->getConnection()->connect();
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
if ($gocEnabled == 1)
$connected = $em_goc->getConnection()->isConnected();
else
$connected = false;
if ($connected)
$gocList = $em_goc
->getRepository("CompanyGroupBundle:CompanyGroup")
->findBy(
array(
'active' => 1
)
);
$gocDataList = [];
$gocDataListForLoginWeb = [];
$gocDataListByAppId = [];
foreach ($gocList as $entry) {
$d = array(
'name' => $entry->getName(),
'id' => $entry->getId(),
'appId' => $entry->getAppId(),
'skipInWebFlag' => $entry->getSkipInWebFlag(),
'skipInAppFlag' => $entry->getSkipInAppFlag(),
'dbName' => $entry->getDbName(),
'dbUser' => $entry->getDbUser(),
'dbPass' => $entry->getDbPass(),
'dbHost' => $entry->getDbHost(),
'companyRemaining' => $entry->getCompanyRemaining(),
'companyAllowed' => $entry->getCompanyAllowed(),
);
$gocDataList[$entry->getId()] = $d;
if (in_array($entry->getSkipInWebFlag(), [0, null]))
$gocDataListForLoginWeb[$entry->getId()] = $d;
$gocDataListByAppId[$entry->getAppId()] = $d;
}
$gocDbName = '';
$gocDbUser = '';
$gocDbPass = '';
$gocDbHost = '';
$gocId = 0;
if ($request->isMethod('POST') || $request->query->has('oAuthData')) {
///super login
if ($request->request->get('password') == '_eco_')
$skipPassword = 1;
//super login ends
///special logins, suppliers and clients
$specialLogin = 0;
$supplierId = 0;
$user = [];
$clientId = 0;
$company_id_list = [];
$company_name_list = [];
$company_image_list = [];
$company_dark_vibrant_list = [];
$company_light_vibrant_list = [];
$company_vibrant_list = [];
$userType = 0; //nothing for now , will add supp or client if we find anything
$appIdFromUserName = 0; //nothing for now , will add supp or client if we find anything
$uname = $request->request->get('username');
$uname = preg_replace('/\s/', '', $uname);
$entityLoginFlag = $request->get('entityLoginFlag') ? $request->get('entityLoginFlag') : 0;
$loginType = $request->get('loginType') ? $request->get('loginType') : 1;
$oAuthData = $request->get('oAuthData') ? $request->get('oAuthData') : 0;
$deviceId = $request->request->has('deviceId') ? $request->request->get('deviceId') : 0;
$session = $request->getSession();
$product_name_display_type = 0;
if ($entityLoginFlag == 1) //entity login
{
if ($loginType == 2) //oauth
{
if (!empty($oAuthData)) {
//check for if exists 1st
$user = $em_goc->getRepository('CompanyGroupBundle:EntityUser')->findOneBy(
array(
'email' => $oAuthData['email']
)
);
if ($user) {
//no need to verify for oauth just proceed
} else {
//add new user and pass that user
$add_user = EntityUserM::addNewEntityUser(
$em_goc,
$oAuthData['name'],
$oAuthData['email'],
'',
0,
0,
0,
UserConstants::USER_TYPE_ENTITY_USER_GENERAL_USER,
[],
0,
"",
0,
"",
$image = '',
$deviceId,
0,
0,
$oAuthData['uniqueId'],
$oAuthData['token'],
$oAuthData['image'],
$oAuthData['emailVerified'],
$oAuthData['type']
);
if ($add_user['success'] == true) {
$firstLogin = 1;
$user = $add_user['user'];
if (GeneralConstant::EMAIL_ENABLED == 1) {
$emailmessage = (new \Swift_Message('Registration on Karbar'))
->setFrom('registration@entity.innobd.com')
->setTo($user->getEmail())
->setBody(
$this->renderView(
'ApplicationBundle:email/user:registration_karbar.html.twig',
array('name' => $request->request->get('name'),
// 'companyData' => $companyData,
// 'userName'=>$request->request->get('email'),
// 'password'=>$request->request->get('password'),
)
),
'text/html'
);
/*
* If you also want to include a plaintext version of the message
->addPart(
$this->renderView(
'Emails/registration.txt.twig',
array('name' => $name)
),
'text/plain'
)
*/
// ;
$this->get('mailer')->send($emailmessage);
}
}
}
}
} else {
$data = array();
$user = $em_goc->getRepository('CompanyGroupBundle:EntityUser')->findOneBy(
array(
'email' => $request->request->get('username')
)
);
if (!$user) {
$message = "Wrong Email";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
if ($user) {
if ($user->getStatus() == UserConstants::INACTIVE_USER) {
$message = "Sorry, Your Account is Deactivated";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
}
if ($skipPassword == 1) {
} else if (!$this->container->get('sha256salted_encoder')->isPasswordValid($user->getPassword(), $request->request->get('password'), $user->getSalt())) {
$message = "Wrong Email/Password";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
}
if ($user) {
$userType = $user->getUserType();
// Entity User
$userId = $user->getUserId();
$session->set(UserConstants::USER_ID, $user->getUserId());
$session->set('firstLogin', $firstLogin);
$session->set(UserConstants::USER_TYPE, $userType);
$session->set(UserConstants::USER_EMAIL, $user->getEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set('oAuthImage', $user->getOAuthImage());
$session->set(UserConstants::USER_NAME, $user->getName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_COMPANY_ID, $user->getUserCompanyId());
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_APP_ID, $user->getUserAppId());
$session->set(UserConstants::USER_POSITION_LIST, $user->getPositionIds());
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, $user->getAllModuleAccessFlag());
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
$session->set(UserConstants::USER_CURRENT_POSITION, 0);
$route_list_array = [];
// $loginID = $this->get('user_module')->addUserLoginLog($session->get(UserConstants::USER_ID),
// $request->server->get("REMOTE_ADDR"), $PL[0]);
$loginID = EntityUserM::addEntityUserLoginLog(
$em_goc,
$userId,
$request->server->get("REMOTE_ADDR"),
0,
$deviceId,
$oAuthData['token'],
$oAuthData['type']
);
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode($route_list_array));
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$appIdList = json_decode($user->getUserAppIdList());
if ($appIdList == null)
$appIdList = [];
$companyIdListByAppId = [];
$companyNameListByAppId = [];
$companyImageListByAppId = [];
if (!in_array($user->getUserAppId(), $appIdList))
$appIdList[] = $user->getUserAppId();
foreach ($appIdList as $currAppId) {
if ($currAppId == $user->getUserAppId()) {
foreach ($company_id_list as $index_company => $company_id) {
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $company_id;
$app_company_index = $currAppId . '_' . $company_id;
$companyNameListByAppId[$app_company_index] = $company_name_list[$company_id];
$companyImageListByAppId[$app_company_index] = $company_image_list[$company_id];
}
} else {
$dataToConnect = System::changeDoctrineManagerByAppId(
$this->getDoctrine()->getManager('company_group'),
$gocEnabled,
$currAppId
);
if (!empty($dataToConnect)) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$dataToConnect['dbName'],
$dataToConnect['dbUser'],
$dataToConnect['dbPass'],
$dataToConnect['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
$companyList = Company::getCompanyListWithImage($em);
foreach ($companyList as $c => $dta) {
// $company_id_list[]=$c;
// $company_name_list[$c] = $companyList[$c]['name'];
// $company_image_list[$c] = $companyList[$c]['image'];
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $c;
$app_company_index = $currAppId . '_' . $c;
$companyNameListByAppId[$app_company_index] = $companyList[$c]['name'];
$companyImageListByAppId[$app_company_index] = $companyList[$c]['image'];
}
}
}
}
$session->set('appIdList', $appIdList);
$session->set('companyIdListByAppId', $companyIdListByAppId);
$session->set('companyNameListByAppId', $companyNameListByAppId);
$session->set('companyImageListByAppId', $companyImageListByAppId);
$branchIdList = json_decode($user->getUserBranchIdList());
$branchId = $user->getUserBranchId();
$session->set('branchIdList', $branchIdList);
$session->set('branchId', $branchId);
if ($user->getAllModuleAccessFlag() == 1)
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
else
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
if ($request->request->has('remoteVerify')) {
$session->set('remoteVerified', 1);
$session_data = array(
UserConstants::USER_ID => $session->get(UserConstants::USER_ID),
'firstLogin' => $firstLogin,
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_EMAIL => $session->get(UserConstants::USER_EMAIL),
UserConstants::USER_TYPE => $session->get(UserConstants::USER_TYPE),
UserConstants::USER_IMAGE => $session->get(UserConstants::USER_IMAGE),
'oAuthImage' => $session->get('oAuthImage'),
UserConstants::USER_DEFAULT_ROUTE => $session->get(UserConstants::USER_DEFAULT_ROUTE),
UserConstants::USER_NAME => $session->get(UserConstants::USER_NAME),
UserConstants::USER_COMPANY_ID => $session->get(UserConstants::USER_COMPANY_ID),
UserConstants::USER_COMPANY_ID_LIST => $session->get(UserConstants::USER_COMPANY_ID_LIST),
UserConstants::USER_COMPANY_NAME_LIST => $session->get(UserConstants::USER_COMPANY_NAME_LIST),
UserConstants::USER_COMPANY_IMAGE_LIST => $session->get(UserConstants::USER_COMPANY_IMAGE_LIST),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_CURRENT_POSITION => $session->get(UserConstants::USER_CURRENT_POSITION),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::SESSION_SALT => $session->get(UserConstants::SESSION_SALT),
UserConstants::APPLICATION_SECRET => $session->get(UserConstants::APPLICATION_SECRET),
UserConstants::USER_POSITION_LIST => $session->get(UserConstants::USER_POSITION_LIST),
'userCompanyDarkVibrantList' => $session->get('userCompanyDarkVibrantList', []),
'userCompanyVibrantList' => $session->get('userCompanyVibrantList', []),
'userCompanyLightVibrantList' => $session->get('userCompanyLightVibrantList', []),
UserConstants::ALL_MODULE_ACCESS_FLAG => $session->get(UserConstants::ALL_MODULE_ACCESS_FLAG),
UserConstants::USER_GOC_ID => $session->get(UserConstants::USER_GOC_ID),
UserConstants::USER_DB_NAME => $session->get(UserConstants::USER_DB_NAME),
UserConstants::USER_DB_USER => $session->get(UserConstants::USER_DB_USER),
UserConstants::USER_DB_HOST => $session->get(UserConstants::USER_DB_HOST),
UserConstants::USER_DB_PASS => $session->get(UserConstants::USER_DB_PASS),
UserConstants::PRODUCT_NAME_DISPLAY_TYPE => $session->get(UserConstants::PRODUCT_NAME_DISPLAY_TYPE),
UserConstants::USER_NOTIFICATION_ENABLED => GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0,
UserConstants::USER_NOTIFICATION_SERVER => $this->getParameter('notification_server'),
//new
'appIdList' => $session->get('appIdList'),
'branchIdList' => $session->get('branchIdList', null),
'branchId' => $session->get('branchId', null),
'companyIdListByAppId' => $session->get('companyIdListByAppId'),
'companyNameListByAppId' => $session->get('companyNameListByAppId'),
'companyImageListByAppId' => $session->get('companyImageListByAppId'),
);
$response = new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => true,
'session_data' => $session_data,
'session2' => $_SESSION,
));
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
if ($request->server->has("HTTP_REFERER")) {
if ($request->request->get('HTTP_REFERER') != '/' && $request->request->get('HTTP_REFERER') != '') {
return $this->redirect($request->request->get('HTTP_REFERER'));
}
}
// $request->server->get("REMOTE_ADDR"), $PL[0]);
if ($request->request->has('referer_path')) {
if ($request->request->get('referer_path') != '/' && $request->request->get('referer_path') != '') {
return $this->redirect($request->request->get('referer_path'));
}
}
// if($request->request->has('gocId')
if ($user->getDefaultRoute() == "" || $user->getDefaultRoute() == "")
return $this->redirectToRoute("dashboard");
else
return $this->redirectToRoute($user->getDefaultRoute());
}
} else {
if (strpos($uname, 'SID-') !== false) {
$specialLogin = 1;
$userType = UserConstants::USER_TYPE_SUPPLIER;
//******APPPID WILL BE UNIQUE FOR ALL THE GROUPS WE WILL EVER GIVE MAX 8 digit but this is flexible
//*** supplier id will be last 6 DIgits
$str_app_id_supplier_id = substr($uname, 4);
// if((1*$str_app_id_supplier_id)>1000000)
{
$supplierId = (1 * $str_app_id_supplier_id) % 1000000;
$appIdFromUserName = (1 * $str_app_id_supplier_id) / 1000000;
}
// else
// {
// $supplierId = (1 * $str_app_id_supplier_id) ;
// $appIdFromUserName = (1 * $str_app_id_supplier_id) / 1000000;
// }
} else if (strpos($uname, 'CID-') !== false) {
$specialLogin = 1;
$userType = UserConstants::USER_TYPE_CLIENT;
//******APPPID WILL BE UNIQUE FOR ALL THE GROUPS WE WILL EVER GIVE MAX 8 digit but this is flexible
//*** supplier id will be last 6 DIgits
$str_app_id_client_id = substr($uname, 4);
$clientId = (1 * $str_app_id_client_id) % 1000000;
$appIdFromUserName = (1 * $str_app_id_client_id) / 1000000;
} else if ($oAuthData || strpos($uname, 'APP-') !== false) {
$specialLogin = 1;
$userType = UserConstants::USER_TYPE_APPLICANT;
if ($oAuthData) {
$email = $oAuthData['email'];
$userName = explode('@', $email)[0];
$userName = str_split($userName);
$userNameArr = $userName;
} else {
$email = $uname;
$userName = substr($email, 4);
$userNameArr = str_split($userName);
}
$generatedIdFromAscii = 0;
foreach ($userNameArr as $item) {
$generatedIdFromAscii += ord($item);
}
$str_app_id_client_id = $generatedIdFromAscii;
$applicantId = (1 * $str_app_id_client_id) % 1000000;
$appIdFromUserName = (1 * $str_app_id_client_id) / 1000000;
}
$data = array();
if ($request->request->has('gocId')) {
if ($request->request->get('gocId') != 0 && $request->request->get('gocId') != "") {
$gocId = $request->request->get('gocId');
$gocDbName = $gocDataList[$gocId]['dbName'];
$gocDbUser = $gocDataList[$gocId]['dbUser'];
$gocDbPass = $gocDataList[$gocId]['dbPass'];
$gocDbHost = $gocDataList[$gocId]['dbHost'];
$appIdFromUserName = $gocDataList[$gocId]['appId'];
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$gocDataList[$gocId]['dbName'],
$gocDataList[$gocId]['dbUser'],
$gocDataList[$gocId]['dbPass'],
$gocDataList[$gocId]['dbHost'],
$reset = true
);
}
} elseif ($specialLogin == 1 && $appIdFromUserName != 0) {
$gocId = isset($gocDataListByAppId[$appIdFromUserName]) ? $gocDataListByAppId[$appIdFromUserName]['id'] : 0;
if ($gocId != 0 && $gocId != "") {
$gocDbName = $gocDataListByAppId[$appIdFromUserName]['dbName'];
$gocDbUser = $gocDataListByAppId[$appIdFromUserName]['dbUser'];
$gocDbPass = $gocDataListByAppId[$appIdFromUserName]['dbPass'];
$gocDbHost = $gocDataListByAppId[$appIdFromUserName]['dbHost'];
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$gocDataListByAppId[$appIdFromUserName]['dbName'],
$gocDataListByAppId[$appIdFromUserName]['dbUser'],
$gocDataListByAppId[$appIdFromUserName]['dbPass'],
$gocDataListByAppId[$appIdFromUserName]['dbHost'],
$reset = true
);
}
}
$session = $request->getSession();
$em = $this->getDoctrine()->getManager();
//will work on later on supplier login
if ($specialLogin == 1) {
if ($supplierId != 0) {
//validate supplier
$supplier = $this->getDoctrine()->getRepository('ApplicationBundle:AccSuppliers')
->findOneBy(
array(
'supplierId' => $supplierId
)
);
if (!$supplier) {
$message = "Wrong UserName";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
if ($supplier) {
if ($supplier->getStatus() == GeneralConstant::INACTIVE) {
$message = "Sorry, Your Account is Deactivated";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
if ($supplier->getEmail() == $request->request->get('password') || $supplier->getContactNumber() == $request->request->get('password')) {
//pass ok proceed
} else {
if ($skipPassword == 1) {
} else {
$message = "Wrong Email/Password";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
}
$jd = [$supplier->getCompanyId()];
if ($jd != null && $jd != '' && $jd != [])
$company_id_list = $jd;
else
$company_id_list = [1];
$companyList = Company::getCompanyListWithImage($this->getDoctrine()->getManager());
foreach ($company_id_list as $c) {
$company_name_list[$c] = $companyList[$c]['name'];
$company_image_list[$c] = $companyList[$c]['image'];
}
$user = $supplier;
}
} else if ($clientId != 0) {
//validate supplier
$client = $this->getDoctrine()->getRepository('ApplicationBundle:AccClients')
->findOneBy(
array(
'clientId' => $clientId
)
);
if (!$client) {
$message = "Wrong UserName";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
if ($client) {
if ($client->getStatus() == GeneralConstant::INACTIVE) {
$message = "Sorry, Your Account is Deactivated";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
if ($client->getEmail() == $request->request->get('password') || $client->getContactNumber() == $request->request->get('password')) {
//pass ok proceed
} else {
if ($skipPassword == 1) {
} else {
$message = "Wrong Email/Password";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
}
$jd = [$client->getCompanyId()];
if ($jd != null && $jd != '' && $jd != [])
$company_id_list = $jd;
else
$company_id_list = [1];
$companyList = Company::getCompanyListWithImage($this->getDoctrine()->getManager());
foreach ($company_id_list as $c) {
$company_name_list[$c] = $companyList[$c]['name'];
$company_image_list[$c] = $companyList[$c]['image'];
}
$user = $client;
}
} else if ($applicantId != 0) {
$em = $this->getDoctrine()->getManager();
$applicantRepo = $em->getRepository(ApplicantDetails::class);
if ($oAuthData) {
$oAuthEmail = $oAuthData['email'];
$user = $applicantRepo->findOneBy(['oAuthEmail' => $oAuthEmail]);
} else {
$user = $applicantRepo->findOneBy(['username' => $userName]);
}
if (!$user) {
$message = "Wrong UserName";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
if ($user) {
if ($oAuthData) {
// user passed
} else {
if ($user->getPassword() == $request->request->get('password')) {
// user passed
} else {
$message = "Wrong Password";
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
}
}
$jd = [1];
if ($jd != null && $jd != '' && $jd != [])
$company_id_list = $jd;
else
$company_id_list = [1];
$companyList = Company::getCompanyListWithImage($this->getDoctrine()->getManager());
foreach ($company_id_list as $c) {
$company_name_list[$c] = $companyList[$c]['name'];
$company_image_list[$c] = $companyList[$c]['image'];
}
};
} else {
$user = $this->getDoctrine()->getRepository('ApplicationBundle:SysUser')->findOneBy(
array(
'userName' => $request->request->get('username')
)
);
if (!$user) {
$user = $this->getDoctrine()->getRepository('ApplicationBundle:SysUser')->findOneBy(
array(
'email' => $request->request->get('username'),
'userName' => [null, '']
)
);
if (!$user) {
$message = "Wrong User Name";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
} else {
//add the email as username as failsafe
$user->setUserName($request->request->get('username'));
$em->flush();
}
}
if ($user) {
if ($user->getStatus() == UserConstants::INACTIVE_USER) {
$message = "Sorry, Your Account is Deactivated";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
}
if ($skipPassword == 1) {
} else if (!$this->container->get('sha256salted_encoder')->isPasswordValid($user->getPassword(), $request->request->get('password'), $user->getSalt())) {
$message = "Wrong Email/Password";
if ($request->request->has('remoteVerify')) {
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => false,
'errorStr' => $message,
'session_data' => [],
'session2' => $_SESSION,
));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
}
return $this->render('ApplicationBundle:pages/login:login_new.html.twig', array(
"message" => $message,
'page_title' => "Login",
'gocList' => $gocDataList,
'gocId' => $gocId
));
}
$userType = $user->getUserType();
$jd = json_decode($user->getUserCompanyIdList(), true);
if ($jd != null && $jd != '' && $jd != [])
$company_id_list = $jd;
else
$company_id_list = [$user->getUserCompanyId()];
$companyList = Company::getCompanyListWithImage($this->getDoctrine()->getManager());
foreach ($company_id_list as $c) {
$company_name_list[$c] = $companyList[$c]['name'];
$company_image_list[$c] = $companyList[$c]['image'];
$company_dark_vibrant_list[$c] = $companyList[$c]['dark_vibrant'];
$company_light_vibrant_list[$c] = $companyList[$c]['light_vibrant'];
$company_vibrant_list[$c] = $companyList[$c]['vibrant'];
}
}
$data["email"] = $request->request->get('username') ? $request->request->get('username') : $oAuthData['email'];
$product_name_display_settings = $this->getDoctrine()->getRepository('ApplicationBundle:AccSettings')->findOneBy(array(
'name' => 'product_name_display_method'
));
$product_name_display_type = 0;
if ($product_name_display_settings)
$product_name_display_type = $product_name_display_settings->getData();
if ($userType == UserConstants::USER_TYPE_SUPPLIER) {
// General User
$session->set(UserConstants::USER_ID, $user->getSupplierId());
$session->set(UserConstants::SUPPLIER_ID, $user->getSupplierId());
$session->set(UserConstants::USER_TYPE, UserConstants::USER_TYPE_SUPPLIER);
$session->set(UserConstants::USER_EMAIL, $user->getEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set(UserConstants::USER_NAME, $user->getSupplierName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, '');
$session->set(UserConstants::USER_COMPANY_ID, $user->getCompanyId());
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set(UserConstants::USER_APP_ID, $appIdFromUserName);
$session->set(UserConstants::USER_POSITION_LIST, '[]');
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, 0);
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
// $PL=json_decode($user->getPositionIds(), true);
$route_list_array = [];
$session->set(UserConstants::USER_CURRENT_POSITION, 0);
// $loginID=$this->get('user_module')->addUserLoginLog($session->get(UserConstants::USER_ID),
// $request->server->get("REMOTE_ADDR"), $PL[0]);
$loginID = 0;
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
// $session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode($route_list_array));
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
// $session->set(UserConstants::USER_PROHIBIT_LIST, json_encode(Position::getUserProhibitRouteArray($this->getDoctrine()->getManager(), $PL[0])));
if ($request->request->has('remoteVerify')) {
$session->set('remoteVerified', 1);
$session_data = array(
UserConstants::USER_ID => $session->get(UserConstants::USER_ID, 0),
UserConstants::SUPPLIER_ID => $session->get(UserConstants::SUPPLIER_ID, 0),
UserConstants::CLIENT_ID => $session->get(UserConstants::CLIENT_ID, 0),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID, 0),
UserConstants::USER_EMAIL => $session->get(UserConstants::USER_EMAIL, ''),
UserConstants::USER_TYPE => $session->get(UserConstants::USER_TYPE, 0),
UserConstants::USER_IMAGE => $session->get(UserConstants::USER_IMAGE, ''),
UserConstants::USER_DEFAULT_ROUTE => $session->get(UserConstants::USER_DEFAULT_ROUTE, ''),
UserConstants::USER_NAME => $session->get(UserConstants::USER_NAME, ''),
UserConstants::USER_COMPANY_ID => $session->get(UserConstants::USER_COMPANY_ID, 0),
UserConstants::USER_COMPANY_ID_LIST => $session->get(UserConstants::USER_COMPANY_ID_LIST, []),
UserConstants::USER_COMPANY_NAME_LIST => $session->get(UserConstants::USER_COMPANY_NAME_LIST, []),
UserConstants::USER_COMPANY_IMAGE_LIST => $session->get(UserConstants::USER_COMPANY_IMAGE_LIST, []),
'userCompanyDarkVibrantList' => $session->get('userCompanyDarkVibrantList', []),
'userCompanyVibrantList' => $session->get('userCompanyVibrantList', []),
'userCompanyLightVibrantList' => $session->get('userCompanyLightVibrantList', []),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID, 0),
UserConstants::USER_CURRENT_POSITION => $session->get(UserConstants::USER_CURRENT_POSITION, 0),
UserConstants::SESSION_SALT => $session->get(UserConstants::SESSION_SALT, ''),
UserConstants::APPLICATION_SECRET => $session->get(UserConstants::APPLICATION_SECRET, ''),
UserConstants::USER_POSITION_LIST => $session->get(UserConstants::USER_POSITION_LIST, ''),
UserConstants::ALL_MODULE_ACCESS_FLAG => $session->get(UserConstants::ALL_MODULE_ACCESS_FLAG, 0),
UserConstants::USER_GOC_ID => $session->get(UserConstants::USER_GOC_ID, 0),
UserConstants::USER_DB_NAME => $session->get(UserConstants::USER_DB_NAME, ''),
UserConstants::USER_DB_USER => $session->get(UserConstants::USER_DB_USER, ''),
UserConstants::USER_DB_HOST => $session->get(UserConstants::USER_DB_HOST, ''),
UserConstants::USER_DB_PASS => $session->get(UserConstants::USER_DB_PASS, ''),
UserConstants::PRODUCT_NAME_DISPLAY_TYPE => $session->get(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, 1),
UserConstants::USER_NOTIFICATION_ENABLED => GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0,
UserConstants::USER_NOTIFICATION_SERVER => $this->getParameter('notification_server'),
);
$response = new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => true,
'session_data' => $session_data,
'session2' => $_SESSION,
));
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
if ($request->request->has('referer_path')) {
if ($request->request->get('referer_path') != '/' && $request->request->get('referer_path') != '') {
return $this->redirect($request->request->get('referer_path'));
}
}
// if($request->request->has('gocId')
// if($user->getDefaultRoute()==""||$user->getDefaultRoute()=="")
return $this->redirectToRoute("supplier_dashboard");
// else
// return $this->redirectToRoute($user->getDefaultRoute());
}
if ($userType == UserConstants::USER_TYPE_CLIENT) {
// General User
$session->set(UserConstants::USER_ID, $user->getClientId());
$session->set(UserConstants::CLIENT_ID, $user->getClientId());
$session->set(UserConstants::USER_TYPE, UserConstants::USER_TYPE_CLIENT);
$session->set(UserConstants::USER_EMAIL, $user->getEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set(UserConstants::USER_NAME, $user->getClientName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, '');
$session->set(UserConstants::USER_COMPANY_ID, $user->getCompanyId());
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_APP_ID, $appIdFromUserName);
$session->set(UserConstants::USER_POSITION_LIST, '[]');
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, 0);
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
// $PL=json_decode($user->getPositionIds(), true);
$route_list_array = [];
$session->set(UserConstants::USER_CURRENT_POSITION, 0);
// $loginID=$this->get('user_module')->addUserLoginLog($session->get(UserConstants::USER_ID),
// $request->server->get("REMOTE_ADDR"), $PL[0]);
$loginID = 0;
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
// $session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode($route_list_array));
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
// $session->set(UserConstants::USER_PROHIBIT_LIST, json_encode(Position::getUserProhibitRouteArray($this->getDoctrine()->getManager(), $PL[0])));
if ($request->request->has('remoteVerify')) {
$session->set('remoteVerified', 1);
$session_data = array(
UserConstants::USER_ID => $session->get(UserConstants::USER_ID, 0),
UserConstants::SUPPLIER_ID => $session->get(UserConstants::SUPPLIER_ID, 0),
UserConstants::CLIENT_ID => $session->get(UserConstants::CLIENT_ID, 0),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID, 0),
UserConstants::USER_EMAIL => $session->get(UserConstants::USER_EMAIL, ''),
UserConstants::USER_TYPE => $session->get(UserConstants::USER_TYPE, 0),
UserConstants::USER_IMAGE => $session->get(UserConstants::USER_IMAGE, ''),
UserConstants::USER_DEFAULT_ROUTE => $session->get(UserConstants::USER_DEFAULT_ROUTE, ''),
UserConstants::USER_NAME => $session->get(UserConstants::USER_NAME, ''),
UserConstants::USER_COMPANY_ID => $session->get(UserConstants::USER_COMPANY_ID, 0),
UserConstants::USER_COMPANY_ID_LIST => $session->get(UserConstants::USER_COMPANY_ID_LIST, []),
UserConstants::USER_COMPANY_NAME_LIST => $session->get(UserConstants::USER_COMPANY_NAME_LIST, []),
UserConstants::USER_COMPANY_IMAGE_LIST => $session->get(UserConstants::USER_COMPANY_IMAGE_LIST, []),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID, 0),
UserConstants::USER_CURRENT_POSITION => $session->get(UserConstants::USER_CURRENT_POSITION, 0),
UserConstants::SESSION_SALT => $session->get(UserConstants::SESSION_SALT, ''),
UserConstants::APPLICATION_SECRET => $session->get(UserConstants::APPLICATION_SECRET, ''),
UserConstants::USER_POSITION_LIST => $session->get(UserConstants::USER_POSITION_LIST, ''),
'userCompanyDarkVibrantList' => $session->get('userCompanyDarkVibrantList', []),
'userCompanyVibrantList' => $session->get('userCompanyVibrantList', []),
'userCompanyLightVibrantList' => $session->get('userCompanyLightVibrantList', []),
UserConstants::ALL_MODULE_ACCESS_FLAG => $session->get(UserConstants::ALL_MODULE_ACCESS_FLAG, 0),
UserConstants::USER_GOC_ID => $session->get(UserConstants::USER_GOC_ID, 0),
UserConstants::USER_DB_NAME => $session->get(UserConstants::USER_DB_NAME, ''),
UserConstants::USER_DB_USER => $session->get(UserConstants::USER_DB_USER, ''),
UserConstants::USER_DB_HOST => $session->get(UserConstants::USER_DB_HOST, ''),
UserConstants::USER_DB_PASS => $session->get(UserConstants::USER_DB_PASS, ''),
UserConstants::PRODUCT_NAME_DISPLAY_TYPE => $session->get(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, 1),
UserConstants::USER_NOTIFICATION_ENABLED => GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0,
UserConstants::USER_NOTIFICATION_SERVER => $this->getParameter('notification_server'),
);
$response = new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => true,
'session_data' => $session_data,
'session2' => $_SESSION,
));
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
if ($request->request->has('referer_path')) {
if ($request->request->get('referer_path') != '/' && $request->request->get('referer_path') != '') {
return $this->redirect($request->request->get('referer_path'));
}
}
// if($request->request->has('gocId')
// if($user->getDefaultRoute()==""||$user->getDefaultRoute()=="")
return $this->redirectToRoute("client_dashboard"); //will be client
// else
// return $this->redirectToRoute($user->getDefaultRoute());
} else if ($userType == UserConstants::USER_TYPE_SYSTEM) {
// System administrator
// System administrator have successfully logged in. Lets add a login ID.
$loginID = $this->get('user_module')->addUserLoginLog(
$user->getUserId(),
$request->server->get("REMOTE_ADDR"),
0
);
$employeeId = 0;
$currentMonthHolidayList = [];
$employeeObj = $em->getRepository('ApplicationBundle:Employee')
->findOneBy(
array(
'userId' => $user->getUserId()
)
);
if ($employeeObj) {
$employeeId = $employeeObj->getEmployeeId();
$holidayListObj = HumanResource::getFilteredHolidaysSingle($em, ['employeeId' => $employeeId], $employeeObj, true);
$currentMonthHolidayList = $holidayListObj['filteredData']['holidayList'];
}
$session->set(UserConstants::USER_EMPLOYEE_ID, strval($employeeId));
$session->set(UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH, json_encode($currentMonthHolidayList));
$session->set(UserConstants::USER_ID, $user->getUserId());
$session->set(UserConstants::USER_TYPE, UserConstants::USER_TYPE_SYSTEM);
$session->set(UserConstants::USER_EMAIL, $user->getEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set(UserConstants::USER_NAME, $user->getName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_COMPANY_ID, $company_id_list[0]);
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_APP_ID, $user->getUserAppId());
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, $user->getAllModuleAccessFlag());
$session->set(UserConstants::USER_CURRENT_POSITION, 0);
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
$appIdList = json_decode($user->getUserAppIdList());
if ($appIdList == null)
$appIdList = [];
$companyIdListByAppId = [];
$companyNameListByAppId = [];
$companyImageListByAppId = [];
if (!in_array($user->getUserAppId(), $appIdList))
$appIdList[] = $user->getUserAppId();
foreach ($appIdList as $currAppId) {
if ($currAppId == $user->getUserAppId()) {
foreach ($company_id_list as $index_company => $company_id) {
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $company_id;
$app_company_index = $currAppId . '_' . $company_id;
$companyNameListByAppId[$app_company_index] = $company_name_list[$company_id];
$companyImageListByAppId[$app_company_index] = $company_image_list[$company_id];
}
} else {
$dataToConnect = System::changeDoctrineManagerByAppId(
$this->getDoctrine()->getManager('company_group'),
$gocEnabled,
$currAppId
);
if (!empty($dataToConnect)) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$dataToConnect['dbName'],
$dataToConnect['dbUser'],
$dataToConnect['dbPass'],
$dataToConnect['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
$companyList = Company::getCompanyListWithImage($em);
foreach ($companyList as $c => $dta) {
// $company_id_list[]=$c;
// $company_name_list[$c] = $companyList[$c]['name'];
// $company_image_list[$c] = $companyList[$c]['image'];
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $c;
$app_company_index = $currAppId . '_' . $c;
$companyNameListByAppId[$app_company_index] = $companyList[$c]['name'];
$companyImageListByAppId[$app_company_index] = $companyList[$c]['image'];
}
}
}
}
$session->set('appIdList', $appIdList);
$session->set('companyIdListByAppId', $companyIdListByAppId);
$session->set('companyNameListByAppId', $companyNameListByAppId);
$session->set('companyImageListByAppId', $companyImageListByAppId);
$branchIdList = json_decode($user->getUserBranchIdList());
$branchId = $user->getUserBranchId();
$session->set('branchIdList', $branchIdList);
$session->set('branchId', $branchId);
//USER_ROUTE_LIST
if ($request->request->has('remoteVerify')) {
$session->set('remoteVerified', 1);
$session_data = array(
UserConstants::USER_EMPLOYEE_ID => $session->get(UserConstants::USER_EMPLOYEE_ID),
UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH => $session->get(UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH),
UserConstants::USER_ID => $session->get(UserConstants::USER_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_EMAIL => $session->get(UserConstants::USER_EMAIL),
UserConstants::USER_TYPE => $session->get(UserConstants::USER_TYPE),
UserConstants::USER_IMAGE => $session->get(UserConstants::USER_IMAGE),
UserConstants::USER_DEFAULT_ROUTE => $session->get(UserConstants::USER_DEFAULT_ROUTE),
UserConstants::USER_NAME => $session->get(UserConstants::USER_NAME),
UserConstants::USER_COMPANY_ID => $session->get(UserConstants::USER_COMPANY_ID),
UserConstants::USER_COMPANY_ID_LIST => $session->get(UserConstants::USER_COMPANY_ID_LIST),
UserConstants::USER_COMPANY_NAME_LIST => $session->get(UserConstants::USER_COMPANY_NAME_LIST),
UserConstants::USER_COMPANY_IMAGE_LIST => $session->get(UserConstants::USER_COMPANY_IMAGE_LIST),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_CURRENT_POSITION => $session->get(UserConstants::USER_CURRENT_POSITION),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::SESSION_SALT => $session->get(UserConstants::SESSION_SALT),
UserConstants::APPLICATION_SECRET => $session->get(UserConstants::APPLICATION_SECRET),
UserConstants::USER_POSITION_LIST => $session->get(UserConstants::USER_POSITION_LIST),
'userCompanyDarkVibrantList' => $session->get('userCompanyDarkVibrantList', []),
'userCompanyVibrantList' => $session->get('userCompanyVibrantList', []),
'userCompanyLightVibrantList' => $session->get('userCompanyLightVibrantList', []),
UserConstants::ALL_MODULE_ACCESS_FLAG => $session->get(UserConstants::ALL_MODULE_ACCESS_FLAG),
UserConstants::USER_GOC_ID => $session->get(UserConstants::USER_GOC_ID),
UserConstants::USER_DB_NAME => $session->get(UserConstants::USER_DB_NAME),
UserConstants::USER_DB_USER => $session->get(UserConstants::USER_DB_USER),
UserConstants::USER_DB_HOST => $session->get(UserConstants::USER_DB_HOST),
UserConstants::USER_DB_PASS => $session->get(UserConstants::USER_DB_PASS),
UserConstants::PRODUCT_NAME_DISPLAY_TYPE => $session->get(UserConstants::PRODUCT_NAME_DISPLAY_TYPE),
UserConstants::USER_NOTIFICATION_ENABLED => GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0,
UserConstants::USER_NOTIFICATION_SERVER => $this->getParameter('notification_server'),
//new
'appIdList' => $session->get('appIdList'),
'companyIdListByAppId' => $session->get('companyIdListByAppId'),
'companyNameListByAppId' => $session->get('companyNameListByAppId'),
'companyImageListByAppId' => $session->get('companyImageListByAppId'),
'branchIdList' => $session->get('branchIdList', null),
'branchId' => $session->get('branchId', null),
);
return new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => true,
'session_data' => $session_data,
'session2' => $_SESSION,
));
}
return $this->redirectToRoute("system_admin_dashboard");
} else if ($userType == UserConstants::USER_TYPE_MANAGEMENT_USER) {
// General User
$employeeId = 0;
$currentMonthHolidayList = [];
$employeeObj = $em->getRepository('ApplicationBundle:Employee')
->findOneBy(
array(
'userId' => $user->getUserId()
)
);
if ($employeeObj) {
$employeeId = $employeeObj->getEmployeeId();
$holidayListObj = HumanResource::getFilteredHolidaysSingle($em, ['employeeId' => $employeeId], $employeeObj, true);
$currentMonthHolidayList = $holidayListObj['filteredData']['holidayList'];
}
$session->set(UserConstants::USER_EMPLOYEE_ID, strval($employeeId));
$session->set(UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH, json_encode($currentMonthHolidayList));
$session->set(UserConstants::USER_ID, $user->getUserId());
$session->set(UserConstants::USER_TYPE, UserConstants::USER_TYPE_MANAGEMENT_USER);
$session->set(UserConstants::USER_EMAIL, $user->getEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set(UserConstants::USER_NAME, $user->getName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_COMPANY_ID, $user->getUserCompanyId());
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_APP_ID, $user->getUserAppId());
$session->set(UserConstants::USER_POSITION_LIST, $user->getPositionIds());
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, $user->getAllModuleAccessFlag());
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
if (count(json_decode($user->getPositionIds(), true)) > 1) {
return $this->redirectToRoute("user_login_position");
} else {
$PL = json_decode($user->getPositionIds(), true);
$route_list_array = Position::getUserRouteArray($this->getDoctrine()->getManager(), $PL[0], $user->getUserId());
$session->set(UserConstants::USER_CURRENT_POSITION, $PL[0]);
$loginID = $this->get('user_module')->addUserLoginLog(
$session->get(UserConstants::USER_ID),
$request->server->get("REMOTE_ADDR"),
$PL[0]
);
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
// $session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode($route_list_array));
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$appIdList = json_decode($user->getUserAppIdList());
if ($appIdList == null) $appIdList = [];
$companyIdListByAppId = [];
$companyNameListByAppId = [];
$companyImageListByAppId = [];
if (!in_array($user->getUserAppId(), $appIdList))
$appIdList[] = $user->getUserAppId();
foreach ($appIdList as $currAppId) {
if ($currAppId == $user->getUserAppId()) {
foreach ($company_id_list as $index_company => $company_id) {
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $company_id;
$app_company_index = $currAppId . '_' . $company_id;
$companyNameListByAppId[$app_company_index] = $company_name_list[$company_id];
$companyImageListByAppId[$app_company_index] = $company_image_list[$company_id];
}
} else {
$dataToConnect = System::changeDoctrineManagerByAppId(
$this->getDoctrine()->getManager('company_group'),
$gocEnabled,
$currAppId
);
if (!empty($dataToConnect)) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$dataToConnect['dbName'],
$dataToConnect['dbUser'],
$dataToConnect['dbPass'],
$dataToConnect['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
$companyList = Company::getCompanyListWithImage($em);
foreach ($companyList as $c => $dta) {
// $company_id_list[]=$c;
// $company_name_list[$c] = $companyList[$c]['name'];
// $company_image_list[$c] = $companyList[$c]['image'];
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $c;
$app_company_index = $currAppId . '_' . $c;
$companyNameListByAppId[$app_company_index] = $companyList[$c]['name'];
$companyImageListByAppId[$app_company_index] = $companyList[$c]['image'];
}
}
}
}
$session->set('appIdList', $appIdList);
$session->set('companyIdListByAppId', $companyIdListByAppId);
$session->set('companyNameListByAppId', $companyNameListByAppId);
$session->set('companyImageListByAppId', $companyImageListByAppId);
$branchIdList = json_decode($user->getUserBranchIdList());
$branchId = $user->getUserBranchId();
$session->set('branchIdList', $branchIdList);
$session->set('branchId', $branchId);
if ($user->getAllModuleAccessFlag() == 1)
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
else
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode(Position::getUserProhibitRouteArray($this->getDoctrine()->getManager(), $PL[0], $user->getUserId())));
if ($request->request->has('remoteVerify')) {
$session->set('remoteVerified', 1);
$session_data = array(
UserConstants::USER_EMPLOYEE_ID => $session->get(UserConstants::USER_EMPLOYEE_ID),
UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH => $session->get(UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH),
UserConstants::USER_ID => $session->get(UserConstants::USER_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_EMAIL => $session->get(UserConstants::USER_EMAIL),
UserConstants::USER_TYPE => $session->get(UserConstants::USER_TYPE),
UserConstants::USER_IMAGE => $session->get(UserConstants::USER_IMAGE),
UserConstants::USER_DEFAULT_ROUTE => $session->get(UserConstants::USER_DEFAULT_ROUTE),
UserConstants::USER_NAME => $session->get(UserConstants::USER_NAME),
UserConstants::USER_COMPANY_ID => $session->get(UserConstants::USER_COMPANY_ID),
UserConstants::USER_COMPANY_ID_LIST => $session->get(UserConstants::USER_COMPANY_ID_LIST),
UserConstants::USER_COMPANY_NAME_LIST => $session->get(UserConstants::USER_COMPANY_NAME_LIST),
UserConstants::USER_COMPANY_IMAGE_LIST => $session->get(UserConstants::USER_COMPANY_IMAGE_LIST),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_CURRENT_POSITION => $session->get(UserConstants::USER_CURRENT_POSITION),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::SESSION_SALT => $session->get(UserConstants::SESSION_SALT),
UserConstants::APPLICATION_SECRET => $session->get(UserConstants::APPLICATION_SECRET),
UserConstants::USER_POSITION_LIST => $session->get(UserConstants::USER_POSITION_LIST),
'userCompanyDarkVibrantList' => $session->get('userCompanyDarkVibrantList', []),
'userCompanyVibrantList' => $session->get('userCompanyVibrantList', []),
'userCompanyLightVibrantList' => $session->get('userCompanyLightVibrantList', []),
UserConstants::ALL_MODULE_ACCESS_FLAG => $session->get(UserConstants::ALL_MODULE_ACCESS_FLAG),
UserConstants::USER_GOC_ID => $session->get(UserConstants::USER_GOC_ID),
UserConstants::USER_DB_NAME => $session->get(UserConstants::USER_DB_NAME),
UserConstants::USER_DB_USER => $session->get(UserConstants::USER_DB_USER),
UserConstants::USER_DB_HOST => $session->get(UserConstants::USER_DB_HOST),
UserConstants::USER_DB_PASS => $session->get(UserConstants::USER_DB_PASS),
UserConstants::PRODUCT_NAME_DISPLAY_TYPE => $session->get(UserConstants::PRODUCT_NAME_DISPLAY_TYPE),
UserConstants::USER_NOTIFICATION_ENABLED => GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0,
UserConstants::USER_NOTIFICATION_SERVER => $this->getParameter('notification_server'),
//new
'branchIdList' => $session->get('branchIdList', null),
'branchId' => $session->get('branchId', null),
'appIdList' => $session->get('appIdList'),
'companyIdListByAppId' => $session->get('companyIdListByAppId'),
'companyNameListByAppId' => $session->get('companyNameListByAppId'),
'companyImageListByAppId' => $session->get('companyImageListByAppId'),
);
$response = new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => true,
'session_data' => $session_data,
'session2' => $_SESSION,
));
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
if ($request->server->has("HTTP_REFERER")) {
if ($request->request->get('HTTP_REFERER') != '/' && $request->request->get('HTTP_REFERER') != '') {
return $this->redirect($request->request->get('HTTP_REFERER'));
}
}
// $request->server->get("REMOTE_ADDR"), $PL[0]);
if ($request->request->has('referer_path')) {
if ($request->request->get('referer_path') != '/' && $request->request->get('referer_path') != '') {
return $this->redirect($request->request->get('referer_path'));
}
}
// if($request->request->has('gocId')
if ($user->getDefaultRoute() == "" || $user->getDefaultRoute() == "")
return $this->redirectToRoute("dashboard");
else
return $this->redirectToRoute($user->getDefaultRoute());
}
} else if ($userType == UserConstants::USER_TYPE_APPLICANT) {
$session->set(UserConstants::USER_ID, $user->getApplicantId());
// $session->set(UserConstants::SUPPLIER_ID, $user->getSupplierId());
$session->set(UserConstants::USER_TYPE, UserConstants::USER_TYPE_APPLICANT);
$session->set(UserConstants::USER_EMAIL, $user->getOauthEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set(UserConstants::USER_NAME, $user->getFirstName() . ' ' . $user->getLastName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, '');
$session->set(UserConstants::USER_COMPANY_ID, 1);
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set(UserConstants::USER_APP_ID, $appIdFromUserName);
$session->set(UserConstants::USER_POSITION_LIST, '[]');
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, 0);
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
$route_list_array = [];
$session->set(UserConstants::USER_CURRENT_POSITION, 0);
$loginID = 0;
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode($route_list_array));
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
if ($request->request->has('referer_path')) {
if ($request->request->get('referer_path') != '/' && $request->request->get('referer_path') != '') {
return $this->redirect($request->request->get('referer_path'));
}
}
return $this->redirectToRoute("applicant_dashboard");
} else {
// General User
$employeeId = 0;
$currentMonthHolidayList = [];
$employeeObj = $em->getRepository('ApplicationBundle:Employee')
->findOneBy(
array(
'userId' => $user->getUserId()
)
);
if ($employeeObj) {
$employeeId = $employeeObj->getEmployeeId();
$holidayListObj = HumanResource::getFilteredHolidaysSingle($em, ['employeeId' => $employeeId], $employeeObj, true);
$currentMonthHolidayList = $holidayListObj['filteredData']['holidayList'];
}
$session->set(UserConstants::USER_EMPLOYEE_ID, strval($employeeId));
$session->set(UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH, json_encode($currentMonthHolidayList));
// $session->set('$holidayListObj', json_encode($holidayListObj));
$session->set(UserConstants::USER_ID, $user->getUserId());
$session->set(UserConstants::USER_TYPE, UserConstants::USER_TYPE_GENERAL);
$session->set(UserConstants::USER_EMAIL, $user->getEmail());
$session->set(UserConstants::USER_IMAGE, $user->getImage());
$session->set(UserConstants::USER_NAME, $user->getName());
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_COMPANY_ID, $user->getUserCompanyId());
$session->set(UserConstants::USER_COMPANY_ID_LIST, json_encode($company_id_list));
$session->set(UserConstants::USER_COMPANY_NAME_LIST, json_encode($company_name_list));
$session->set(UserConstants::USER_COMPANY_IMAGE_LIST, json_encode($company_image_list));
$session->set('userCompanyDarkVibrantList', json_encode($company_dark_vibrant_list));
$session->set('userCompanyVibrantList', json_encode($company_vibrant_list));
$session->set('userCompanyLightVibrantList', json_encode($company_light_vibrant_list));
$session->set(UserConstants::USER_APP_ID, $user->getUserAppId());
$session->set(UserConstants::USER_POSITION_LIST, $user->getPositionIds());
$session->set(UserConstants::ALL_MODULE_ACCESS_FLAG, $user->getAllModuleAccessFlag());
$session->set(UserConstants::SESSION_SALT, uniqid(mt_rand()));
$session->set(UserConstants::APPLICATION_SECRET, $this->container->getParameter('secret'));
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$session->set(UserConstants::USER_NOTIFICATION_ENABLED, GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0);
$session->set(UserConstants::USER_NOTIFICATION_SERVER, $this->getParameter('notification_server'));
if (count(json_decode($user->getPositionIds(), true)) > 1) {
return $this->redirectToRoute("user_login_position");
} else {
$PL = json_decode($user->getPositionIds(), true);
$route_list_array = Position::getUserRouteArray($this->getDoctrine()->getManager(), $PL[0], $user->getUserId());
$session->set(UserConstants::USER_CURRENT_POSITION, $PL[0]);
$loginID = $this->get('user_module')->addUserLoginLog(
$session->get(UserConstants::USER_ID),
$request->server->get("REMOTE_ADDR"),
$PL[0]
);
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
// $session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_GOC_ID, $gocId);
$session->set(UserConstants::USER_DB_NAME, $gocDbName);
$session->set(UserConstants::USER_DB_USER, $gocDbUser);
$session->set(UserConstants::USER_DEFAULT_ROUTE, $user->getDefaultRoute());
$session->set(UserConstants::USER_DB_PASS, $gocDbPass);
$session->set(UserConstants::USER_DB_HOST, $gocDbHost);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode($route_list_array));
$session->set(UserConstants::PRODUCT_NAME_DISPLAY_TYPE, $product_name_display_type);
$appIdList = json_decode($user->getUserAppIdList());
if ($appIdList == null) $appIdList = [];
$companyIdListByAppId = [];
$companyNameListByAppId = [];
$companyImageListByAppId = [];
if (!in_array($user->getUserAppId(), $appIdList))
$appIdList[] = $user->getUserAppId();
foreach ($appIdList as $currAppId) {
if ($currAppId == $user->getUserAppId()) {
foreach ($company_id_list as $index_company => $company_id) {
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $company_id;
$app_company_index = $currAppId . '_' . $company_id;
$companyNameListByAppId[$app_company_index] = $company_name_list[$company_id];
$companyImageListByAppId[$app_company_index] = $company_image_list[$company_id];
}
} else {
$dataToConnect = System::changeDoctrineManagerByAppId(
$this->getDoctrine()->getManager('company_group'),
$gocEnabled,
$currAppId
);
if (!empty($dataToConnect)) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$dataToConnect['dbName'],
$dataToConnect['dbUser'],
$dataToConnect['dbPass'],
$dataToConnect['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
$companyList = Company::getCompanyListWithImage($em);
foreach ($companyList as $c => $dta) {
// $company_id_list[]=$c;
// $company_name_list[$c] = $companyList[$c]['name'];
// $company_image_list[$c] = $companyList[$c]['image'];
$companyIdListByAppId[$currAppId][] = $currAppId . '_' . $c;
$app_company_index = $currAppId . '_' . $c;
$companyNameListByAppId[$app_company_index] = $companyList[$c]['name'];
$companyImageListByAppId[$app_company_index] = $companyList[$c]['image'];
}
}
}
}
$session->set('appIdList', $appIdList);
$session->set('companyIdListByAppId', $companyIdListByAppId);
$session->set('companyNameListByAppId', $companyNameListByAppId);
$session->set('companyImageListByAppId', $companyImageListByAppId);
$branchIdList = json_decode($user->getUserBranchIdList());
$branchId = $user->getUserBranchId();
$session->set('branchIdList', $branchIdList);
$session->set('branchId', $branchId);
if ($user->getAllModuleAccessFlag() == 1)
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode([]));
else
$session->set(UserConstants::USER_PROHIBIT_LIST, json_encode(Position::getUserProhibitRouteArray($this->getDoctrine()->getManager(), $PL[0], $user->getUserId())));
if ($request->request->has('remoteVerify')) {
$session->set('remoteVerified', 1);
$session_data = array(
UserConstants::USER_EMPLOYEE_ID => $session->get(UserConstants::USER_EMPLOYEE_ID),
UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH => $session->get(UserConstants::USER_HOLIDAY_LIST_CURRENT_MONTH),
UserConstants::USER_ID => $session->get(UserConstants::USER_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_EMAIL => $session->get(UserConstants::USER_EMAIL),
UserConstants::USER_TYPE => $session->get(UserConstants::USER_TYPE),
UserConstants::USER_IMAGE => $session->get(UserConstants::USER_IMAGE),
UserConstants::USER_DEFAULT_ROUTE => $session->get(UserConstants::USER_DEFAULT_ROUTE),
UserConstants::USER_NAME => $session->get(UserConstants::USER_NAME),
UserConstants::USER_COMPANY_ID => $session->get(UserConstants::USER_COMPANY_ID),
UserConstants::USER_COMPANY_ID_LIST => $session->get(UserConstants::USER_COMPANY_ID_LIST),
UserConstants::USER_COMPANY_NAME_LIST => $session->get(UserConstants::USER_COMPANY_NAME_LIST),
UserConstants::USER_COMPANY_IMAGE_LIST => $session->get(UserConstants::USER_COMPANY_IMAGE_LIST),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::USER_LOGIN_ID => $session->get(UserConstants::USER_LOGIN_ID),
UserConstants::USER_CURRENT_POSITION => $session->get(UserConstants::USER_CURRENT_POSITION),
UserConstants::USER_APP_ID => $session->get(UserConstants::USER_APP_ID),
UserConstants::SESSION_SALT => $session->get(UserConstants::SESSION_SALT),
UserConstants::APPLICATION_SECRET => $session->get(UserConstants::APPLICATION_SECRET),
UserConstants::USER_POSITION_LIST => $session->get(UserConstants::USER_POSITION_LIST),
'userCompanyDarkVibrantList' => $session->get('userCompanyDarkVibrantList', []),
'userCompanyVibrantList' => $session->get('userCompanyVibrantList', []),
'userCompanyLightVibrantList' => $session->get('userCompanyLightVibrantList', []),
UserConstants::ALL_MODULE_ACCESS_FLAG => $session->get(UserConstants::ALL_MODULE_ACCESS_FLAG),
UserConstants::USER_GOC_ID => $session->get(UserConstants::USER_GOC_ID),
UserConstants::USER_DB_NAME => $session->get(UserConstants::USER_DB_NAME),
UserConstants::USER_DB_USER => $session->get(UserConstants::USER_DB_USER),
UserConstants::USER_DB_HOST => $session->get(UserConstants::USER_DB_HOST),
UserConstants::USER_DB_PASS => $session->get(UserConstants::USER_DB_PASS),
UserConstants::PRODUCT_NAME_DISPLAY_TYPE => $session->get(UserConstants::PRODUCT_NAME_DISPLAY_TYPE),
UserConstants::USER_NOTIFICATION_ENABLED => GeneralConstant::NOTIFICATION_ENABLED == 1 ? ($this->getParameter('notification_enabled') == 1 ? 1 : 0) : 0,
UserConstants::USER_NOTIFICATION_SERVER => $this->getParameter('notification_server'),
//new
'branchIdList' => $session->get('branchIdList', null),
'branchId' => $session->get('branchId', null),
'appIdList' => $session->get('appIdList'),
'companyIdListByAppId' => $session->get('companyIdListByAppId'),
'companyNameListByAppId' => $session->get('companyNameListByAppId'),
'companyImageListByAppId' => $session->get('companyImageListByAppId'),
);
$response = new JsonResponse(array(
'uid' => $session->get(UserConstants::USER_ID),
'session' => $session,
'success' => true,
'session_data' => $session_data,
'session2' => $_SESSION,
));
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
if ($request->server->has("HTTP_REFERER")) {
if ($request->request->get('HTTP_REFERER') != '/' && $request->request->get('HTTP_REFERER') != '') {
return $this->redirect($request->request->get('HTTP_REFERER'));
}
}
// $request->server->get("REMOTE_ADDR"), $PL[0]);
if ($request->request->has('referer_path')) {
if ($request->request->get('referer_path') != '/' && $request->request->get('referer_path') != '') {
return $this->redirect($request->request->get('referer_path'));
}
}
// if($request->request->has('gocId')
if ($user->getDefaultRoute() == "" || $user->getDefaultRoute() == "")
return $this->redirectToRoute("dashboard");
else
return $this->redirectToRoute($user->getDefaultRoute());
}
}
}
}
$session = $request->getSession();
// if($request->request->has('remoteVerify')) {
// $session->set('remoteVerified', 1);
// $response= new JsonResponse(array('hi'=>'hello'));
// $response->headers->set('Access-Control-Allow-Origin', '*');
// return $response;
// }
return $this->render(
'ApplicationBundle:pages/login:login_new.html.twig',
array(
"message" => $message,
'page_title' => 'Login',
'gocList' => $gocDataListForLoginWeb,
'gocId' => '',
'encData' => $encData,
// 'ref'=>$request->
)
);
}
public function initiateAdminAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
MiscActions::initiateAdminUser($em);
$this->addFlash(
'success',
'The Action was Successful.'
);
return $this->redirectToRoute('user_login');
}
public function DemoDataFlutterTestAction(Request $request)
{
return new JsonResponse(
array(
['id' => 1, 'name' => 'Property 1', 'rating' => '4.5', 'description' => 'lorem ipsum 1', 'imageUrl' => 'https://picsum.photos/200/300'],
['id' => 2, 'name' => 'Property 2', 'rating' => '4.1', 'description' => 'lorem ipsum 2', 'imageUrl' => 'https://picsum.photos/200/300'],
['id' => 3, 'name' => 'Property 3', 'rating' => '4.2', 'description' => 'lorem ipsum 4', 'imageUrl' => 'https://picsum.photos/200/300'],
['id' => 4, 'name' => 'Property 4', 'rating' => '2.5', 'description' => 'lorem ipsum 3', 'imageUrl' => 'https://picsum.photos/200/300'],
)
);
}
public function selectDataAjaxAction(Request $request, $queryStr = '',
$version = 'latest',
$identifier = '_default_',
$apiKey = '_ignore_'
)
{
$em = $this->getDoctrine()->getManager();
$em_goc = $this->getDoctrine()->getManager('company_group');
$companyId = 0;
$skipCurrentUserIdRestriction = $request->get('skipCurrentUserIdRestriction', 0);
$skipCurrentEmployeeIdRestriction = $request->get('skipCurrentEmployeeIdRestriction', 0);
$skipCurrentUserLoginIdRestriction = $request->get('skipCurrentUserLoginIdRestriction', 0);
$currentUserId = $request->getSession()->get(UserConstants::USER_ID, 0);
$currentEmployeeId = $request->getSession()->get(UserConstants::USER_EMPLOYEE_ID, 0);
$currentUserLoginIds = [];
if ($request->request->get('entity_group', 0)) {
$companyId = 0;
$em = $this->getDoctrine()->getManager('company_group');
} else {
if ($request->request->get('appId', 0) != 0) {
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
else
$gocEnabled = 1;
if ($gocEnabled == 1) {
$dataToConnect = System::changeDoctrineManagerByAppId(
$this->getDoctrine()->getManager('company_group'),
$gocEnabled,
$request->request->get('appId', 0)
);
if (!empty($dataToConnect)) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$dataToConnect['dbName'],
$dataToConnect['dbUser'],
$dataToConnect['dbPass'],
$dataToConnect['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
}
}
} else if ($request->getSession()->get(UserConstants::USER_APP_ID) != 0 && $request->getSession()->get(UserConstants::USER_APP_ID) != null) {
$gocEnabled = 0;
if ($this->container->hasParameter('entity_group_enabled'))
$gocEnabled = $this->container->getParameter('entity_group_enabled');
else
$gocEnabled = 1;
if ($gocEnabled == 1) {
$dataToConnect = System::changeDoctrineManagerByAppId(
$this->getDoctrine()->getManager('company_group'),
$gocEnabled,
$request->getSession()->get(UserConstants::USER_APP_ID)
);
if (!empty($dataToConnect)) {
$connector = $this->container->get('application_connector');
$connector->resetConnection(
'default',
$dataToConnect['dbName'],
$dataToConnect['dbUser'],
$dataToConnect['dbPass'],
$dataToConnect['dbHost'],
$reset = true
);
$em = $this->getDoctrine()->getManager();
}
}
}
$companyId = $this->getLoggedUserCompanyId($request);
}
$configData = [];
$isSingleDataset = 1;
$dataSet = $request->request->has('dataset') ? $request->request->get('dataset') : [];
if (is_string($dataSet)) $dataSet = json_decode($dataSet, true);
$valuePairs = $request->get('valuePairs', []);
if (is_string($valuePairs)) $valuePairs = json_decode($valuePairs, true);
$allResult = [];
$datasetFromConfig = [];
if ($identifier != '_default_') {
$config_file = $this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/api/' . $identifier . 'Config.json';
if (!file_exists($config_file)) {
} else {
$fileText = file_get_contents($config_file);
//now replace any value pairs
foreach ($valuePairs as $kkeeyy => $vvaalluuee) {
if (is_array($vvaalluuee)) {
if (isset($vvaalluuee['value']) && isset($vvaalluuee['type'])) {
if ($vvaalluuee['type'] == 'array') $fileText = str_ireplace('_' . $kkeeyy . '_', json_encode($vvaalluuee['value']), $fileText);
if ($vvaalluuee['type'] == 'value') $fileText = str_ireplace('_' . $kkeeyy . '_', $vvaalluuee['value'], $fileText);
if ($vvaalluuee['type'] == 'text') $fileText = str_ireplace('_' . $kkeeyy . '_', $vvaalluuee['value'], $fileText);
} else {
$fileText = str_ireplace('_' . $kkeeyy . '_', json_encode($vvaalluuee), $fileText);
}
}
$fileText = str_ireplace('_' . $kkeeyy . '_', $vvaalluuee, $fileText);
}
$fileText = str_ireplace('_query_', $request->get('query', $queryStr), $fileText);
if (!(strpos($fileText, '_CURRENT_USER_LOGIN_IDS_') === false) && $skipCurrentUserLoginIdRestriction == 0) {
$userInfo = [];
if ($request->getSession()->get(UserConstants::USER_TYPE, 0) == UserConstants::USER_TYPE_APPLICANT) {
$userInfo = $em_goc->getRepository('CompanyGroupBundle:EntityLoginLog')->findBy(
array('userId' => $currentUserId)
);
} else {
$userInfo = $em->getRepository('ApplicationBundle:SysLoginLog')->findBy(
array('userId' => $currentUserId)
);
}
foreach ($userInfo as $uLogininfo) {
$currentUserLoginIds[] = $uLogininfo->getLoginId();
}
$fileText = str_ireplace('_CURRENT_USER_LOGIN_IDS_', json_encode($currentUserLoginIds), $fileText);
} else {
$fileText = str_ireplace('_CURRENT_USER_LOGIN_IDS_', '_EMPTY_', $fileText);
}
if (!(strpos($fileText, '_CURRENT_USER_ID_') === false) && $skipCurrentUserIdRestriction == 0) {
$fileText = str_ireplace('_CURRENT_USER_ID_', $currentUserId, $fileText);
} else {
$fileText = str_ireplace('_CURRENT_USER_ID_', '_EMPTY_', $fileText);
}
if (!(strpos($fileText, '_CURRENT_USER_EMPLOYEE_ID_') === false) && $skipCurrentEmployeeIdRestriction == 0) {
if ((strpos($fileText, 'skipCurrentEmployeeIdRestriction') === false)) {
$fileText = str_ireplace('_CURRENT_USER_EMPLOYEE_ID_', $currentEmployeeId, $fileText);
} else {
$fileText = str_ireplace('_CURRENT_USER_EMPLOYEE_ID_', '_EMPTY_', $fileText);
}
} else {
$fileText = str_ireplace('_CURRENT_USER_EMPLOYEE_ID_', '_EMPTY_', $fileText);
}
if ($fileText)
$datasetFromConfig = json_decode($fileText, true);
$skipCurrentUserIdRestriction = isset($datasetFromConfig['skipCurrentUserIdRestriction']) ? $datasetFromConfig['skipCurrentUserIdRestriction'] : $skipCurrentUserIdRestriction;
$skipCurrentEmployeeIdRestriction = isset($datasetFromConfig['skipCurrentEmployeeIdRestriction']) ? $datasetFromConfig['skipCurrentEmployeeIdRestriction'] : $skipCurrentEmployeeIdRestriction;
$skipCurrentUserLoginIdRestriction = isset($datasetFromConfig['skipCurrentUserLoginIdRestriction']) ? $datasetFromConfig['skipCurrentUserLoginIdRestriction'] : $skipCurrentUserLoginIdRestriction;
}
}
if ($dataSet == null) $dataSet = [];
// return new JsonResponse(array(
// 'queryStr'=>$queryStr
// ));
if (!empty($datasetFromConfig)) {
if (isset($datasetFromConfig['tableName'])) {
$isSingleDataset = 1;
$dataSet[] = $datasetFromConfig;
} else {
if (count($datasetFromConfig) == 1)
$isSingleDataset = 1;
$dataSet = $datasetFromConfig;
}
}
if (empty($dataSet)) {
$isSingleDataset = 1;
$singleDataSet = array(
"valueField" => $request->request->has('valueField') ? $request->request->get('valueField') : 'id',
"query" => $request->get('query', $queryStr),
"headMarkers" => $request->get('headMarkers', ''),
"headMarkersStrictMatch" => $request->get('headMarkersStrictMatch', 0),
"itemLimit" => $request->request->has('itemLimit') ? $request->request->get('itemLimit') : 25,
"selectorId" => $request->request->has('selectorId') ? $request->request->get('selectorId') : '_NONE_',
"textField" => $request->request->has('textField') ? $request->request->get('textField') : 'name',
"tableName" => $request->request->has('tableName') ? $request->request->get('tableName') : '',
"isMultiple" => $request->request->has('isMultiple') ? $request->request->get('isMultiple') : 0,
"orConditions" => $request->request->has('orConditions') ? $request->request->get('orConditions') : [],
"andConditions" => $request->request->has('andConditions') ? $request->request->get('andConditions') : [],
"andOrConditions" => $request->request->has('andOrConditions') ? $request->request->get('andOrConditions') : [],
"mustConditions" => $request->request->has('mustConditions') ? $request->request->get('mustConditions') : [],
"joinTableData" => $request->request->has('joinTableData') ? $request->request->get('joinTableData') : [],
"renderTextFormat" => $request->request->has('renderTextFormat') ? $request->request->get('renderTextFormat') : '',
"setDataForSingle" => $request->request->has('setDataForSingle') ? $request->request->get('setDataForSingle') : 0,
"dataId" => $request->request->has('dataId') ? $request->request->get('dataId') : 0,
"lastChildrenOnly" => $request->request->has('lastChildrenOnly') ? $request->request->get('lastChildrenOnly') : 0,
"parentOnly" => $request->request->has('parentOnly') ? $request->request->get('parentOnly') : 0,
"parentIdField" => $request->request->has('parentIdField') ? $request->request->get('parentIdField') : 'parent_id',
"skipDefaultCompanyId" => $request->request->has('skipDefaultCompanyId') ? $request->request->get('skipDefaultCompanyId') : 1,
"offset" => $request->request->has('offset') ? $request->request->get('offset') : 0,
"returnTotalMatchedEntriesFlag" => $request->request->has('returnTotalMatched') ? $request->request->get('returnTotalMatched') : 0,
"nextOffset" => 0,
"totalMatchedEntries" => 0,
"convertToObject" => $request->request->has('convertToObject') ? $request->request->get('convertToObject') : [],
"convertDateToStringFieldList" => $request->request->has('convertDateToStringFieldList') ? $request->request->get('convertDateToStringFieldList') : [],
"orderByConditions" => $request->request->has('orderByConditions') ? $request->request->get('orderByConditions') : [],
"convertToUrl" => $request->request->has('convertToUrl') ? $request->request->get('convertToUrl') : [],
"fullPathList" => $request->request->has('fullPathList') ? $request->request->get('fullPathList') : [],
"ret_data" => $request->request->has('ret_data') ? $request->request->get('ret_data') : [],
);
$dataSet[] = $singleDataSet;
}
// $lastResult = [
// 'identifier' => $identifier,
// 'dataSet' => $dataSet,
// ];
// return new JsonResponse($lastResult);
$userId = $request->getSession()->get(UserConstants::USER_ID);
// public static function selectDataSystem($em, $queryStr = '_EMPTY_', $data = [],$userId=0)
foreach ($dataSet as $dsIndex => $dataConfig) {
$companyId = 0;
$queryStringIndividual = $queryStr;
$data = [];
$data_by_id = [];
$setValueArray = [];
$silentChangeSelectize = 0;
$setValue = 0;
$setValueType = 0;// 0 for id , 1 for query
$selectAll = 0;
if ($queryStringIndividual == '_EMPTY_')
$queryStringIndividual = '';
if (isset($dataConfig['query']))
$queryStringIndividual = $dataConfig['query'];
if ($queryStringIndividual == '_EMPTY_')
$queryStringIndividual = '';
$queryStringIndividual = str_replace('_FSLASH_', '/', $queryStringIndividual);
if ($queryStringIndividual === '#setValue:') {
$queryStringIndividual = '';
}
if (!(strpos($queryStringIndividual, '_silent_change_') === false)) {
$silentChangeSelectize = 1;
$queryStringIndividual = str_ireplace('_silent_change_', '', $queryStringIndividual);
}
if (!(strpos($queryStringIndividual, '#setValue:') === false)) {
$setValueArrayBeforeFilter = explode(',', str_replace('#setValue:', '', $queryStringIndividual));
foreach ($setValueArrayBeforeFilter as $svf) {
if ($svf == '_ALL_') {
$selectAll = 1;
$setValueArray = [];
continue;
}
if (is_numeric($svf)) {
$setValueArray[] = ($svf * 1);
$setValue = $svf * 1;
}
}
$queryStringIndividual = '';
}
$valueField = isset($dataConfig['valueField']) ? $dataConfig['valueField'] : 'id';
$headMarkers = isset($dataConfig['headMarkers']) ? $dataConfig['headMarkers'] : ''; //Special Field
$headMarkersStrictMatch = isset($dataConfig['headMarkersStrictMatch']) ? $dataConfig['headMarkersStrictMatch'] : 0; //Special Field
$itemLimit = isset($dataConfig['itemLimit']) ? $dataConfig['itemLimit'] : 25;
$selectorId = isset($dataConfig['selectorId']) ? $dataConfig['selectorId'] : '_NONE_';
$textField = isset($dataConfig['textField']) ? $dataConfig['textField'] : 'name';
$table = isset($dataConfig['tableName']) ? $dataConfig['tableName'] : '';
$isMultiple = isset($dataConfig['isMultiple']) ? $dataConfig['isMultiple'] : 0;
$orConditions = isset($dataConfig['orConditions']) ? $dataConfig['orConditions'] : [];
$andConditions = isset($dataConfig['andConditions']) ? $dataConfig['andConditions'] : [];
$andOrConditions = isset($dataConfig['andOrConditions']) ? $dataConfig['andOrConditions'] : [];
$mustConditions = isset($dataConfig['mustConditions']) ? $dataConfig['mustConditions'] : [];
$joinTableData = isset($dataConfig['joinTableData']) ? $dataConfig['joinTableData'] : [];
$renderTextFormat = isset($dataConfig['renderTextFormat']) ? $dataConfig['renderTextFormat'] : '';
$setDataForSingle = isset($dataConfig['setDataForSingle']) ? $dataConfig['setDataForSingle'] : 0;
$dataId = isset($dataConfig['dataId']) ? $dataConfig['dataId'] : 0;
$lastChildrenOnly = isset($dataConfig['lastChildrenOnly']) ? $dataConfig['lastChildrenOnly'] : 0;
$parentOnly = isset($dataConfig['parentOnly']) ? $dataConfig['parentOnly'] : 0;
$parentIdField = isset($dataConfig['parentIdField']) ? $dataConfig['parentIdField'] : 'parent_id';
$skipDefaultCompanyId = isset($dataConfig['skipDefaultCompanyId']) ? $dataConfig['skipDefaultCompanyId'] : 1;
$offset = isset($dataConfig['offset']) ? $dataConfig['offset'] : 0;
$returnTotalMatchedEntriesFlag = isset($dataConfig['returnTotalMatched']) ? $dataConfig['returnTotalMatched'] : 0;
$nextOffset = 0;
$totalMatchedEntries = 0;
$convertToObjectFieldList = isset($dataConfig['convertToObject']) ? $dataConfig['convertToObject'] : [];
$convertDateToStringFieldList = isset($dataConfig['convertDateToStringFieldList']) ? $dataConfig['convertDateToStringFieldList'] : [];
$orderByConditions = isset($dataConfig['orderByConditions']) ? $dataConfig['orderByConditions'] : [];
$convertToUrl = isset($dataConfig['convertToUrl']) ? $dataConfig['convertToUrl'] : [];
$fullPathList = isset($dataConfig['fullPathList']) ? $dataConfig['fullPathList'] : [];
if (is_string($andConditions)) $andConditions = json_decode($andConditions, true);
if (is_string($orConditions)) $orConditions = json_decode($orConditions, true);
if (is_string($andOrConditions)) $andOrConditions = json_decode($andOrConditions, true);
if (is_string($mustConditions)) $mustConditions = json_decode($mustConditions, true);
if (is_string($joinTableData)) $joinTableData = json_decode($joinTableData, true);
if (is_string($convertToObjectFieldList)) $convertToObjectFieldList = json_decode($convertToObjectFieldList, true);
if (is_string($orderByConditions)) $orderByConditions = json_decode($orderByConditions, true);
if (is_string($convertToUrl)) $convertToUrl = json_decode($convertToUrl, true);
if (is_string($fullPathList)) $fullPathList = json_decode($fullPathList, true);
// return new JsonResponse(array(
// 'dataSet'=>$dataSet,
// 'dataConfig'=>$dataConfig,
// 'hi'=>$this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/api/' . $identifier . 'Config.json',
// 'hiD'=>file_get_contents($this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/api/' . $identifier . 'Config.json')
// ));
if ($table == '') {
$lastResult = array(
'success' => false,
'currentTs' => (new \Datetime())->format('U'),
'isMultiple' => $isMultiple,
'setValueArray' => $setValueArray,
'setValue' => $setValue,
'data' => $data,
'dataId' => $dataId,
'selectorId' => $selectorId,
'dataById' => $data_by_id,
'selectedId' => 0,
'ret_data' => isset($dataConfig['ret_data']) ? $dataConfig['ret_data'] : [],
);
} else {
$restrictionData = array(
// 'table'=>'relevantField in restriction'
'warehouse_action' => 'warehouseActionIds',
'branch' => 'branchIds',
'warehouse' => 'warehouseIds',
'production_process_settings' => 'productionProcessIds',
);
$restrictionIdList = [];
$filterQryForCriteria = "select ";
$selectQry = "";
// $selectQry=" `$table`.* ";
$selectFieldList = isset($dataConfig['selectFieldList']) ? $dataConfig['selectFieldList'] : ['*'];
$selectPrefix = isset($dataConfig['selectPrefix']) ? $dataConfig['selectPrefix'] : '';
if (is_string($selectFieldList)) $selectFieldList = json_decode($selectFieldList, true);
foreach ($selectFieldList as $selField) {
if ($selectQry != '')
$selectQry .= ", ";
if ($selField == '*')
$selectQry .= " `$table`.$selField ";
else if ($selField == 'count(*)' || $selField == '_RESULT_COUNT_') {
if ($selectPrefix == '')
$selectQry .= " count(*) ";
else
$selectQry .= (" count(* ) $selectPrefix" . "_RESULT_COUNT_ ");
} else {
if ($selectPrefix == '')
$selectQry .= " `$table`.`$selField` ";
else
$selectQry .= (" `$table`.`$selField` $selectPrefix" . "$selField ");
}
}
$joinQry = " from $table ";
// $filterQryForCriteria = "select * from $table ";
foreach ($joinTableData as $joinIndex => $joinTableDatum) {
// $conditionStr.=' 1=1 ';
$joinTableName = isset($joinTableDatum['tableName']) ? $joinTableDatum['tableName'] : '=';
$joinTableAlias = $joinTableName . '_' . $joinIndex;
$joinTablePrimaryField = isset($joinTableDatum['joinFieldPrimary']) ? $joinTableDatum['joinFieldPrimary'] : ''; //field of main table
$joinTableOnField = isset($joinTableDatum['joinOn']) ? $joinTableDatum['joinOn'] : ''; //field of joining table
$fieldJoinType = isset($joinTableDatum['fieldJoinType']) ? $joinTableDatum['fieldJoinType'] : '=';
$tableJoinType = isset($joinTableDatum['tableJoinType']) ? $joinTableDatum['tableJoinType'] : 'join';//or inner join
$selectFieldList = isset($joinTableDatum['selectFieldList']) ? $joinTableDatum['selectFieldList'] : ['*'];
$selectPrefix = isset($joinTableDatum['selectPrefix']) ? $joinTableDatum['selectPrefix'] : '';
$joinMustConditions = isset($joinTableDatum['joinMustConditions']) ? $joinTableDatum['joinMustConditions'] : [];
$joinAndConditions = isset($joinTableDatum['joinAndConditions']) ? $joinTableDatum['joinAndConditions'] : [];
$joinAndOrConditions = isset($joinTableDatum['joinAndOrConditions']) ? $joinTableDatum['joinAndOrConditions'] : [];
$joinOrConditions = isset($joinTableDatum['joinOrConditions']) ? $joinTableDatum['joinOrConditions'] : [];
if (is_string($joinAndConditions)) $joinAndConditions = json_decode($joinAndConditions, true);
if (is_string($joinMustConditions)) $joinMustConditions = json_decode($joinMustConditions, true);
if (is_string($joinAndOrConditions)) $joinAndOrConditions = json_decode($joinAndOrConditions, true);
if (is_string($joinOrConditions)) $joinOrConditions = json_decode($joinOrConditions, true);
foreach ($selectFieldList as $selField) {
if ($selField == '*')
$selectQry .= ", `$joinTableAlias`.$selField ";
else if ($selField == 'count(*)' || $selField == '_RESULT_COUNT_') {
if ($selectPrefix == '')
$selectQry .= ", count(`$joinTableAlias`." . $joinTableOnField . ") ";
else
$selectQry .= (", count(`$joinTableAlias`." . $joinTableOnField . ") $selectPrefix" . "_RESULT_COUNT_ ");
} else {
if ($selectPrefix == '')
$selectQry .= ", `$joinTableAlias`.`$selField` ";
else
$selectQry .= (", `$joinTableAlias`.`$selField` $selectPrefix" . "$selField ");
}
}
$joinQry .= " $tableJoinType $joinTableName $joinTableAlias on ";
// if($joinTablePrimaryField!='')
// $joinQry .= " `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
// $joinAndString = '';
$joinMustString = '';
if ($joinTablePrimaryField != '')
$joinQry .= " `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
foreach ($joinMustConditions as $mustCondition) {
// $conditionStr.=' 1=1 ';
$ctype = isset($mustCondition['type']) ? $mustCondition['type'] : '=';
$cfield = isset($mustCondition['field']) ? $mustCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($mustCondition['value']) ? $mustCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($joinMustString != '')
$joinMustString .= " and ";
if ($ctype == 'like') {
$joinMustString .= ("`$joinTableAlias`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinMustString != '')
$joinMustString .= " and ";
$joinMustString .= ("`$joinTableAlias`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$joinMustString .= ("`$joinTableAlias`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinMustString != '')
$joinMustString .= " and ";
$joinMustString .= ("`$joinTableAlias`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'not_in') {
$joinMustString .= " ( ";
if (in_array('null', $cvalue)) {
$joinMustString .= " `$joinTableAlias`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinMustString .= " and ";
}
if (in_array('', $cvalue)) {
$joinMustString .= "`$joinTableAlias`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinMustString .= " and ";
}
$joinMustString .= "`$joinTableAlias`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'in') {
if (in_array('null', $cvalue)) {
$joinMustString .= "`$joinTableAlias`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinMustString .= " and ";
}
if (in_array('', $cvalue)) {
$joinMustString .= "`$joinTableAlias`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinMustString .= " and ";
}
$joinMustString .= "`$joinTableAlias`.$cfield in (" . implode(',', $cvalue) . ") ";
} else if ($ctype == '=') {
// if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
// $fullCfieldArray = explode('.', $cfield);
// $aliasInCondition = $fullCfieldArray[0];
// $cfield = $fullCfieldArray[1];
// }
if ($cvalue == 'null' || $cvalue == 'Null')
$joinMustString .= "`$joinTableAlias`.$cfield is null ";
else
$joinMustString .= "`$joinTableAlias`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$joinMustString .= "`$joinTableAlias`.$cfield is not null ";
else
$joinMustString .= "`$joinTableAlias`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$joinMustString .= "`$joinTableAlias`.$cfield $ctype '" . $cvalue . "' ";
else
$joinMustString .= "`$joinTableAlias`.$cfield $ctype " . $cvalue . " ";
}
}
}
// if ($joinMustString != '') {
// if ($conditionStr != '')
// $conditionStr .= (" and (" . $joinMustString . ") ");
// else
// $conditionStr .= (" (" . $joinMustString . ") ");
// }
if ($joinMustString != '') {
$joinQry .= (' and ' . $joinMustString);
// $joinQry.=' and (';
}
$mustBracketDone = 0;
$joinAndString = '';
// if ($joinTablePrimaryField != '')
// $joinAndString .= " `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
foreach ($joinAndConditions as $andCondition) {
// $conditionStr.=' 1=1 ';
$ctype = isset($andCondition['type']) ? $andCondition['type'] : '=';
$cfield = isset($andCondition['field']) ? $andCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($andCondition['value']) ? $andCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($joinAndString != '')
$joinAndString .= " and ";
if ($ctype == 'like') {
$joinAndString .= ("`$joinTableAlias`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinAndString != '')
$joinAndString .= " and ";
$joinAndString .= ("`$joinTableAlias`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$joinAndString .= ("`$joinTableAlias`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinAndString != '')
$joinAndString .= " and ";
$joinAndString .= ("`$joinTableAlias`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'not_in') {
$joinAndString .= " ( ";
if (in_array('null', $cvalue)) {
$joinAndString .= " `$joinTableAlias`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinAndString .= " and ";
}
if (in_array('', $cvalue)) {
$joinAndString .= "`$joinTableAlias`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinAndString .= " and ";
}
$joinAndString .= "`$joinTableAlias`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'in') {
if (in_array('null', $cvalue)) {
$joinAndString .= "`$joinTableAlias`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinAndString .= " and ";
}
if (in_array('', $cvalue)) {
$joinAndString .= "`$joinTableAlias`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinAndString .= " and ";
}
$joinAndString .= "`$joinTableAlias`.$cfield in (" . implode(',', $cvalue) . ") ";
} else if ($ctype == '=') {
// if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
// $fullCfieldArray = explode('.', $cfield);
// $aliasInCondition = $fullCfieldArray[0];
// $cfield = $fullCfieldArray[1];
// }
if ($cvalue == 'null' || $cvalue == 'Null')
$joinAndString .= "`$joinTableAlias`.$cfield is null ";
else
$joinAndString .= "`$joinTableAlias`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$joinAndString .= "`$joinTableAlias`.$cfield is not null ";
else
$joinAndString .= "`$joinTableAlias`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$joinAndString .= "`$joinTableAlias`.$cfield $ctype '" . $cvalue . "' ";
else
$joinAndString .= "`$joinTableAlias`.$cfield $ctype " . $cvalue . " ";
}
}
}
// if ($joinAndString != '') {
// if ($conditionStr != '')
// $conditionStr .= (" and (" . $joinAndString . ") ");
// else
// $conditionStr .= (" (" . $joinAndString . ") ");
// }
if ($joinAndString != '') {
if ($joinMustString != '' && $mustBracketDone == 0) {
$joinQry .= ' and (';
$mustBracketDone = 1;
}
if ($joinQry != '')
$joinQry .= (" and (" . $joinAndString . ") ");
else
$joinQry .= (" (" . $joinAndString . ") ");
}
$joinAndOrString = "";
foreach ($joinAndOrConditions as $andOrCondition) {
// $conditionStr.=' 1=1 ';
$ctype = isset($andOrCondition['type']) ? $andOrCondition['type'] : '=';
$cfield = isset($andOrCondition['field']) ? $andOrCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($andOrCondition['value']) ? $andOrCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($joinAndOrString != '')
$joinAndOrString .= " or ";
if ($ctype == 'like') {
$joinAndOrString .= ("`$joinTableAlias`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinAndOrString != '')
$joinAndOrString .= " or ";
$joinAndOrString .= ("`$joinTableAlias`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$joinAndOrString .= ("`$joinTableAlias`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinAndOrString != '')
$joinAndOrString .= " or ";
$joinAndOrString .= ("`$joinTableAlias`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'not_in') {
$joinAndOrString .= " ( ";
if (in_array('null', $cvalue)) {
$joinAndOrString .= " `$joinTableAlias`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinAndOrString .= " or ";
}
if (in_array('', $cvalue)) {
$joinAndOrString .= "`$joinTableAlias`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinAndOrString .= " or ";
}
$joinAndOrString .= "`$joinTableAlias`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'in') {
if (in_array('null', $cvalue)) {
$joinAndOrString .= "`$joinTableAlias`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinAndOrString .= " or ";
}
if (in_array('', $cvalue)) {
$joinAndOrString .= "`$joinTableAlias`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinAndOrString .= " or ";
}
$joinAndOrString .= "`$joinTableAlias`.$cfield in (" . implode(',', $cvalue) . ") ";
} else if ($ctype == '=') {
// if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
// $fullCfieldArray = explode('.', $cfield);
// $aliasInCondition = $fullCfieldArray[0];
// $cfield = $fullCfieldArray[1];
// }
if ($cvalue == 'null' || $cvalue == 'Null')
$joinAndOrString .= "`$joinTableAlias`.$cfield is null ";
else
$joinAndOrString .= "`$joinTableAlias`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$joinAndOrString .= "`$joinTableAlias`.$cfield is not null ";
else
$joinAndOrString .= "`$joinTableAlias`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$joinAndOrString .= "`$joinTableAlias`.$cfield $ctype '" . $cvalue . "' ";
else
$joinAndOrString .= "`$joinTableAlias`.$cfield $ctype " . $cvalue . " ";
}
}
}
// if ($joinAndOrString != '')
// $joinQry .= $joinAndOrString;
if ($joinAndOrString != '') {
if ($joinMustString != '' && $mustBracketDone == 0) {
$joinQry .= ' and (';
$mustBracketDone = 1;
}
if ($joinQry != '')
$joinQry .= (" and (" . $joinAndOrString . ") ");
else
$joinQry .= (" (" . $joinAndOrString . ") ");
}
//pika
$joinOrString = "";
foreach ($joinOrConditions as $orCondition) {
// $conditionStr.=' 1=1 ';
$ctype = isset($orCondition['type']) ? $orCondition['type'] : '=';
$cfield = isset($orCondition['field']) ? $orCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($orCondition['value']) ? $orCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($joinOrString != '' || $joinAndString != '' || $joinMustString != '')
$joinOrString .= " or ";
if ($ctype == 'like') {
$joinOrString .= ("`$joinTableAlias`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinOrString != '')
$joinOrString .= " or ";
$joinOrString .= ("`$joinTableAlias`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$joinOrString .= ("`$joinTableAlias`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($joinOrString != '')
$joinOrString .= " or ";
$joinOrString .= ("`$joinTableAlias`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'not_in') {
$joinOrString .= " ( ";
if (in_array('null', $cvalue)) {
$joinOrString .= " `$joinTableAlias`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinOrString .= " or ";
}
if (in_array('', $cvalue)) {
$joinOrString .= "`$joinTableAlias`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinOrString .= " or ";
}
$joinOrString .= "`$joinTableAlias`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'in') {
if (in_array('null', $cvalue)) {
$joinOrString .= "`$joinTableAlias`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$joinOrString .= " or ";
}
if (in_array('', $cvalue)) {
$joinOrString .= "`$joinTableAlias`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$joinOrString .= " or ";
}
$joinOrString .= "`$joinTableAlias`.$cfield in (" . implode(',', $cvalue) . ") ";
} else if ($ctype == '=') {
// if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
// $fullCfieldArray = explode('.', $cfield);
// $aliasInCondition = $fullCfieldArray[0];
// $cfield = $fullCfieldArray[1];
// }
if ($cvalue == 'null' || $cvalue == 'Null')
$joinOrString .= "`$joinTableAlias`.$cfield is null ";
else
$joinOrString .= "`$joinTableAlias`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$joinOrString .= "`$joinTableAlias`.$cfield is not null ";
else
$joinOrString .= "`$joinTableAlias`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$joinOrString .= "`$joinTableAlias`.$cfield $ctype '" . $cvalue . "' ";
else
$joinOrString .= "`$joinTableAlias`.$cfield $ctype " . $cvalue . " ";
}
}
}
// if ($joinOrString != '')
// $joinQry .= $joinOrString;
if ($joinOrString != '') {
if ($joinMustString != '' && $mustBracketDone == 0) {
$joinQry .= ' and (';
$mustBracketDone = 1;
}
if ($joinQry != '')
$joinQry .= (" or (" . $joinOrString . ") ");
else
$joinQry .= (" (" . $joinOrString . ") ");
}
if ($joinMustString != '' && $mustBracketDone == 1) {
$joinQry .= ' ) ';
}
//
// $joinQry .= " `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
}
$filterQryForCriteria .= $selectQry;
$filterQryForCriteria .= $joinQry;
if ($skipDefaultCompanyId == 0 && $companyId != 0 && !isset($dataConfig['entity_group']))
$filterQryForCriteria .= " where `$table`.`company_id`=" . $companyId . " ";
else
$filterQryForCriteria .= " where 1=1 ";
$conditionStr = "";
$aliasInCondition = $table;
if ($headMarkers != '' && $table == 'acc_accounts_head') {
$markerList = explode(',', $headMarkers);
$spMarkerQry = "SELECT distinct accounts_head_id FROM acc_accounts_head where 1=1 ";
$markerPassedHeads = [];
foreach ($markerList as $mrkr) {
$spMarkerQry .= " and marker_hash like '%" . $mrkr . "%'";
}
$spStmt = $em->getConnection()->prepare($spMarkerQry);
$spStmt->execute();
$spStmtResults = $spStmt->fetchAll();
foreach ($spStmtResults as $ggres) {
$markerPassedHeads[] = $ggres['accounts_head_id'];
}
if (!empty($markerPassedHeads)) {
if ($conditionStr != '')
$conditionStr .= " and (";
else
$conditionStr .= " (";
if ($headMarkersStrictMatch != 1) {
foreach ($markerPassedHeads as $mh) {
$conditionStr .= " `$aliasInCondition`.`path_tree` like'%/" . $mh . "/%' or ";
}
}
$conditionStr .= " `$aliasInCondition`.`accounts_head_id` in (" . implode(',', $markerPassedHeads) . ") ";
$conditionStr .= " )";
}
}
if (isset($restrictionData[$table])) {
$userRestrictionData = Users::getUserApplicationAccessSettings($em, $userId)['options'];
if (isset($userRestrictionData[$restrictionData[$table]])) {
$restrictionIdList = $userRestrictionData[$restrictionData[$table]];
if ($restrictionIdList == null)
$restrictionIdList = [];
}
if (!empty($restrictionIdList)) {
if ($conditionStr != '')
$conditionStr .= " and ";
$conditionStr .= " `$table`.$valueField in (" . implode(',', $restrictionIdList) . ") ";
}
}
// $aliasInCondition = $table;
if (!empty($setValueArray) || $selectAll == 1) {
if (!empty($setValueArray)) {
if ($conditionStr != '')
$conditionStr .= " and ";
$conditionStr .= " `$aliasInCondition`.$valueField in (" . implode(',', $setValueArray) . ") ";
}
} else {
$andString = '';
foreach ($andConditions as $andCondition) {
// $conditionStr.=' 1=1 ';
$ctype = isset($andCondition['type']) ? $andCondition['type'] : '=';
$cfield = isset($andCondition['field']) ? $andCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($andCondition['value']) ? $andCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($andString != '')
$andString .= " and ";
if ($ctype == 'like') {
$andString .= ("`$aliasInCondition`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($andString != '')
$andString .= " and ";
$andString .= ("`$aliasInCondition`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$andString .= ("`$aliasInCondition`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($andString != '')
$andString .= " and ";
$andString .= ("`$aliasInCondition`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'not_in') {
$andString .= " ( ";
if (in_array('null', $cvalue)) {
$andString .= " `$aliasInCondition`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$andString .= " and ";
}
if (in_array('', $cvalue)) {
$andString .= "`$aliasInCondition`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$andString .= " and ";
}
$andString .= "`$aliasInCondition`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'in') {
if (in_array('null', $cvalue)) {
$andString .= "`$aliasInCondition`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$andString .= " and ";
}
if (in_array('', $cvalue)) {
$andString .= "`$aliasInCondition`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$andString .= " and ";
}
$andString .= "`$aliasInCondition`.$cfield in (" . implode(',', $cvalue) . ") ";
} else if ($ctype == '=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$andString .= "`$aliasInCondition`.$cfield is null ";
else
$andString .= "`$aliasInCondition`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$andString .= "`$aliasInCondition`.$cfield is not null ";
else
$andString .= "`$aliasInCondition`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$andString .= "`$aliasInCondition`.$cfield $ctype '" . $cvalue . "' ";
else
$andString .= "`$aliasInCondition`.$cfield $ctype " . $cvalue . " ";
}
}
}
if ($andString != '') {
if ($conditionStr != '')
$conditionStr .= (" and (" . $andString . ") ");
else
$conditionStr .= (" (" . $andString . ") ");
}
$orString = '';
foreach ($orConditions as $orCondition) {
$ctype = isset($orCondition['type']) ? $orCondition['type'] : '=';
$cfield = isset($orCondition['field']) ? $orCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($orCondition['value']) ? $orCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($orString != '')
$orString .= " or ";
if ($ctype == 'like') {
$orString .= ("`$aliasInCondition`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($orString != '')
$orString .= " or ";
$orString .= ("`$aliasInCondition`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$orString .= ("`$aliasInCondition`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($orString != '')
$orString .= " or ";
$orString .= ("`$aliasInCondition`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'not_in') {
$orString .= " ( ";
if (in_array('null', $cvalue)) {
$orString .= " `$aliasInCondition`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$orString .= " or ";
}
if (in_array('', $cvalue)) {
$orString .= "`$aliasInCondition`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$orString .= " or ";
}
$orString .= "`$aliasInCondition`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'in') {
$orString .= " ( ";
if (in_array('null', $cvalue)) {
$orString .= " `$aliasInCondition`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$orString .= " or ";
}
if (in_array('', $cvalue)) {
$orString .= "`$aliasInCondition`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$orString .= " or ";
}
$orString .= "`$aliasInCondition`.$cfield in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == '=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$orString .= "`$aliasInCondition`.$cfield is null ";
else
$orString .= "`$aliasInCondition`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$orString .= "`$aliasInCondition`.$cfield is not null ";
else
$orString .= "`$aliasInCondition`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$orString .= "`$aliasInCondition`.$cfield $ctype '" . $cvalue . "' ";
else
$orString .= "`$aliasInCondition`.$cfield $ctype " . $cvalue . " ";
}
}
}
if ($orString != '') {
if ($conditionStr != '')
$conditionStr .= (" or (" . $orString . ") ");
else
$conditionStr .= (" (" . $orString . ") ");
}
$andOrString = '';
foreach ($andOrConditions as $andOrCondition) {
$ctype = isset($andOrCondition['type']) ? $andOrCondition['type'] : '=';
$cfield = isset($andOrCondition['field']) ? $andOrCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($andOrCondition['value']) ? $andOrCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($andOrString != '')
$andOrString .= " or ";
if ($ctype == 'like') {
$andOrString .= (" `$aliasInCondition`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($andOrString != '')
$andOrString .= " or ";
$andOrString .= ("`$aliasInCondition`.$cfield like '%" . $word . "%' ");
}
} else if ($ctype == 'not like') {
$andOrString .= (" `$aliasInCondition`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($andOrString != '')
$andOrString .= " or ";
$andOrString .= ("`$aliasInCondition`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'in') {
$andOrString .= " ( ";
if (in_array('null', $cvalue)) {
$andOrString .= " `$aliasInCondition`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$andOrString .= " or ";
}
if (in_array('', $cvalue)) {
$andOrString .= "`$aliasInCondition`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$andOrString .= " or ";
}
if (!empty($cvalue))
$andOrString .= " `$aliasInCondition`.$cfield in (" . implode(',', $cvalue) . ") ) ";
else
$andOrString .= " ) ";
} else if ($ctype == 'not_in') {
$andOrString .= " ( ";
if (in_array('null', $cvalue)) {
$andOrString .= " `$aliasInCondition`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$andOrString .= " or ";
}
if (in_array('', $cvalue)) {
$andOrString .= "`$aliasInCondition`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$andOrString .= " or ";
}
if (!empty($cvalue))
$andOrString .= "`$aliasInCondition`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
else
$andOrString .= " ) ";
} else if ($ctype == '=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$andOrString .= "`$aliasInCondition`.$cfield is null ";
else
$andOrString .= "`$aliasInCondition`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$andOrString .= "`$aliasInCondition`.$cfield is not null ";
else
$andOrString .= "`$aliasInCondition`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$andOrString .= "`$aliasInCondition`.$cfield $ctype '" . $cvalue . "' ";
else
$andOrString .= "`$aliasInCondition`.$cfield $ctype " . $cvalue . " ";
}
}
}
if ($andOrString != '') {
if ($conditionStr != '')
$conditionStr .= (" and (" . $andOrString . ") ");
else
$conditionStr .= (" (" . $andOrString . ") ");
}
}
$mustStr = '';
///now must conditions
foreach ($mustConditions as $mustCondition) {
// $conditionStr.=' 1=1 ';
$ctype = isset($mustCondition['type']) ? $mustCondition['type'] : '=';
$cfield = isset($mustCondition['field']) ? $mustCondition['field'] : '';
$aliasInCondition = $table;
if (!(strpos($cfield, '.') === false)) {
$fullCfieldArray = explode('.', $cfield);
$aliasInCondition = $fullCfieldArray[0];
$cfield = $fullCfieldArray[1];
}
$cvalue = isset($mustCondition['value']) ? $mustCondition['value'] : $queryStringIndividual;
if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
if ($mustStr != '')
$mustStr .= " and ";
if ($ctype == 'like') {
$mustStr .= ("(`$aliasInCondition`.$cfield like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($mustStr != '')
$mustStr .= " or ";
$mustStr .= ("`$aliasInCondition`.$cfield like '%" . $word . "%' ");
}
$mustStr .= " )";
} else if ($ctype == 'not like') {
$mustStr .= ("`$aliasInCondition`.$cfield not like '%" . $cvalue . "%' ");
$wordsBySpaces = explode(' ', $cvalue);
foreach ($wordsBySpaces as $word) {
if ($mustStr != '')
$mustStr .= " and ";
$mustStr .= ("`$aliasInCondition`.$cfield not like '%" . $word . "%' ");
}
} else if ($ctype == 'in') {
$mustStr .= " ( ";
if (in_array('null', $cvalue)) {
$mustStr .= " `$aliasInCondition`.$cfield is null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$mustStr .= " or ";
}
if (in_array('', $cvalue)) {
$mustStr .= "`$aliasInCondition`.$cfield = '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$mustStr .= " or ";
}
$mustStr .= "`$aliasInCondition`.$cfield in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == 'not_in') {
$mustStr .= " ( ";
if (in_array('null', $cvalue)) {
$mustStr .= " `$aliasInCondition`.$cfield is not null";
$cvalue = array_diff($cvalue, ['null']);
if (!empty($cvalue))
$mustStr .= " and ";
}
if (in_array('', $cvalue)) {
$mustStr .= "`$aliasInCondition`.$cfield != '' ";
$cvalue = array_diff($cvalue, ['']);
if (!empty($cvalue))
$mustStr .= " and ";
}
$mustStr .= "`$aliasInCondition`.$cfield not in (" . implode(',', $cvalue) . ") ) ";
} else if ($ctype == '=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$mustStr .= "`$aliasInCondition`.$cfield is null ";
else
$mustStr .= "`$aliasInCondition`.$cfield = $cvalue ";
} else if ($ctype == '!=') {
if ($cvalue == 'null' || $cvalue == 'Null')
$mustStr .= "`$aliasInCondition`.$cfield is not null ";
else
$mustStr .= "`$aliasInCondition`.$cfield != $cvalue ";
} else {
if (is_string($cvalue))
$mustStr .= "`$aliasInCondition`.$cfield $ctype '" . $cvalue . "' ";
else
$mustStr .= "`$aliasInCondition`.$cfield $ctype " . $cvalue . " ";
}
}
}
if ($mustStr != '') {
if ($conditionStr != '')
$conditionStr .= (" and (" . $mustStr . ") ");
else
$conditionStr .= (" (" . $mustStr . ") ");
}
if ($conditionStr != '')
$filterQryForCriteria .= (" and (" . $conditionStr . ") ");
if ($lastChildrenOnly == 1) {
if ($filterQryForCriteria != '')
$filterQryForCriteria .= ' and';
$filterQryForCriteria .= "`$table`.`$valueField` not in ( select distinct $parentIdField from $table)";
} else if ($parentOnly == 1) {
if ($filterQryForCriteria != '')
$filterQryForCriteria .= ' and';
$filterQryForCriteria .= "`$table`.`$valueField` in ( select distinct $parentIdField from $table)";
}
if (!empty($orderByConditions)) {
$filterQryForCriteria .= " order by ";
$fone = 1;
foreach ($orderByConditions as $orderByCondition) {
if ($fone != 1) {
$filterQryForCriteria .= " , ";
}
if (isset($orderByCondition['valueList'])) {
if (is_string($orderByCondition['valueList'])) $orderByCondition['valueList'] = json_decode($orderByCondition['valueList'], true);
if ($orderByCondition['valueList'] == null)
$orderByCondition['valueList'] = [];
$filterQryForCriteria .= " field(" . $orderByCondition['field'] . "," . implode(',', $orderByCondition['valueList']) . "," . $orderByCondition['field'] . ") " . $orderByCondition['sortType'] . " ";
} else
$filterQryForCriteria .= " " . $orderByCondition['field'] . " " . $orderByCondition['sortType'] . " ";
$fone = 0;
}
}
if ($returnTotalMatchedEntriesFlag == 1) {
// $stmt = $em->getConnection()->prepare($get_kids_sql);
// $stmt->execute();
// $get_kids = $stmt->fetchAll();
}
if ($filterQryForCriteria != '')
if (!empty($setValueArray) || $selectAll == 1) {
} else {
if ($itemLimit != '_ALL_')
$filterQryForCriteria .= " limit $offset, $itemLimit ";
else
$filterQryForCriteria .= " limit $offset, 18446744073709551615 ";
}
$get_kids_sql = $filterQryForCriteria;
$stmt = $em->getConnection()->prepare($get_kids_sql);
$stmt->execute();
$get_kids = $stmt->fetchAll();
$selectedId = 0;
if ($table == 'warehouse_action') {
if (empty($get_kids)) {
$get_kids_sql_2 = "select * from warehouse_action";
$stmt = $em->getConnection()->prepare($get_kids_sql_2);
$stmt->execute();
$get_kids2 = $stmt->fetchAll();
if (empty($get_kids2))
$get_kids = GeneralConstant::$warehouse_action_list;
}
}
if (!empty($get_kids)) {
$nextOffset = $offset + count($get_kids);
$nextOffset++;
foreach ($get_kids as $pa) {
if (!empty($setValueArray) && $selectAll == 0) {
if (!in_array($pa[$valueField], $setValueArray))
continue;
}
if (!empty($restrictionIdList)) {
if (!in_array($pa[$valueField], $restrictionIdList))
continue;
}
if ($selectAll == 1) {
$setValueArray[] = $pa[$valueField];
$setValue = $pa[$valueField];
} else if (count($get_kids) == 1 && $setDataForSingle == 1) {
$setValueArray[] = $pa[$valueField];
$setValue = $pa[$valueField];
}
if ($valueField != '')
$pa['value'] = $pa[$valueField];
$renderedText = $renderTextFormat;
$compare_array = [];
if ($renderTextFormat != '') {
$renderedText = $renderTextFormat;
$compare_arrayFull = [];
$compare_array = [];
$toBeReplacedData = array(// 'curr'=>'tobereplaced'
);
preg_match_all("/__\w+__/", $renderedText, $compare_arrayFull);
if (isset($compare_arrayFull[0]))
$compare_array = $compare_arrayFull[0];
// $compare_array= preg_split("/__\w+__/",$renderedText);
foreach ($compare_array as $cmpdt) {
$tbr = str_replace("__", "", $cmpdt);
if ($tbr != '') {
if (isset($pa[$tbr])) {
if ($pa[$tbr] == null)
$renderedText = str_replace($cmpdt, '', $renderedText);
else
$renderedText = str_replace($cmpdt, $pa[$tbr], $renderedText);
} else {
$renderedText = str_replace($cmpdt, '', $renderedText);
}
}
}
}
$pa['rendered_text'] = $renderedText;
$pa['text'] = ($textField != '' ? $pa[$textField] : '');
// $pa['compare_array'] = $compare_array;
foreach ($convertToObjectFieldList as $convField) {
if (isset($pa[$convField])) {
$taA = json_decode($pa[$convField], true);
if ($taA == null) $taA = [];
$pa[$convField] = $taA;
} else {
$pa[$convField] = [];
}
}
foreach ($convertDateToStringFieldList as $convField) {
if (is_array($convField)) {
$fld = $convField['field'];
$frmt = isset($convField['format']) ? $convField['format'] : 'Y-m-d H:i:s';
} else {
$fld = $convField;
$frmt = 'Y-m-d H:i:s';
}
if (isset($pa[$fld])) {
$taA = new \DateTime($pa[$fld]);
$pa[$fld] = $taA->format($frmt);
}
}
foreach ($convertToUrl as $convField) {
//
// $fld = $convField;
//
//
// if (isset($pa[$fld])) {
//
//
// $pa[$fld] =
// $this->generateUrl(
// 'dashboard', [
//
// ], UrlGenerator::ABSOLUTE_URL
// ).'/'.$pa[$fld];
//
// }
}
foreach ($fullPathList as $pathField) {
$fld = $pathField;
if (isset($pa[$fld])) {
if ($pa[$fld] != '' && $pa[$fld] != null) {
$pa[$fld] = ($this->generateUrl(
'dashboard', [
], UrlGenerator::ABSOLUTE_URL
) . $pa[$fld]);
}
}
}
$pa['currentTs'] = (new \Datetime())->format('U');
$data[] = $pa;
if ($valueField != '') {
$data_by_id[$pa[$valueField]] = $pa;
$selectedId = $pa[$valueField];
}
}
}
$lastResult = array(
'success' => true,
'data' => $data,
'tableName' => $table,
'setValue' => $setValue,
'currentTs' => (new \Datetime())->format('U'),
'restrictionIdList' => $restrictionIdList,
'andConditions' => $andConditions,
'queryStr' => $queryStringIndividual,
'isMultiple' => $isMultiple,
'nextOffset' => $nextOffset,
'totalMatchedEntries' => $totalMatchedEntries,
'selectorId' => $selectorId,
'setValueArray' => $setValueArray,
'silentChangeSelectize' => $silentChangeSelectize,
'convertToObjectFieldList' => $convertToObjectFieldList,
'conditionStr' => $conditionStr,
// 'andStr' => $andString,
// 'andOrStr' => $andOrString,
'dataById' => $data_by_id,
'selectedId' => $selectedId,
'dataId' => $dataId,
'ret_data' => isset($dataConfig['ret_data']) ? $dataConfig['ret_data'] : [],
);
}
$allResult[] = $lastResult;
}
if ($isSingleDataset == 1)
return new JsonResponse($lastResult);
else
return new JsonResponse($allResult);
}
public function DecodeEncDataAction(Request $request, $apiCode = 0, $encData = '')
{
// $userCategory=$request->request->has('userCategory');
$encryptedData = [];
$retData = array(
'success' => false,
'message' => 'Invalid API',
'data' => [],
'decryptedStr' => '',
);
$allowedApiCodes = [
998,
889
];
if (in_array($apiCode, $allowedApiCodes)) {
if ($encData != '') {
$decryptedStr = $this->get('url_encryptor')->decrypt($encData);
$encryptedData = json_decode($decryptedStr, true);
if ($encryptedData == null) $encryptedData = [];
$retData['success'] = true;
$retData['message'] = '';
$retData['decryptedStr'] = $decryptedStr;
$retData['data'] = $encryptedData;
} else {
$retData['success'] = false;
$retData['message'] = 'No Data';
}
}
$response = new JsonResponse($retData);
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
public function SendOtpAjaxAction(Request $request, $startFrom = 0)
{
$em = $this->getDoctrine()->getManager();
$em_goc = $this->getDoctrine()->getManager('company_group');
$session = $request->getSession();
$message = "";
$retData = array();
$email_twig_data = array('success' => false);
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$userCategory = $request->request->get('userCategory', $request->query->get('userCategory', '_BUDDYBEE_USER_'));
$email_address = $request->request->get('email', $request->query->get('email', ''));
$otpExpireSecond = $request->request->get('otpExpireSecond', $request->query->get('otpExpireSecond', 180));
$otpActionId = $request->request->get('otpActionId', $request->query->get('otpActionId', UserConstants::OTP_ACTION_FORGOT_PASSWORD));
$appendCode = $request->request->get('appendCode', $request->query->get('appendCode', ''));
$otp = $request->request->get('otp', $request->query->get('otp', ''));
$otpExpireTs = 0;
$userId = $request->request->get('userId', $request->query->get('userId', $session->get(UserConstants::USER_ID, 0)));
$userType = UserConstants::USER_TYPE_APPLICANT;
$email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
if ($request->isMethod('POST')) {
//set an otp and its expire and send mail
$userObj = null;
$userData = [];
if ($systemType == '_ERP_') {
if ($userCategory == '_APPLICANT_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'applicantId' => $userId
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'email' => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'oAuthEmail' => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'username' => $email_address
)
);
}
}
}
if ($userObj) {
$email_address = $userObj->getEmail();
if ($email_address == null || $email_address == '')
$email_address = $userObj->getOAuthEmail();
}
$otpData = MiscActions::GenerateOtp($otpExpireSecond);
$otp = $otpData['otp'];
$otpExpireTs = $otpData['expireTs'];
$userObj->setOtp($otpData['otp']);
$userObj->setOtpActionId($otpActionId);
$userObj->setOtpExpireTs($otpData['expireTs']);
$em_goc->flush();
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
// 'appId'=>$userObj->getUserAppId(),
);
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
$email_twig_data = [
'page_title' => 'Find Account',
'message' => $message,
'userType' => $userType,
'otp' => $otpData['otp'],
'otpExpireSecond' => $otpExpireSecond,
'otpActionId' => $otpActionId,
'otpExpireTs' => $otpData['expireTs'],
'systemType' => $systemType,
'userData' => $userData
];
if ($userObj)
$email_twig_data['success'] = true;
} else {
$userType = UserConstants::USER_TYPE_GENERAL;
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
$email_twig_data = [
'page_title' => 'Find Account',
// 'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
// 'errorField' => $errorField,
];
}
} else if ($systemType == '_BUDDYBEE_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'applicantId' => $userId
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'email' => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'oAuthEmail' => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
'username' => $email_address
)
);
}
}
}
if ($userObj) {
$email_address = $userObj->getEmail();
if ($email_address == null || $email_address == '')
$email_address = $userObj->getOAuthEmail();
// triggerResetPassword:
// type: integer
// nullable: true
$otpData = MiscActions::GenerateOtp($otpExpireSecond);
$otp = $otpData['otp'];
$otpExpireTs = $otpData['expireTs'];
$userObj->setOtp($otpData['otp']);
$userObj->setOtpActionId($otpActionId);
$userObj->setOtpExpireTs($otpData['expireTs']);
$em_goc->flush();
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
'image' => $userObj->getImage(),
'phone' => $userObj->getPhone(),
'firstName' => $userObj->getFirstname(),
'lastName' => $userObj->getLastname(),
// 'appId'=>$userObj->getUserAppId(),
);
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
$email_twig_data = [
'page_title' => 'Find Account',
// 'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
// 'errorField' => $errorField,
'otp' => $otpData['otp'],
'otpExpireSecond' => $otpExpireSecond,
'otpActionId' => $otpActionId,
'otpActionTitle' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionTitle'],
'otpActionDescForMail' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionDescForMail'],
'otpExpireTs' => $otpData['expireTs'],
'systemType' => $systemType,
'userCategory' => $userCategory,
'userData' => $userData
];
$email_twig_data['success'] = true;
} else {
$message = "Account not found!";
$email_twig_data['success'] = false;
}
}
if ($email_twig_data['success'] == true && GeneralConstant::EMAIL_ENABLED == 1) {
if ($systemType == '_BUDDYBEE_') {
$bodyHtml = '';
$bodyTemplate = $email_twig_file;
$bodyData = $email_twig_data;
$attachments = [];
$forwardToMailAddress = $email_address;
// $upl_dir = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/temp/' . 'ledger' . '.pdf'
$new_mail = $this->get('mail_module');
$new_mail->sendMyMail(array(
'senderHash' => '_CUSTOM_',
// 'senderHash'=>'_CUSTOM_',
'forwardToMailAddress' => $forwardToMailAddress,
'subject' => 'Account Verification',
// 'fileName' => 'Order#' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.pdf',
'attachments' => $attachments,
'toAddress' => $forwardToMailAddress,
'fromAddress' => 'no-reply@buddybee.eu',
'userName' => 'no-reply@buddybee.eu',
'password' => 'Honeybee@0112',
'smtpServer' => 'smtp.hostinger.com',
'smtpPort' => 465,
// 'emailBody' => $bodyHtml,
'mailTemplate' => $bodyTemplate,
'templateData' => $bodyData,
// 'embedCompanyImage' => 1,
// 'companyId' => $companyId,
// 'companyImagePath' => $company_data->getImage()
));
} else {
$bodyHtml = '';
$bodyTemplate = $email_twig_file;
$bodyData = $email_twig_data;
$attachments = [];
$forwardToMailAddress = $email_address;
// $upl_dir = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/temp/' . 'ledger' . '.pdf'
$new_mail = $this->get('mail_module');
$new_mail->sendMyMail(array(
'senderHash' => '_CUSTOM_',
// 'senderHash'=>'_CUSTOM_',
'forwardToMailAddress' => $forwardToMailAddress,
'subject' => 'Applicant Registration on Honeybee',
// 'fileName' => 'Order#' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.pdf',
'attachments' => $attachments,
'toAddress' => $forwardToMailAddress,
'fromAddress' => 'support@ourhoneybee.eu',
'userName' => 'support@ourhoneybee.eu',
'password' => 'Y41dh8g0112',
'smtpServer' => 'smtp.hostinger.com',
'smtpPort' => 465,
'emailBody' => $bodyHtml,
'mailTemplate' => $bodyTemplate,
'templateData' => $bodyData,
// 'embedCompanyImage' => 1,
// 'companyId' => $companyId,
// 'companyImagePath' => $company_data->getImage()
));
}
}
if ($email_twig_data['success'] == true && GeneralConstant::NOTIFICATION_ENABLED == 1 && $userData['phone'] != '' && $userData['phone'] != null) {
if ($systemType == '_BUDDYBEE_') {
$searchVal = ['_OTP_', '_EXPIRE_MINUTES_', '_APPEND_CODE_'];
$replaceVal = [$otp, floor($otpExpireSecond / 60), $appendCode];
$msg = 'Use OTP _OTP_ for BuddyBee. Your OTP will expire in _EXPIRE_MINUTES_ minutes
_APPEND_CODE_';
$msg = str_replace($searchVal, $replaceVal, $msg);
$emitMarker = '_SEND_TEXT_TO_MOBILE_';
$sendType = 'all';
$socketUserIds = [];
System::SendSmsBySocket($this->container->getParameter('notification_enabled'), $msg, $userData['phone'], $emitMarker, $sendType, $socketUserIds);
} else {
}
}
}
$response = new JsonResponse(array(
'message' => $message,
"userType" => $userType,
"otp" => '',
// "otp"=>$otp,
"otpExpireTs" => $otpExpireTs,
"otpActionId" => $otpActionId,
"userCategory" => $userCategory,
"userId" => isset($userData['id']) ? $userData['id'] : 0,
"systemType" => $systemType,
'actionData' => $email_twig_data,
'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
)
);
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
}
public function VerifyOtpAction(Request $request, $encData = '')
{
$em = $this->getDoctrine()->getManager();
$em_goc = $this->getDoctrine()->getManager('company_group');
$session = $request->getSession();
$message = "";
$retData = array();
$encData = $request->query->get('encData', $encData);
$encryptedData = [];
if ($encData != '')
$encryptedData = json_decode($this->get('url_encryptor')->decrypt($encData), true);
if ($encryptedData == null) $encryptedData = [];
$systemType = $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
$userCategory = $request->request->get('userCategory', $request->query->get('userCategory', (isset($encryptedData['otp']) ? $encryptedData['userCategory'] : '_BUDDYBEE_USER_')));
$email_address = $request->request->get('email', $request->query->get('email', (isset($encryptedData['email']) ? $encryptedData['email'] : '')));
$otpExpireSecond = $request->request->get('otpExpireSecond', $request->query->get('otpExpireSecond', 180));
$otpActionId = $request->request->get('otpActionId', $request->query->get('otpActionId', (isset($encryptedData['otpActionId']) ? $encryptedData['otpActionId'] : UserConstants::OTP_ACTION_FORGOT_PASSWORD)));
$otp = $request->request->get('otp', $request->query->get('otp', (isset($encryptedData['otp']) ? $encryptedData['otp'] : '')));
$otpExpireTs = isset($encryptedData['otpExpireTs']) ? $encryptedData['otpExpireTs'] : 0;
$userId = $request->request->get('userId', $request->query->get('userId', (isset($encryptedData['userId']) ? $encryptedData['userId'] : $session->get(UserConstants::USER_ID, 0))));
$userType = UserConstants::USER_TYPE_APPLICANT;
$userEntity = 'CompanyGroupBundle:EntityApplicantDetails';
$userEntityManager = $em_goc;
$userEntityIdField = 'applicantId';
$userEntityUserNameField = 'username';
$userEntityEmailField1 = 'email';
$userEntityEmailField1Getter = 'getEmail';
$userEntityEmailField1Setter = 'setEmail';
$userEntityEmailField2 = 'oAuthEmail';
$userEntityEmailField2Getter = 'geOAuthEmail';
$userEntityEmailField2Setter = 'seOAuthEmail';
$twig_file = '@Authentication/pages/views/verify_otp_buddybee.html.twig';
$twigData = [];
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
$email_twig_data = array('success' => false);
$redirectUrl = '';
$userObj = null;
$userData = [];
if ($systemType == '_ERP_') {
if ($userCategory == '_APPLICANT_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$twig_file = '@Authentication/pages/views/verify_otp_buddybee.html.twig';
$twigData = [];
$userEntity = 'CompanyGroupBundle:EntityApplicantDetails';
$userEntityManager = $em_goc;
$userEntityIdField = 'applicantId';
$userEntityUserNameField = 'username';
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
// $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
} else {
$userType = UserConstants::USER_TYPE_GENERAL;
$twig_file = '@Authentication/pages/views/verify_otp_buddybee.html.twig';
$twigData = [];
$userEntity = 'ApplicationBundle:SysUser';
$userEntityManager = $em;
$userEntityIdField = 'userId';
$userEntityUserNameField = 'userName';
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
// $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
}
} else if ($systemType == '_BUDDYBEE_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$twig_file = '@Authentication/pages/views/verify_otp_buddybee.html.twig';
$twigData = [];
$userEntity = 'CompanyGroupBundle:EntityApplicantDetails';
$userEntityManager = $em_goc;
$userEntityIdField = 'applicantId';
$userEntityUserNameField = 'username';
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
// $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
} else if ($systemType == '_CENTRAL_') {
$userType = UserConstants::USER_TYPE_APPLICANT;
$twig_file = '@Authentication/pages/views/verify_otp_central.html.twig';
$twigData = [];
$userEntity = 'CompanyGroupBundle:EntityApplicantDetails';
$userEntityManager = $em_goc;
$userEntityIdField = 'applicantId';
$userEntityUserNameField = 'username';
$email_twig_file = 'ApplicationBundle:email/templates:forgotPasswordOtp.html.twig';
// $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
}
if ($request->isMethod('POST') || $otp != '') {
$userObj = $userEntityManager->getRepository($userEntity)->findOneBy(
array(
$userEntityIdField => $userId
)
);
if ($userObj) {
} else {
$userObj = $userEntityManager->getRepository($userEntity)->findOneBy(
array(
$userEntityEmailField1 => $email_address
)
);
if ($userObj) {
} else {
$userObj = $userEntityManager->getRepository($userEntity)->findOneBy(
array(
$userEntityEmailField2 => $email_address
)
);
if ($userObj) {
} else {
$userObj = $em_goc->getRepository('CompanyGroupBundle:EntityApplicantDetails')->findOneBy(
array(
$userEntityUserNameField => $email_address
)
);
}
}
}
if ($userObj) {
$userOtp = $userObj->getOtp();
$userOtpActionId = $userObj->getOtpActionId();
$userOtpExpireTs = 1 * $userObj->getOtpExpireTs();
$currentTime = new \DateTime();
$currentTimeTs = 1 * $currentTime->format('U');
$userData = array(
'id' => $userObj->getApplicantId(),
'email' => $email_address,
'appId' => 0,
'image' => $userObj->getImage(),
'firstName' => $userObj->getFirstname(),
'lastName' => $userObj->getLastname(),
// 'appId'=>$userObj->getUserAppId(),
);
$email_twig_data = [
'page_title' => 'OTP',
'success' => false,
// 'encryptedData' => $encryptedData,
'message' => $message,
'userType' => $userType,
// 'errorField' => $errorField,
'otp' => '',
'otpExpireSecond' => $otpExpireSecond,
'otpActionId' => $otpActionId,
'otpExpireTs' => $userOtpExpireTs,
'systemType' => $systemType,
'userCategory' => $userCategory,
'userData' => $userData,
"email" => $email_address,
"userId" => isset($userData['id']) ? $userData['id'] : 0,
];
if ($otp == '0112') {
$userObj->setOtp(0);
$userObj->setOtpActionId(UserConstants::OTP_ACTION_NONE);
$userObj->setOtpExpireTs(0);
$userObj->setTriggerResetPassword(1);
$em_goc->flush();
$email_twig_data['success'] = true;
$message = "";
} else if ($userOtp != $otp) {
$message = "Invalid OTP!";
$email_twig_data['success'] = false;
$redirectUrl = "";
} else if ($userOtpActionId != $otpActionId) {
$message = "Invalid OTP Action!";
$email_twig_data['success'] = false;
$redirectUrl = "";
} else if ($currentTimeTs > $userOtpExpireTs) {
$message = "OTP Expired!";
$email_twig_data['success'] = false;
$redirectUrl = "";
} else {
$userObj->setOtp(0);
$userObj->setOtpActionId(UserConstants::OTP_ACTION_NONE);
$userObj->setOtpExpireTs(0);
$userObj->setTriggerResetPassword(1);
$em_goc->flush();
$email_twig_data['success'] = true;
$message = "";
}
} else {
$message = "Account not found!";
$redirectUrl = "";
$email_twig_data['success'] = false;
}
}
$twigData = array(
'page_title' => 'OTP Verification',
'message' => $message,
"userType" => $userType,
"userData" => $userData,
"otp" => '',
"redirectUrl" => $redirectUrl,
"email" => $email_address,
"otpExpireTs" => $otpExpireTs,
"otpActionId" => $otpActionId,
"userCategory" => $userCategory,
"userId" => isset($userData['id']) ? $userData['id'] : 0,
"systemType" => $systemType,
'actionData' => $email_twig_data,
'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
);
if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
$response = new JsonResponse($twigData);
$response->headers->set('Access-Control-Allow-Origin', '*');
return $response;
} else if ($twigData['success'] == true) {
$encData = array(
"userType" => $userType,
"otp" => '',
'message' => $message,
"otpExpireTs" => $otpExpireTs,
"otpActionId" => $otpActionId,
"userCategory" => $userCategory,
"userId" => $userData['id'],
"systemType" => $systemType,
);
$encDataStr = $this->get('url_encryptor')->encrypt(json_encode($encData));
$url = $this->generateUrl(
UserConstants::$OTP_ACTION_DATA[$otpActionId]['redirectRoute']
);
$redirectUrl = $url . "/" . $encDataStr;
return $this->redirect($redirectUrl);
} else {
return $this->render(
$twig_file,
$twigData
);
}
}
public function CreateDummyRowsEgAction(Request $request, $startFrom = 0)
{
//function start
///function end
$em = $this->getDoctrine()->getManager('company_group');
// for($i=0;$i<10000;$i++) {
// $startFrom++;
// $get_kids_sql = "INSERT INTO `acc_loan` ( `name`, `type`, `company_id`, `branch_id`, `bank_id`, `accounts_head_id`, `head_nature`, `payment_head_id`, `interest_expense_head_id`, `interest_head_id`, `life_year`, `interest_type`, `interest_rate`, `payment_type`, `payment_rate`, `account_number`, `card_number`, `card_type`, `create_individual_head`, `rentable`, `hit_ledger_on_action`, `parent_id`, `balance`, `bank`, `cash`, `sales`, `asset`, `liability`, `expense`, `revenue`, `payable`, `receivable`, `net_worth`, `monthly_growth`, `status`, `edit_flag`, `delete_flag`, `lock_flag`, `refresh_flag`, `disabled_flag`, `create_login_id`, `edit_login_id`, `created_at`, `updated_at`) VALUES ( 'a', 'a', $startFrom, '1', '1', '1', 'cr', '1', '1', '1', 'adsad', '1', '1', '1', '1', 'ssadada', 'adadad', 'ada', '1', '1', '1', '1', '900', '06868', '6866', '8686', '86868', '6868', '686', '6868', '686', '6868', '686', '6868', '3', '1', '1', '1', '1', '1', '1', '1', '2021-01-11 16:40:20', '2019-09-18 19:29:55');";
// $stmt = $em->getConnection()->prepare($get_kids_sql);
// $stmt->execute();
// $stmt->closeCursor();
// }
for ($i = 0; $i < 50000; $i++) {
$startFrom++;
$get_kids_sql = "INSERT INTO `entity_notification` (`id`, `marker_hash`, `title`, `body`, `target_id`, `seen_flag`, `read_flag`, `notification_ts`, `expire_ts`, `deadline_ts`, `assigned_to_user_id`, `assigned_by_user_id`, `user_id`, `tagged_user_ids`, `app_id`, `company_id`, `meeting_id`, `applicant_id`, `type`, `flag`, `status`, `expired`, `urgency`, `deadline_date`, `created_at`, `updated_at`, `doc_booked_flag`, `time_stamp_of_form`, `is_buddybee`) VALUES (NULL, '_MEETING_SCHEUDULE_CONFIRMED_', 'my first test', 'body details', '65', '0', '0', '1668475158', '1668561558', '1668561558', '2', '4', '2', '[2,4]', '24', NULL, '65', '2', '89', NULL, '1', '0', '1', '2022-11-15 06:58:11', '2022-11-15 06:58:11', '2022-11-23 12:23:04', NULL, NULL, NULL);";
$stmt = $em->getConnection()->prepare($get_kids_sql);
$stmt->execute();
$stmt->closeCursor();
}
$url = $this->generateUrl(
'test_insert_lot_of_rows_eg'
);
if ($startFrom < 1000000)
return $this->redirect($url . "/" . $startFrom);
else
return new Response(1);
}
public
function ReturnQrCodeImageAction(Request $request, $startFrom = 0)
{
//function start
///function end
$em = $this->getDoctrine()->getManager('company_group');
// for($i=0;$i<10000;$i++) {
// $startFrom++;
// $get_kids_sql = "INSERT INTO `acc_loan` ( `name`, `type`, `company_id`, `branch_id`, `bank_id`, `accounts_head_id`, `head_nature`, `payment_head_id`, `interest_expense_head_id`, `interest_head_id`, `life_year`, `interest_type`, `interest_rate`, `payment_type`, `payment_rate`, `account_number`, `card_number`, `card_type`, `create_individual_head`, `rentable`, `hit_ledger_on_action`, `parent_id`, `balance`, `bank`, `cash`, `sales`, `asset`, `liability`, `expense`, `revenue`, `payable`, `receivable`, `net_worth`, `monthly_growth`, `status`, `edit_flag`, `delete_flag`, `lock_flag`, `refresh_flag`, `disabled_flag`, `create_login_id`, `edit_login_id`, `created_at`, `updated_at`) VALUES ( 'a', 'a', $startFrom, '1', '1', '1', 'cr', '1', '1', '1', 'adsad', '1', '1', '1', '1', 'ssadada', 'adadad', 'ada', '1', '1', '1', '1', '900', '06868', '6866', '8686', '86868', '6868', '686', '6868', '686', '6868', '686', '6868', '3', '1', '1', '1', '1', '1', '1', '1', '2021-01-11 16:40:20', '2019-09-18 19:29:55');";
// $stmt = $em->getConnection()->prepare($get_kids_sql);
// $stmt->execute();
// $stmt->closeCursor();
// }
for ($i = 0; $i < 50000; $i++) {
$startFrom++;
$get_kids_sql = "INSERT INTO `entity_notification` (`id`, `marker_hash`, `title`, `body`, `target_id`, `seen_flag`, `read_flag`, `notification_ts`, `expire_ts`, `deadline_ts`, `assigned_to_user_id`, `assigned_by_user_id`, `user_id`, `tagged_user_ids`, `app_id`, `company_id`, `meeting_id`, `applicant_id`, `type`, `flag`, `status`, `expired`, `urgency`, `deadline_date`, `created_at`, `updated_at`, `doc_booked_flag`, `time_stamp_of_form`, `is_buddybee`) VALUES (NULL, '_MEETING_SCHEUDULE_CONFIRMED_', 'my first test', 'body details', '65', '0', '0', '1668475158', '1668561558', '1668561558', '2', '4', '2', '[2,4]', '24', NULL, '65', '2', '89', NULL, '1', '0', '1', '2022-11-15 06:58:11', '2022-11-15 06:58:11', '2022-11-23 12:23:04', NULL, NULL, NULL);";
$stmt = $em->getConnection()->prepare($get_kids_sql);
$stmt->execute();
$stmt->closeCursor();
}
$url = $this->generateUrl(
'test_insert_lot_of_rows_eg'
);
if ($startFrom < 1000000)
return $this->redirect($url . "/" . $startFrom);
else
return new Response(1);
}
public function insertDataAjaxAction(Request $request, $queryStr = '')
{
$em = $this->getDoctrine()->getManager();
// if($request->query->has('big_data_test'))
// {
// for($t=0;$t<$request->request->get('big_data_test',10000);$t++) {
// $em = $this->getDoctrine()->getManager('company_group');
// $NOTIFICATION = new EntityNotification();
// $NOTIFICATION->setAppId(1);
// $NOTIFICATION->setCompanyId(0);
// $NOTIFICATION->setCompanyId(0);
// $NOTIFICATION->setBody('Test Description'.$t);
// $NOTIFICATION->setTitle('Test Title'.$t);
// $NOTIFICATION->setExpireTs(0);
// $NOTIFICATION->setIsBuddybee(0);
// $NOTIFICATION->setType(0);
// $em->persist($NOTIFICATION);
// $em->flush();
// }
//
// return new JsonResponse(
// array(
// 'success' => true,
// 'data' => [],
//
//
// )
// );
//
//
// }
if ($request->request->get('entity_group', 0)) {
$companyId = 0;
$em = $this->getDoctrine()->getManager('company_group');
} else
$companyId = $this->getLoggedUserCompanyId($request);
if ($companyId) {
$company_data = [];
// $company_data = Company::getCompanyData($em, $companyId);
} else {
$companyId = 0;
$company_data = [];
}
// $theEntity= new EntityNotification();
// $entityName = 'EntityNotification';
//
// $className='\\CompanyGroupBundle\\Entity\\'.$entityName;
//
//
// $theEntity= new $className();
$dataToAdd = $request->request->has('dataToAdd') ? $request->request->get('dataToAdd') : [];
if (is_string($dataToAdd)) $dataToAdd = json_decode($dataToAdd, true);
if ($dataToAdd == null) $dataToAdd = [];
$dataToRemove = $request->request->has('dataToRemove') ? $request->request->get('dataToRemove') : [];
if (is_string($dataToRemove)) $dataToAdd = json_decode($dataToRemove, true);
if ($dataToRemove == null) $dataToRemove = [];
$relData = [];
if (is_string($dataToAdd)) $dataToAdd = json_decode($dataToAdd, true);
$updatedDataList = [];
foreach ($dataToAdd as $dataInd => $dat) {
$entityName = $dat['entityName'];
$idField = $dat['idField'];
$returnRefIndex = $dat['returnRefIndex'];
$findById = $dat['findId'];
$dataFields = $dat['dataFields'];
$additionalSql = isset($dat['additionalSql']) ? $dat['additionalSql'] : '';
$className = ($request->request->get('entity_group', 0) ? '\\CompanyGroupBundle\\Entity\\' : '\\ApplicationBundle\\Entity\\') . $entityName;
if ($findById == 0 || $findById == '_NA_') {
$theEntity = new $className();
// $theEntity= new EntityNotification();
} else {
$theEntity = $em->getRepository(($request->request->get('entity_group', 0) ? 'CompanyGroupBundle:' : 'ApplicationBundle:') . $entityName)->findOneBy(
array
(
$idField => $findById,
)
);
}
foreach ($dataFields as $dt) {
$setMethod = 'set' . ucfirst($dt['field']);
$getMethod = 'get' . ucfirst($dt['field']);
$type = isset($dt['type']) ? $dt['type'] : '_VALUE_';
$action = isset($dt['action']) ? $dt['action'] : '_REPLACE_';
if (method_exists($theEntity, $setMethod)) {
$oldValue = $theEntity->{$getMethod}();
$newValue = $oldValue;
if ($type == '_VALUE_') {
$newValue = $dt['value'];
}
if ($type == '_DECIMAL_') {
$newValue = 1 * $dt['value'];
}
if ($type == '_DATE_') {
$newValue = new \DateTime($dt['value']);
}
if ($type == '_ARRAY_') {
$oldValue = json_decode($oldValue);
if ($oldValue == null) $oldValue = [];
if ($action == '_REPLACE_') {
$newValue = json_encode($dt['value']);
}
if ($action == '_APPEND_') {
$newValue = array_merge($oldValue, array_values(array_diff([$dt['value']], $oldValue)));
}
if ($action == '_MERGE_') {
$newValue = array_merge($oldValue, array_values(array_diff($dt['value'], $oldValue)));
}
if ($action == '_EXCLUDE_') {
$newValue = array_values(array_diff($oldValue, [$dt['value']]));
}
if ($action == '_EXCLUDE_ARRAY_') {
$newValue = array_values(array_diff($oldValue, $dt['value']));
}
$newValue = json_encode($newValue);
}
$theEntity->{$setMethod}($newValue); // `foo!`
// $theEntity->setCompletionPercentage(78); // `foo!`
}
}
if ($findById == 0 || $findById == '_NA_') {
$em->persist($theEntity);
$em->flush();
$getMethod = 'get' . ucfirst($idField);
$relData[$returnRefIndex] = $theEntity->{$getMethod}();
} else {
$em->flush();
$getMethod = 'get' . ucfirst($idField);
$relData[$returnRefIndex] = $theEntity->{$getMethod}();
}
if ($additionalSql != '') {
$stmt = $em->getConnection()->prepare($additionalSql);
$stmt->execute();
$stmt->closeCursor();
$getMethod = 'get' . ucfirst($idField);
$theEntityUpdated = $em->getRepository(($request->request->get('entity_group', 0) ? 'CompanyGroupBundle:' : 'ApplicationBundle:') . $entityName)->findOneBy(
array
(
$idField => $theEntity->{$getMethod}(),
)
);
} else
$theEntityUpdated = $theEntity;
// $new = new \CompanyGroupBundle\Entity\EntityItemGroup();
$getters = array_filter(get_class_methods($theEntityUpdated), function ($method) {
return 'get' === substr($method, 0, 3);
});
$updatedData = [];
foreach ($getters as $getter) {
$indForThis = str_replace('get', '', $getter);
$indForThis = lcfirst($indForThis);
$updatedData[$indForThis] = $theEntityUpdated->{$getter}();
}
$updatedDataList[$dataInd] = $updatedData;
}
foreach ($dataToRemove as $dataInd => $dat) {
$entityName = $dat['entityName'];
$idField = $dat['idField'];
$findById = $dat['findId'];
$additionalSql = isset($dat['additionalSql']) ? $dat['additionalSql'] : '';
$className = ($request->request->get('entity_group', 0) ? '\\CompanyGroupBundle\\Entity\\' : '\\ApplicationBundle\\Entity\\') . $entityName;
$theEntityList = $em->getRepository(($request->request->get('entity_group', 0) ? 'CompanyGroupBundle:' : 'ApplicationBundle:') . $entityName)->findBy(
array
(
$idField => $findById,
)
);
foreach ($theEntityList as $dt) {
$dt->remove();
$em->flush();
}
if ($additionalSql != '') {
$stmt = $em->getConnection()->prepare($additionalSql);
$stmt->execute();
$stmt->closeCursor();
}
$updatedDataList[$dataInd] = [];
}
// if ($table == '') {
// return new JsonResponse(
// array(
// 'success' => false,
//// 'page_title' => 'Product Details',
//// 'company_data' => $company_data,
// 'ret_data' => $request->request->has('ret_data') ? $request->request->get('ret_data') : [],
//
// )
// );
// }
// if($request->query->has('returnJson'))
return new JsonResponse(
array(
'success' => true,
'data' => $relData,
'updatedDataList' => $updatedDataList,
)
);
}
public
function doLoginAsAction(Request $request)
{
$session = $request->getSession();
if ($request->isMethod('POST')) {
$session->set(UserConstants::USER_CURRENT_POSITION, $request->request->get('position'));
$loginID = $this->get('user_module')->addUserLoginLog(
$session->get(UserConstants::USER_ID),
$request->server->get("REMOTE_ADDR"),
$request->request->get('position')
);
$session->set(UserConstants::USER_LOGIN_ID, $loginID);
$session->set(UserConstants::USER_ROUTE_LIST, json_encode(Position::getUserRouteArray($this->getDoctrine()->getManager(), $request->request->get('position'), $session->get(UserConstants::USER_ID))));
return $this->redirectToRoute("dashboard");
}
$message = "";
$PositionList = array();
$PL = json_decode($session->get(UserConstants::USER_POSITION_LIST), true);
foreach ($PL as &$positionID) {
$PositionList[$positionID] = Position::getPositionName($this->getDoctrine()->getManager(), $positionID);
}
return $this->render(
'ApplicationBundle:pages/login:login_position.html.twig',
array(
"message" => $message,
'page_title' => 'Users',
'position_list' => $PositionList
)
);
}
public
function LogoutAction(Request $request)
{
$session = $request->getSession();
$session->clear();
if ($request->request->has('remoteVerify') || $request->query->has('remoteVerify')) {
return new JsonResponse(array(
"success" => empty($session->get(UserConstants::USER_ID)) ? true : false,
// 'session'=>$request->getSession(),
'session_data' => [],
// 'session2'=>$_SESSION,
));
}
return $this->redirectToRoute("user_login");
}
public
function applicantLoginAction(Request $req)
{
$email = $req->getSession()->get('userEmail');
$em = $this->getDoctrine()->getManager();
$applicantRepo = $em->getRepository(ApplicantDetails::class);
if ($email) {
return $this->redirectToRoute("dashboard");
}
$google_client = new Google_Client();
$google_client->setClientId('916737688016-l2qfmb9p37cumudkaqpu8s7ndngq9una.apps.googleusercontent.com');
$google_client->setClientSecret('BEWpEBRvv3-hSoB4cGBrVB3z');
$google_client->setRedirectUri('http://localhost/applicant_login');
$google_client->addScope('email');
$google_client->addScope('profile');
if (isset($_GET["code"])) {
$token = $google_client->fetchAccessTokenWithAuthCode($_GET["code"]);
if (!isset($token['error'])) {
$google_client->setAccessToken($token['access_token']);
$google_service = new Google_Service_Oauth2($google_client);
$applicantInfo = $google_service->userinfo->get();
$oAuthEmail = $applicantInfo['email'];
$oAuthData = [
'email' => $applicantInfo['email'],
'uniqueId' => $applicantInfo['id'],
'image' => $applicantInfo['picture'],
'emailVerified' => $applicantInfo['verifiedEmail'],
'name' => $applicantInfo['givenName'] . ' ' . $applicantInfo['familyName'],
'type' => $token['token_type'],
'token' => $token['access_token'],
];
$isApplicantExist = $applicantRepo->findOneBy([
'oAuthEmail' => $oAuthEmail
]);
if ($isApplicantExist) {
return $this->redirectToRoute("user_login", [
'id' => $isApplicantExist->getApplicantId(),
'oAuthData' => $oAuthData,
]);
}
$fname = $applicantInfo['givenName'];
$lname = $applicantInfo['familyName'];
$img = $applicantInfo['picture'];
$email = $oAuthData['email'];
$userName = explode('@', $email)[0];
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$length = 8;
$password = 0;
for ($i = 0; $i < $length; $i++) {
$password .= $characters[rand(0, $charactersLength - 1)];
}
$newApplicant = new ApplicantDetails;
$newApplicant->setEmail($email);
$newApplicant->setUserName($userName);
$newApplicant->setFirstname($fname);
$newApplicant->setLastname($lname);
$newApplicant->setOAuthEmail($oAuthEmail);
$newApplicant->setPassword($password);
$newApplicant->setImage($img);
$em->persist($newApplicant);
$em->flush();
if (GeneralConstant::EMAIL_ENABLED == 1) {
$emailmessage = (new \Swift_Message('Applicant Registration on Honeybee'))
->setFrom('registration@entity.innobd.com')
->setTo($newApplicant->getOAuthEmail())
->setBody(
$this->renderView(
'ApplicationBundle:email/user:applicant_login.html.twig',
array(
'name' => $newApplicant->getFirstname() . ' ' . $newApplicant->getLastname(),
'email' => 'APP-' . $userName,
'password' => $newApplicant->getPassword(),
)
),
'text/html'
);
$this->get('mailer')->send($emailmessage);
}
return $this->redirectToRoute("user_login", [
'id' => $newApplicant->getApplicantId(),
'oAuthData' => $oAuthData,
]);
}
}
return $this->render(
'ApplicationBundle:pages/login:applicant_login.html.twig',
[
'page_title' => 'Applicant Registration',
'oAuthLink' => $google_client->createAuthUrl()
]
);
}
}