I got this funcion:
function get_all_in_progress_designments($now) {
$this->db->where('active', 1);
$this->db->where('deleted !=', '1');
$this->db->order_by('date_to', 'DESC');
$designments = $this->db->get('designments')->result_array();
foreach ($designments as $key => &$designment_info) {
$designment_info['image'] = self::get_image_for_designment($designment_info['designment_id']);
$designment_info['count_joined'] = self::get_users_count_joined_by_id($designment_info['designment_id']);
$designment_info['count_ideas'] = self::get_users_count_ideas_by_id($designment_info['designment_id']);
$date_to = $designment_info['date_to'];
$diff = $date_to - $now;
$days = round($diff / 86400);
$time_left = $days . ' days';
if($days <= 0){
$days = 0;
$time_left = $days . ' days';
It will return the designments that are in progress with the picture, title, and description and some other information.
To show the difference between the in progress and active designments I want the in progress designments turned grey ish/ transparent. Is there a way to put this in the function? I saw a few things like this if($image && imagefilter($im, IMAGE_FILTER_GRAYSCALE)).
I hope you can help me
Kind regards,
Aucun commentaire:
Enregistrer un commentaire