data = array(); // comptage des abonnements à renouveler $query = "SELECT count(*) as total FROM abts_abts WHERE date_fin BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 30 DAY)"; if($deflt_bulletinage_location) { $query .= " AND location_id='".$deflt_bulletinage_location."'"; } if ($this->is_count_from_query($query)) { $this->add_data('serials', 'abonnements_to_renew', 'pointage'); } // comptage des abonnements dépassés $query = "SELECT count(*) as total FROM abts_abts WHERE date_fin < CURDATE()"; if($deflt_bulletinage_location) { $query .= " AND location_id='".$deflt_bulletinage_location."'"; } if ($this->is_count_from_query($query)) { $this->add_data('serials', 'abonnements_outdated', 'pointage'); } } }