NetTalk Central

Author Topic: p_web._SendFile Question  (Read 4013 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
p_web._SendFile Question
« on: April 01, 2016, 06:46:30 AM »
trying to redirect in login according user role with p web.SendFile example:

CASE p_web.GetSessionLevel()
OF  1
    p_web._SendFile('IndexPage',0)
OF  2
    p_web._SendFile('PageForActiveTransactions',0)       
OF  3
     p_web._SendFile('PageForSalesCustomer',0)
ELSE
    p_web._SendFile('IndexPage',0)
END

but NET:SendHeader in webhandler is always (1) value and can't change with  p_web._SendFile('IndexPage',0)


MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: p_web._SendFile Question
« Reply #1 on: April 03, 2016, 09:22:26 PM »
Try this

Case
 of 1;  p_web.Script( p_web.WindowOpen( 'IndexPage' ))
 of 2;  p_web.Script( p_web.WindowOpen( 'CustomerPage' ))


and if you want to change the theme for different users

  of 3
      p_web.ChangeTheme( 'Shoestrap' )
      p_web.Script( p_web.WindowOpen( 'NiceUserPage' ))     

Ubaidullah

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Re: p_web._SendFile Question
« Reply #2 on: October 27, 2020, 07:12:46 AM »
Thanks for this. This was helpful for me today.
I used it and it worked nicely.

For anyone wondering where this code goes, it goes in LoginForm after the call to p_web.ValidateLogin and the code that sets the cookies.

Regards,
Ubaidullah Nubar.