<?php $this->load->view('header_front');
//code for to get web logo
error_reporting(0);
?>

<form name="blog_order_form" method="request" action="<?php echo base_url(); ?>front_end/blog">
    <div class="vacancies-section">
        <div class="container">
            <div class="section-welcome nav-welcome" style=" margin-bottom: 0px !important;">
                <ol class="breadcrumb">
                    <li><a href="<?php echo base_url(); ?>">Home</a></li>
                    <li><a href="<?php echo base_url(); ?>front_end/Blog">Career Advice</a></li>
                </ol>
                <a class="menubtn" href="#"><i class="fa fa-bars"></i></a></div>
            <div class="row">
                <div class="col-md-3">
                    <div class="vacancies-contan">
                        <ul class="specialisms-section">
                            <h2>Categories</h2>
                            <?php
                            //code to get jobs cateories
                            foreach ($blogscategory as $val_cat) {
                                ?>
                                <li onclick="window.location='<?php echo base_url(); ?>front_end/blog?blogs_cat_id=<?php echo $val_cat->blogs_cat_id; ?>';"
                                    onmouseover="this.style.color='#db0700'" onmouseout="this.style.color='#666666'"
                                    style="cursor:pointer;width:109%"><?php echo $val_cat->blogs_category_title; ?></li>
                            <?php } ?>
				
                        </ul>
						
                    </div></br></br>
					<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=347281462010503";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-page" data-href="https://www.facebook.com/JobNJobUK" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"></div>
                </div>
                <div class="col-md-9">
                    <div class="jobs-vacancies-section">
                        <h3>JNJ Career Advice</h3>
                    </div>
                    <div class="row margin-top-45" style="margin-top: 0px !important;">
                        <div class="col-md-10">
                            <ul class="customer-bg">
                                <?php foreach ($blogs as $val) { ?>
                                    <li style="padding: 0 0 15px !important; margin-top: 15px;">
                                        <div class="col-md-3 adds-bd"><img style="cursor:pointer;"
                                                                           onclick="window.location='<?php echo base_url(); ?>front_end/blog_post?blog_id=<?php echo $val->blog_id ?>'"
                                                                           src="<?php echo base_url(); ?>assets/upload/<?= $val->blog_image; ?>"
                                                                           class="img-responsive"></div>
                                        <div class="col-md-9">
                                            <div class="customer-service-section">
                                                <h4>
                                                    <a href="<?php echo base_url(); ?>front_end/blog_post?blog_id=<?php echo $val->blog_id ?>"><?php echo $val->blog_title; ?></a>
                                                </h4>
                    <span style="color: #797979 !important; font-size: 11px;">
                    <?php
                    $cat_id = $val->blog_category_id;
                    $sel_category = mysql_query("SELECT `blogs_category_title` FROM `blogs_category` WHERE `blogs_cat_id` ='" . $cat_id . "'");
                    $white_space = '&nbsp' . '&nbsp' . '&nbsp' . '&nbsp' . '&nbsp' . '&nbsp' . '&nbsp' . '&nbsp';
                    while ($data = mysql_fetch_array($sel_category)) {
                        $title[] = $data['blogs_category_title'];

                        ?>
                        <i class="fa fa-tags" aria-hidden="true"></i> <?php echo $title[0] . $white_space;
                        $title = array();
                    } ?> <i class="fa fa-calendar" aria-hidden="true">&nbsp;</i><?php echo $val->post_date; ?> </span> <?php echo substr($val->blog_content, 0, 500) . '...'; ?></br></br>
					<a href="<?php echo $val->link;?>" target="_blank" style="color:#db0700;">View Source</a>
					
                                                <div class="butten-bg margin-top-30 mobile-space"
                                                     style="margin-top: 0px !important;"><a
                                                        style="width: 25%; float: right;"
                                                        href="<?php echo base_url(); ?>front_end/blog_post?blog_id=<?php echo $val->blog_id ?>">Read
                                                        More</a></div>
                                            </div>
                                        </div>
                                    </li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<?php $this->load->view('footer_front'); ?>
