Forums: suppress the search and the advanced search option - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

suppress the search and the advanced search option if no administrator Rate Topic: -----

#1 User is offline   taumic 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 86
  • Joined: 18-November 08

Posted 23 September 2018 - 01:27 PM

PHPRunner 10.31587x64

Hello,

I want to suppress the search and the advanced search option if the user is not an administrator.

So in LISTPAGE-Before display I write

if( $_SESSION["administrator"] <> "J")        // NO Admin
  { echo "<script language=\"Javascript\"> var zeige_suchmaske = 0; </script>"; } 
  else
  { echo "<script language=\"Javascript\"> var zeige_suchmaske = 1; </script>"; }  



and in LISTPAGE-Javascript onload Event:

if ( zeige_suchmaske == 0 )      // NO ADMIN                  
   {
     var srch = pageObj.getSearchController();     
     srch.display("hide");                        
   }


But unfortunately the search options are still displayed and working.
Can someone please help me - I just can't figure out my error.

Best regards

Taumic
0

#2 User is offline   walk2fly 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 403
  • Joined: 09-February 10

Posted 25 September 2018 - 08:30 AM

Greetings to Germany!

From my little understanding, logged in ADMIN can see everything, whether STATIC or DYNAMIC user rights management is ON.
In both user rights management modes, you can off-check SEARCH/ADVANCED feature so that non-ADMINS users can't see same.
Seems to at least me as if you try yto ride the PHPR horse in a strange manner, say, to forget of what is already built-in
and to kill working time and nerves by manual coding ride-outs being not necessary.
0

#3 User is offline   taumic 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 86
  • Joined: 18-November 08

Posted 25 September 2018 - 11:28 AM

Greetings back! (compatriot?)

That would be the easiest of course.
But are you sure that there is this option in the permissions management - I miss the SEARCH/ADVANCED function.
Maybe I have also set something wrong elsewhere....

Anyway, thank you very much for your effort!

Posted Image
0

#4 User is offline   walk2fly 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 403
  • Joined: 09-February 10

Posted 25 September 2018 - 02:13 PM

:rolleyes: Ja, bin überzeugter deutscher Reichsbürger ...

https://xlinesoft.co...oose_fields.htm

... though in regard to elder 6.2 version (could not find
something better due to time is money reasons), view content
of second screenshot ..., pls debit my open account with you by
enjoying some beers on 3rd Oct 2018 in my favor ;-)

P.S. Lucky one, as you are, I found: https://xlinesoft.co...oose_fields.htm

... so, 3rd screenshot content refers, enjoy!
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic