Hi, everybody,
I would like to disable/enable the orderby-function of a column depending on the current date
Any ideas?
Situation: I am working on a tournament registration database for teams. Each team has to submit a "reference time" which must not be displayed until the "deadline" for registration for that tournament has passed.
Solution so far: In the Visual Editor in the "View As" of the "reference time" I have blanked the value for tournaments which have not yet reached their registration deadline with this code:
[codebox]if ($data2["deadline"]>date(now())) $value="";[/codebox]
Problem: some smart Alec found out that you just have to click on the column title to get the list sorted properly (but without showing the actual values). So, if you know your own reference time, you can get your relative position in regards to the other teams. Which should not be possible.
Question 1: is this the right place to change the code:
[codebox]<A class=blackshade href="tournament_list.php?orderby={$order_dir_referencetime}referencetime">referencetime</A>[/codebox]
Question 2: how can I do it?
Any help is being appreciated.
Greetings,
Wilfried