Here is the code in my control app
If I start with this control app, it works, but trying to include it does not.
// Check for record
echo" [gvlogin]";
echo" [gvapp]";
// sc_exit();
$check_sql = “SELECT sec_login,sec_access FROM sec_table WHERE sec_login = [gvlogin]”
. " and sec_app_name = [gvapp]";
sc_select(rs, $check_sql);
if (false == {rs})
{
// Error while accessing database
echo" Not Authorized for this App 11";
sc_redir(GTEKmenu);
}
elseif ({rs}->EOF)
{
// No record found
echo" Not Authorized for this App 22";
sc_redir(GTEKmenu);
}
else
{
// Record found
echo" here";
{clientName} = $rs->fields[“sec_login”];
{clientacc} = $rs->fields[“sec_access”];
echo" {clienName}";
echo" {clientacc}";
exit();
if ({clientacc} == ‘Y’)
{
sc_redir([gvapp]);
}
else
{
echo" Not Authorized for this App";
sc_redir(GTEKmenu);
}
}