{"TITLE":"Quotes","DESCRIPTION":"Quotes Callback","TYPE_EVENT":"9","ENABLE":"1","CODE":"if (strripos($callback, 'Quotes') > -1) {\r\n\t$refresh_emoji =\t\thex2bin('E299BB');\r\n\t$confirm_emoji = \t\thex2bin('E29C85');\r\n\t$radio_emoji= \t\t\thex2bin('F09F93BB');\r\n\t$quote_emoji = \t\t\thex2bin('E284B9');\r\n\t$script_emoji = \t\thex2bin('F09F9384');\r\n\tswitch(explode('*', $callback)[1]) {\r\n    \tcase \"Show\":\r\n    \t\t$this->sendAction($chat_id,\"typing\");\r\n\t    \t$optionCallback =array( \r\n\t\t\t\t\t\t\t\tarray($this->buildInlineKeyboardButton(\r\n\t\t\t                       \t$text = $quote_emoji.\"\u0421\u043b\u0443\u0447\u0430\u0435\u043d\u043d\u0430\u044f \u0446\u0438\u0442\u0430\u0442\u0430\",\r\n\t\t\t                       \t\"\",\r\n\t\t\t                       \t\"Quotes*RandomQuote\"\r\n\t\t\t                    )),\r\n            \t\t\t\t\tarray($this->buildInlineKeyboardButton(\r\n\t\t\t                       \t$text = $script_emoji.\"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\",\r\n\t\t\t                       \t\"\",\r\n\t\t\t                       \t\"Scripts*Show\"\r\n\t\t\t                    ))\r\n\t\t\t\t\t\t\t);\r\n\t\t\t$this->sendContent(array(\r\n\t\t\t\t\t\t\t\t'chat_id' => $chat_id,\r\n\t\t\t\t\t\t\t\t'text' => \"\u0426\u0438\u0442\u0430\u0442\u044b:\",\r\n\t\t\t\t\t\t\t\t'reply_markup' => $this->buildInlineKeyBoard($optionCallback)));\r\n\t\t\t$this->sendAnswerCallbackQuery($callback_id, $confirm_emoji.\"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e\", false);\r\n    \t\t$skip = true;\r\n    \t\tbreak;\r\n    \tcase \"RandomQuote\":\r\n    \t\t$this->sendAction($chat_id,\"typing\");\r\n    \t\t$rec = SQLSelect(\"SELECT * FROM app_quotes;\");\r\n\t\t\t$total = count($rec);\r\n\t\t\t$option[] = $this->buildInlineKeyboardButton($text = $refresh_emoji.\"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\", \"\", \"Quotes*Refresh\");\r\n\t\t\t$option[] = $this->buildInlineKeyboardButton($text = $script_emoji.\"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f\", \"\", \"Scripts*Show\");\r\n\t\t\t$keyb = $this->buildInlineKeyBoard(array_chunk(($option), 1));\r\n\t\t\t$this->sendContent(array('chat_id' => $chat_id, 'text' => $rec[rand(0, $total)]['BODY'], 'reply_markup' => $keyb));\r\n\t\t\t$this->sendAnswerCallbackQuery($callback_id, $confirm_emoji.\"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e\", false);\r\n    \t\t$skip = true;\r\n    \t\tbreak;\r\n    \tcase \"Refresh\":\r\n    \t\t$rec = SQLSelect(\"SELECT * FROM app_quotes;\");\r\n\t\t\t$total = count($rec);\r\n\t\t\t$option[] = $this->buildInlineKeyboardButton($text = $refresh_emoji.\"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\", \"\", \"Quotes*Refresh\");\r\n\t\t\t$option[] = $this->buildInlineKeyboardButton($text = $script_emoji.\"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f\", \"\", \"Scripts*Show\");\r\n\t\t\t$keyb = $this->buildInlineKeyBoard(array_chunk(($option), 1));\r\n\t\t\t$this->editMessage($chat_id, $message_id, $rec[rand(0, $total)]['BODY'], $keyb);\r\n\t\t\t$this->sendAnswerCallbackQuery($callback_id, $confirm_emoji.\"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e\", false);\r\n    \t\t$skip = true;\r\n    \t\tbreak;\r\n    }\r\n}"}