<?php
$person_id = $this->session->userdata('person_id');
if ($all_notification) {
    foreach ($all_notification as $notification_value) {
        ?>
        <div class="media col-sm-10 col-sm-offset-1 <?php echo ($notification_seen_info[$notification_value->notification_id] == 2) ? 'deep_green' : '' ?>" id="viewSinglednotification<?php echo $notification_value->notification_id ?>" style="cursor: pointer;">
            <div class="media-left">
                <?php
                if (in_array($notify_by_info[$notification_value->notification_id]->person_role, Array(1, 2, 6, 8, 9))) {
                    ?>
                    <img class="media-object " src="<?php echo base_url() ?>images/logo-50.png" alt="logo">
                    <?php
                } else {
                    if ($notify_by_info[$notification_value->notification_id]->person_image) {
                        ?>
                        <img class="media-object " height="45" width="45"
                             src="<?php echo base_url() . 'content-library/' . $notify_by_info[$notification_value->notification_id]->url . '/' . $notify_by_info[$notification_value->notification_id]->person_image ?>" alt="logo">
                             <?php
                         } else {
                             ?>
                        <img class="media-object " src="<?php echo base_url() ?>images/logo-50.png" alt="logo">
                        <?php
                    }
                }
                ?>
            </div>
            <div class="media-body" style="padding-left: 20px !important; text-align: left !important">
                <span class="text-justify" style="">
                    <?php
                    if (in_array($notify_by_info[$notification_value->notification_id]->person_role, Array(1, 2, 6, 8, 9))) {
                        ?>
                        <span style="color: #4d4d4d !important; font-weight: bold !important;">
                            Talha Training
                        </span> 
                        <?php
                    } else {
                        ?>
                        <span style="color: #4d4d4d !important; font-weight: bold !important;">
                            <?php
                            if ($notification_value->notify_by == $person_id) {
                                echo 'You';
                            } else {
                                echo $notify_by_info[$notification_value->notification_id]->person_first_name . ' ' . $notify_by_info[$notification_value->notification_id]->person_last_name;
                            }
                            ?>
                        </span> 
                        <?php
                    }
                    echo $notification_message[$notification_value->notification_id] . '.';
                    ?>
                </span>
                <div class="media-bottom">
                    <p style="color: #999999">
                        <?php echo $notification_date_time[$notification_value->notification_id] ?>
                    </p>
                </div>
            </div>
        </div>
        <?php
    }
} 