Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flexydial
/
hdfc-beu-v2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fc54e023
authored
2018-10-31 19:51:56 +0530
by
G Manojkumar
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Activated all users and Log generation
1 parent
01ec3695
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
application/app/Http/Controllers/SmsController.php
application/app/Http/Controllers/SmsController.php
View file @
fc54e02
...
...
@@ -7,18 +7,18 @@ use Log;
class
SmsController
extends
Controller
{
public
$smsUrl
=
'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'
;
public
$userarray
=
array
(
"A21568"
,
"admin"
);
//
public $userarray = array("A21568","admin");
public
function
sendSmsBasedOnSubDisposition
(
$kstychCall
)
{
$users
=
$this
->
userarray
;
if
(
in_array
(
Auth
::
user
()
->
username
,
$users
)){
//
$users = $this->userarray;
//
if(in_array(Auth::user()->username , $users)){
$msgText
=
$this
->
getSmsTemplate
(
$kstychCall
);
if
(
!
empty
(
$msgText
)
)
{
$msgText
=
$this
->
fillValuesInTemplate
(
$msgText
);
Log
::
info
(
$msgText
);
//
Log::info($msgText);
$this
->
sendSmsRequest
(
$kstychCall
,
$msgText
);
}
}
//
}
return
;
}
public
function
sendSmsRequest
(
$kstychCall
,
$msgText
)
...
...
@@ -47,7 +47,9 @@ class SmsController extends Controller
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
$response
=
curl_exec
(
$ch
);
Log
::
info
(
$response
);
Log
::
useFiles
(
storage_path
()
.
'/logs/SMS_Messages.log'
);
Log
::
info
(
"|"
.
date
(
'Y-m-d H:i:s'
,
strtotime
(
'+5 hours 30 minutes'
))
.
"|"
.
$kstychCall
[
'callnumber'
]
.
"|"
.
$msgText
.
"|"
.
$response
);
//Log::info($response);
curl_close
(
$ch
);
}
catch
(
Exception
$e
)
{
Log
::
info
(
$e
->
getMessage
());
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment