This topic is locked

Conditional Statement work After Date of every month

12/8/2011 8:44:07 AM
PHPRunner General questions
A
angelcause author

Is there any way in which we use conditional statement and if a user enters a record after the 25th of every month the cell or row should be highlighted in any color like red.
Table is like this :
ID

Activity

Target

Achieved

Variance

record_added


The Record_Added field is in the back-end logging the date of the record entered.

A
angelcause author 12/8/2011

thanks for the help, but the link you are reffering me to is a simple conditional formatting script, I want to apply the script and it should check if the date is passed 25th only then the cell should change color.
for example a user enters a record before 25th it should look normal but when he enters the record on 26th till 31st of every month only then the cell should change the color.

C
cgphp 12/8/2011

In the "List page: After record processed" event, enter this code:

if (date('d',strtotime($data['record_added'])) > 25)

$row["rowstyle"]='style="background:yellow"';