Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
taxi-customer-bot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Глеб Прохницкий
taxi-customer-bot
Commits
0771c86b
Commit
0771c86b
authored
Apr 18, 2018
by
Глеб Прохницкий
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleted commented functions
parent
2e1732ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
5 deletions
+1
-5
src/states.php
+1
-5
No files found.
src/states.php
View file @
0771c86b
...
...
@@ -135,7 +135,7 @@ class States {
.
" WHERE order_id="
.
$arr
[
'order'
][
'id'
]);
$stmt
->
execute
();
sleep
(
3
5
);
sleep
(
3
0
);
$ch2
=
curl_init
(
'https://services.vot.by/api/order/'
.
$arr
[
'order'
][
'id'
]
.
'/status'
);
curl_setopt
(
$ch2
,
CURLOPT_HTTPHEADER
,
array
(
'Authorization: Bearer '
.
$usetTableQueryData
[
'token'
]
...
...
@@ -155,15 +155,11 @@ class States {
$keyboard
=
new
\TelegramBot\Api\Types\ReplyKeyboardMarkup
([[[
"text"
=>
"В главное меню"
]]],
true
,
true
);
$bot
->
sendMessage
(
$message
->
getChat
()
->
getId
(),
"У вас не может быть более 7-ми активных заказов!"
,
false
,
null
,
null
,
$keyboard
);
// $bot->sendMessage($message->getChat()->getId(), "Start: " . $answer['start_lat'] . " " . $answer['start_lng'], false, null, null, $keyboard);
// $bot->sendMessage($message->getChat()->getId(), "End: " . $answer['end_lat'] . " " . $answer['end_lng'], false, null, null, $keyboard);
$stmt
=
$db
->
prepare
(
"DELETE from orders where chat_id = "
.
$message
->
getChat
()
->
getId
());
$stmt
->
execute
();
}
else
{
$keyboard
=
new
\TelegramBot\Api\Types\ReplyKeyboardMarkup
([[[
"text"
=>
"В главное меню"
]]],
true
,
true
);
$bot
->
sendMessage
(
$message
->
getChat
()
->
getId
(),
"Непредвиденная ошибка!"
,
false
,
null
,
null
,
$keyboard
);
// $bot->sendMessage($message->getChat()->getId(), "Start: " . $answer['start_lat'] . " " . $answer['start_lng'], false, null, null, $keyboard);
// $bot->sendMessage($message->getChat()->getId(), "End: " . $answer['end_lat'] . " " . $answer['end_lng'], false, null, null, $keyboard);
$stmt
=
$db
->
prepare
(
"DELETE from orders where chat_id = "
.
$message
->
getChat
()
->
getId
());
$stmt
->
execute
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment