//получить сенд файл
    $send_content = file_get_contents("modules/templates/admin/sendMsg.txt");
    if (strlen($send_content) > 0){
        $send_action = explode(" ",$send_content);
        if (isset($send_action[1])) {
            file_put_contents("modules/templates/admin/sendMsg.txt", "");
            if($send_action[0] == "send_one"){
                $this->DelMessageText(ADMIN_CHAT_ID, $send_action[2]);
                $user = R::findOne("users", "id = '{$send_action[1]}'");
                file_put_contents("modules/templates/admin/sendMsgTempl.txt",$text);
                $template = new Template("admin/sendMsgTempl");
                $template = $template->Load();
                $template->LoadButtons();
                $this->sendMessage($user["chat_id"], $template->text, $template->buttons);
                $this->DelMessageText(ADMIN_CHAT_ID, $message_id);
                $this->sendMessage(ADMIN_CHAT_ID, "Сообщение отправлено");
                return;
            } elseif ($send_action[0] == "send_all"){
                $this->DelMessageText(ADMIN_CHAT_ID, $send_action[1]);
                $users = R::findAll("users");
                $this->DelMessageText(ADMIN_CHAT_ID, $message_id);
                file_put_contents("modules/templates/admin/sendMsgTemplAll.txt",$text);
                $template = new Template("admin/sendMsgTemplAll");
                $template = $template->Load();
                $template->LoadButtons();
                foreach ($users as $user) {
                    $this->sendMessage($user["chat_id"], $template->text, $template->buttons);
                }
                $this->sendMessage(ADMIN_CHAT_ID, "Сообщение отправлено всем пользоваетлям");
                return;
            }
            
        }
    }
    switch ($command[0]) {
        case "/reply":
            file_put_contents("modules/templates/admin/user_voice_reply.txt", "$command[1] $message_id");
            $this->sendMessage(ADMIN_CHAT_ID, "Для ответа запишите голосове сообщение");
            return;

        case "/send_voice":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $file_id = file_get_contents("modules/templates/admin/file_id.txt");
            $reply_to = file_get_contents("modules/templates/admin/user_voice_reply.txt");
            $full = explode(" ", $reply_to);
            $this->sendVoice($full[0], $file_id);
            $this->sendMessage(ADMIN_CHAT_ID, "Сообщение отправлено");
            $this->DelMessageText(ADMIN_CHAT_ID, $full[1]);
            return;
        case "/1":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);
            $statuses = R::findAll( 'refbuffer' , ' ORDER BY id ASC ' );
            $stats = array();
            foreach($statuses as $status){
                array_push($stats, $status["buffer"]);
            }
            $template = new Template("admin/status_stat", [
                new TemplateData(":red", $stats[0]),
                new TemplateData(":orange", $stats[1]),
                new TemplateData(":yellow",$stats[2]),
                new TemplateData(":green", $stats[3]),
                new TemplateData(":blue", $stats[4]),
                new TemplateData(":darkblue", $stats[5]),
                new TemplateData(":purple", $stats[6])
            ]);
            $template = $template->Load();
            $this->sendMessage(ADMIN_CHAT_ID, $template->text);
            return;
        case "/aphrodite_morning_process_purchase_success":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $orderId = (int)$command[1];
            //$username = $command[3];

            $aphroditeMorning = R::findOne("aphroditemorning", "id = $orderId");
            if ($aphroditeMorning) {
                $aphroditeMorning["status"] = 2;

                R::store($aphroditeMorning);

                $aphroditeMorningUser = R::findOne("users", "id = {$aphroditeMorning["user_id"]}");
                $aphroditeMorningUser["action"] = "";
                R::store($aphroditeMorningUser);

                $this->DelMessageText($aphroditeMorningUser["chat_id"], $command[2]);

                $templateUser = new Template("aphrodite_morning/order_payment_success");
                $templateUser = $templateUser->Load();

                $this->sendMessage($aphroditeMorningUser["chat_id"], $templateUser->text);

                //Создать файл с номерам заказа
                file_put_contents("modules/templates/admin/cur_order.txt", "aphr $orderId");

                $templateAdmin = new Template("admin/aphrodite_morning/process_purchase_success", [
                    new TemplateData(":aphroditeMorningId", $aphroditeMorning["id"]),
                    new TemplateData(":username", $aphroditeMorningUser["username"]),
                    //new TemplateData(":username", $username)

                ]);
                $templateAdmin = $templateAdmin->Load();
                $this->sendPhoto(ADMIN_CHAT_ID,"https://katyasatorinebot.online/bot/{$aphroditeMorning["check_photo"]}", $templateAdmin->text);
                //$response = $this->sendMessage(ADMIN_CHAT_ID,$templateAdmin->text);
            }

            return;
        case "/aphrodite_morning_process_purchase_deny":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $orderId = (int)$command[1];
            //$username = $command[3];

            $aphroditeMorning = R::findOne("aphroditemorning", "id = $orderId");
            if ($aphroditeMorning) {
                $aphroditeMorning["status"] = 2;

                R::store($aphroditeMorning);

                $aphroditeMorningUser = R::findOne("users", "id = {$aphroditeMorning["user_id"]}");

                $templateUser = new Template("order_payment_deny_utro");
                $templateUser = $templateUser->Load();

                //$this->DelMessageText($aphroditeMorningUser["chat_id"], $command[2]);

                $this->sendMessage($aphroditeMorningUser["chat_id"], $templateUser->text);

                $templateAdmin = new Template("admin/aphrodite_morning/process_purchase_deny", [
                    new TemplateData(":aphroditeMorningId", $aphroditeMorning["id"]),
                    new TemplateData(":username", $aphroditeMorningUser["username"]),
                    //new TemplateData(":username", $username)
                ]);
                $templateAdmin = $templateAdmin->Load();

                $this->sendMessage(ADMIN_CHAT_ID, $templateAdmin->text);
            }

            return;

        case "/daoss_magick_process_purchase_success":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $orderId = (int)$command[1];
            //$username = $command[3];

            $daossmagick = R::findOne("daossmagick", "id = $orderId");
            if ($daossmagick) {
                $daossmagick["status"] = 2;

                R::store($daossmagick);

                $daossmagickUser = R::findOne("users", "id = {$daossmagick["user_id"]}");
                $daossmagickUser["action"] = "";
                R::store($daossmagickUser);

                $this->DelMessageText($daossmagickUser["chat_id"], $command[2]);

                $templateUser = new Template("daoss_magick/order_payment_success");
                $templateUser = $templateUser->Load();

                $this->sendMessage($daossmagickUser["chat_id"], $templateUser->text);

                //Создать файл с номерам заказа
                file_put_contents("modules/templates/admin/cur_order.txt", "daoss $orderId");

                $templateAdmin = new Template("admin/daoss_magick/process_purchase_success", [
                    new TemplateData(":daossMagickId", $daossmagick["id"]),
                    new TemplateData(":username", $daossmagickUser["username"]),
                    //new TemplateData(":username", $username)

                ]);
                $templateAdmin = $templateAdmin->Load();
                $this->sendPhoto(ADMIN_CHAT_ID,"https://katyasatorinebot.online/bot/{$daossmagick["check_photo"]}", $templateAdmin->text);
                //$response = $this->sendMessage(ADMIN_CHAT_ID,$templateAdmin->text);
            }

            return;
        case "/daoss_magick_process_purchase_deny":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $orderId = (int)$command[1];
            //$username = $command[3];

            $daossmagick = R::findOne("daossmagick", "id = $orderId");
            if ($daossmagick) {
                $daossmagick["status"] = 2;

                R::store($daossmagick);

                $daossmagickUser = R::findOne("users", "id = {$daossmagick["user_id"]}");

                $templateUser = new Template("order_payment_deny_daoss");
                $templateUser = $templateUser->Load();

                //$this->DelMessageText($daossmagickUser["chat_id"], $command[2]);

                $this->sendMessage($daossmagickUser["chat_id"], $templateUser->text);

                $templateAdmin = new Template("admin/daoss_magick/process_purchase_deny", [
                    new TemplateData(":daossMagickId", $daossmagick["id"]),
                    new TemplateData(":username", $daossmagickUser["username"]),
                    //new TemplateData(":username", $username)
                ]);
                $templateAdmin = $templateAdmin->Load();

                $this->sendMessage(ADMIN_CHAT_ID, $templateAdmin->text);
            }

            return;
        case "/process_purchase_success":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $orderId = (int)$command[1];
            $username = $command[2];

            $order = R::findOne("orders", "id = $orderId");
            if ($order) {
                $order["status"] = 2;

                R::store($order);

                //тот, кто оплатил
                $user = R::findOne("users", "id = {$order["user_id"]}");
                $user["action"] = "";
                R::store($user);

                if ($order["marathon_stage"] > 0){
                    switch ($order["marathon_stage"]) {
                    case 1:
                        $templateUser = new Template("order_payment_success", [
                            new TemplateData(":stage", "/message_18 1"),
                        ]);
                        break;
                    case 2:
                        $templateUser = new Template("order_payment_success", [
                            new TemplateData(":stage", "/message_19 1"),
                        ]);
                        break;
                    case 3:
                        $templateUser = new Template("order_payment_success", [
                            new TemplateData(":stage", "/message_20 1"),
                        ]);
                        break;
                    }
                    
                    $templateUser = $templateUser->Load();
                    $templateUser->LoadButtons();
                    $this->sendMessage($user["chat_id"], $templateUser->text, $templateUser->buttons);
                }


                //Создать файл с номерам заказа
                file_put_contents("modules/templates/admin/cur_order.txt", "order $orderId");

                $templateAdmin = new Template("admin/process_purchase_success", [
                    new TemplateData(":orderId", $order["id"]),
                    new TemplateData(":username", $username)
                ]);

                $templateAdmin = $templateAdmin->Load();
                $this->sendPhoto(ADMIN_CHAT_ID, "https://katyasatorinebot.online/bot/{$order["check_photo"]}", $templateAdmin->text);
                //$response = $this->sendMessage(ADMIN_CHAT_ID, $templateAdmin->text);

            }

            return;
        case "/process_purchase_deny":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);

            $orderId = (int)$command[1];
            $username = $command[2];

            $order = R::findOne("orders", "id = $orderId");
            if ($order) {
                $order["status"] = 2;

                R::store($order);

                $user = R::findOne("users", "id = {$order["user_id"]}");

                $templateUser = new Template("order_payment_deny_extaz");
                $templateUser = $templateUser->Load();

                $this->sendMessage($user["chat_id"], $templateUser->text);

                $templateAdmin = new Template("admin/process_purchase_deny", [
                    new TemplateData(":orderId", $order["id"]),
                    new TemplateData(":username", $username)
                ]);
                $templateAdmin = $templateAdmin->Load();

                $this->sendMessage(ADMIN_CHAT_ID, $templateAdmin->text);
            }

            return;
        case "/send_one":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);
            $response = $this->sendMessage(ADMIN_CHAT_ID, "Введите текст для отправки пользователю");
            $send_id = $command[1];
            file_put_contents("modules/templates/admin/sendMsg.txt", "send_one {$send_id} {$response["result"]["message_id"]}");
            return;
        case "/send_all":
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);
            $response = $this->sendMessage(ADMIN_CHAT_ID, "Введите текст для рассылки всем пользователям");
            file_put_contents("modules/templates/admin/sendMsg.txt", "send_all {$response["result"]["message_id"]}");
            return;
        case ((bool)preg_match("~^[0-9]+$~", $command[0])):
            $this->DelMessageText(ADMIN_CHAT_ID, $message_id);
            $price = $command[0];

            $fileOrder = file_get_contents("modules/templates/admin/cur_order.txt");

            $orderParams = explode(" ", $fileOrder);

            //$orderId = file_get_contents("modules/templates/admin/cur_order.txt");
            //$order = R::findOne("orders", "id = $orderId");

            $order = "";

            switch ($orderParams[0]){
                case "aphr":
                    $order = R::findOne("aphroditemorning", "id = $orderParams[1]");
                    break;
                case "order":
                    $order = R::findOne("orders", "id = $orderParams[1]");
                    break;
                case "daoss":
                    $order = R::findOne("daossmagick", "id = $orderParams[1]");
                    break;
            }

            $user = R::findOne("users", "id = {$order["user_id"]}");
привет, мне нужно сделать так, чтобы админу отображался юзер, оплативший заказ (айди и ник, если имеется). Это телеграм-бот на пхп