This topic is locked

suppress the search and the advanced search option

9/23/2018 9:27:14 AM
PHPRunner General questions
T
taumic author

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

HJB 9/25/2018

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.

T
taumic author 9/25/2018

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!

HJB 9/25/2018

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=85992&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> Ja, bin überzeugter deutscher Reichsbürger ...
https://xlinesoft.com/phprunner/docs62/choose_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.com/phprunner/docs/choose_fields.htm
... so, 3rd screenshot content refers, enjoy!