Korinisni kojima u narednih 7 dana </div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="example" width="100%"> <thead> <th>Br.kartice</th> <th>Ime</th> <th>Telefon</th> <th>Do</th> </thead> <tbody> <?php /******************************************************************************/ $all_view_paid_users = ViewPaidUsers::getAll("WHERE user_paid_end BETWEEN user_paid_start and DATE_ADD(curdate(),INTERVAL 7 day)\n and user_paid_status=1 ORDER BY user_paid_id DESC"); foreach ($all_view_paid_users as $user_paid) { echo "<tr class='gradeU'>\n <td>{$user_paid->user_id}</td>\n <td>{$user_paid->user_name} {$user_paid->user_surname}</td>\n <td>{$user_paid->user_phone}</td>"; ?> <td><?php echo $user_paid->user_paid_end[8] . $user_paid->user_paid_end[9] . "." . $user_paid->user_paid_end[5] . $user_paid->user_paid_end[6] . "." . $user_paid->user_paid_end[0] . $user_paid->user_paid_end[1] . $user_paid->user_paid_end[2] . $user_paid->user_paid_end[3]; ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div>
</div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="dataTables-example" width="100%"> <thead> <th>Br.kartice</th> <th>Ime</th> <th>Prezime</th> <th>Telefon</th> <th>Do</th> <th>Istice za</th> </thead> <tbody> <?php /******************************************************************************/ $all_view_paid_users = ViewPaidUsers::getAll("WHERE user_paid_status=1 ORDER BY user_paid_id DESC"); $curdate = new DateTime(date("l")); //current date $curdate = $curdate->format('Y-m-d'); //date format Y-m-d foreach ($all_view_paid_users as $user_paid) { $date_end = $user_paid->user_paid_end[8] . "" . $user_paid->user_paid_end[9]; $current_date = $curdate[8] . "" . $curdate[9]; $days = $date_end - $current_date; if ($date_end - $current_date == 1) { echo "<tr class='gradeU'>\n <td>{$user_paid->user_id}</td>\n <td>{$user_paid->user_name}</td>\n <td>{$user_paid->user_surname}</td>\n <td>{$user_paid->user_phone}</td>\n <td>{$user_paid->user_paid_end}</td>\n <td>{$days} dan </td>\n </tr>"; } } /*****************************************************************************/ ?>