Problem with login control integration

I have a small problem to integrate scriptcase with sites that have already been made and its own session and user authentication system.
I have created an application that scriptcase I inserted with iframe on this page:
http://www.goviaggi.com/admin/statistiche_gestionale.php
This page is only accessible to users who are logged in, otherwise they are addressed to:
http://www.goviaggi.com/admin/errore.php

the page:
http://www.goviaggi.com/admin/statistiche_gestionale.php
I created a php code that goes with the IFrame page scriptcase:
http://www.goviaggi.com/admin/grid_stat_prenotazione/index.php?idhotel =
idhotel … and becomes:
http://www.goviaggi.com/admin/grid_stat_prenotazione/index.php?idhotel=6
or idhotel changes depending on the customer login

The help that I ask is the following:
I create a php code that I’m going to put directly into the grid of scriptcase working with my site and go to the page 's idhotel and that checks whether the user is logged in?

Hi, do you resolve this integration? How do you do? Thanks

Please, ask your questionwth i your needs and data, don’t do necroposting.