@@ -358,21 +358,22 @@ function(data){
358
358
359
359
360
360
<?php
361
- $ sql = "SELECT * FROM members WHERE email_renewal='1' ORDER BY renewal ASC; " ;
361
+ $ sql = "SELECT * FROM members WHERE renewal > DATE_SUB(NOW(), INTERVAL 1 WEEK) AND renewal < DATE_SUB(NOW(),INTERVAL -3 WEEK) ORDER BY renewal ASC " ;
362
362
$ result = $ link ->query ($ sql );
363
363
?>
364
364
<div class="colgroup leading">
365
365
<div class="width6">
366
- <h4>
367
- Member renewal notice :
366
+ <h4 style="display:inline-block; margin-bottom:0;" >
367
+ Members with next expiration date :
368
368
<a href="#"><?php echo $ result ->num_rows ; ?> </a>
369
369
</h4>
370
+ <a style="float:right" href="cron.php" title="Execute cron"><img src="images/cron.png" style="margin-top:10px" alt="cron"></a>
370
371
<hr>
371
372
<?php
372
373
if ($ result ->num_rows >0 ){
373
374
echo '<div id="result_searcher" align="center"> ' ;
374
375
echo '<table class="stylized" width="100%"> ' ;
375
- echo '<tr><th>N</th><th class="name">Name</th><th class="surname">Surname</th><th class="email">E-mail</th><th class="renewal">Renewal</th><th class="option">Options</th></tr> ' ;
376
+ echo '<tr><th>N</th><th class="name">Name</th><th class="surname">Surname</th><th class="email">E-mail</th><th class="renewal">Renewal</th><th class=ta-center">Renewal notice</th><th class= "option">Options</th></tr> ' ;
376
377
$ i = 0 ;
377
378
while ($ row = $ result ->fetch_assoc ()){
378
379
$ i += 1 ;
@@ -386,6 +387,12 @@ function(data){
386
387
echo '<td> ' .htmlspecialchars ($ row ['surname ' ]).'</td> ' ;
387
388
echo '<td> ' .htmlspecialchars ($ row ['email ' ]).'</td> ' ;
388
389
echo '<td class="ta-center"> ' .date ("d/m/Y " ,strtotime ($ row ['renewal ' ])).'</td> ' ;
390
+
391
+ if ($ row ['email_renewal ' ] == '1 ' ){
392
+ echo '<td class="ta-center" style="background:#A5DF00;"><strong>Yes</strong></td> ' ;
393
+ }else {
394
+ echo '<td class="ta-center" style="background:#F5D0A9;"><strong>No</strong></td> ' ;
395
+ }
389
396
echo '<td id="member ' .$ row ['cod ' ].'" class="options-width"> ' ;
390
397
echo '<a href="renovar-user.php?cod= ' .$ row ['cod ' ].'" title="Renewal" class="renovar"><img src="images/update.png" /></a> ' ;
391
398
echo '<a href="edit-user.php?cod= ' .$ row ['cod ' ].'" title="Edit ' .$ row ['usuario ' ].'" class="icon-1 info-tooltip"><img src="images/note_edit.png" /></a> ' ;
0 commit comments