Hello. My name is Michael. I will be helping you with your question today.
If you could please attach the code that you have so far - either by using the paperclip icon here, or by uploading it to a site to which I can have access, like WikiSend or OneDrive, then provide me a link, that would be helpful so I could take a look at what you already have. Then I can take a look at it and let you know what I think.
It sounds pretty complicated, but I will take a look.
I've looked at it, and it's something I can definitely do if you are able to pay for my time to do it. I will submit an additional services offer for you to approve (optional). If you decide against it, let me know and I will open the question to others. Experts have the ability to make their own offers to you, so if mine doesn't work for you, that's OK... just let me know.