C
|
cgphp 9/26/2011 |
Enter the following code in the javascript Onload event of the list page: var today = new Date(); |
J
|
Jeroef author 9/26/2011 |
Enter the following code in the javascript Onload event of the list page: var today = new Date();
|
C
|
cgphp 9/26/2011 |
You can create a custom view for the signup table. In the custom view disable the "Add page". Then, in the "List page: Before process" event of the signup table check for the target date. If the target date matches the current date do a redirect to the custom view. $target_date = "21-09-2001"; //you can fetch this date from db |
J
|
Jeroef author 9/26/2011 |
You can create a custom view for the signup table. In the custom view disable the "Add page". Then, in the "List page: Before process" event of the signup table check for the target date. If the target date matches the current date do a redirect to the custom view. Sample code: $target_date = "21-09-2001"; //you can fetch this date from db
|
C
|
cgphp 9/26/2011 |
$rs = CustomQuery("SELECT date_field_name FROM main_table"); //change this query according to your needs |
J
|
Jeroef author 9/26/2011 |
$rs = CustomQuery("SELECT date_field_name FROM main_table"); //change this query according to your needs
$rs = CustomQuery("SELECT datum FROM tindex");
|
C
|
cgphp 9/26/2011 |
$rs = CustomQuery("SELECT datum FROM tindex"); |
J
|
Jeroef author 9/26/2011 |
$rs = CustomQuery("SELECT datum FROM tindex");
$rs = CustomQuery("SELECT datum FROM tanmalan");
|
J
|
Jeroef author 9/27/2011 |
No luck yet. I added a new date field in tanmalan and pointed the customquery to that. $rs = CustomQuery("SELECT datum FROM tanmalan");
$rs = CustomQuery("SELECT datum FROM tindex");
|
C
|
cgphp 9/27/2011 |
How many records the query fetches from db ? Be sure that only one record is fetched. |
J
|
Jeroef author 9/27/2011 |
How many records the query fetches from db ? Be sure that only one record is fetched.
|
C
|
cgphp 9/27/2011 |
How many records the query fetches from db ? Be sure that only one record is fetched.
|
C
|
cgphp 9/27/2011 |
Be sure that the fetched record field is a valid date and not an empty or null value. |
J
|
Jeroef author 9/27/2011 |
Did you check what I asked you ?
$rs = CustomQuery("SELECT datum FROM tindex");
|
C
|
cgphp 9/27/2011 |
I can't help you if you can't provide me more info. |
J
|
Jeroef author 9/27/2011 |
I can't help you if you can't provide me more info. How many records in the tindex table ? Do you get some errors ?
|
C
|
cgphp 9/27/2011 |
Try out this code and let me know the result: $rs = CustomQuery("SELECT datum FROM tindex"); |
J
|
Jeroef author 9/27/2011 |
Try out this code and let me know the result: $rs = CustomQuery("SELECT datum FROM tindex");
|
C
|
cgphp 9/27/2011 |
You have solved the issue. The date value in db is prior to today. To check the script functionality, set the db field value to today date. $rs = CustomQuery("SELECT datum FROM tindex"); |
J
|
Jeroef author 9/27/2011 |
You have solved the issue. The date value in db is prior to today. To check the script functionality, set the db field value to today date. If you want to redirect when the target date is expired, chenge the if statement as follows: $rs = CustomQuery("SELECT datum FROM tindex");
|
C
|
cgphp 9/27/2011 |
Now is there a way to be able to handle multible records?
|
J
|
Jeroef author 9/27/2011 |
Please, provide more info.
|
C
|
cgphp 9/28/2011 |
Jeroef, what's the porpuse of this code ? I'm afraid that it may not be the best approach. |
J
|
Jeroef author 9/28/2011 |
Jeroef, what's the porpuse of this code ? I'm afraid that it may not be the best approach.
|
C
|
cgphp 9/29/2011 |
It's not very clear how you hanlde the signup process. The competitors can signup for a competition at time. Right? |
J
|
Jeroef author 9/29/2011 |
It's not very clear how you hanlde the signup process. The competitors can signup for a competition at time. Right?
|
J
|
Jeroef author 9/30/2011 |
The project is a admin program for track and field clubbs. They wanted a form that (instead of the club taking entrys of compeditors by email and manualy enter then into the system) handled the registrations. When the compeditor enter tindex they get info about all the upcomming competitions. If they want to compete they klick on tanmalan (tindex = master , tanmalan = detail) and fills out the form. Yes they sign up for one competition at the time but offcourse there can be alot of diffrent competitions to choose from. When the date is up for a signup the club heads into another list that uses the tanmalan as lookup table, and there fills out all the compeditors that have signed up. This is why i need to hide the Add New button on tanmalan after a choosen date has expired,
|
C
|
cgphp 9/30/2011 |
tanmalan2_list.php?mastertable=your_master_table_name&masterkey1=your_details_key_field_value |
J
|
Jeroef author 9/30/2011 |
tanmalan2_list.php?mastertable=your_master_table_name&masterkey1=your_details_key_field_value
|
J
|
Jeroef author 9/30/2011 |
[quote name='Jeroef' date='27 September 2011 - 09:05 PM' timestamp='1317153905' post='61086'] $rs = CustomQuery("SELECT datum FROM tindex");
|
J
|
Jeroef author 10/1/2011 |
[quote name='Jeroef' date='30 September 2011 - 11:25 AM' timestamp='1317378353' post='61142'] |