Чего то не идет. В смысле выдача есть но нужно устранить два нюанса.
1. В конце выдает лишнюю строчку со статусом 0 когда оба тоннеля активны.
2. Если можно переставьте пожалуйста статус поближе к идентификатору тоннеля.
Сейчас оно вот так:
[{"acctstarttime":"2018-01-20 00:00:21","account":"ovcher","tunnel":"user880","comment":"my majordomo","vpnki_address":"172.16.х.х","duration":"16:06:45","status":"1"},{"acctstarttime":"2018-01-20 00:00:18","account":"ovcher","tunnel":"user1697","comment":"my blog","vpnki_address":"172.16.х.х","duration":"16:06:48","status":"1"},{"acctstarttime":"","account":"ovcher","tunnel":"user1697","comment":"my blog","vpnki_address":"","duration":"","status":"0"}]
А в идеале оно должно выглядеть вот так:
Тоннели подняты и в работе:
[{"acctstarttime":"2018-01-20 00:00:21","account":"ovcher","tunnel":"user880","status":"1","comment":"my majordomo","vpnki_address":"172.16.х.х,"duration":"16:06:45"},{"acctstarttime":"2018-01-20 00:00:18","account":"ovcher","tunnel":"user1697","status":"1","comment":"my blog","vpnki_address":"172.16.х.х","duration":"16:06:48"}]
Тоннели опущены:
[{"acctstarttime":"2018-01-20 00:00:21","account":"ovcher","tunnel":"user880","status":"0","comment":"my majordomo","vpnki_address":"","duration":""},{"acctstarttime":"","account":"ovcher","tunnel":"user1697","status":"0","comment":"my blog","vpnki_address":"","duration":""}]
Первый тоннель включен, второй выключен:
[{"acctstarttime":"2018-01-20 00:00:21","account":"ovcher","tunnel":"user880","status":"1","comment":"my majordomo","vpnki_address":"172.16.х.х","duration":"16:06:45"},{"acctstarttime":"","account":"ovcher","tunnel":"user1697","status":"0","comment":"my blog","vpnki_address":"","duration":""}]
Сделайте, ПЛЗ... Спасибо огромное, за работу!
Баннеры, понажимаю.