<repo_name>Noushid/nice-web<file_sep>/application/views/templates/footer.php
		<!--footer 1 start -->
        <footer class="footer footer-one">
            <div class="primary-footer brand-bg">
                <div class="container">
                    <a href="#top" class="page-scroll btn-floating btn-large pink back-top waves-effect waves-light tt-animate btt" data-section="#top">
                      <i class="material-icons">&#xE316;</i>
                    </a>

                    <div class="row">
                        <div class="col-md-4 widget clearfix">
                            <h2 class="white-text">About Classic International</h2>
                            <p>Classic International is Leading Typing and Translation Service Provider in India and Kuwait. Also We offer Health Insurances And Educational Insurances, etc..</p>

                            <ul class="social-link tt-animate ltr">
                              <li><a href="https://www.facebook.com/ClassicInternational" target="_blank"><i class="fa fa-facebook"></i></a></li>
                              <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                              <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                            </ul>
                        </div><!-- /.col-md-3 -->

                        <div class="col-md-3 widget" style="padding-left: 80px;">
                            <h2 class="white-text">First Look</h2>

                            <ul class="footer-list">
                                <li><a href="about"><i class="fa fa-chevron-right mr-10"></i>About Us</a></li>
                                <li><a href="home#WhatWeDo"><i class="fa fa-chevron-right mr-10"></i>What We Do</a></li>
                                <li><a href="home#appointment"><i class="fa fa-chevron-right mr-10"></i>Make An Appointment</a></li>
                                <li><a href="contact#getintouch"><i class="fa fa-chevron-right mr-10"></i>Contact Us</a></li>
                            </ul>
                        </div><!-- /.col-md-3 -->

                        <div class="col-md-2 widget">
                            <h2 class="white-text">Quick links</h2>

                            <ul class="footer-list">
                                <li><a href="services"><i class="fa fa-chevron-right mr-10"></i>Our Services</a></li>
                                <li><a href="home#latestnews"><i class="fa fa-chevron-right mr-10"></i>Latest News</a></li>
                                <li><a href="blog"><i class="fa fa-chevron-right mr-10"></i>Our Blogs</a></li>
                                <li><a href="contact#getintouch"><i class="fa fa-chevron-right mr-10"></i>Get In Touch</a></li>
                            </ul>
                        </div><!-- /.col-md-3 -->


                        <div class="col-md-3 widget">
                            <h2 class="white-text">Subscribe Me</h2>

                            <form id="subscribeForm" method="post" action="">
                              <div class="form-group clearfix">
                                <label class="sr-only" for="subscribe">Email address</label>
                                <input type="email" class="form-control" id="mail" name="email" placeholder="Email address">
                                <button type="submit" class="tt-animate ltr" id="subscribe"><i class="fa fa-long-arrow-right"></i></button>
                              </div>
                            </form>
                            <div class="col-md-10 hide" id="sub_msg">
                                <div class="alert alert-success">
                                    Subscribed
                                </div>
                            </div>
                            <div class="col-md-10 hide" id="sub_error">
                                <div class="alert alert-success" id="error_content">
                                    Subscription failed!try again later
                                </div>
                            </div>

                            
                            <div class="widget-tags">
                              <a href="moments">Our Moments</a>
                              <a href="login">Admin Login</a>
                            </div><!-- /.widget-tags -->
                        </div><!-- /.col-md-3 -->
                    </div><!-- /.row -->
                </div><!-- /.container -->
            </div><!-- /.primary-footer -->

            <div class="secondary-footer brand-bg darken-2">
                <div class="container">
                    <span class="copy-text">Copyright &copy; <span id="year"></span> <a href="home">Classic International info</a> &nbsp;  | &nbsp;  All Rights Reserved &nbsp;  | &nbsp;  Designed  By <a href="http://psybotechnologies.com/">Psybo Technologies</a></span>
                </div><!-- /.container -->
            </div><!-- /.secondary-footer -->
        </footer>
        <!--footer 1 end-->


        <!-- Preloader -->
        <div id="preloader">
          <div class="preloader-position"> 
            <img src="<?php echo public_url()?>assets/img/logo-colored.png" alt="logo" >
            <div class="progress">
              <div class="indeterminate"></div>
            </div>
          </div>
        </div>
        <!-- End Preloader -->

        <!-- Applay Modal Dialog Box
        ===================================== -->
        <div id="applayServices" class="modal fade" role="dialog">
            <div class="modal-dialog">

                <!-- Modal content-->
                <div class="modal-content">
                    <div class="modal-header bg-gray">
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                        <h5 class="modal-title text-center"><i class="fa fa-list fa-fw"></i>Get A Quote  Now</h5>
                    </div>
                    <div class="modal-body">                        
                        <form class="form-horizontal" name="quoteForm" id="quoteForm" method="POST" action="request-quote">

                            <div class="">
                              <div class="col-sm-offset-1 col-md-10">
                                <div class="input-field mt-20">
                                  <input type="text" name="name" class="validate" id="name" required="">
                                  <label for="name">Full Name*</label>
                                </div>
                              </div>

                              <div class="col-sm-offset-1 col-md-10">
                                <div class="input-field mt-20">
                                  <input id="email" type="email" name="email" class="validate" required="">
                                  <label for="email" data-error="wrong" data-success="right">Email Address*</label>
                                </div>
                              </div>

                              <div class="col-sm-offset-1 col-md-10">
                                <div class="input-field mt-20">
                                  <input type="text" name="people" class="validate" id="phone">
                                  <label for="people">Contact Number*</label>
                                </div>
                              </div>

                              <div class="col-sm-offset-1 col-md-10">
                                <div class="input-field mt-20">
                                    <select class="text-capitalize selectpicker form-control required selectbox" name="service" data-style="g-select" data-width="100%">
                                        <option value="0" selected="">Select Service</option>
                                        <option value="Typing Services">Typing Services</option>
                                        <option value="Services for Ministry of Health">Services for Ministry of Health</option>
                                        <option value="Services for Higher & Lower Education">Services for Higher & Lower Education</option>
                                        <option value="Medical Fingerprint Assists Services">Medical Fingerprint Assists Services</option>
                                        <option value="Insurance Services">Insurance Services</option>
                                        <option value="Health Insurance Services">Health Insurance Services</option>
                                        <option value="Education Services">Education Services</option>
                                        <option value="Transportation services">Transportation services </option>
                                        <option value="Pan Card Services">Pan Card Services</option>
                                        <option value="Air Tickets and Related Services">Air Tickets and Related Services</option>
                                        <option value="Courier Services">Courier Services</option>
                                        <option value="Miscellaneous Services">Miscellaneous Services</option>
                                    </select>
                                </div>
                              </div>

                              <div class="col-sm-offset-1 col-md-10">
                                <div class="input-field mt-20">
                                  <textarea name="message" id="message" class="materialize-textarea" ></textarea>
                                  <label for="message">Additional note</label>
                                </div>
                              </div>

                            </div><!-- /.row -->

                            <div class="form-group mt40 text-right">
                                <div class="col-sm-10">
                                    <div class="col-sm-8 col-sm-offset-2" id="statusMsg">

                                    </div>
                                    <div class="col-sm-2 pull-right">
                                        <button type="submit" class="waves-effect waves-light btn">Submit</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer bg-gray">
                        <span class="pull-left color-pink"><span><i class="fa fa-phone color-cyan fa-fw ml-10"></i></span>9953 01 77</span>
                        <span class="pull-right color-pink"><span><i class="fa fa-envelope color-cyan fa-fw mr-10"></i></span><EMAIL></span>
                    </div>
                </div>
            </div>
        </div> 



        <!-- jQuery -->
        <script src="<?php echo public_url()?>assets/js/jquery-2.1.3.min.js"></script>
        <script src="<?php echo public_url()?>assets/bootstrap/js/bootstrap.min.js"></script>
        <script src="<?php echo public_url()?>assets/materialize/js/materialize.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/jquery.easing.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/jquery.sticky.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/smoothscroll.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/imagesloaded.js"></script>
        <script src="<?php echo public_url()?>assets/js/jquery.stellar.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/jquery.inview.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/jquery.shuffle.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/menuzord.js"></script>
        <script src="<?php echo public_url()?>assets/js/bootstrap-tabcollapse.min.js"></script>
        <script src="<?php echo public_url()?>assets/owl.carousel/owl.carousel.js"></script>
        <script src="<?php echo public_url()?>assets/flexSlider/jquery.flexslider-min.js"></script>
        <script src="<?php echo public_url()?>assets/magnific-popup/jquery.magnific-popup.min.js"></script>
        <script src="<?php echo public_url()?>assets/js/scripts.js"></script>
        <script src="<?php echo public_url()?>assets/js/masonry.pkgd.min.js"></script>
        <script src="https://maps.googleapis.com/maps/api/js"></script>

        <!-- RS5.0 Core JS Files -->
        <script src="<?php echo public_url()?>assets/revolution/js/jquery.themepunch.tools.min.js"></script>
        <script src="<?php echo public_url()?>assets/revolution/js/jquery.themepunch.revolution.min.js"></script>

        <!-- RS5.0 Init  -->
        <script type="text/javascript">
            jQuery(document).ready(function () {
                jQuery(".materialize-slider").revolution({
                    sliderType: "standard",
                    sliderLayout: "fullscreen",
                    delay: 9000,
                    navigation: {
                        keyboardNavigation: "on",
                        keyboard_direction: "horizontal",
                        mouseScrollNavigation: "off",
                        onHoverStop: "off",
                        touch: {
                            touchenabled: "on",
                            swipe_threshold: 75,
                            swipe_min_touches: 1,
                            swipe_direction: "horizontal",
                            drag_block_vertical: false
                        },
                        arrows: {
                            style: "gyges",
                            enable: true,
                            hide_onmobile: false,
                            hide_onleave: true,
                            tmp: '',
                            left: {
                                h_align: "left",
                                v_align: "center",
                                h_offset: 10,
                                v_offset: 0
                            },
                            right: {
                                h_align: "right",
                                v_align: "center",
                                h_offset: 10,
                                v_offset: 0
                            }
                        }
                    },
                    responsiveLevels: [1240, 1024, 778, 480],
                    gridwidth: [1240, 1024, 778, 480],
                    gridheight: [700, 600, 500, 500],
                    disableProgressBar: "on",
                    parallax: {
                        type: "mouse",
                        origo: "slidercenter",
                        speed: 2000,
                        levels: [2, 3, 4, 5, 6, 7, 12, 16, 10, 50]
                    }
                });
            });
        </script>


        <!-- SLIDER REVOLUTION 5.0 EXTENSIONS  (Load Extensions only on Local File Systems! The following part can be removed on Server for On Demand Loading) -->
         
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.video.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.slideanims.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.actions.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.layeranimation.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.kenburn.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.navigation.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.migration.min.js"></script>
        <script type="text/javascript" src="<?php echo public_url()?>assets/revolution/js/extensions/revolution.extension.parallax.min.js"></script>

        <!-- year scrpt -->
        <script type="text/javascript">
            n =  new Date();
            y = n.getFullYear();
            document.getElementById("year").innerHTML = y;
        </script>

         <!-- Google Map Customization  -->
        <script type="text/javascript">
            jQuery(document).ready(function() {

                //set your google maps parameters
                var $latitude = 29.26708, //Visit http://www.latlong.net/convert-address-to-lat-long.html for generate your Lat. Long.
                    $longitude = 47.941092,
                    $map_zoom = 14 /* ZOOM SETTING */

                //google map custom marker icon 
                var $marker_url = 'assets/img/pin.png';

                //we define here the style of the map
                var style = [{
                    styles: [
                      {
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#212121"
                          }
                        ]
                      },
                      {
                        "elementType": "labels.icon",
                        "stylers": [
                          {
                            "visibility": "off"
                          }
                        ]
                      },
                      {
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#757575"
                          }
                        ]
                      },
                      {
                        "elementType": "labels.text.stroke",
                        "stylers": [
                          {
                            "color": "#212121"
                          }
                        ]
                      },
                      {
                        "featureType": "administrative",
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#757575"
                          }
                        ]
                      },
                      {
                        "featureType": "administrative.country",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#9e9e9e"
                          }
                        ]
                      },
                      {
                        "featureType": "administrative.land_parcel",
                        "stylers": [
                          {
                            "visibility": "off"
                          }
                        ]
                      },
                      {
                        "featureType": "administrative.locality",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#bdbdbd"
                          }
                        ]
                      },
                      {
                        "featureType": "poi",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#757575"
                          }
                        ]
                      },
                      {
                        "featureType": "poi.park",
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#181818"
                          }
                        ]
                      },
                      {
                        "featureType": "poi.park",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#616161"
                          }
                        ]
                      },
                      {
                        "featureType": "poi.park",
                        "elementType": "labels.text.stroke",
                        "stylers": [
                          {
                            "color": "#1b1b1b"
                          }
                        ]
                      },
                      {
                        "featureType": "road",
                        "elementType": "geometry.fill",
                        "stylers": [
                          {
                            "color": "#2c2c2c"
                          }
                        ]
                      },
                      {
                        "featureType": "road",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#8a8a8a"
                          }
                        ]
                      },
                      {
                        "featureType": "road.arterial",
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#373737"
                          }
                        ]
                      },
                      {
                        "featureType": "road.highway",
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#3c3c3c"
                          }
                        ]
                      },
                      {
                        "featureType": "road.highway.controlled_access",
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#4e4e4e"
                          }
                        ]
                      },
                      {
                        "featureType": "road.local",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#616161"
                          }
                        ]
                      },
                      {
                        "featureType": "transit",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#757575"
                          }
                        ]
                      },
                      {
                        "featureType": "water",
                        "elementType": "geometry",
                        "stylers": [
                          {
                            "color": "#000000"
                          }
                        ]
                      },
                      {
                        "featureType": "water",
                        "elementType": "labels.text.fill",
                        "stylers": [
                          {
                            "color": "#3d3d3d"
                          }
                        ]
                      }
                    ]
                }];

                //set google map options
                var map_options = {
                    center: new google.maps.LatLng($latitude, $longitude),
                    zoom: $map_zoom,
                    panControl: true,
                    zoomControl: true,
                    mapTypeControl: true,
                    streetViewControl: true,
                    mapTypeId: google.maps.MapTypeId.ROADMAP,
                    scrollwheel: false,
                    styles: style
                }
                //inizialize the map
                var map = new google.maps.Map(document.getElementById('myMap'), map_options);
                //add a custom marker to the map                
                var marker = new google.maps.Marker({
                    position: new google.maps.LatLng($latitude, $longitude),
                    map: map,
                    visible: true,
                    icon: $marker_url
                });

                var contentString = '<div id="mapcontent">' + '<p><strong>Classic Typing Centre</strong> <br> Jleeb Al shuyoukh, Abbassiya, Kuwait <br> Mob: 99 530 177</p></div>';
                var infowindow = new google.maps.InfoWindow({
                    maxWidth: 320,
                    content: contentString
                });

                google.maps.event.addListener(marker, 'click', function() {
                    infowindow.open(map, marker);
                });
            });
        </script>
        <!--Subscribe-->

        
    </body>
  
</html><file_sep>/application/views/errors/html/error_404.php

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="materialize is a material design based mutipurpose responsive template">
        <meta name="keywords" content="material design, card style, material template, portfolio, corporate, business, creative, agency">
        <meta name="author" content="trendytheme.net">

        <title>404</title>

        <!--  favicon -->
        <link rel="shortcut icon" href="assets/img/ico/favicon.png">
        <!--  apple-touch-icon -->
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/img/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/img/ico/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/img/ico/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="assets/img/ico/apple-touch-icon-57-precomposed.png">

        <link href='https://fonts.googleapis.com/css?family=Raleway:400,300,500,700,900' rel='stylesheet' type='text/css'>
        <!-- FontAwesome CSS -->
        <link href="assets/fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <!-- materialize -->
        <link href="assets/materialize/css/materialize.min.css" rel="stylesheet">
        <!-- Bootstrap -->
        <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <!-- shortcodes -->
        <link href="assets/css/shortcodes/shortcodes.css" rel="stylesheet">
        <!-- Style CSS -->
        <link href="assets/css/style.css" rel="stylesheet">


        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>

    <body>
        
        <section class="fullscreen-banner valign-wrapper error-wrapper-alt">
            <div class="valign-cell">
              <div class="container">
                <div class="text-center">
                    <h1 class="mb-30">404</h1>
                    <span class="error-sub">OOPS! <?php echo $heading; ?></span>

                    <p>Sorry, <?php echo $message; ?></p>
                    
                    <a class="btn btn-lg waves-effect waves-light" href="home">Take Me Home</a>
                </div>
              </div><!-- /.container -->
            </div><!-- /.valign-cell -->
        </section>


        <!-- Preloader -->
        <div id="preloader">
          <div class="preloader-position"> 
            <img src="assets/img/logo-colored.png" alt="logo" >
            <div class="progress">
              <div class="indeterminate"></div>
            </div>
          </div>
        </div>
        <!-- End Preloader -->


        <!-- jQuery -->
        <script src="assets/js/jquery-2.1.3.min.js"></script>
        <script src="assets/bootstrap/js/bootstrap.min.js"></script>
        <script src="assets/materialize/js/materialize.min.js"></script>
        <script src="assets/js/menuzord.js"></script>
        <script src="assets/js/jquery.easing.min.js"></script>
        <script src="assets/js/smoothscroll.min.js"></script>
        <script src="assets/js/twitterFetcher.min.js"></script>
        <script src="assets/js/scripts.js"></script>
    </body>
  
</html><file_sep>/application/views/admin/brochure.php
<div class="col-md-12">
    <div class="row">
        <div class="box" style="margin-left: 14px;">
            <button class="btn btn-primary" ng-click="newBrochure()"><i class="fa fa-plus"></i> Add</button>
            <form class="form-horizontal" method="POST" ng-show="showform" ng-submit="addBrochure()">
                <h3>New Brochure</h3>
                <div class="form-group">
                    <label for="" class="control-label col-md-1">Name</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" name="name" ng-model="newbrochure.name" required=""/>
                    </div>
                    <label for="" class="control-label col-md-1">subject</label>
                    <div class="col-md-4">
                        <input class="form-control" type="text" ng-model="newbrochure.subject" name="subject"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-md-1" for="date">Date</label>
                    <div class="col-md-4">
                        <p class="input-group">
                            <input type="text" class="form-control" name="date" uib-datepicker-popup="dd-MMMM-yyyy" ng-model="date" is-open="popup2.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" readonly show-button-bar="false"/>
                          <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="open2()"><i class="glyphicon glyphicon-calendar"></i></button>
                          </span>
                        </p>
                    </div>
                </div>

                <div class="form-group">
                    <label for="" class="control-label col-md-1">brochure</label>
                    <div class="col-md-4">
                            <button ngf-select="uploadFiles($files, $invalidFiles)"
                                    accept="application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,text/plain,application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint,application/vnd.oasis.opendocument.text"
                                    ngf-max-height="1000" ngf-max-size="10MB">
                                Select Files
                            </button>
                        <span class="alert alert-danger"ng-show="fileValidation.status == true">{{fileValidation.msg}}</span>
                    </div>
                    <div class="col-md-12">
                        <div class="row">
                            <ul class="list-group">
                                <li ng-repeat="f in files" style="font:smaller" class="list-group-item">
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <div class="col-sm-2">
                                                <img ngf-src="f.$ngfBlobUrl" class="thumbnail" width="100px" ngf-no-object-url="true" >
                                                <span>{{f.name}} {{f.$errorParam}}</span>
                                            </div>
                                            <div class="col-sm-6">
                                                <div class="row">
                                                    <div class="col-sm-8">
                                                        <div class="progress" ng-show="f.progress >= 0" ng-class="{cancel: uploadstatus == 1}">
                                                            <div ng-show="uploadstatus == 1">{{f.progressmsg}}</div>
                                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
                                                                 aria-valuemin="0" aria-valuemax="100" style="width:{{f.progress}}%" ng-show="uploadstatus != 1">
                                                                {{f.progress}}% Complete
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-4">
                                                        <button class="btn btn-danger" type="button" ng-click="abort()">cancel</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li ng-repeat="f in errFiles" style="font:smaller" class="list-group-item">
                                    {{f.name}} {{f.$error}} {{f.$errorParam}}
                                </li>
                            </ul>
                        </div>
                    </div>
                        {{errorMsg}}
                    <!----- ***for existing Brochure **---->
                    <div class="clearfix"></div>
                    <div class="row" ng-show="newbrochure.file_name">
                        <a href="{{newbrochure.fileUrl}}">{{newbrochure.file_name}}</a>
                    </div>
                </div>
                <div class="form-group text-center">
                    <button class="btn btn-primary" type="submit">Save</button>
                    <button class="btn btn-danger" type="button" ng-click="hideForm()">Cancel</button>
                </div>
            </form>
            <div class="row">
                <form class="form-inline" ng-show="showtable">
                    <div class="form-group">
                        <label for="" class="control-label col-md-2">Show</label>
                        <div class="col-md-3">
                            <select name="numPerPage" ng-model="numPerPage" class="form-control"
                                    ng-options="num for num in paginations">{{num}}
                            </select>
                        </div>

                        <label class="control-label col-md-2">Search</label>
                        <div class="col-md-3">
                            <input type="text" ng-model="search" class="form-control" placeholder="Search">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="help-block" ng-show="!showtable">{{message}}</div>
    <table class="table table-bordered" ng-show="showtable">
        <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Subject</th>
            <th>Date</th>
            <th>File</th>
            <th>action</th>
        </tr>
        </thead>
        <tbody>
        <tr dir-paginate="brochure in brochures | filter:search | limitTo:pageSize | itemsPerPage:numPerPage">
            <td>{{$index+1}}</td>
            <td>{{brochure.name}}</td>
            <td>{{brochure.subject}}</td>
            <td>{{brochure.date | date:'dd-MMM-yyyy'}}</td>
            <td>{{brochure.file_name}}</td>
            <td>
                <div  class="btn-group btn-group-xs" role="group">
                    <button type="button" class="btn btn-info" ng-click="showForm(brochure)">
                        <i class="fa fa-pencil"></i>
                    </button>
                    <button  type="button" class="btn btn-danger" confirmed-click="deleteBrochure(brochure)" ng-confirm-click="Would you like to delete this item?!">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
    <dir-pagination-controls
        max-size="10"
        direction-links="true"
        boundary-links="true" >
    </dir-pagination-controls>
</div>

<div id="loading" ng-show="loading">
    <div id="loading-image">
        <img src="<?php echo public_url() . 'assets/admin/img/loading.gif' ?>" alt=""/>
        <h4>Please wait...</h4>
    </div>
</div><file_sep>/application/views/index.php
        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
<!--                            <li class="active"><a href="index.html">Home</a></li>-->
<!--                            <li><a href="about">About Us</a>-->
<!--                                <ul class="dropdown">-->
<!--                                    <li><a href="about#aboutus">About Company</a></li>-->
<!--                                    <li><a href="team">Our Teams</a></li>-->
<!--                                </ul>-->
<!--                            </li>-->
<!--                            <li><a href="services">Our Services</a>-->
<!--                                <ul class="dropdown">-->
<!--                                    <li><a href="services#services1">Typing Services</a></li>-->
<!--                                    <li><a href="services#services2">Services for Ministry of Health</a></li>-->
<!--                                    <li><a href="services#services3">Services for Higher & Lower Education</a></li>-->
<!--                                    <li><a href="services#services4">Medical Fingerprint Assists Services</a></li>-->
<!--                                    <li><a href="services#services5">Insurance Services</a></li>-->
<!--                                    <li><a href="services#services6">Health Insurance Services</a></li>-->
<!--                                    <li><a href="services#services7">Education Services</a></li>-->
<!--                                    <li><a href="services#services8">Transportation services </a></li>-->
<!--                                    <li><a href="services#services9">Pan Card Services</a></li>-->
<!--                                    <li><a href="services#services10">Air Tickets and Related Services</a></li>-->
<!--                                    <li><a href="services#services11">Courier Services</a></li>-->
<!--                                    <li><a href="services#services12">Miscellaneous Services</a></li>-->
<!--                                </ul>-->
<!--                            </li>-->
<!--                            <li><a href="gallery">Moments</a></li>-->
<!--                            <li><a href="blog">Blog</a></li>-->
<!--                            <li><a href="contact">Contact Us</a>-->
<!--                            </li>-->
                             <?php echo menu('Home') ?>
                            
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->


        <!-- start revolution slider 5.0 -->
        <section class="rev_slider_wrapper">
         <div class="rev_slider materialize-slider">
          <ul>

            <!-- slide 1 start --> 
            <li data-transition="fade" data-slotamount="default"  data-easein="Power4.easeInOut" data-easeout="Power4.easeInOut" data-masterspeed="2000"  data-thumb="<?php echo public_url()?>assets/img/banner/1.jpg"  data-rotate="0"  data-fstransition="fade" data-fsmasterspeed="1500" data-fsslotamount="7" data-saveperformance="off"  data-title="materialize Material" data-description="">
            
                <!-- MAIN IMAGE -->
                <img src="<?php echo public_url()?>assets/img/banner/1.jpg"  alt=""  data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" data-bgparallax="10" class="rev-slidebg" data-no-retina>

                <!-- LAYER NR. 1 -->
                <div class="tp-caption rev-heading text-extrabold dark-text tp-resizeme"
                    data-x="right"
                    data-y="center" data-voffset="-50" 
                    data-fontsize="['60','60','60','45']"
                    data-lineheight="['60','60','60','50']"
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="800" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 5; white-space: nowrap;">We Serve Your Needs
                </div>

                <!-- LAYER NR. 3 -->
                <div class="tp-caption tp-resizeme rev-btn"
                    data-x="['right','right','right','right']" data-hoffset="['0','0','0','0']" 
                    data-y="['middle','middle','middle','middle']" data-voffset="['130','130','130','130']" 
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-style_hover="cursor:default;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="1200" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 7; white-space: nowrap;">
                    <a href="contact" class="btn btn-lg  waves-effect waves-light">Contact Now</a>
                </div>

            </li>
            <!-- slide 1 end -->

            <!-- slide 2 start --> 
            <li data-transition="fade" data-slotamount="default"  data-easein="Power4.easeInOut" data-easeout="Power4.easeInOut" data-masterspeed="2000"  data-thumb="<?php echo public_url()?>assets/img/banner/3.jpg"  data-rotate="0"  data-fstransition="fade" data-fsmasterspeed="1500" data-fsslotamount="7" data-saveperformance="off"  data-title="Unique Design" data-description="">
                
                <!-- MAIN IMAGE -->
                <img src="<?php echo public_url()?>assets/img/banner/2.jpg"  alt=""  data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" data-bgparallax="10" class="rev-slidebg" data-no-retina>

                <!-- LAYER NR. 1 -->
                <div class="tp-caption rev-heading text-extrabold dark-text tp-resizeme"
                    data-x="center"
                    data-y="center" data-voffset="-50" 
                    data-fontsize="['60','60','60','45']"
                    data-lineheight="['60','60','60','50']"
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="800" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 5; white-space: nowrap;">We Solve Your Problem Easy
                </div>

                <!-- LAYER NR. 3 -->
                <div class="tp-caption tp-resizeme rev-btn"
                    data-x="['center','center','center','center']" data-hoffset="['0','0','0','0']" 
                    data-y="['middle','middle','middle','middle']" data-voffset="['130','130','130','130']" 
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-style_hover="cursor:default;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="1200" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 7; white-space: nowrap;">
                    <a href="home#appointment" class="btn btn-lg  waves-effect waves-light">Request Quotes now</a>
                </div>

            </li>
            <!-- slide 2 end -->

            <!-- slide 3 start --> 
            <li data-transition="fade" data-slotamount="default"  data-easein="Power4.easeInOut" data-easeout="Power4.easeInOut" data-masterspeed="2000"  data-thumb="<?php echo public_url()?>assets/img/banner/3.jpg"  data-rotate="0"  data-fstransition="fade" data-fsmasterspeed="1500" data-fsslotamount="7" data-saveperformance="off"  data-title="Unique Design" data-description="">
                
                <!-- MAIN IMAGE -->
                <img src="<?php echo public_url()?>assets/img/banner/3.jpg"  alt=""  data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" data-bgparallax="10" class="rev-slidebg" data-no-retina>

                <!-- LAYER NR. 1 -->
                <div class="tp-caption rev-heading text-extrabold dark-text tp-resizeme"
                    data-x="left"
                    data-y="center" data-voffset="-50" 
                    data-fontsize="['60','60','60','45']"
                    data-lineheight="['60','60','60','50']"
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="800" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 5; white-space: nowrap;">Call Now : 99 530 177
                </div>

                <!-- LAYER NR. 3 -->
                <div class="tp-caption tp-resizeme rev-btn"
                    data-x="['left','left','left','left']" data-hoffset="['0','0','0','0']" 
                    data-y="['middle','middle','middle','middle']" data-voffset="['130','130','130','130']" 
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-style_hover="cursor:default;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="1200" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 7; white-space: nowrap;">
                    <a href="contact" class="btn btn-lg  waves-effect waves-light">Connect with us</a>
                </div>

            </li>
            <!-- slide 3 end -->

            <!-- slide 4 start --> 
            <li data-transition="fade" data-slotamount="default"  data-easein="Power4.easeInOut" data-easeout="Power4.easeInOut" data-masterspeed="2000"  data-thumb="<?php echo public_url()?>assets/img/banner/4.jpg"  data-rotate="0"  data-fstransition="fade" data-fsmasterspeed="1500" data-fsslotamount="7" data-saveperformance="off"  data-title="Unique Design" data-description="">
                
                <!-- MAIN IMAGE -->
                <img src="<?php echo public_url()?>assets/img/banner/4.jpg"  alt=""  data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" data-bgparallax="10" class="rev-slidebg" data-no-retina>

                <!-- LAYER NR. 1 -->
                <div class="tp-caption rev-heading text-extrabold dark-text tp-resizeme"
                    data-x="left"
                    data-y="center" data-voffset="-50" 
                    data-fontsize="['60','60','60','45']"
                    data-lineheight="['60','60','60','50']"
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="800" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 5; white-space: nowrap;">Request A Quote Now
                </div>

                <!-- LAYER NR. 3 -->
                <div class="tp-caption tp-resizeme rev-btn"
                    data-x="['left','left','left','left']" data-hoffset="['0','0','0','0']" 
                    data-y="['middle','middle','middle','middle']" data-voffset="['130','130','130','130']" 
                    data-width="none"
                    data-height="none"
                    data-whitespace="nowrap"
                    data-transform_idle="o:1;"
                    data-style_hover="cursor:default;"
                    data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:600;e:Power4.easeInOut;" 
                    data-transform_out="y:[100%];s:1000;e:Power2.easeInOut;s:1000;e:Power2.easeInOut;" 
                    data-mask_in="x:0px;y:[100%];s:inherit;e:inherit;" 
                    data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
                    data-start="1200" 
                    data-splitin="none" 
                    data-splitout="none" 
                    data-responsive_offset="on"
                    style="z-index: 7; white-space: nowrap;">
                    <a href="home#appointment" class="btn btn-lg  waves-effect waves-light">Make A Quote Now</a>
                </div>

            </li>
            <!-- slide 4 end -->
         
          </ul>             
         </div><!-- end revolution slider -->
        </section><!-- end of slider wrapper -->

        <!-- Welcome head start -->
        <section>
            <div class="container">
                <div class="row padding-top-60">
                    <div class="col-md-7 wow fadeInUp">
                        <h2 class="font-30 text-bold mb-30">Welcome to Classic International Info</h2>
                        <p>
                          The reputed leading typing and service center in state of Kuwait, located in Jleeb Al Shuyoukh, Abbassiya- for all your document production requirements, directed by our leadereminent Mr. Musthafa , competent withvast experience in this field thorough the updatedknowledge and changes of legal procedures and formalities in different Ministries.Classic typing Center has grown as an ideal figure in the area of services like typing, proof reading, editing etc.We believe that quality is born by combining experience to knowledge.
                        </p>
                    </div>
                    <div class="col-sm-offset-2 col-md-3">
                        <img src="<?php echo public_url()?>assets/img/bg/Classic.png" class="img-responsive " alt="Image">
                    </div>
                </div>
            </div><!-- /.container -->
        </section>
        <!-- Welcome head End -->

        <section class="full-width promo-box brand-bg ptb-50">
            <div class="container">
                <div class="col-md-12">
                    <div class="promo-info">
                        <span class="white-text text-uppercase">Do you ever feel stuck in your business? </span>
                        <h2 class="white-text text-bold text-uppercase no-margin">Get solution for your all Problems</h2>
                    </div>
                    <?php
                    if (isset($brochure) and $brochure != false) { ?>
                        <div class="promo-btn">
                            <a href="<?php echo (isset($brochure->fileUrl) ? $brochure->fileUrl : '')?>" download class="btn white waves-effect waves-grey">Download Our Brochure</a>
                        </div>
                    <?php }
                    ?>
                </div>
            </div>
        </section>

        <!-- Featured SEO Carousel -->
        <section id="WhatWeDo" class="section-padding">
            <div class="container">

              <div class="text-center mb-80">
                  <h2 class="section-title">What We Do</h2>
                  <p class="section-sub">We aim to later all needs of our beloved clients, assuring the managent system will meet the expectations of our customers in regards with the service undergo in our hands</p>
              </div>

              <div class="seo-featured-carousel brand-dot">
                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/TypingService.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Typing services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/health.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Services for Ministry of health</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/education.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Services for higher & lower education</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/Medical-finger.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Medical finger print assists services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/Hinsurance.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Health insurance services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/education2.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Education services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/Transportation.png" alt="">
                      </div>
                      <div class="desc">
                          <h2>Transportation services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/PAN_card.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Pan card services</h2>
                      </div>
                  </div><!-- /.featured-item -->

                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/air.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Air tickets and related services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/Courier.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Courier services</h2>
                      </div>
                  </div><!-- /.featured-item -->


                  <div class="featured-item seo-service">
                      <div class="icon">
                          <img class="img-responsive" src="<?php echo public_url()?>assets/img/bg/miscellaneous.jpg" alt="">
                      </div>
                      <div class="desc">
                          <h2>Miscellaneous Services</h2>
                      </div>
                  </div><!-- /.featured-item -->

              </div><!-- /.seo-featured -->
            </div><!-- /.container -->
        </section>
        <!-- Featured Carousel End -->

        <section class="section-padding bg-fixed parallax-bg pre-banner-2 overlay dark-5" data-stellar-background-ratio="0.5">
            <div id="appointment"  class="container">

                <div class="text-center">
                    <h2 class="section-title text-capitalize white-text">Make an Appointment</h2>
                </div>

                <div class="row">
                    <div class="col-md-4 contact-info">
                        <address>
                          <i class="material-icons brand-color">&#xE55F;</i>
                          <div class="address">
                            Jleeb Al shuyoukh, Abbassiya, <br>
                            Kuwait

                            <p><br></p>
                          </div>

                          <i class="material-icons brand-color">&#xE61C;</i>
                          <div class="phone">
                            <p>Mob: 995 301 77 , 555 301 77 , <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;979 746 31 , 
                            607 581 13<br>
                            Fax: 24344318 <br>
                            Office:     24 310 783 </p>
                          </div>

                          <i class="material-icons brand-color">&#xE0E1;</i>
                          <div class="mail">
                            <p><a href="mailto:<EMAIL>"><EMAIL></a>
                            <br><a href="mailto:<EMAIL>"><EMAIL></a></p>
                          </div>

                          <i class="material-icons brand-color">&#xE90C;</i>
                          <div class="mail">
                            <p><a href="#">Ministry of Commercial Registration No: 4180/2004</a></p>
                          </div>
                        </address>
                    </div><!-- /.col-md-4 -->

                    <div class="col-md-8">
                        <form class="white-form" name="contact-form" id="appForm" action="appointment-request" method="POST">
                            <div class="row">
                              <div class="col-md-6">
                                <div class="input-field">
                                  <input type="text" name="name" class="validate" id="name" required="">
                                  <label for="name">Full Name*</label>
                                </div>
                              </div><!-- /.col-md-4 -->

                              <div class="col-md-6">
                                <div class="input-field">
                                  <input id="email" type="email" name="email" class="validate" required="">
                                  <label for="email" data-error="wrong" data-success="right">Email Address*</label>
                                </div>
                              </div><!-- /.col-md-4 -->
                            </div><!-- /.row -->

                            <div class="row">
                              <div class="col-md-6">
                                <div class="input-field">
                                  <input type="text" name="phone" class="validate" id="people">
                                  <label for="people">Contact Number*</label>
                                </div>
                              </div><!-- /.col-md-4 -->
                              <div class="col-md-6">
                                <div class="input-field">
                                    <select class="text-capitalize selectpicker form-control required selectbox" name="service" data-style="g-select" data-width="100%" style="background-color: transparent;">
                                        <option value="0" selected="">Select Service</option>
                                        <option value="Typing Services">Typing Services</option>
                                        <option value="Services for Ministry of Health">Services for Ministry of Health</option>
                                        <option value="Services for Higher & Lower Education">Services for Higher & Lower Education</option>
                                        <option value="Medical Fingerprint Assists Services">Medical Fingerprint Assists Services</option>
                                        <option value="Insurance Services">Insurance Services</option>
                                        <option value="Health Insurance Services">Health Insurance Services</option>
                                        <option value="Education Services">Education Services</option>
                                        <option value="Transportation services">Transportation services </option>
                                        <option value="Pan Card Services">Pan Card Services</option>
                                        <option value="Air Tickets and Related Services">Air Tickets and Related Services</option>
                                        <option value="Courier Services">Courier Services</option>
                                        <option value="Miscellaneous Services">Miscellaneous Services</option>
                                    </select>
                                </div>
                              </div><!-- /.col-md-4 -->
                            </div><!-- /.row -->
                            <div class="input-field">
                              <textarea name="message" id="message" class="materialize-textarea" ></textarea>
                              <label for="message">Aditional note</label>
                            </div>
                            <div class="text-center mb-80">
                              <button type="submit" name="submit" class="waves-effect waves-light btn btn-lg text-medium mt-30 text-capitalize">Book Now</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div><!-- /.container -->
        </section>

        <!-- Feature Accordion -->
        <section class="section-padding">
            <div class="container">
                <div class="text-center mb-80">
                    <h2 class="section-title text-uppercase">Our Features</h2>
                    <p class="section-sub">Classic International Info, The reputed leading service centre in state of Kuwait, located in Jleeb Al Shuyoukh, Abbassiya- for all your document production requirements, directed by our leader Mr. Musthafa Who is the eminent, competent with vast experience in this field, Thorough knowledge on updated changes of legal procdures and formalities in different Ministries.</p>
                </div>
              <div class="row">

                <div class="col-md-6">
                  <div class="panel-group feature-accordion brand-accordion icon angle-icon" id="accordion-one">
                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a data-toggle="collapse" data-parent="#accordion-one" href="#collapse-one">
                            We have
                          </a>
                        </h3>
                      </div>
                      <div id="collapse-one" class="panel-collapse collapse">
                        <div class="panel-body">
                          20 years’ of service experience in same field.
                        </div>
                      </div>
                    </div>

                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a class="collapsed" data-toggle="collapse" data-parent="#accordion-one" href="#collapse-two">
                            Our Hard Working Team
                          </a>
                        </h3>
                      </div>
                      <div id="collapse-two" class="panel-collapse collapse">
                        <div class="panel-body">
                          All staffs are well grounded in their areas. Our administrative staffs are working with a customer driven focus.
                        </div>
                      </div>
                    </div>

                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a class="collapsed" data-toggle="collapse" data-parent="#accordion-one" href="#collapse-three">
                            Our Motto
                          </a>
                        </h3>
                      </div>
                      <div id="collapse-three" class="panel-collapse collapse">
                        <div class="panel-body">
                          Trust is our motto.
                        </div>
                      </div>
                    </div>

                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a class="collapsed" data-toggle="collapse" data-parent="#accordion-one" href="#collapse-four">
                            Our Goodwill
                          </a>
                        </h3>
                      </div>
                      <div id="collapse-four" class="panel-collapse collapse">
                        <div class="panel-body">
                          Candidates satisfaction is our goodwill.
                        </div>
                      </div>
                    </div>

                  </div>                  
                </div><!-- /.col-md-6 -->

                <div class="col-md-6">
                  <div class="panel-group feature-accordion brand-accordion icon angle-icon" id="accordion-one">
                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a data-toggle="collapse" data-parent="#accordion-two" href="#1collapse-one">
                            We Made
                          </a>
                        </h3>
                      </div>
                      <div id="1collapse-one" class="panel-collapse collapse">
                        <div class="panel-body">
                          Transportation facilities are arranged from all location in Kuwait.
                        </div>
                      </div>
                    </div>

                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a class="collapsed" data-toggle="collapse" data-parent="#accordion-two" href="#1collapse-two">
                            Creative Assistence
                          </a>
                        </h3>
                      </div>
                      <div id="1collapse-two" class="panel-collapse collapse">
                        <div class="panel-body">
                          Certificate verification from ministry of lower education and higher education for various ministry department.
                        </div>
                      </div>
                    </div>

                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a class="collapsed" data-toggle="collapse" data-parent="#accordion-two" href="#1collapse-three">
                            Awesome Customer Servicers
                          </a>
                        </h3>
                      </div>
                      <div id="1collapse-three" class="panel-collapse collapse">
                        <div class="panel-body">
                          We arrange certificate attestation facility in India(HRD, Ministry of External affairs in Delhi and Kuwait Embassy in Delhi) & good conduct certificate.
                        </div>
                      </div>
                    </div>

                    <div class="panel panel-default">
                      <div class="panel-heading">
                        <h3 class="panel-title">
                          <a class="collapsed" data-toggle="collapse" data-parent="#accordion-two" href="#1collapse-four">
                            Also we are
                          </a>
                        </h3>
                      </div>
                      <div id="1collapse-four" class="panel-collapse collapse">
                        <div class="panel-body">
                          Also we are doing all kind of typing works.
                        </div>
                      </div>
                    </div>
                  </div>                  
                </div><!-- /.col-md-6 -->

              </div><!-- /.row -->
            </div><!-- /.container -->
        </section>


        <section id="latestnews" class="section-padding latest-news-card gray-bg">
            <div class="container">
                <div class="text-center mb-80">
                    <h2 class="section-title text-uppercase">Latest News</h2>
                    <!-- <p class="section-sub">Quisque non erat mi. Etiam congue et augue sed tempus. Aenean sed ipsum luctus, scelerisque ipsum nec, iaculis justo. Sed at vestibulum purus, sit amet viverra diam. Nulla ac nisi rhoncus,</p> -->
                </div>


                <div class="blog-carousel">
                    <?php
                    if (isset($news) and $news != false) {
                        foreach ($news as $value) {
                            ?>
                            <article class="card">
                                <div class="card-image waves-effect waves-block waves-light">
                                    <img class="activator" src="<?php echo(isset($value->thumbImgUrl) ? $value->thumbImgUrl : ''); ?>" alt="image">
                                </div>
                                <div class="card-content">
                                    <h2 class="entry-title activator"><?php echo $value->heading ?></h2>
                                </div>
                                <div class="card-reveal overlay-blue">
                                    <span class="card-title close-button"><i class="fa fa-times"></i></span>

                                    <p><?php echo $value->content ?></p>
                                </div>
                            </article><!-- /.card -->
                        <?php
                        }
                    }
                    ?>
                </div>
            </div><!-- /.container -->
        </section>


<file_sep>/application/views/about.php
        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li class="active"><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('About Us') ?>
                            
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->

        <!--page title start-->
        <section id="aboutus" class="page-title pattern-bg ptb-50">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <h2>Classic International</h2>
                        <span>About Us</span>
                        <ol class="breadcrumb">
                            <li><a href="#">Home</a></li>
                            <li class="active">About Us</li>
                        </ol>
                    </div>
                </div>
            </div>
        </section>
        <!--page title end-->
        

        <section class="section-padding">
            <div class="container">
                <h2 class="font-30 text-medium mb-30">Welcome to Classic International Group</h2>
                <div class="row">
                    <div class="col-md-7">
                        <p>
                            Welcome to <strong>Classic InternationalGroup</strong>, the reputed leading typing and service center in state of Kuwait, located in Jleeb Al Shuyoukh, Abbassiya- for all your document production requirements, directed by our leader eminent <strong>Mr. Musthafa</strong>   , competent with vast experience in this field thorough the updated knowledge and changes of legal procedures and formalities in different Ministries. <strong>Classic typing Center</strong> has grown as an ideal figure in the area of services like typing, proof reading, editing etc. We believe that quality is born by combining experience to knowledge.
                        </p>
                        <p>
                            So we provide the best high quality services that an organization may need. Let us help you achieve your goals through our highly-experienced staff assuring your expenses in limited budget. We offer professional typing services, including proof reading at competitive rates. We have been providing quality based services for more than twenty years. We are thrilled and honored to have the support of our well-respected customer’s group to help us to provide them quality service.
                        </p>
                    </div><!-- /.col-md-7 -->

                    <div class="col-md-5">
                        <div class="gallery-thumb">
                        <ul class="slides">
                            <li data-thumb="<?php echo public_url()?>assets/img/blog/1.jpg">
                                <img src="<?php echo public_url()?>assets/img/blog/1.jpg" alt="image">
                            </li>
                            <li data-thumb="<?php echo public_url()?>assets/img/blog/1.jpg">
                                <img src="<?php echo public_url()?>assets/img/blog/1.jpg" alt="image">
                            </li>
                            <li data-thumb="<?php echo public_url()?>assets/img/blog/1.jpg">
                                <img src="<?php echo public_url()?>assets/img/blog/1.jpg" alt="image">
                            </li>
                            <li data-thumb="<?php echo public_url()?>assets/img/blog/1.jpg">
                                <img src="<?php echo public_url()?>assets/img/blog/1.jpg" alt="image">
                            </li>
                        </ul>
                    </div><!-- /.gallery-thumb -->
                </div><!-- /.col-md-5 -->
              </div><!-- /.row -->
              <div class="row">
                  <div class="col-md-12">
                      <p>
                          We have a long list of satisfied customers, who still keeps coming back to us for further work. They are pleased with the value we give to their time and money. Classic Typingguarantees the best typing service you would find in Kuwait
                      </p>
                  </div>
              </div>
            </div><!-- /.container -->
        </section>


        <section id="whatwedo" class="padding-top-100">
            <div class="container">
              <div class="text-center mb-80">
                  <h2 class="section-title text-uppercase">More About Us</h2>
              </div>

              <div class="vertical-tab">
                <div class="row">
                  <div class="col-sm-3">
                        <!-- Nav tabs -->
                        <ul class="nav nav-tabs nav-stacked" role="tablist">
                          <li role="presentation" class="active"><a href="#tab-6" class="waves-effect waves-light" role="tab" data-toggle="tab">What We Do</a></li>
                          <li role="presentation"><a href="#tab-7" class="waves-effect waves-light" role="tab" data-toggle="tab">Our Mission</a></li>
                          <li role="presentation"><a href="#tab-8" class="waves-effect waves-light" role="tab" data-toggle="tab">Our Team</a></li>
                          <li role="presentation"><a href="#tab-9" class="waves-effect waves-light" role="tab" data-toggle="tab">Our Services</a></li>
                        </ul>                      
                  </div><!-- /.col-md-3 -->

                  <div class="col-sm-9">
                        <!-- Tab panes -->
                        <div class="panel-body">
                          <div class="tab-content">
                            <div role="tabpanel" class="tab-pane fade in active" id="tab-6">
                                <h2>What We Do</h2>

                                <img class="alignright" src="<?php echo public_url()?>assets/img/busy_man.png" alt="">
                                <p>We servce English, Arabic, Malayalam and Urdu Typing, We will arrange translation from authorized translators in Kuwait, Special Services for Nurses and Technical Staffs, We can assist you to process your family's medical, finger and reports, We provide educational services for students, professionals and businesses across the globe, All kind of Visa typing, Passport, shuoonand <a href="https://www.paci.gov.kw/Default.aspx">civil id</a> forms typing, Insurance Services, <a href="http://www.mohe.edu.kw/equivalencynew/home.aspx">Education</a> Services and also <a href="https://www.paci.gov.kw/Default.aspx">Civil id related Kuwait</a>, <a href="http://www.csc.net.kw:8888/csc/ar/home.jsp">Civil commission Kuwait</a>, <a href="http://cr.lsgkerala.gov.in/">Birth death marriage related in India</a> and <a href="http://www.noorkaroots.net">nookra</a> related services available here.</p>
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tab-7">
                                <h2>Our Mission</h2>

                                <img class="alignright" src="<?php echo public_url()?>assets/img/mission.png" alt="">

                                <p>We aim to later all needs of our beloved clients, assuring the managent system will meet the expectations of our customers in regards with the service undergo in our hands.</p>

                                <p>We serve your needs, So we provide the best high quality services that an organization may need. Let us help you achieve your goals through our highly-experienced staff assuring your expenses in limited budget.</p>
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tab-8">
                                <h2>Our Team</h2>

                                <img class="alignright" src="<?php echo public_url()?>assets/img/business.png" alt="">

                                <p>We have a long list of <a href="team">Professional Staffs</a>, They are pleased with the value we give to their time and money. Classic Typingguarantees the best typing service you would find in Kuwait.</p>

                                <p>We have been providing quality based services for more than twenty years. We are thrilled and honored to have the support of our well-respected customer’s group to help us to provide them quality service.</p>
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tab-9">
                                <h2>Our Services</h2>
                                
                                <img class="alignright mt-20" src="<?php echo public_url()?>assets/img/data.png" alt="">

                                <p>
                                  <a href="services#services1">Typing Services</a>
                                  <br><a href="services#services2">Services for Ministry of Health</a> , <a href="services#services4">Medical Fingerprint Assists Services</a>
                                  <br><a href="services#services3">Services for Higher & Lower Education</a> , <a href="services#services7">Education Services</a>
                                  <br><a href="services#services5">Insurance Services</a>, <a href="services#services6">Health Insurance Services</a>
                                  <br><a href="services#services8">Transportation services</a> , <a href="services#services10">Air Tickets and Related Services</a>
                                  <br><a href="services#services9">Pan Card Services</a>
                                  <br><a href="services#services11">Courier Services</a> , <a href="services#services12">Miscellaneous Services</a>
                                </p>
                            </div>
                          </div>
                        </div>
                  </div>
                </div><!-- /.row -->
              </div><!-- /.vertical-tab -->

            </div><!-- /.container -->
        </section>
        
        <section class="section-padding">
            <div class="container">
              <div class="team-tab" role="tabpanel">

                  <!-- Tab panes -->
                  <div class="panel-body">
                    <div class="tab-content">
                      <div role="tabpanel" class="tab-pane fade in active">
                          <div class="row">
                              <div class="col-md-4 col-sm-3">
                                  <figure class="team-img text-center">
                                      <img src="<?php echo public_url()?>assets/img/bg/musthafa.png" class="img-responsive" alt="Image">

                                      <ul class="team-social-links list-inline">
                                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                                          <li><a href="#"><i class="fa fa-google-plus"></i></a></li>
                                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                                      </ul>
                                  </figure>
                              </div><!-- /.col-md-4 -->

                              <div class="col-md-8 col-sm-9">

                                  <div class="team-intro">
                                      <h3>Mr. Musthafa<small>Co-Founder</small></h3>
                                      <p>A id a torquent tortor at lacus et donec platea eu scelerisque maecenas ac eros a adipiscing id lobortis cum lacus erat. Parturient eleifend adipiscing ultrices a cursus est feugiat porta a at condimentum fames adipiscing odio in nisi venenatis suspendisse suspendisse parturient. Leo congue sociosqu maecenas ligula eu penatibus at suscipit mus scelerisque.</p>     
                                  </div>
                              </div> <!-- col-md-8 -->
                          </div> <!-- row -->
                      </div> <!--team-1 end-->

                    </div> <!--tab-content end -->
                  </div>

              </div> <!--tab-pan end --> 

            </div><!-- /.container -->
        </section>

<file_sep>/application/views/contact.php
        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li class="active"><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('Contact') ?>
                            
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->


        <!--page title start-->
        <section class="page-title pattern-bg ptb-50">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <h2>Contact Us</h2>
                        <span>24*7 Hours Services</span>
                        <ol class="breadcrumb">
                            <li><a href="#">Home</a></li>
                            <li class="active">Contact Us</li>
                        </ol>
                    </div>
                </div>
            </div>
        </section>
        <!--page title end-->

        
        <!-- contact-form-section -->
        <section id="getintouch" class="section-padding">
          
          <div class="container">

              <div class="text-center mb-80">
                  <h2 class="section-title text-uppercase">Get in touch</h2>
                  <p class="section-sub">24-7 Technical Support from Kuwait. An online support to help your problems go away.A 24 hour, reliable service to help solve problems your face with any of our services.We are just a phone call or message us away.</p>
              </div>

            <div class="row mb-80">
                <div class="col-md-8">
                    <form name="contact-form" id="contactForm" action="contact-request" method="POST">

                      <div class="row">
                        <div class="col-md-6">
                          <div class="input-field">
                            <input type="text" name="name" class="validate" id="name" required="">
                            <label for="name">Name</label>
                          </div>

                        </div><!-- /.col-md-6 -->

                        <div class="col-md-6">
                          <div class="input-field">
                            <label class="sr-only" for="email">Email</label>
                            <input id="email" type="email" name="email" class="validate" required="">
                            <label for="email" data-error="wrong" data-success="right">Email</label>
                          </div>
                        </div><!-- /.col-md-6 -->
                      </div><!-- /.row -->

                      <div class="row">
                        <div class="col-md-6">
                          <div class="input-field">
                            <input id="phone" type="tel" name="phone" class="validate" >
                            <label for="phone">Phone Number</label>
                          </div>
                        </div><!-- /.col-md-6 -->

                        <div class="col-md-6">
                          <div class="input-field">
                            <input id="website" type="text" name="website" class="validate" >
                            <label for="website">Your Website</label>
                          </div>
                        </div><!-- /.col-md-6 -->
                      </div><!-- /.row -->

                      <div class="input-field">
                        <textarea name="message" id="message" class="materialize-textarea" ></textarea>
                        <label for="message">Message</label>
                      </div>

                      <button type="submit" name="submit" class="waves-effect waves-light btn submit-button pink mt-30">Send Message</button>
                    </form>
                </div><!-- /.col-md-8 -->

                <div class="col-md-4 contact-info">

                    <address>
                      <i class="material-icons brand-color">&#xE55F;</i>
                      <div class="address">
                        Block 4, Street 5 Jleeb Al-Shuyoukh,<br>
                        Abbassiya, Kuwait Police Station Road, <br>
                        Behind BEC & Lulu Exchange,<br> Near Orma Jewellery

                        <hr>
                      </div>

                      <i class="material-icons brand-color">&#xE61C;</i>
                      <div class="phone">
                        <p>Fax: 24 34 43 18<br>
                          Telephone: 24 31 07 83 <br> Mobile: 99 53 01 77 <br> Whatsapp: 99 53 01 77 <strong>,</strong>   <span class="ml-10">99 25 38 41</span></p>
                      </div>

                      <i class="material-icons brand-color">&#xE0E1;</i>
                      <div class="mail">
                        <p><a href="mailto:<EMAIL>"><EMAIL></a><br>
                        <a href="mailto:<EMAIL>"><EMAIL></a> <br>
                        <a href="mailto:<EMAIL>"><EMAIL></a></p>
                      </div>
                    </address>

                </div><!-- /.col-md-4 -->
            </div><!-- /.row -->
          </div>
        </section>
        <!-- contact-form-section End -->


        <!-- map-section -->
        <div id="myMap" class="height-450"></div>
        <!-- /.map-section -->
<file_sep>/application/controllers/Home.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 25/4/17
 * Time: 5:57 PM
 */
defined('BASEPATH') or exit('No Direct Script Access Allowed');

class Home extends CI_Controller
{
    protected $header = 'templates/header';
    protected $footer = 'templates/footer';
    
    function __construct()
    {
        parent::__construct();

        $this->load->library('session');

        $this->load->model('Brochures_Model', 'brochure');
        $this->load->model('News_Model', 'news');
        $this->load->model('Subscription_Model', 'subscription');
        $this->load->model('Slide_Image_Model', 'slide_image');
        $this->load->model('Gallery_Files_Model', 'gallery_files');
        $this->load->model('Blog_Model', 'blog');
    }

    public function login()
    {

        if ($this->session->userdata('logged_in') == TRUE) {
            redirect(base_url('admin'));
            return FALSE;
        }

        $this->load->view('login');
    }

    public function test($page = 'test')
    {
        $this->load->view($this->header);
        $this->load->view($page);
        $this->load->view($this->footer);
    }

    public function index($page = 'index')
    {
        $data['slide_image'] = $this->_get_slide_images();
        $data['brochure'] = $this->_get_latest_brochure()[0];
        $data['news'] = $this->_get_news();
        $this->load->view($this->header);
        $this->load->view($page,$data);
        $this->load->view($this->footer);
    }

    public function about($page = 'about')
    {
        $this->load->view($this->header);
        $this->load->view($page);
        $this->load->view($this->footer);
    }

    public function team($page = 'team')
    {
        $this->load->view($this->header);
        $this->load->view($page);
        $this->load->view($this->footer);
    }

    public function service($page = 'service')
    {
        $this->load->view($this->header);
        $this->load->view($page);
        $this->load->view($this->footer);
    }

    public function moments($page = 'gallery')
    {
        $data['gallery'] = $this->_get_gallery();
        $this->load->view($this->header);
        $this->load->view($page,$data);
        $this->load->view($this->footer);
    }

    public function blog($page = 'blog')
    {
        $data['blog'] = $this->_get_blog();
        $this->load->view($this->header);
        $this->load->view($page,$data);
        $this->load->view($this->footer);
    }

    public function blogView($id)
    {
        $data['blog'] = $this->_get_blog($id);
        $data['blog_latest'] = $this->_get_latest_blog();
        $this->load->view($this->header);
        $this->load->view('blogView', $data);
        $this->load->view($this->footer);
    }

    public function contact($page = 'contact')
    {
        $this->load->view($this->header);
        $this->load->view($page);
        $this->load->view($this->footer);
    }

    public function _get_latest_brochure()
    {
        $data = $this->brochure->select($limit = 1, $order = 'DESC');
        return $data;
    }

    public function _get_news()
    {
        $data = $this->news->select($limit = 6, $order = 'DESC');
        return $data;
    }

    public function subscribe()
    {
        $this->form_validation->set_rules('email', 'Email', 'required|valid_email|callback_check_mail');
        if ($this->form_validation->run() == FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_output(validation_errors());
        } else {
            $data['email'] = $this->input->post('email');
            $data['ip'] = $this->get_client_ip();
            $data['date'] = date('Y-m-d');
            if ($this->subscription->add($data)) {
                $this->output->set_output('subscription success');
            } else {
                $this->output->set_status_header(500, 'Server Error');
                $this->output->set_output('subscription success');
            }
        }
    }

    public function check_mail($mail)
    {
        if ($this->subscription->select_where(['email' => $mail]) == FALSE) {
            return TRUE;
        } else {
            $this->form_validation->set_error_delimiters('<div style="color: #ff0000">', '</div>');
            $this->form_validation->set_message('check_mail', 'You Have Already Subscribed');
            return FALSE;
        }
    }

    // Function to get the client IP address
    function get_client_ip() {
        $ipaddress = '';
        if (isset($_SERVER['HTTP_CLIENT_IP']))
            $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
        else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
            $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if(isset($_SERVER['HTTP_X_FORWARDED']))
            $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
        else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
            $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
        else if(isset($_SERVER['HTTP_FORWARDED']))
            $ipaddress = $_SERVER['HTTP_FORWARDED'];
        else if(isset($_SERVER['REMOTE_ADDR']))
            $ipaddress = $_SERVER['REMOTE_ADDR'];
        else
            $ipaddress = 'UNKNOWN';
        return $ipaddress;
    }

    public function unsubscribe($param1)
    {
        if ($this->subscription->unsub(['active' => 0],['email' => $param1])) {
            redirect(base_url(), 'refresh');
        }
    }

    public function _get_slide_images()
    {
        $data = $this->slide_image->select();
        return $data;
    }

    public function _get_gallery()
    {
        $data = $this->gallery_files->select();
        return $data;
    }

    public function _get_blog($id="")
    {
        if ($id != "") {
            $data = $this->blog->select_where(['id' => $id]);
            return $data;
        } else {
            $data = $this->blog->select();
            return $data;
        }
    }

    public function _get_latest_blog()
    {
        $data = $this->blog->select($limit = 8, $order = 'DESC');
        return $data;
    }

    public function request_quote()
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('email', 'Email', 'required|valid_email');

        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation error');
        } else {
            $name = $this->input->post('name');
            $email = $this->input->post('email');
            $phone = $this->input->post('phone');
            $service = $this->input->post('service');
            $message = $this->input->post('message');


            $message = wordwrap($message, 70, "\n");

            $subject = 'Quote From :  ' . $name;

            $content = 'name    :   ' . $name . PHP_EOL . PHP_EOL;
            $content .= 'Quote from   :  ' . $email . PHP_EOL . PHP_EOL;
            $content .= 'Phone   :   ' . $phone . PHP_EOL . PHP_EOL;
            $content .= 'Requested Service   :   ' . $service . PHP_EOL . PHP_EOL;

            $content .= 'Message  :   ' . $message . PHP_EOL . PHP_EOL;

            $content = str_replace("\n.", "\n.", $content);

            $to = '<EMAIL>';

            $headers = 'From:<EMAIL>';

            if (mail($to, $subject, $content, $headers)) {
                $this->output->set_output("We will contact you soon!\n Thank you.");
            } else {
                $this->output->set_status_header(400, 'Unable to send mail');
                $this->output->set_output("Please try again later.");
            }
        }
    }

    public function appointment_request()
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('email', 'Email', 'required|valid_email');

        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation error');
        } else {
            $name = $this->input->post('name');
            $email = $this->input->post('email');
            $phone = $this->input->post('phone');
            $service = $this->input->post('service');
            $message = $this->input->post('message');


            $message = wordwrap($message, 70, "\n");

            $subject = 'Appointment From :  ' . $name;

            $content = 'name    :   ' . $name . PHP_EOL . PHP_EOL;
            $content .= 'appointment from   :  ' . $email . PHP_EOL . PHP_EOL;
            $content .= 'Phone   :   ' . $phone . PHP_EOL . PHP_EOL;
            $content .= 'Requested Service   :   ' . $service . PHP_EOL . PHP_EOL;

            $content .= 'Message  :   ' . $message . PHP_EOL . PHP_EOL;

            $content = str_replace("\n.", "\n.", $content);

            $to = '<EMAIL>';

            $headers = 'From:<EMAIL>';

            if (mail($to, $subject, $content, $headers)) {
                $this->output->set_output("We will contact you soon!\n Thank you.");
            } else {
                $this->output->set_status_header(400, 'Unable to send mail');
                $this->output->set_output("Please try again later.");
            }
        }

    }

    public function contact_request()
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('email', 'Email', 'required|valid_email');

        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation error');
        } else {
            $name = $this->input->post('name');
            $email = $this->input->post('email');
            $phone = $this->input->post('phone');
            $website = $this->input->post('website');
            $message = $this->input->post('message');


            $message = wordwrap($message, 70, "\n");

            $subject = 'Contact Request From :  ' . $name;

            $content = 'name    :   ' . $name . PHP_EOL . PHP_EOL;
            $content .= 'contact request   :  ' . $email . PHP_EOL . PHP_EOL;
            $content .= 'Phone   :   ' . $phone . PHP_EOL . PHP_EOL;
            $content .= 'Website   :   ' . $website . PHP_EOL . PHP_EOL;

            $content .= 'Message  :   ' . $message . PHP_EOL . PHP_EOL;

            $content = str_replace("\n.", "\n.", $content);

            $to = '<EMAIL>';

            $headers = 'From:<EMAIL>';

            if (mail($to, $subject, $content, $headers)) {
                $this->output->set_output("We will contact you soon!\n Thank you.");
            } else {
                $this->output->set_status_header(400, 'Unable to send mail');
                $this->output->set_output("Please try again later.");
            }
        }
    }
}<file_sep>/application/controllers/App.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 25/4/17
 * Time: 3:36 PM
 */

defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Class App
 *
 */

class App extends CI_Controller
{

    protected $limit = 10;

    function __construct()
    {
        parent::__construct();
        require_once '../vendor/fzaninotto/faker/src/autoload.php';
//        can only be called from the command line!
        if (!$this->input->is_cli_request()) {
            exit('Direct Access Not Allowed');
        }

//        can only run in the development environment
        if (ENVIRONMENT !== 'development') {
            exit('Wowesers! You don\'t want to do that');
        }

//        initiate faker
        $this->faker = Faker\Factory::create();

//        Required Models
        $this->load->model('Blog_Model', 'blog');
        $this->load->model('Brochures_Model', 'brochure');
        $this->load->model('Files_Model', 'file');
        $this->load->model('Galleries_Model', 'gallery');
        $this->load->model('Gallery_Files_Model', 'gallery_file');
        $this->load->model('Helpful_Links_Model', 'helpful_link');
        $this->load->model('News_Model', 'news');
        $this->load->model('Slide_Image_Model', 'slide_image');
        $this->load->model('Users_Model', 'user');

    }

    function truncate()
    {
        $this->_truncate_db();
    }

    /**
     * Seed local database
    */

    function seed($tabel = "")
    {
        $this->truncate();

        $this->_seed_users(1);
        $this->_seed_blog($this->limit);
        $this->_seed_brochure($this->limit);
        $this->_seed_files(5);
        $this->_seed_gallery($this->limit);
        $this->_seed_gallery_files($this->limit);
        $this->_seed_helpful_link($this->limit);
        $this->_seed_news($this->limit);
        $this->_seed_slide_image($this->limit);
    }

    function _seed_users($limit)
    {
        echo "seeding $limit users";

        // create a bunch of base buyer accounts
        for ($i = 0; $i < $limit; $i++) {
            echo ".";

            $data = array(
                'username' => 'admin', // get a unique nickname
                'password' => hash('<PASSWORD>', '<PASSWORD>'), // run this via your password hashing function
            );

            $this->user->add($data);
        }

        echo PHP_EOL;
    }

    function _seed_news($limit)
    {
        echo "seeding $limit news";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'heading' => $this->faker->sentence(4),
                'content' => $this->faker->paragraph(3),
                'date' => $this->faker->date(),
                'file_id' => $this->faker->randomElement([1, 2, 3, 4, 5]),
            ];

            $this->news->add($data);
        }
        echo PHP_EOL;

    }

    function _seed_slide_image($limit)
    {
        echo "seeding $limit slide_images";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'file_id' => $this->faker->randomElement([1, 2, 3, 4, 5]),
            ];

            $this->slide_image->add($data);
        }
        echo PHP_EOL;
    }

    function _seed_brochure($limit)
    {
        echo "seeding $limit brochures";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'name' => $this->faker->name,
                'subject' => $this->faker->sentence(3),
                'date' => $this->faker->date(),
                'file_id' => $this->faker->randomElement([1, 2, 3, 4, 5]),
            ];

            $this->brochure->add($data);
        }
        echo PHP_EOL;
    }

    function _seed_gallery($limit)
    {
        echo "seeding $limit gallery";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'gallery_name' => $this->faker->name,
                'description' => $this->faker->sentence(5),
            ];

            $this->gallery->add($data);
        }
        echo PHP_EOL;
    }


    function _seed_gallery_files($limit)
    {
        echo "seeding $limit gallery_files";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'gallery_id' => $this->faker->randomElement([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
                'file_id' => $this->faker->randomElement([1, 2, 3, 4, 5]),
            ];

            $this->gallery_file->add($data);
        }
        echo PHP_EOL;
    }

    function _seed_helpful_link($limit)
    {
        echo "seeding $limit helpful links";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'name' => $this->faker->name,
                'link' => $this->faker->url,
            ];

            $this->helpful_link->add($data);
        }
        echo PHP_EOL;
    }

    function _seed_blog($limit)
    {
        echo "seeding $limit blogs";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'name' => $this->faker->name,
                'heading' => $this->faker->sentence(3),
                'content' => $this->faker->paragraph(4),
                'date' => $this->faker->date(),
                'file_id' => $this->faker->randomElement([1, 2, 3, 4, 5]),
            ];

            $this->blog->add($data);
        }
        echo PHP_EOL;
    }

    function _seed_files($limit)
    {
        echo "seeding $limit files";

        for ($i = 0; $i < $limit; $i++) {
            echo ".";
            $data = [
                'file_name' => $this->faker->image($dir = FCPATH . 'uploads', $width = 640, $height = 480, 'cats', false),
                'file_type' => $this->faker->fileExtension,
                'size' => $this->faker->randomElement([1200, 500, 6000, 5654]),
                'date' => $this->faker->date()
            ];

            $this->file->add($data);
        }
        echo PHP_EOL;
    }


    function _truncate_db()
    {
        $this->user->trunc();
        $this->blog->trunc();
        $this->brochure->trunc();
        $this->file->trunc();
        $this->gallery->trunc();
        $this->gallery_file->trunc();
        $this->helpful_link->trunc();
        $this->news->trunc();
        $this->slide_image->trunc();
    }
}<file_sep>/application/helpers/menu_helper.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 9/2/17
 * Time: 5:04 PM
 */

function dashboard_menu()
{
    $menu = [
        'dashboard' => [
            'title' => 'dashboard',
            'icon' => 'fa-tachometer',
            'link' => '/'
        ],
        'slide image' => [
            'title' => 'slide image',
            'icon' => 'fa-picture-o',
            'link' => 'slide-images'
        ],
        'news' => [
            'title' => 'news',
            'icon' => 'fa-newspaper-o',
            'link' => 'news'
        ],
        'brochure' => [
            'title' => 'brochure',
            'icon' => 'fa-file-pdf-o',
            'link' => 'brochures'
        ],
        'gallery' => [
            'title' => 'gallery',
            'icon' => 'fa-picture-o',
            'link' => 'gallery'
        ],
        'helpful link' => [
            'title' => 'helpful link',
            'icon' => 'fa-external-link',
            'link' => 'helpful-links'
        ],
        'blog' => [
            'title' => 'blog',
            'icon' => 'fa-comment',
            'link' => 'blog'
        ]
    ];

    $html = '<nav class="sidebar-left">
        <div class="">
          <ul class="menu-left">
            <li>
              <div class="user-img">
                <img class="img-responsive img-circle center-block" src="' . public_url() . 'assets/img/logo/logo.png" alt="User">
              </div>
              <div class="user-id text-center">
                <span class=""><NAME></span>
              </div>
            </li>';
    foreach ($menu as $key => $value) {
        $html .= '<li><a href="' . base_url('admin/#'.$value['link']) . '" ng-class="{active : url == \'' . $value['link'] . '\'}">'.ucfirst($value['title']).' &nbsp;<i class="menu-icon fa '.$value['icon'].' pull-right"></i></a></li>';
    }

    $html .='</ul>
        </div>
      </nav>';

    return $html;
}

function menu($current)
{
    $menu = [
        'Home' => [
            'title' => 'Home',
            'icon' => '',
            'link' => 'home'
        ],
        'About Us' => [
            'title' => 'About Us',
            'icon' => '',
            'link' => 'about',
            'sub' => [
                'about us' => [
                    'title' => 'about company',
                    'icon' => '',
                    'link' => 'about#aboutus',
                ],
                'team' => [
                    'title' => 'our team',
                    'icon' => '',
                    'link' => 'team',
                ]
            ]
        ],
        'Our Services' => [
            'title' => 'Our Services',
            'icon' => '',
            'link' => 'services',
            'sub' => [
                'typing services' => [
                    'title' => 'typing service',
                    'icon' => '',
                    'link' => 'services#services1',
                ],
                'services for ministry health' => [
                    'title' => 'services for ministry health',
                    'icon' => '',
                    'link' => 'services#services2',
                ],
                'services for higher & lower education' => [
                    'title' => 'services for higher & lower education',
                    'icon' => '',
                    'link' => 'services#services3',
                ],
                'medical fingerprint assists services' => [
                    'title' => 'medical fingerprint assists services',
                    'icon' => '',
                    'link' => 'services#services4',
                ],
                'insurance services' => [
                    'title' => 'insurance services',
                    'icon' => '',
                    'link' => 'services#services5',
                ],
                'health insurance services' => [
                    'title' => 'health insurance services',
                    'icon' => '',
                    'link' => 'services#services6',
                ],
                'education services' => [
                    'title' => 'education services',
                    'icon' => '',
                    'link' => 'services#services7',
                ],
                'transportation services' => [
                    'title' => 'transportation services',
                    'icon' => '',
                    'link' => 'services#services8',
                ],
                'pan card services' => [
                    'title' => 'pan card services',
                    'icon' => '',
                    'link' => 'services#services9',
                ],
                'air tickets and related services' => [
                    'title' => 'air tickets and related services',
                    'icon' => '',
                    'link' => 'services#services10',
                ],
                'courier services' => [
                    'title' => 'courier services',
                    'icon' => '',
                    'link' => 'services#services11',
                ],
                'miscellaneous services' => [
                    'title' => 'miscellaneous services',
                    'icon' => '',
                    'link' => 'services#services12',
                ]
            ]
        ],
        'Moments' => [
            'title' => 'Moments',
            'icon' => '',
            'link' => 'moments'
        ],
        'Blog' => [
            'title' => 'Blog',
            'icon' => '',
            'link' => 'blog'
        ],
        'Contact' => [
            'title' => 'Contact',
            'link' => 'contact'
        ]
    ];

    $html = '';
    foreach ($menu as $key=>$value) {
        if (isset($value['sub'])) {
            if ($key == $current) {
                $html .= '<li class="active">' .PHP_EOL.
                    '<a href="' . $value['link'] . '">' . ucwords($value['title']) . '</a>' . PHP_EOL .
                    '<ul class="dropdown">' . PHP_EOL;
                foreach ($value['sub'] as $sub) {
                    $html .= '<li><a href="' . $sub['link'] . '">' . ucwords($sub['title']) . '</a></li>'. PHP_EOL;
                }
            } else {
                $html .= '<li>' .PHP_EOL.
                    '<a href="' . $value['link'] . '">' . ucwords($value['title']) . '</a>' . PHP_EOL .
                    '<ul class="dropdown">' . PHP_EOL;
                foreach ($value['sub'] as $sub) {
                    $html .= '<li><a href="' . $sub['link'] . '">' . ucwords($sub['title']) . '</a></li>'. PHP_EOL;
                }
            }

            $html .= '</ul>' . PHP_EOL;
            $html .= '</li>' . PHP_EOL;

        }else{
            if ($key == $current) {
                $html .= '<li class="active"><a href="' . base_url($value['link']) . '">' . $key . '</a></li>' . PHP_EOL;
            }else{
                $html .= '<li><a href="' . base_url($value['link']) . '">' . $key . '</a></li>' . PHP_EOL;
            }
        }

    }
    return $html;
}
<file_sep>/application/models/Gallery_Files_Model.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 25/4/17
 * Time: 4:48 PM
 */


defined('BASEPATH') or exit ('No direct script access allowed');
require_once APPPATH . 'core/My_Model.php';

class Gallery_Files_Model extends My_Model
{

    protected $table = 'gallery_files';

    function __construct()
    {
        parent::__construct();
    }

    /**
     * Return ALL galleries with their files ie,album model
     *
     */
    public function select($limit = null, $order = null)
    {
        $this->db->from('galleries');
        if ($limit != null) {
            $this->db->limit($limit);
        }
        if ($order != null) {
            $this->db->order_by('id', 'DESC');
        }
        $query = $this->db->get();
        if ($query->num_rows() > 0) {
            $galleries = $query->result();
            foreach ($galleries as $value) {
                $this->db->from('gallery_files');
                $this->db->where('gallery_id', $value->id);
                $glr_fls_query = $this->db->get();
                $gallery_files = $glr_fls_query->result();
                foreach ($gallery_files as $val) {
                    $this->db->from('files');
                    $this->db->where('id', $val->file_id);
                    $files_query = $this->db->get();
                    $files = $files_query->result();
                    foreach ($files as $file) {
                        $val->file_name = $file->file_name;
                        $val->file_type = $file->file_type;
                        $val->gallery_file_id = $val->id;
                        $val->thumbImgUrl = public_url() . 'uploads/thumb/thumb_' . $file->file_name;
                        $val->imgUrl = public_url() . 'uploads/' . $file->file_name;
                    }
                }
                $value->files = $gallery_files;
            }
            return $galleries;
        }else
            return FALSE;

    }

    /**
     * Return ONE gallery with their files ie,album model
     *
     */
    public function select_where($galery_id, $limit = null, $order = null)
    {
        $this->db->from('galleries');
        $this->db->where('id', $galery_id);
        if ($limit != null) {
            $this->db->limit($limit);
        }
        if ($order != null) {
            $this->db->order_by('id', 'DESC');
        }
        $query = $this->db->get();
        if ($query->num_rows() > 0) {
            $galleries = $query->result();
            foreach ($galleries as $value) {
                $this->db->from('gallery_files');
                $this->db->where('gallery_id', $value->id);
                $glr_fls_query = $this->db->get();
                $gallery_files = $glr_fls_query->result();
                foreach ($gallery_files as $val) {
                    $this->db->from('files');
                    $this->db->where('id', $val->file_id);
                    $files_query = $this->db->get();
                    $files = $files_query->result();
                    foreach ($files as $file) {
                        $val->file_name = $file->file_name;
                        $val->file_type = $file->file_type;
                        $val->gallery_file_id = $val->id;
                    }
                }
                $value->files = $gallery_files;
            }
            return $galleries;
        }else
            return FALSE;

    }


    /**
     *return all gallery files one by one
     *
     */
    public function select_all($limit = null, $order = null)
    {
        $this->db->from('galleries');
        if ($limit != null) {
            $this->db->limit($limit);
        }
        if ($order != null) {
            $this->db->order_by($order, 'DESC');
        }
        $all_files = [];
        $query = $this->db->get();
        if ($query->num_rows() > 0) {
            $galleries = $query->result();
            foreach ($galleries as $value) {
                $this->db->from('gallery_files');
                $this->db->where('gallery_id', $value->id);
                $glr_fls_query = $this->db->get();
                $gallery_files = $glr_fls_query->result();
                foreach ($gallery_files as $val) {
                    $this->db->from('files');
                    $this->db->where('id', $val->file_id);
                    $files_query = $this->db->get();
                    $files = $files_query->result();
                    foreach ($files as $file) {
                        $val->thumbUrl = public_url() . 'uploads/thumb/thumb_' . $file->file_name;
                        $val->url = public_url() . 'uploads/' . $file->file_name;
                        $val->alt = 'gallery';
                        $val->category = $value->name;
                        $val->description = $value->description;
                        array_push($all_files, $val);
                    }
                }
            }
            return $all_files;
        }else
            return FALSE;
    }

    public function select_gl_fl_where(array $where)
    {
        $this->db->select(['gallery_files.*', 'files.id as filId', 'files.file_name', 'files.file_type']);
        $this->db->from($this->table);
        $this->db->join('files', 'files.id = gallery_files.file_id', 'full');
        $this->db->where($where);
        $query = $this->db->get();
        if ($query->num_rows() > 0) {
            return $query->result();
        }else
            return FALSE;
    }


    public function add($data)
    {
        return $this->insert($data);
    }

    public function edit($data, $id)
    {
        return $this->update($data, $id);
    }

    public function remove($id)
    {
        return $this->drop($id);
    }

    public function trunc()
    {
        return $this->truncate();
    }
}

<file_sep>/resources/js/angularscript.js
/**
 * Created by psybo-03 on 25/4/17.
 */

var app = angular.module('myApp', ['ngRoute', 'ui.bootstrap', 'angularUtils.directives.dirPagination', 'ngFileUpload']);
app.config(['$routeProvider', '$locationProvider','$qProvider', function ($routeProvider, $locationProvider, $qProvider) {
    $qProvider.errorOnUnhandledRejections(false);
    $locationProvider.hashPrefix('');
    $routeProvider
        .when('/#/', {
            templateUrl: '',
            controller:'dashboardController'
        })
        .when('/news', {
            templateUrl: 'news',
            controller:'newsController'
        })
        .when('/brochures', {
            templateUrl: 'brochures',
            controller:'brochureController'
        })
        .when('/helpful-links', {
            templateUrl: 'helpful-links',
            controller:'helpfulLinkController'
        })
        .when('/gallery', {
            templateUrl: 'gallery',
            controller:'galleryController'
        })
        .when('/slide-images', {
            templateUrl: 'slide-images',
            controller:'slideImageController'
        })
        .when('/blog', {
            templateUrl: 'blog',
            controller:'blogController'
        })
        .when('/edit-profile', {
            templateUrl: 'change'
        })

}]);

//Pagination filter
app.filter('startFrom', function() {
    return function(input, start) {
        start = +start; //parse to int
        return input.slice(start);
    }
});


app.directive('fileModel', ['$parse', function ($parse) {
    return {
        restrict: 'A',
        link: function(scope, element, attrs) {
            var model = $parse(attrs.fileModel);
            var modelSetter = model.assign;
            scope.filespre = [];

            element.bind('change', function(){
                var values = [];
                angular.forEach(element[0].files, function (item) {
                    //url
                    item.url = URL.createObjectURL(item);
                    item.model = attrs.fileModel;
                    scope.filespre.push(item);
                });
                scope.$apply(function(){
                    modelSetter(scope, element[0].files);
                    //old
                    //modelSetter(scope, element[0].files[0]);
                });
            });
        }
    };
}]);

app.directive('ngConfirmClick', [
    function () {
        return {
            link: function (scope, element, attr) {
                var msg = attr.ngConfirmClick || "Are you sure?";
                var clickAction = attr.confirmedClick;
                element.bind('click', function (event) {
                    if (window.confirm(msg)) {
                        scope.$eval(clickAction)
                    }
                });
            }
        };
    }

]);

<file_sep>/application/views/blog.php
        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li class="active"><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('Blog') ?>
                            
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->
        
        <!--page title start-->
        <section class="page-title pattern-bg ptb-50">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <h2>Classic International</h2>
                <span>Our Blog Page</span>
                <ol class="breadcrumb">
                    <li><a href="home">Home</a></li>
                    <li class="active">Blog</li>
                </ol>
                    </div>
                </div>
            </div>
        </section>
        <!--page title end-->


        <!-- Grid News -->
        <section class="section-padding grid-news-hover grid-blog">
            <div class="container">

              <div class="row">
                <div id="blogGrid">
                  
                  <!-- blog one start -->
                    <?php
                    if (isset($blog) and $blog != FALSE) {
                        foreach ($blog as $value) {
                            ?>
                            <div class="col-xs-12 col-sm-6 col-md-4 blog-grid-item">
                                <article class="post-wrapper">
                                    <div class="thumb-wrapper waves-effect waves-block waves-light">
                                        <a href="<?php echo 'blogView/' . $value->id ?>"><img src="<?php echo $value->imgUrl ?>" class="img-responsive"
                                                                alt=""></a>

                                        <div class="post-date">
                                            <?php echo $value->day?><span><?php echo $value->month?></span>
                                        </div>
                                    </div>
                                    <!-- .post-thumb -->

                                    <div class="blog-content">
                                        <div class="hover-overlay light-blue"></div>
                                        <header class="entry-header-wrapper">
                                            <div class="entry-header">
                                                <h2 class="entry-title pcut"><a href="<?php echo 'blogView/' . $value->id ?>"><?php echo $value->heading ?></a></h2>
                                            </div>
                                            <!-- /.entry-header -->
                                        </header>
                                        <!-- /.entry-header-wrapper -->
                                        <div class="entry-content">
                                            <p class="pcut"> <?php echo $value->content ?></p>
                                        </div>
                                        <!-- .entry-content -->
                                    </div>
                                    <!-- /.blog-content -->

                                </article>
                                <!-- /.post-wrapper -->
                            </div><!-- /.col-md-4 -->
                        <?php
                        }
                    }?>
                  <!-- blog one end -->


                </div><!-- /#blogGrid -->
              </div><!-- /.row -->
<!--              <ul class="pagination post-pagination text-center mt-50">-->
<!--                <li><a href="#." class="waves-effect waves-light"><i class="fa fa-angle-left"></i></a></li>-->
<!--                <li><span class="current waves-effect waves-light">1</span></li>-->
<!--                <li><a href="#." class="waves-effect waves-light">2</a></li>-->
<!--                <li><a href="#." class="waves-effect waves-light"><i class="fa fa-angle-right"></i></a></li>-->
<!--              </ul>-->


            </div><!-- /.container -->
        </section>
        <!-- Grid News End -->


<file_sep>/application/controllers/Slide_Image_Controller.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 4/5/17
 * Time: 1:02 PM
 */

defined('BASEPATH') or exit('No Direct Script Access Allowed');
require_once(APPPATH . 'core/Check_Logged.php');

class Slide_Image_Controller extends Check_Logged
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('Slide_Image_Model', 'slide_image');
        $this->load->model('Files_Model', 'file');

        $this->load->library(['upload', 'image_lib']);

        if (!$this->logged) {
            redirect(base_url('login'));
        }
    }

    function index()
    {

    }

    function get_all()
    {
        $data = $this->slide_image->select();
        $this->output->set_content_type('application/json')->set_output(json_encode($data));
    }

    function store()
    {
        if ($this->input->server('REQUEST_METHOD') == 'POST') {
            $uploaded = json_decode($this->input->post('uploaded'));
            if (!empty($uploaded)) {
                foreach ($uploaded as $value) {
                    $data = [];
                    $data['file_name'] = $value->file_name;
                    $data['file_type'] = $value->file_type;
                    $data['size'] = $value->file_size;
                    $data['date'] = date('Y-m-d');
                    $file_id = $this->file->add($data);
                    if ($file_id) {
                        $slide_data['file_id'] = $file_id;
                        if ($this->slide_image->add($slide_data)) {

                            /************resize and create thumbnail image*******/

                            if ($value->image_width > 1920 OR $value->image_width < 1920) {
                                $img_cfg['image_library'] = 'gd2';
                                $img_cfg['source_image'] = getwdir() . 'uploads/' . $value->file_name;
                                $img_cfg['maintain_ratio'] = TRUE;
                                $img_cfg['new_image'] = getwdir() . 'uploads/' . $value->file_name;
                                $img_cfg['width'] = 1920;
                                $img_cfg['quality'] = 80;
                                $img_cfg['master_dim'] = 'width';

                                $this->image_lib->initialize($img_cfg);
                                if (!$this->image_lib->resize()) {
                                    $resize_error[] = $this->image_lib->display_errors();
                                }
                                $this->image_lib->clear();

                                /********End resize*********/
                                $this->output->set_content_type('application/json')->set_output(json_encode('Upload success'));
                            }
                        }else{
                            $this->output->set_status_header(400, 'Server Down');
                            $this->output->set_content_type('application/json')->set_output(json_encode('Add error.try again later'));
                        }
                    }
                }
            } else {
                $this->output->set_status_header(400, 'Validation Error');
                $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Select an image']));
            }
        } else {
            show_404();
        }
    }

    function update($id)
    {
    }

    function upload()
    {
        $config['upload_path'] = getwdir() . 'uploads';
        $config['allowed_types'] = 'jpg|png|jpeg|JPG|JPEG';
        $config['max_size'] = 4096;
        $config['file_name'] = 'S_' . rand();
        $config['multi'] = 'ignore';
        $this->upload->initialize($config);
        if ($this->upload->do_upload('file')) {
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->data()));
        }else{
            $this->output->set_status_header(401, 'File Upload Error');
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->display_errors()));
        }
    }



    public function delete($id)
    {
        $slide_image = $this->slide_image->select_where(['slide_images.id' => $id]);
        if ($slide_image) {
            if ($this->slide_image->remove($id)) {
                if ($this->file->remove($slide_image[0]->file_id) && file_exists(getwdir() . 'uploads/' . $slide_image[0]->file_name)) {
                    unlink(getwdir() . 'uploads/' . $slide_image[0]->file_name);
                    $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Slide Image Deleted']));
                } else {
                    $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Slide Image Deleted and file delete error']));
                }
            } else {
                $this->output->set_status_header(500, 'Server Down');
                $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Delete Error']));
            }
        } else {
            $this->output->set_status_header(400, '404');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Record Not found']));
        }
    }

}<file_sep>/application/views/admin/slide_image.php
<div class="col-md-12" ng-class="{disable : loading} ">
    <div class="row" style="padding-left: 14px">
        <div class="box">
            <button class="btn btn-primary" ng-click="newSlideImage()"><i class="fa fa-plus"></i> Add</button>
            <form class="form-horizontal" method="POST" ng-submit="addSlideImage()" ng-show="showform" name="addform" enctype="multipart/form-data">
                <h3>New Slide Image</h3>
                <div class="form-group">
                    <label for="" class="control-label col-md-1">Photo</label>
                    <div class="col-md-4">
                        <button ngf-select="uploadFiles($files, $invalidFiles)"
                                accept="image/*"
                                ngf-max-height="5000"
                                ngf-max-size="5MB"
                                ngf-multiple="true">
                            Select Files
                        </button>
                        <span class="alert alert-danger"ng-show="fileValidation.status == true">{{fileValidation.msg}}</span>
                        <br><br>
                        Files:

                        <ul>
                            <li ng-repeat="f in files" style="font:smaller">
                                <img ngf-src="f.$ngfBlobUrl" class="thumbnail" width="100px" ngf-no-object-url="true" >
                                {{f.name}} {{f.$errorParam}}
                                <div class="progress" ng-show="f.progress >= 0">
                                    <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
                                         aria-valuemin="0" aria-valuemax="100" style="width:{{f.progress}}%">
                                        {{f.progress}}% Complete
                                    </div>
                                </div>

                            </li>
                            <li ng-repeat="f in errFiles" style="font:smaller">{{f.name}} {{f.$error}} {{f.$errorParam}}
                            </li>
                        </ul>
                        {{errorMsg}}
                    </div>
                    <span class="alert alert-warning">Image should be 100*100</span>

                    <!----for existing image----->
                    <div class="clearfix"></div>


                    <div class="clearfix"></div>
                </div>
                <div class="container" ng-show="show_error">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="alert alert-danger alert-dismissable fade in ">
                                <a href="" class="close" data-dismiss="alert" arial-label="close">&times;</a>
                                <h4>following files are not uploaded</h4>
                                <p ng-repeat-start="err in error">{{err}}</p>
                                <hr ng-repeat-end />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group text-center">
                    <button class="btn btn-primary" type="submit">Save</button>
                    <button class="btn btn-danger" type="button" ng-click="hideForm()">Cancel</button>
                </div>
            </form>
        </div>
        <div class="clearfix"></div>
        <hr/>
        <div class="row">
            <div class="container-fluid">
                <div class="row">
                    <div class="row" style="margin-left: 14px">
                        <div class="col-md-2" dir-paginate="(key,preview) in slideimages | filter:search | limitTo:pageSize | itemsPerPage:numPerPage">
                            <div class="thumbnail cus-thumb" ng-mouseover="showcaption=true" ng-mouseleave="showcaption=false" style="max-height: 142px;min-height: 142px">
                                <div class="caption" ng-show="showcaption">
                                    <div id="content">
                                        <a href="{{preview.imgUrl}}" class="label label-warning" rel="tooltip" title="Show">Show</a>
                                        <a href="" class="label label-danger" rel="tooltip" title="Delete" confirmed-click="deleteImage(preview)" ng-confirm-click="Would you like to delete this item?!">Delete</a>
                                    </div>
                                </div>
                                <img src="{{preview.imgUrl}}" alt="thumbnails">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="pull-right">
                    <dir-pagination-controls
                        max-size="10"
                        direction-links="true"
                        boundary-links="true">
                    </dir-pagination-controls>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="loading" ng-show="loading">
    <div id="loading-image">
        <img src="<?php echo public_url() . 'assets/admin/img/loading.gif' ?>" alt=""/>
        <h4>Please wait...</h4>
    </div>
</div><file_sep>/application/controllers/News_Controller.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 26/4/17
 * Time: 10:27 AM
 */

defined('BASEPATH') or exit('No Direct Script Access Allowed');
require_once(APPPATH . 'core/Check_Logged.php');

class News_Controller extends Check_Logged
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('News_Model', 'news');
        $this->load->model('Files_Model', 'file');

        $this->load->library(['upload', 'image_lib']);

        if (!$this->logged) {
            redirect(base_url('login'));
        }
    }

    function index()
    {

    }

    function get_all()
    {
        $data = $this->news->select();
        $this->output->set_content_type('application/json')->set_output(json_encode($data));
    }

    function store()
    {
        $this->form_validation->set_rules('heading', 'Heading', 'required');
        $this->form_validation->set_rules('content', 'Content', 'required');
        $this->form_validation->set_rules('date', 'Date', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            $post_data = $this->input->post();
            $uploaded = json_decode($post_data['uploaded']);

            unset($post_data['uploaded']);

            if (!empty($uploaded)) {
                /*INSERT FILE DATA TO DB*/

                $file_data['file_name'] = $uploaded->file_name;
                $file_data['file_type'] = $uploaded->file_type;
                $file_data['size'] = $uploaded->file_size;
                $file_data['date'] = $this->input->post('date');

                $file_id = $this->file->add($file_data);

                $post_data['file_id'] = $file_id;
                $resize_error = [];
                if ($file_id and $this->news->add($post_data)) {
                    /*****Create Thumb Image****/
                    $img_cfg['source_image'] = getwdir() . 'uploads/' . $uploaded->file_name;
                    $img_cfg['maintain_ratio'] = TRUE;
                    $img_cfg['new_image'] = getwdir() . 'uploads/thumb/thumb_' . $uploaded->file_name;
                    $img_cfg['quality'] = 99;
                    $img_cfg['master_dim'] = 'height';

                    $this->image_lib->initialize($img_cfg);
                    if (!$this->image_lib->resize()) {
                        $resize_error[] = $this->image_lib->display_errors();
                    }
                    $this->image_lib->clear();

                    /********End Thumb*********/

                    /*resize and create thumbnail image*/
                    if ($uploaded->file_size > 1024) {
                        $img_cfg['image_library'] = 'gd2';
                        $img_cfg['source_image'] = getwdir() . 'uploads/' . $uploaded->file_name;
                        $img_cfg['maintain_ratio'] = TRUE;
                        $img_cfg['new_image'] = getwdir() . 'uploads/' . $uploaded->file_name;
                        $img_cfg['height'] = 500;
                        $img_cfg['quality'] = 100;
                        $img_cfg['master_dim'] = 'height';

                        $this->image_lib->initialize($img_cfg);
                        if (!$this->image_lib->resize()) {
                            $resize_error[] = $this->image_lib->display_errors();
                        }
                        $this->image_lib->clear();

                        /********End resize*********/


                        if (empty($resize_error)) {
                            $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                        } else {
                            $this->output->set_status_header(402, 'Server Down');
                            $this->output->set_content_type('application/json')->set_output(json_encode($resize_error));
                        }
                    } else {
                        $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                    }
                }
            } else {
                if ($this->news->add($post_data)) {
                    $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                } else {
                    $this->output->set_status_header(402, 'Server Down');
                    $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Add Error']));
                }
            }
        }
    }

    function update($id)
    {
        $this->form_validation->set_rules('heading', 'Heading', 'required');
        $this->form_validation->set_rules('content', 'Content', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            if ($this->input->post('date') == '0000-00-00') {
                $date = null;
            }else{
                $date = $this->input->post('date');
            }

            $uploaded = json_decode($this->input->post('uploaded'));
            if (empty($uploaded)) {
                $data['heading'] = $this->input->post('heading');
                $data['content'] = $this->input->post('content');
                $data['date'] = $date;

                if ($this->news->edit($data,$id)) {
                    $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Updated']));
                } else {
                    $this->output->set_status_header(500, 'Server Down');
                    $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'server Down']));
                }
            } else {
                $file_data['file_name'] = $uploaded->file_name;
                $file_data['file_type'] = $uploaded->file_type;
                $file_data['size'] = $uploaded->file_size;
                $file_data['date'] = $date;

                $file_id = $this->file->add($file_data);
                if ($file_id) {
                    $data = [];
                    $data['heading'] = $this->input->post('heading');
                    $data['content'] = $this->input->post('content');
                    $data['date'] = $date;
                    $data['file_id'] = $file_id;
                    if ($this->news->edit($data, $id)) {
                        if ($this->input->post('file_id') != 'null') {
                            if ($this->file->remove($this->input->post('file_id'))) {
                                if (file_exists(getwdir() . 'uploads/' . $this->input->post('file_name'))) {
                                    unlink(getwdir() . 'uploads/' . $this->input->post('file_name'));
                                }
                            }
                        }
                        /*****Create Thumb Image****/
                        $img_cfg['source_image'] = getwdir() . 'uploads/' . $uploaded->file_name;
                        $img_cfg['maintain_ratio'] = TRUE;
                        $img_cfg['new_image'] = getwdir() . 'uploads/thumb/thumb_' . $uploaded->file_name;
                        $img_cfg['quality'] = 99;
                        $img_cfg['master_dim'] = 'height';

                        $this->image_lib->initialize($img_cfg);
                        if (!$this->image_lib->resize()) {
                            $resize_error[] = $this->image_lib->display_errors();
                        }
                        $this->image_lib->clear();

                        /********End Thumb*********/

                        /*resize and create thumbnail image*/
                        if ($uploaded->file_size > 1024) {
                            $img_cfg['image_library'] = 'gd2';
                            $img_cfg['source_image'] = getwdir() . 'uploads/' . $uploaded->file_name;
                            $img_cfg['maintain_ratio'] = TRUE;
                            $img_cfg['new_image'] = getwdir() . 'uploads/' . $uploaded->file_name;
                            $img_cfg['height'] = 500;
                            $img_cfg['quality'] = 100;
                            $img_cfg['master_dim'] = 'height';

                            $this->image_lib->initialize($img_cfg);
                            if (!$this->image_lib->resize()) {
                                $resize_error[] = $this->image_lib->display_errors();
                            }
                            $this->image_lib->clear();

                            /********End resize*********/


                            if (empty($resize_error)) {
                                $this->output->set_content_type('application/json')->set_output(json_encode($date));
                            } else {
                                $this->output->set_status_header(402, 'Server Down');
                                $this->output->set_content_type('application/json')->set_output(json_encode($resize_error));
                            }
                        } else {
                            $this->output->set_content_type('application/json')->set_output(json_encode($data));
                        }
                    }else{
                        $this->output->set_status_header(402, 'Server Down');
                        $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Server Error']));
                    }
                }

            }
        }
    }

    function delete_image($id)
    {

        $news = $this->news->select_where(['id' => $id]);

        if ($this->file->remove($news[0]->file_id)) {
            $data['file_id'] = null;
            if ($this->news->edit($data,$id)) {
                if (file_exists(getwdir() . 'uploads/' . $news[0]->file_name)) {
                    unlink(getwdir() . 'uploads/' . $news[0]->file_name);
                }
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Image Delete']));
            }
        }else{
            $this->output->set_status_header(400, 'Server Down');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Try again later']));
        }
    }

    function upload()
    {
        $config['upload_path'] = getwdir() . 'uploads';
        $config['allowed_types'] = 'jpg|png|jpeg|JPG|JPEG';
        $config['max_size'] = 4096;
        $config['file_name'] = 'N_' . rand();
        $config['multi'] = 'ignore';
        $this->upload->initialize($config);
        if ($this->upload->do_upload('file')) {
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->data()));
        }else{
            $this->output->set_status_header(401, 'File Upload Error');
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->display_errors()));
        }
    }



    public function delete($id)
    {
        $news = $this->news->select_where(['id' => $id]);
        if ($this->news->remove($id)) {
            if ($this->file->remove($news[0]->file_id) && file_exists(getwdir() . 'uploads/' . $news[0]->file_name)) {
                unlink(getwdir() . 'uploads/' . $news[0]->file_name);
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'News Deleted']));
            } else {
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'News Deleted and file delete error']));
            }
        } else {
            $this->output->set_status_header(500, 'Server Down');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Delete Error']));
        }
    }


}<file_sep>/application/views/admin/news.php
<div class="col-md-12">
    <div class="row">
        <button class="btn btn-primary" ng-click="newNews()"><i class="fa fa-plus"></i> Add</button>
        <form class="form-horizontal" method="POST" ng-show="showform" ng-submit="addNews()">
            <h3>New News</h3><br/>
            <div class="form-group">
                <label for="" class="control-label col-md-1">Heading</label>
                <div class="col-md-8">
                    <textarea class="form-control" name="heading" ng-model="newnews.heading" required=""></textarea>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-1">Content</label>
                <div class="col-md-8">
                    <textarea class="form-control" ng-model="newnews.content" name="content" required=""></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-1" for="date">Date</label>
                <div class="col-md-4">
                    <p class="input-group">
                        <input type="text" class="form-control" name="date" uib-datepicker-popup="dd-MMMM-yyyy" ng-model="date" is-open="popup2.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" readonly show-button-bar="false"/>
                          <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="open2()"><i class="glyphicon glyphicon-calendar"></i></button>
                          </span>
                    </p>
                </div>
            </div>

            <div class="form-group">
                <label for="" class="control-label col-md-1">Photo</label>
                <div class="col-md-4">
                    <button ngf-select="uploadFiles($files, $invalidFiles)" accept="image/*" ngf-max-height="5000" ngf-max-size="5MB">Select Files</button>
                </div>
                <div class="col-md-12">
                    Files:
                    <div class="row">
                        <ul class="list-group">
                            <li ng-repeat="f in files" style="font:smaller" class="list-group-item">
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="col-sm-2">
                                            <img ngf-src="f.$ngfBlobUrl" class="thumbnail" width="100px" ngf-no-object-url="true">
                                            <span>{{f.name}} {{f.$errorParam}}</span>
                                        </div>
                                        <div class="col-sm-6">
                                            <div class="row">
                                                <div class="col-sm-8">
                                                    <div class="progress" ng-show="f.progress >= 0" ng-class="{cancel: uploadstatus == 1}">
                                                        <div ng-show="uploadstatus == 1">{{f.progressmsg}}</div>
                                                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
                                                             aria-valuemin="0" aria-valuemax="100" style="width:{{f.progress}}%" ng-show="uploadstatus != 1">
                                                            {{f.progress}}% Complete
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <button class="btn btn-danger" type="button" ng-click="abort()">cancel</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </div>

                            </li>
                            <li ng-repeat="f in errFiles" style="font:smaller" class="list-group-item">{{f.name}} {{f.$error}} {{f.$errorParam}}
                            </li>
                        </ul>
                    </div>
                    {{errorMsg}}
                </div>

                <!--                   for existing image-->
                <div class="clearfix"></div>
                <div class="row" ng-show="newnews.file_name" style="margin-left: 14px">
                    <div class="col-md-2">
                        <div class="thumbnail cus-thumb" ng-mouseover="showcaption=true" ng-mouseleave="showcaption=false">
                            <div class="caption" ng-show="showcaption">
                                <div id="content">
                                    <a href="" class="label label-warning" rel="tooltip" title="Show">Show</a>
                                    <a href="" class="label label-danger" rel="tooltip" title="delete" confirmed-click="deleteImage(newnews)" ng-confirm-click="Would you like to delete this item?!">delete</a>
                                </div>
                            </div>
                            <img src="{{newnews.thumbImgUrl}}" alt="thumbnails">
                        </div>
                    </div>
                </div>

                <div class="clearfix"></div>
            </div>
            <div class="form-group text-center">
                <button class="btn btn-primary" type="submit">Save</button>
                <button class="btn btn-danger" type="button" ng-click="hideForm()">Cancel</button>
            </div>
        </form>
        <div class="row">
            <form class="form-inline" ng-show="showtable">
                <div class="form-group">
                    <label for="" class="control-label col-md-2">Show</label>
                    <div class="col-md-3">
                        <select name="numPerPage" ng-model="numPerPage" class="form-control"
                                ng-options="num for num in paginations">{{num}}
                        </select>
                    </div>

                    <label class="control-label col-md-2">Search</label>
                    <div class="col-md-3">
                        <input type="text" ng-model="search" class="form-control" placeholder="Search">
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="help-block" ng-show="!showtable">{{message}}</div>
    <table class="table table-bordered" ng-show="showtable">
        <thead>
        <tr>
            <th>#</th>
            <th>Heading</th>
            <th>Content</th>
            <th>Date</th>
            <th>image</th>
            <th>action</th>
        </tr>
        </thead>
        <tbody>
        <tr dir-paginate="news in newses | filter:search | limitTo:pageSize | itemsPerPage:numPerPage">
            <td>{{$index+1}}</td>
            <td>{{news.heading}}</td>
            <td><p class="description" popover-placement="top" uib-popover="{{news.content}}" popover-trigger="'mouseenter'">{{news.content}}</p></td></td>
            <td><span ng-if="news.date!='0000-00-00'">{{news.date |date:'dd-MMM-yyyy'}}</span></td>
            <td><a href="{{news.imgUrl}}"><img class="img img-thumbnail" src="{{news.thumbImgUrl}}" alt="thumbnail" width="25px" height="25px"/></a></td>
            <td>
                <div  class="btn-group btn-group-xs" role="group">
                    <button type="button" class="btn btn-info" ng-click="showForm(news)">
                        <i class="fa fa-pencil"></i>
                    </button>
                    <button  type="button" class="btn btn-danger" confirmed-click="deleteNews(news)" ng-confirm-click="Would you like to delete this item?!">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
    <dir-pagination-controls
        max-size="10"
        direction-links="true"
        boundary-links="true" >
    </dir-pagination-controls>
</div>

<div id="loading" ng-show="loading">
    <div id="loading-image">
        <img src="<?php echo public_url() . 'assets/admin/img/loading.gif' ?>" alt=""/>
        <h4>Please wait...</h4>
    </div>
</div><file_sep>/application/views/team.php

        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li class="active"><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('Blog') ?>
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->
        
        <!--page title start-->
        <section class="page-title pattern-bg ptb-50">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <h2>Classic International</h2>
                <span>Our Professional Teams</span>
                <ol class="breadcrumb">
                    <li><a href="home">Home</a></li>
                    <li><a href="about">About Us</a></li>
                    <li class="active">Our Teams</li>
                </ol>
                    </div>
                </div>
            </div>
        </section>
        <!--page title end-->


        <section class="section-padding">
            <div class="container">

              <div class="text-center mb-80">
                  <h2 class="section-title text-uppercase">Our Team</h2>
                  <p class="section-sub">"Individual commitment to a group effort... That is what makes a Team work, a Company work, a Society work, a Civilization work."</p>
              </div>

              <div class="row">
                <div class="col-md-3" style="margin-left: 38%;">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/a1.jpg" class="img-responsive" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
              </div><!-- /.row -->
              <div class="mocup-wrapper text-center">
                  <img src="<?php echo public_url()?>assets/img/bg/inner.png" alt="image">
              </div>

              <div class="row">
                <div class="col-md-3" style="margin-left: 25%;">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/b1.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/b2.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
              </div><!-- /.row -->
              <div class="mocup-wrapper text-center">
                  <img src="<?php echo public_url()?>assets/img/bg/inner.png" alt="image">
              </div>

              <div class="row">
                <div class="col-md-3" style="margin-left: 13%;">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/c2.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/c3.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/c4.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
              </div><!-- /.row -->
              <div class="mocup-wrapper text-center">
                  <img src="<?php echo public_url()?>assets/img/bg/inner.png" alt="image">
              </div>

              <div class="row">
                <div class="col-md-3" style="margin-left: 25%;">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/d1.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/d2.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
              </div><!-- /.row -->
              <div class="mocup-wrapper text-center">
                  <img src="<?php echo public_url()?>assets/img/bg/inner.png" alt="image">
              </div>

              <div class="text-center mb-80">
                  <h2>Our Data Entry Operators</h2>
              </div>

              <div class="row">
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/e1.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/e2.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/e3.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/e4.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/e5.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
                <div class="col-md-3">
                  <div class="team-wrapper">
                      <div class="team-img">
                          <a href="#"><img src="<?php echo public_url()?>assets/img/teams/e6.jpg" class="img-responsive mw80" alt="Image"></a>
                      </div><!-- /.team-img -->

                      <ul class="team-social-links list-inline text-center">
                          <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                          <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                          <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                      </ul>
                  </div>
                </div>
              </div><!-- /.row -->

            </div><!-- /.container -->
        </section><file_sep>/application/views/admin/gallery.php
<div class="col-md-12" ng-class="{disable : loading} ">
    <div class="row" style="padding-left: 14px">
        <div class="box">
            <button class="btn btn-primary" ng-click="newGallery()"><i class="fa fa-plus"></i> Add</button>
            <form class="form-horizontal" method="POST" ng-submit="addGallery()" ng-show="showform" name="addform" enctype="multipart/form-data">
                <h3>New Gallery</h3>
                <div class="form-group">
                    <label for="" class="control-label col-md-1">Name</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" name="name" ng-model="newgallery.gallery_name" placeholder="special character Not allowed ( !@#$%^&*() )"/>
                    </div>
                    <label for="" class="control-label col-md-1">Description</label>
                    <div class="col-md-4">
                        <textarea class="form-control" name="description" ng-model="newgallery.description"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="control-label col-md-1">Photo</label>
                    <div class="col-md-4">
                        <button ngf-select="uploadFiles($files, $invalidFiles)"
                                accept="image/*"
                                ngf-max-height="5000"
                                ngf-max-size="5MB"
                                ngf-multiple="true">
                            Select Files
                        </button>
                        <span class="alert alert-danger" ng-show="fileValidation.status == true">{{fileValidation.msg}}</span>
                    </div>
                    <div class="col-md-12">
                        Files:
                        <div class="row">
                            <ul class="list-group">
                                <li ng-repeat="f in files" style="font:smaller" class="list-group-item">
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <div class="col-sm-2">
                                                <img ngf-src="f.$ngfBlobUrl" class="thumbnail" width="100px" ngf-no-object-url="true">
                                                <span>{{f.name}} {{f.$errorParam}}</span>
                                            </div>
                                            <div class="col-sm-6">
                                                <div class="row">
                                                    <div class="col-sm-8">
                                                        <div class="progress" ng-show="f.progress >= 0" ng-class="{cancel: uploadstatus == 1}">
                                                            <div ng-show="uploadstatus == 1">{{f.progressmsg}}</div>
                                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
                                                                 aria-valuemin="0" aria-valuemax="100" style="width:{{f.progress}}%" ng-show="uploadstatus != 1">
                                                                {{f.progress}}% Complete
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-4">
<!--                                                        <button class="btn btn-danger" type="button" ng-click="abort()">cancel</button>-->
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li class="bg-danger" ng-repeat="f in errFiles" style="font:smaller" class="list-group-item">{{f.name}} {{f.$error}} {{f.$errorParam}}
                                </li>
                            </ul>
                        </div>
                        <div class="row" ng-show="errorMsg">
                            <div class="alert alert-danger">
                                {{errorMsg}}
                            </div>
                        </div>
                    </div>
                    <span class="alert alert-warning">Image should be 100*100</span>

                    <!----for existing image----->
                    <div class="clearfix"></div>
                    <div class="row">
                        <div class="col-md-2" ng-repeat="(key,preview) in item_files">
                            <div class="thumbnail cus-thumb" ng-mouseover="showcaption=true" ng-mouseleave="showcaption=false" style="max-height: 142px;min-height: 142px">
                                <div class="caption" ng-show="showcaption">
                                    <div id="content">
                                        <a href="" class="label label-warning" rel="tooltip" title="Show">Show</a>
                                        <a href="" class="label label-danger" rel="tooltip" title="Delete" confirmed-click="deleteImage(preview)" ng-confirm-click="Would you like to delete this item?!">Delete</a>
                                    </div>
                                </div>
                                <img src="{{preview.thumbImgUrl}}" alt="thumbnails">
                            </div>
                        </div>
                    </div>

                    <div class="clearfix"></div>
                </div>
                <div class="container" ng-show="show_error">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="alert alert-danger alert-dismissable fade in ">
                                <a href="" class="close" data-dismiss="alert" arial-label="close">&times;</a>
                                <h4>following files are not uploaded</h4>
                                <p ng-repeat-start="err in error">{{err}}</p>
                                <hr ng-repeat-end />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group text-center">
                    <button class="btn btn-primary" type="submit">Save</button>
                    <button class="btn btn-danger" type="button" ng-click="hideForm()">Cancel</button>
                </div>
            </form>
        </div>
        <div class="clearfix"></div>
        <hr/>
        <div class="row">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-3" dir-paginate="gallery in galleries | filter:search | limitTo:pageSize | itemsPerPage:numPerPage">
                        <div class="cuadro_intro_hover thumbnail" style="background-color:#cccccc;">
                            <p style="text-align:center;">
                                <img class="img-responsive" style="cursor:pointer;" src="{{gallery.files[0].thumbImgUrl}}" alt="{{gallery.name}}" />
                            </p>
                            <div class="caption">
                                <div class="blur"></div>
                                <div class="caption-text">
                                    <h3 style="border-top:2px solid white; border-bottom:2px solid white; padding:10px;">{{gallery.gallery_name}}</h3>
                                    <p>{{gallery.description}}</p>
                                    <button type="button" style="color: initial;" class="btn btn-default" data-toggle="modal" data-target="#gallery" ng-click="showGalleryFiles(gallery)">Open</button>
                                    <button type="button" style="color: initial;" class="btn btn-info" ng-click="ShowForm(gallery)">edit</button>
                                    <button type="button" style="color: initial;" class="btn btn-danger" confirmed-click="deleteGallery(gallery)" ng-confirm-click="Would you like to delete this item?!">delete</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="pull-right">
                    <dir-pagination-controls
                        max-size="10"
                        direction-links="true"
                        boundary-links="true">
                    </dir-pagination-controls>
                </div>
                <div class="modal" id="gallery" role="dialog">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal">&times;</button>
                                <h4>{{galleryfiles.gallery_name}}</h4>
                            </div>
                            <div class="modal-body">
                                <div class="row">
                                    <div class="col-md-2" ng-repeat="file in galleryfiles.files">
                                        <div class="thumbnail img-responsive">
                                            <a href="{{file.imgUrl}}">
                                                <img src="{{file.thumbImgUrl}}" alt="{{file.file_name}}"/>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">close</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="loading" ng-show="loading">
    <div id="loading-image">
        <img src="<?php echo public_url() . 'assets/admin/img/loading.gif' ?>" alt=""/>
        <h4>Please wait...</h4>
    </div>
</div><file_sep>/application/controllers/Brochure_Controller.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 4/5/17
 * Time: 1:02 PM
 */

defined('BASEPATH') or exit('No Direct Script Access Allowed');
require_once(APPPATH . 'core/Check_Logged.php');

class Brochure_Controller extends Check_Logged
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('Brochures_Model', 'brochure');
        $this->load->model('Files_Model', 'file');

        $this->load->library(['upload', 'image_lib']);

        if (!$this->logged) {
            redirect(base_url('login'));
        }
    }

    function index()
    {

    }

    function get_all()
    {
        $data = $this->brochure->select();
        $this->output->set_content_type('application/json')->set_output(json_encode($data));
    }

    function store()
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('date', 'Date', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            $post_data = $this->input->post();
            $uploaded = json_decode($post_data['uploaded']);

            unset($post_data['uploaded']);

            if (!empty($uploaded)) {
                /*INSERT FILE DATA TO DB*/

                $file_data['file_name'] = $uploaded->file_name;
                $file_data['file_type'] = $uploaded->file_type;
                $file_data['size'] = $uploaded->file_size;
                $file_data['date'] = $this->input->post('date');

                $file_id = $this->file->add($file_data);

                $post_data['file_id'] = $file_id;
                if ($file_id and $this->brochure->add($post_data)) {
                    $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                }
            } else {
                $this->output->set_status_header(403, 'Validation Error');
                $this->output->set_content_type('application/json')->set_output(json_encode(['validation_error' => 'select any file']));
            }
        }
    }

    function update($id)
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('date', 'Date', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            if ($this->input->post('date') == '0000-00-00') {
                $date = null;
            }else{
                $date = $this->input->post('date');
            }

            $uploaded = json_decode($this->input->post('uploaded'));
            if (empty($uploaded)) {
                $data['name'] = $this->input->post('name');
                $data['subject'] = $this->input->post('subject');
                $data['date'] = $date;

                if ($this->brochure->edit($data,$id)) {
                    $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Updated']));
                } else {
                    $this->output->set_status_header(500, 'Server Down');
                    $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'server Down']));
                }
            } else {
                $file_data['file_name'] = $uploaded->file_name;
                $file_data['file_type'] = $uploaded->file_type;
                $file_data['size'] = $uploaded->file_size;
                $file_data['date'] = $date;

                $file_id = $this->file->add($file_data);
                if ($file_id) {
                    $data = [];
                    $data['name'] = $this->input->post('name');
                    $data['subject'] = $this->input->post('subject');
                    $data['date'] = $date;
                    $data['file_id'] = $file_id;
                    if ($this->brochure->edit($data, $id)) {
                        if ($this->input->post('file_id') != 'null') {
                            if ($this->file->remove($this->input->post('file_id'))) {
                                if (file_exists(getwdir() . 'uploads/' . $this->input->post('file_name'))) {
                                    unlink(getwdir() . 'uploads/' . $this->input->post('file_name'));
                                }
                            }
                            $this->output->set_content_type('application/json')->set_output(json_encode($data));
                        } else {
                            $this->output->set_content_type('application/json')->set_output(json_encode($data));
                        }
                    }else{
                        $this->output->set_status_header(402, 'Server Down');
                        $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Server Error']));
                    }
                }

            }
        }
    }

    function upload()
    {
        $config['upload_path'] = getwdir() . 'uploads';
        $config['allowed_types'] = 'pdf|docx|doc|xlsx|word|csv|odt|odp|ods';
        $config['max_size'] = 4096;
        $config['file_name'] = 'B_' . rand();
        $config['multi'] = 'ignore';
        $this->upload->initialize($config);
        if ($this->upload->do_upload('file')) {
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->data()));
        }else{
            $this->output->set_status_header(401, 'File Upload Error');
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->display_errors()));
        }
    }



    public function delete($id)
    {
        $brochure = $this->brochure->select_where(['id' => $id]);
        if ($this->brochure->remove($id)) {
            if ($this->file->remove($brochure[0]->file_id) && file_exists(getwdir() . 'uploads/' . $brochure[0]->file_name)) {
                unlink(getwdir() . 'uploads/' . $brochure[0]->file_name);
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Brochure Deleted']));
            } else {
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Brochure Deleted and file delete error']));
            }
        } else {
            $this->output->set_status_header(500, 'Server Down');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Delete Error']));
        }
    }


}<file_sep>/application/controllers/Helpful_Link_Controller.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 4/5/17
 * Time: 1:02 PM
 */

defined('BASEPATH') or exit('No Direct Script Access Allowed');
require_once(APPPATH . 'core/Check_Logged.php');

class Helpful_Link_Controller extends Check_Logged
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('Helpful_Links_Model', 'helpful_link');

        if (!$this->logged) {
            redirect(base_url('login'));
        }
    }

    function index()
    {

    }

    function get_all()
    {
        $data = $this->helpful_link->select();
        $this->output->set_content_type('application/json')->set_output(json_encode($data));
    }

    function store()
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('link', 'Link', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            $post_data = $this->input->post();
            if ($this->helpful_link->add($post_data)) {
                $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
            }
            else {
                $this->output->set_status_header(500, 'Server Down');
                $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Add error.Try again later']));
            }
        }
    }

    function update($id)
    {
        $this->form_validation->set_rules('name', 'Name', 'required');
        $this->form_validation->set_rules('link', 'Link', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            $data['name'] = $this->input->post('name');
            $data['link'] = $this->input->post('link');
            if ($this->helpful_link->edit($data, $id)) {
                $this->output->set_content_type('application/json')->set_output(json_encode($data));
            }else{
                $this->output->set_status_header(402, 'Server Down');
                $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Server Error']));
            }
        }
    }

    public function delete($id)
    {
        $helpful_link = $this->helpful_link->select_where(['id' => $id]);
        if ($helpful_link != FALSE) {
            if ($this->helpful_link->remove($id)) {
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Brochure Deleted.']));
            } else {
                $this->output->set_status_header(500, 'Server Down');
                $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Delete Error']));
            }
        }else{
            $this->output->set_status_header(404, 'Not found');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'The record Not found']));
        }
    }


}<file_sep>/application/views/service.php
        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li class="active"><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('Our Services') ?>
                            
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->


        <!--page title start-->
        <section class="page-title pattern-bg ptb-50">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <h2>Classic International</h2>
                <span>We Serve Your Needs</span>
                <ol class="breadcrumb">
                    <li><a href="#">Home</a></li>
                    <li class="active">Our Services</li>
                </ol>
                    </div>
                </div>
            </div>
        </section>
        <section id="count3" class="facts-two">
              <div class="container">

                  <div class="row text-center">
                      <div class="col-sm-3 counter-wrap">
                        <i class="material-icons brand-color">&#xE90F;</i>
                        <span class="timer">1545</span>
                        <span class="count-description">Client Work With Us</span>
                      </div> <!-- /.col-sm-3 -->

                      <div class="col-sm-3 counter-wrap">
                        <i class="material-icons brand-color">&#xE863;</i>
                        <span class="timer">535</span>
                        <span class="count-description">Years of Experience</span>
                      </div><!-- /.col-sm-3 -->

                      <div class="col-sm-3 counter-wrap">
                        <i class="material-icons brand-color">&#xE8F8;</i>
                        <span class="timer">1544</span>
                        <span class="count-description">Cups Of Coffee</span>
                      </div><!-- /.col-sm-3 -->

                      <div class="col-sm-3 counter-wrap">
                        <i class="material-icons brand-color">&#xE87E;</i>
                        <span class="timer">111</span>
                        <span class="count-description">Awards Won</span>
                      </div><!-- /.col-sm-3 -->
                  </div>
              </div><!-- /.container -->
        </section>
        <!--page title end-->
        <section class="section-padding banner-6 parallax-bg bg-fixed overlay light-9" data-stellar-background-ratio="0.5">
            <div class="container">

              <div class="text-center">
                  <h2 class="section-title text-uppercase">Our Services</h2>
                  <p class="section-sub">Classic International is Leading Typing and Translation Service Provider in India and Kuwait. Also We offer Health Insurances And Educational Insurances. </p>
              </div>
            </div><!-- /.container -->
        </section>

        <section id="services1" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-8">
                <h2 class="font-30 mb-30">Typing Services</h2>
                <p>
                  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                  tempor incididunt ut labore et dolore magna aliqua.
                </p>
                <div class="row">
                  <div class="col-md-6">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> English Arabic and Malayalam typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> All kind of Visa typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Passport, shuoonand civil id forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Medical and finger print office forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Indian/Pakistan embassy forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Different types of CV, bio data and all kind of documents typing </li>
                      </ul>
                  </div>
                  <div class="col-md-6">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> School admission and related forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> All kind of job applications typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Driving license application and related forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Marriage Affidavits, Relation/Non Relation Affidavits </li>
                          <li><i class="fa fa-check-square mr-10"></i> Employment Contracts for Servants/Maids </li>
                      </ul>
                  </div>
                </div>
              </div>
              <div class="col-md-4">
                  <img src="<?php echo public_url()?>assets/img/bg/typingServices.png" class="img-responsive animated slideInLeft" alt="Image">
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services2" class="padding-top-70 animated fadeInLeft">
          <div class="container">
            <div class="row">
              <div class="col-md-4">
                  <img src="<?php echo public_url()?>assets/img/bg/ministryHealth.png" class="img-responsive animated slideInRight mt-50" alt="Image">
              </div>
              <div class="col-md-8">
                <h2 class="font-30 mb-30">Services for Ministry of Health</h2>
                <p>
                  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                  tempor incididunt ut labore et dolore magna aliqua.
                </p>
                <div class="row">
                  <div class="col-md-8">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> Arrange Bio data in order as per ministry requirements </li>
                          <li><i class="fa fa-check-square mr-10"></i> Certificate attestation from all department in India </li>
                          <li><i class="fa fa-check-square mr-10"></i> Good conduct certificate from Nursing council in India and assisting you throughout the selection process </li>
                          <li><i class="fa fa-check-square mr-10"></i> Arabic Class (it will be conducted during processing time) </li>
                          <li><i class="fa fa-check-square mr-10"></i> Certificate verification from Ministry of Lower education and Ministry of Higher education of Kuwait. </li>
                          <li><i class="fa fa-check-square mr-10"></i> Submission for Civil service commission, Medical + Finger + Medical license's related processing Report submission </li>
                      </ul>
                  </div>
                  <div class="col-md-4">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> Passport submission  </li>
                          <li><i class="fa fa-check-square mr-10"></i> Getting appointment Order </li>
                          <li><i class="fa fa-check-square mr-10"></i> File closing </li>
                          <li><i class="fa fa-check-square mr-10"></i> File opening </li>
                          <li><i class="fa fa-check-square mr-10"></i> Bank account opening process  </li>
                          <li><i class="fa fa-check-square mr-10"></i> Salary Fixation(Budgeting) </li>
                      </ul>
                  </div>
                </div>
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services3" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-60">Services for Higher & Lower Education</h2>
                <p>
                  Certificate verification from Ministry of Lower education and Ministry of Higher education of Kuwait. We prepare online application, scanning and uploading your certificates, related to your qualification.
                </p>
              </div>
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/edu.png" class="img-responsive animated1 fadeInDownBig" alt="Image">
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services4" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/fingerprint.png" class="img-responsive animated slideInLeft" alt="Image">
              </div>
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-60">Medical Fingerprint Assists Services</h2>
                <p>
                  We can assist you to process your family's medical, finger prints and related reports.
                </p>
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services5" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-60">Insurance Services</h2>
                <p>
                  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                  tempor incididunt ut labore et dolore magna aliqua.
                </p>
                <div class="row">
                  <div class="col-md-12">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> For all your car insurance </li>
                          <li><i class="fa fa-check-square mr-10"></i> Industrial commercial and individual insurance needs…. </li>
                          <li><i class="fa fa-check-square mr-10"></i> c/o KIBB sulthan group  </li>
                      </ul>
                  </div>
                </div>
              </div>
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/insurance.png" class="img-responsive animated fadeInDownBig" alt="Image">
              </div>
            </div>
          </div><!-- /.container --><!--  -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services6" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/Health-Insurance.png" class="img-responsive animated fadeInDownBig" alt="Image">
              </div>
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-60">Health Insurance Services</h2>
                <p>
                  We provide you primary details from form filling and also help for money transactions until the final stage.
                </p>
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services7" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-60">Education Services</h2>
                <p>
                  We are sure to support your education plan by giving essential guidance for admission procedures .
                </p>
              </div>
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/Education.png" class="img-responsive animated fadeInDownBig" alt="Image">
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services8" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/transportation.png" class="img-responsive animated fadeInDownBig" alt="Image">
              </div>
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-60">Transportation services </h2>
                <p>
                  Wherever you plan to go, we will serve you by reserving and booking taxi services in Kuwait.
                </p>
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services9" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-80">Pan Card Services</h2>
                <p>
                  We will support you in your economic progress by issuing pan card.
                </p>
              </div>
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/pan.png" class="img-responsive animated fadeInDownBig" alt="Image" style="max-width: 80%;margin-bottom: 19px;">
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services10" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/air-tickets.png" class="img-responsive animated slideInLeft" alt="Image">
              </div>
              <div class="col-md-7">
                <h2 class="font-30 mb-30">Air Tickets and Related Services</h2>
                <p>
                  Whatever may be destination in your dream world, you can fly with us  bybooking cheap flight tickets to there with our price beat guarantee. Find exclusive student/youth fares and exciting Round The World tickets. From simple weekend getaways to complex travel that includes multiple destinations. Classic Travel handles every detail with efficiency, courtesy, and credibility while always keeping your needs, desires, and comfort in mind. Where in the world do you want to go? Depend on classic Travel to get you there while also satisfying your expectations.
                </p>
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services11" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-7">
                <h2 class="font-30 mb-30 mt-40">Courier Services</h2>
                <p>
                  We send mail by PROFESSIONAL Courier Service, hand to hand delivery all over the world within 72 working hours. We also send International Fax, Email, Attachment of Big document and any other electronic file; if you are looking for any of those services you can contact us immediately. We are ready to serve you.
                </p>
              </div>
              <div class="col-md-5">
                  <img src="<?php echo public_url()?>assets/img/bg/courier.png" class="img-responsive animated fadeInDownBig" alt="Image">
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <section id="services12" class="padding-top-70">
          <div class="container">
            <div class="row">
              <div class="col-md-4">
                  <img src="<?php echo public_url()?>assets/img/bg/mis.png" class="img-responsive animated fadeInLeftBig" alt="Image">
              </div>
              <div class="col-md-8">
                <h2 class="font-30 mb-30">Miscellaneous Services</h2>
                <p>
                  Ministry type & arrange by order bio data, certificate attestation from all department in India, Good conduct certificate from Nursing council in India and assisting you during and after selection.
                </p>
                <div class="row">
                  <div class="col-md-6">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> Photostat </li>
                          <li><i class="fa fa-check-square mr-10"></i> Color and black and white printing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Scanning and mailing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Health insurance </li>
                          <li><i class="fa fa-check-square mr-10"></i> Medical and finger print Service(Family Visa, Company Visa, Domestic Visa) </li>
                          <li><i class="fa fa-check-square mr-10"></i> English Arabic and Malayalam typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> All kind of job applications typing </li>
                      </ul>
                  </div>
                  <div class="col-md-6">
                      <ul class="check-circle-list">
                          <li><i class="fa fa-check-square mr-10"></i> Passport, shuoon and civil id forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Medical and finger print office forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Indian Pakistan embassy forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> School admission and related forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Driving license application and related forms typing </li>
                          <li><i class="fa fa-check-square mr-10"></i> Different types of CV and bio data typing </li>
                      </ul>
                  </div>
                </div>
              </div>
            </div>
          </div><!-- /.container -->
          <div class="mocup-wrapper text-center">
            <img src="<?php echo public_url()?>assets/img/bg/bottom.png" alt="image">
          </div>
        </section>

        <div class="text-center mt-80 mb-80">
            <h2 class="mb-30 text-uppercase">For any other queries. contact us here.</h2>
            <a href="#" class="btn btn-lg waves-effect waves-light" data-toggle="modal" data-target="#applayServices">Contact Support</a>
        </div>

<file_sep>/application/views/admin/helpful_links.php
<div class="col-md-12">
    <div class="row">
        <div class="box" style="margin-left: 14px;">
            <button class="btn btn-primary" ng-click="newLink()"><i class="fa fa-plus"></i> Add</button>
            <form class="form-horizontal" method="POST" ng-show="showform" ng-submit="addLink()">
                <h3>New Link</h3>
                <div class="form-group">
                    <label for="" class="control-label col-md-1">Name</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" name="name" ng-model="newlink.name" required=""/>
                    </div>
                    <label for="" class="control-label col-md-1">Link</label>
                    <div class="col-md-4">
                        <input class="form-control" type="text" ng-model="newlink.link" name="link" pattern="[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?" onblur="checkURL(this);" required=""/>
                    </div>
                </div>
                <div class="form-group text-center">
                    <button class="btn btn-primary" type="submit">Save</button>
                    <button class="btn btn-danger" type="button" ng-click="hideForm()">Cancel</button>
                </div>
            </form>
            <form class="form-inline" ng-show="showtable">
                <div class="form-group">
                    <label for="" class="control-label col-md-2">Show</label>
                    <div class="col-md-3">
                        <select name="numPerPage" ng-model="numPerPage" class="form-control"
                                ng-options="num for num in paginations">{{num}}
                        </select>
                    </div>

                    <label class="control-label col-md-2">Search</label>
                    <div class="col-md-3">
                        <input type="text" ng-model="search" class="form-control" placeholder="Search">
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="help-block" ng-show="!showtable">{{message}}</div>
    <table class="table table-bordered" ng-show="showtable">
        <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Link</th>
            <th>action</th>
        </tr>
        </thead>
        <tbody>
        <tr dir-paginate="link in links | filter:search | limitTo:pageSize | itemsPerPage:numPerPage">
            <td>{{$index+1}}</td>
            <td>{{link.name}}</td>
            <td>{{link.link}}</td>
            <td>
                <div  class="btn-group btn-group-xs" role="group">
                    <button type="button" class="btn btn-info" ng-click="showForm(link)">
                        <i class="fa fa-pencil"></i>
                    </button>
                    <button  type="button" class="btn btn-danger" confirmed-click="deleteLink(link)" ng-confirm-click="Would you like to delete this item?!">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
    <dir-pagination-controls
        max-size="10"
        direction-links="true"
        boundary-links="true" >
    </dir-pagination-controls>
</div>

<div id="loading" ng-show="loading">
    <div id="loading-image">
        <img src="<?php echo public_url() . 'assets/admin/img/loading.gif' ?>" alt=""/>
        <h4>Please wait...</h4>
    </div>
</div><file_sep>/application/controllers/Gallery_Controller.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 4/5/17
 * Time: 4:38 PM
 */


defined('BASEPATH') or exit('No Direct Script Access Allowed');
require_once(APPPATH . 'core/Check_Logged.php');

class Gallery_Controller extends Check_Logged
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('Galleries_Model', 'gallery');
        $this->load->model('Gallery_Files_Model', 'gallery_files');
        $this->load->model('Files_Model', 'file');

        $this->load->library(['upload', 'image_lib']);

        if (!$this->logged) {
            redirect(base_url('login'));
        }
    }

    function index()
    {

    }

    function get_all()
    {
        $data = $this->gallery_files->select();
        $this->output->set_content_type('application/json')->set_output(json_encode($data));
    }

    function store()
    {
        $this->form_validation->set_rules('gallery_name', 'Name', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            $post_data = $this->input->post();
            $uploaded = json_decode($post_data['uploaded']);

            unset($post_data['uploaded']);


            if (!empty($uploaded) ) {
                $gallery_id = $this->gallery->add($post_data);
                if ($gallery_id) {
                    /*INSERT FILE DATA TO DB*/
                    foreach ($uploaded as $value) {
                        $file_data['file_name'] = $value->file_name;
                        $file_data['file_type'] = $value->file_type;
                        $file_data['size'] = $value->file_size;
                        $file_data['date'] = date('Y-m-d');
                        $file_id = $this->file->add($file_data);

                        $gallery_files_data['gallery_id'] = $gallery_id;
                        $gallery_files_data['file_id'] = $file_id;

                        if ($this->gallery_files->add($gallery_files_data)) {
                            /*****Create Thumb Image****/
                            $img_cfg['source_image'] = getwdir() . 'uploads/' . $value->file_name;
                            $img_cfg['maintain_ratio'] = TRUE;
                            $img_cfg['new_image'] = getwdir() . 'uploads/thumb/thumb_' . $value->file_name;
                            $img_cfg['quality'] = 99;
                            $img_cfg['master_dim'] = 'height';

                            $this->image_lib->initialize($img_cfg);
                            if (!$this->image_lib->resize()) {
                                $resize_error[] = $this->image_lib->display_errors();
                            }
                            $this->image_lib->clear();

                            /********End Thumb*********/

                            /*resize and create thumbnail image*/
                            if ($value->file_size > 1024) {
                                $img_cfg['image_library'] = 'gd2';
                                $img_cfg['source_image'] = getwdir() . 'uploads/' . $value->file_name;
                                $img_cfg['maintain_ratio'] = TRUE;
                                $img_cfg['new_image'] = getwdir() . 'uploads/' . $value->file_name;
                                $img_cfg['height'] = 500;
                                $img_cfg['quality'] = 100;
                                $img_cfg['master_dim'] = 'height';

                                $this->image_lib->initialize($img_cfg);
                                if (!$this->image_lib->resize()) {
                                    $resize_error[] = $this->image_lib->display_errors();
                                }
                                $this->image_lib->clear();

                                /********End resize*********/
                            }
                        }
                        $resize_error = [];
                        if (empty($resize_error)) {
                            $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                        } else {
//                            $this->output->set_status_header(402, 'Server Down');
                            $this->output->set_content_type('application/json')->set_output(json_encode($resize_error));
                        }
                    }
                }
            } else {
                $this->output->set_status_header(400, 'Validation Error');
                $this->output->set_content_type('application/json')->set_output(json_encode(['validation_error' => 'Please select images.']));
            }
        }
    }

    function update($id){
        $this->form_validation->set_rules('gallery_name', 'Name', 'required');
        if ($this->form_validation->run() === FALSE) {
            $this->output->set_status_header(400, 'Validation Error');
            $this->output->set_content_type('application/json')->set_output(json_encode(validation_errors()));
        } else {
            $post_data = $this->input->post();
            $uploaded = json_decode($post_data['uploaded']);
            unset($post_data['uploaded']);
            unset($post_data['files']);

            if ($this->gallery->edit($post_data,$id)) {
                if (!empty($uploaded)) {
                    /*INSERT FILE DATA TO DB*/
                    foreach ($uploaded as $value) {
                        $file_data['file_name'] = $value->file_name;
                        $file_data['file_type'] = $value->file_type;
                        $file_data['size'] = $value->file_size;
                        $file_data['date'] = $this->input->post('date');
                        $file_id = $this->file->add($file_data);

                        $gallery_files_data['gallery_id'] = $id;
                        $gallery_files_data['file_id'] = $file_id;

                        if ($this->gallery_files->add($gallery_files_data)) {
                            /*****Create Thumb Image****/
                            $img_cfg['source_image'] = getwdir() . 'uploads/' . $value->file_name;
                            $img_cfg['maintain_ratio'] = TRUE;
                            $img_cfg['new_image'] = getwdir() . 'uploads/thumb/thumb_' . $value->file_name;
                            $img_cfg['quality'] = 99;
                            $img_cfg['master_dim'] = 'height';

                            $this->image_lib->initialize($img_cfg);
                            if (!$this->image_lib->resize()) {
                                $resize_error[] = $this->image_lib->display_errors();
                            }
                            $this->image_lib->clear();

                            /********End Thumb*********/

                            /*resize and create thumbnail image*/
                            if ($value->file_size > 1024) {
                                $img_cfg['image_library'] = 'gd2';
                                $img_cfg['source_image'] = getwdir() . 'uploads/' . $value->file_name;
                                $img_cfg['maintain_ratio'] = TRUE;
                                $img_cfg['new_image'] = getwdir() . 'uploads/' . $value->file_name;
                                $img_cfg['height'] = 500;
                                $img_cfg['quality'] = 100;
                                $img_cfg['master_dim'] = 'height';

                                $this->image_lib->initialize($img_cfg);
                                if (!$this->image_lib->resize()) {
                                    $resize_error[] = $this->image_lib->display_errors();
                                }
                                $this->image_lib->clear();

                                /********End resize*********/
                            }
                        }
                        $resize_error = [];
                        if (empty($resize_error)) {
                            $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                        } else {
                            $this->output->set_content_type('application/json')->set_output(json_encode($resize_error));
                        }
                    }
                } else {
                    $this->output->set_content_type('application/json')->set_output(json_encode($post_data));
                }
            } else {
                $this->output->set_status_header(500, 'Server Down');
                $this->output->set_content_type('application/json')->set_output(json_encode(['validation_error' => 'Please select images.']));
            }
        }
    }


    function delete_image($id)
    {

        $gallery_files = $this->gallery_files->select_gl_fl_where(['gallery_files.id' => $id]);

        if ($this->file->remove($gallery_files[0]->file_id) AND $this->gallery_files->remove($gallery_files[0]->id)) {
                if (file_exists(getwdir() . 'uploads/' . $gallery_files[0]->file_name)) {
                    unlink(getwdir() . 'uploads/' . $gallery_files[0]->file_name);
                }
                $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Image Delete']));
        }else{
            $this->output->set_status_header(400, 'Server Down');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Try again later']));
        }
    }

    function upload()
    {
        $config['upload_path'] = getwdir() . 'uploads';
        $config['allowed_types'] = 'jpg|png|jpeg|JPG|JPEG';
        $config['max_size'] = 4096;
        $config['file_name'] = 'G_' . rand();
        $config['multi'] = 'ignore';
        $this->upload->initialize($config);
        if ($this->upload->do_upload('file')) {
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->data()));
        }else{
            $this->output->set_status_header(401, 'File Upload Error');
            $this->output->set_content_type('application/json')->set_output(json_encode($this->upload->display_errors()));
        }
    }



    public function delete($id)
    {
        $gallery_files = $this->gallery_files->select_where($id);
        if ($gallery_files) {
            if (!empty($gallery_files[0]->files)) {
                foreach ($gallery_files[0]->files as $file) {
                    if ($this->gallery_files->remove($file->id)) {
                        if ($this->file->remove($file->file_id) && file_exists(getwdir() . 'uploads/' . $file->file_name)) {
                            unlink(getwdir() . 'uploads/' . $file->file_name);
                            $status = 1;
                        } else {
                            $status = 0;
                        }
                    }
                }
                if ($status == 1) {
                    if ($this->gallery->remove($id)) {
                        $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Gallery Deleted']));
                    }
                } elseif ($status == 0) {
                    $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Gallery not deleted but some files are deleted']));
                }

            } else {
                if ($this->gallery->remove($id)) {
                    $this->output->set_content_type('application/json')->set_output(json_encode(['msg' => 'Gallery Deleted']));
                } else {
                    $this->output->set_status_header(500, 'Server Down');
                    $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'Delete Error']));
                }
            }
        } else {
            $this->output->set_status_header(500, 'Server Down');
            $this->output->set_content_type('application/json')->set_output(json_encode(['error' => 'The Record Not found']));
        }
    }


}<file_sep>/application/views/templates/header.php
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="Classic International is Leading Typing and Translation Service Provider in India and Kuwait. Also We offer Health Insurances and Educational Insurances">
        <meta name="keywords" content="Typing services, Services for Ministry of health, Services for higher & lower education, Medical finger print assists services, Health insurance services, Education services, Transportation services, Pan card services, Air tickets and related services, Courier services, Services in Kuwait">
        <meta name="author" content="Psybo Technologies">

        <title>Home | Classic International</title>

        <!--  favicon -->
        <link rel="shortcut icon" href="<?php echo public_url()?>assets/img/favicon.png">
        <!--  apple-touch-icon -->
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo public_url()?>assets/img/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo public_url()?>assets/img/ico/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo public_url()?>assets/img/ico/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="<?php echo public_url()?>assets/img/ico/apple-touch-icon-57-precomposed.png">

        <link href='https://fonts.googleapis.com/css?family=Raleway:400,300,500,700,900' rel='stylesheet' type='text/css'>
        <!-- FontAwesome CSS -->
        <link href="<?php echo public_url()?>assets/fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <!-- Material Icons CSS -->
        <link href="<?php echo public_url()?>assets/fonts/iconfont/material-icons.css" rel="stylesheet">
        <!-- magnific-popup -->
        <link href="<?php echo public_url()?>assets/magnific-popup/magnific-popup.css" rel="stylesheet">
        <!-- owl.carousel -->
        <link href="<?php echo public_url()?>assets/owl.carousel/assets/owl.carousel.css" rel="stylesheet">
        <link href="<?php echo public_url()?>assets/owl.carousel/assets/owl.theme.default.min.css" rel="stylesheet">
        <!-- flexslider -->
        <link href="<?php echo public_url()?>assets/flexSlider/flexslider.css" rel="stylesheet">
        <!-- materialize -->
        <link href="<?php echo public_url()?>assets/materialize/css/materialize.min.css" rel="stylesheet">
        <!-- Bootstrap -->
        <link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet">
        <!-- shortcodes -->
        <link href="<?php echo public_url()?>assets/css/shortcodes/shortcodes.css" rel="stylesheet">
        <!-- Style CSS -->
        <link href="<?php echo public_url()?>assets/css/style.css" rel="stylesheet">

        <!-- RS5.0 Main Stylesheet -->
        <link rel="stylesheet" type="text/css" href="<?php echo public_url()?>assets/revolution/css/settings.css">
        <!-- RS5.0 Layers and Navigation Styles -->
        <link rel="stylesheet" type="text/css" href="<?php echo public_url()?>assets/revolution/css/layers.css">
        <link rel="stylesheet" type="text/css" href="<?php echo public_url()?>assets/revolution/css/navigation.css">

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>

    <body id="top" class="has-header-search">

        <!-- Top bar -->
        <div class="top-bar dark-bg lighten-2 visible-md visible-lg">
          <div class="container">
            <div class="row">
                <div class="col-md-6 text-left">
                <ul class="topbar-cta no-margin">
                  <li class="mr-20">
                    <a><i class="material-icons mr-10">&#xE0B9;</i><EMAIL></a>
                  </li>
                  <li>
                    <a><i class="material-icons mr-10">&#xE0CD;</i> 99 530 177</a>
                  </li>
                </ul>
              </div>
              <!-- Social Icon -->
              <div class="col-md-6 text-right">
                <!-- Social Icon -->
                <ul class="list-inline social-top tt-animate btt">
                  <li><a href="https://www.facebook.com/ClassicInternational" target="_blank"><i class="fa fa-facebook"></i></a></li>
                  <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                  <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                  <li class="link"><a class="thm-btn" href="#" data-toggle="modal" data-target="#applayServices">get a quote</a></li>
<!--                  <li class="link hide" id="status"><a class="thm-btn" href="#">Sending...</a></li>-->
<!--                  <li class="link hide"><a class="thm-btn" href="#">Sent</a></li>-->
                </ul>
               <!--  <div class="link">
                    <a href="#" class="thm-btn">get a quote</a>
                </div> -->
              </div>

              
            </div><!-- /.row -->
          </div><!-- /.container -->
        </div><!-- /.top-bar -->
<file_sep>/application/views/gallery.php
        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li class="active"><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('Moments') ?>
                            
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->


        <!--page title start-->
        <section class="page-title pattern-bg ptb-50">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <h2>Classic International</h2>
                <span>Life is not made up of minutes, hours, days, weeks, months, or years, but of moments.</span>
                <ol class="breadcrumb">
                    <li><a href="#">Home</a></li>
                    <li class="active">Our Moments</li>
                </ol>
                    </div>
                </div>
            </div>
        </section>
        <!--page title end-->


        <section class="section-padding">
            <div class="text-center mb-50">
                <h2 class="section-title text-uppercase">Our Moments</h2>
                <!-- <p class="section-sub">Quisque non erat mi. Etiam congue et augue sed tempus. Aenean sed ipsum luctus, scelerisque ipsum nec, iaculis justo. Sed at vestibulum purus, sit amet vived at vestibulum purus erra at vestibulum purus diam. Nulla ac nisi rhoncus,</p> -->
            </div>


            <div class="portfolio-container text-center">


                <div class="portfolio col-4 mtb-50">
                    <!-- add "gutter" class for add spacing -->
                    <?php
                    if (isset($gallery) and $gallery != false) {
                        foreach ($gallery as $value) {
                            ?>
                            <div class="portfolio-item">
                                <div class="portfolio-wrapper">
                                    <div class="thumb">
                                        <div class="bg-overlay"></div>
                                        <div class="portfolio-slider" data-direction="vertical">
                                            <ul class="slides">
                                                <?php
                                                foreach ($value->files as $file) { ?>
                                                    <li>
                                                        <a href="<?php echo $file->imgUrl ?>" title="materialize Unique Design">
                                                            <img src="<?php echo $file->imgUrl ?>" alt="">
                                                        </a>
                                                    </li>
                                                <?php } ?>
                                            </ul>
                                        </div>
                                        <div class="portfolio-intro">
                                            <div class="action-btn">
                                                <a href="#"> <i class="fa fa-search"></i> </a>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- thumb -->
                                </div>
                                <!-- /.portfolio-wrapper -->
                            </div><!-- /.portfolio-item -->
                        <?php
                        }
                    }?>



                </div><!-- /.portfolio -->

            </div><!-- portfolio-container -->
        </section>
<file_sep>/application/config/routes.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
|	$route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples:	my-controller/index	-> my_controller/index
|		my-controller/my-method	-> my_controller/my_method

*/
$route['default_controller'] = 'Home';
$route['login'] = 'Home/login';

/****HOME ROUTES START******/

$route['home'] = 'Home/index';
$route['about'] = 'Home/about';
$route['team'] = 'Home/team';
$route['services'] = 'Home/service';
$route['moments'] = 'Home/moments';
$route['blog'] = 'Home/blog';
$route['blogView/(:num)'] = 'Home/blogView/$1';
$route['contact'] = 'Home/contact';
$route['subscribe'] = 'Home/subscribe';
$route['request-quote'] = 'Home/request_quote';
$route['appointment-request'] = 'Home/appointment_request';
$route['contact-request'] = 'Home/contact_request';




$route['test'] = 'Home/test';
/****HOME ROUTES END******/

/****ADMIN******/
$route['admin'] = 'Dashboard';
$route['login/verify'] = 'Dashboard/verify';
$route['logout'] = 'Dashboard/logout';
$route['admin/check-thumb'] = 'Dashboard/thumbnail_check';
$route['admin/user'] = 'Dashboard/get_user';

$route['admin/change'] = 'Dashboard/change_profile';
$route['admin/change/submit'] = 'Dashboard/edit_profile';

/*NEWS*/
$route['admin/news'] = 'Dashboard/news';
$route['admin/news/get-all'] = 'News_Controller/get_all';
$route['admin/news/add'] = 'News_Controller/store';
$route['admin/news/edit/(:num)'] = 'News_Controller/update/$1';
$route['admin/news/upload'] = 'News_Controller/upload';
$route['admin/news/delete-image/(:num)'] = 'News_Controller/delete_image/$1';
$route['admin/news/delete/(:num)'] = 'News_Controller/delete/$1';

/*BROCHURE*/
$route['admin/brochures'] = 'Dashboard/brochure';
$route['admin/brochure/get-all'] = 'Brochure_Controller/get_all';
$route['admin/brochure/add'] = 'Brochure_Controller/store';
$route['admin/brochure/edit/(:num)'] = 'Brochure_Controller/update/$1';
$route['admin/brochure/upload'] = 'Brochure_Controller/upload';
$route['admin/brochure/delete-image/(:num)'] = 'Brochure_Controller/delete_image/$1';
$route['admin/brochure/delete/(:num)'] = 'Brochure_Controller/delete/$1';

/*HELPFUL-LINKS*/
$route['admin/helpful-links'] = 'Dashboard/helpful_link';
$route['admin/helpful-link/get-all'] = 'Helpful_Link_Controller/get_all';
$route['admin/helpful-link/add'] = 'Helpful_Link_Controller/store';
$route['admin/helpful-link/edit/(:num)'] = 'Helpful_Link_Controller/update/$1';
$route['admin/helpful-link/delete/(:num)'] = 'Helpful_Link_Controller/delete/$1';

/*GALLERY*/
$route['admin/gallery'] = 'Dashboard/gallery';
$route['admin/gallery/get-all'] = 'Gallery_Controller/get_all';
$route['admin/gallery/add'] = 'Gallery_Controller/store';
$route['admin/gallery/edit/(:num)'] = 'Gallery_Controller/update/$1';
$route['admin/gallery/upload'] = 'Gallery_Controller/upload';
$route['admin/gallery/delete-image/(:num)'] = 'Gallery_Controller/delete_image/$1';
$route['admin/gallery/delete/(:num)'] = 'Gallery_Controller/delete/$1';


/*SLIDE IMAGE*/
$route['admin/slide-images'] = 'Dashboard/slide_image';
$route['admin/slide-images/get-all'] = 'Slide_Image_Controller/get_all';
$route['admin/slide-images/upload'] = 'Slide_Image_Controller/upload';
$route['admin/slide-images/add'] = 'Slide_Image_Controller/store';
$route['admin/slide-images/delete/(:num)'] = 'Slide_Image_Controller/delete/$1';

/*BLOG*/
$route['admin/blog'] = 'Dashboard/blog';
$route['admin/blog/get-all'] = 'Blog_Controller/get_all';
$route['admin/blog/add'] = 'Blog_Controller/store';
$route['admin/blog/edit/(:num)'] = 'Blog_Controller/update/$1';
$route['admin/blog/upload'] = 'Blog_Controller/upload';
$route['admin/blog/delete-image/(:num)'] = 'Blog_Controller/delete_image/$1';
$route['admin/blog/delete/(:num)'] = 'Blog_Controller/delete/$1';


$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
<file_sep>/application/views/blogView.php

        <!--header start-->
        <header id="header" class="tt-nav nav-border-bottom">
            <div class="header-sticky light-header ">
                <div class="container">
                    <div class="search-wrapper">
                        <div class="search-trigger pull-right">
                            <div class='search-btn'></div>
                            <i class="material-icons">&#xE8B6;</i>
                        </div>
                        <!-- Modal Search Form -->
                        <i class="search-close material-icons">&#xE5CD;</i>
                        <div class="search-form-wrapper">
                            <form action="#" class="white-form">
                                <div class="input-field">
                                    <input type="text" name="search" id="search">
                                    <label for="search" class="">Search Here...</label>
                                </div>
                                <button class="btn pink search-button waves-effect waves-light" type="submit"><i class="material-icons">&#xE8B6;</i></button>  
                            </form>
                        </div>
                    </div><!-- /.search-wrapper -->

                    <div id="materialize-menu" class="menuzord">
                        <!--logo start-->
                        <a href="home" class="logo-brand">
                            <img src="<?php echo public_url()?>assets/img/logo.png" alt="" >
                        </a>
                        <!--logo end-->
                        <!--mega menu start-->
                        <ul class="menuzord-menu pull-right">
                            <!-- <li><a href="index.html">Home</a></li>
                            <li><a href="about.html">About Us</a></li>
                            <li><a href="service.html">Our Services</a></li>
                            <li><a href="gallery.html">Moments</a></li>
                            <li class="active"><a href="blog.html">Blog</a></li>
                            <li><a href="contact.html">Contact Us</a></li> -->
                            <?php echo menu('Blog') ?>
                        </ul>
                        <!--mega menu end-->
                    </div>
                </div>
            </div>
        </header>
        <!--header end-->

        <!--page title start-->
        <section class="page-title pattern-bg ptb-50">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                <h2>Classic International</h2>
                <span>Our Blog Page</span>
                <ol class="breadcrumb">
                    <li><a href="home">Home</a></li>
                    <li><a href="index">Blog</a></li>
                    <li class="active">Blog View</li>
                </ol>
                    </div>
                </div>
            </div>
        </section>
        <!--page title end-->


        <!-- blog section start -->
        <section class="blog-section section-padding">
            <div class="container">
                <div class="row">
                    <div class="col-md-8">
                        <?php
                        if (isset($blog) and $blog != FALSE) {
                            ?>
                            <div class="posts-content single-post">

                                <article class="post-wrapper">

                                    <header class="entry-header-wrapper clearfix">

                                        <div class="entry-header">
                                            <h2 class="entry-title"><?php echo $blog[0]->heading ?></h2>

                                            <div class="entry-meta">
                                                <ul class="list-inline">
                                                    <li>
                                                        <i class="fa fa-clock-o"></i><a href="#"><?php echo date('M d, Y',strtotime($blog[0]->date)) ?></a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <!-- .entry-meta -->
                                        </div>

                                    </header>
                                    <!-- /.entry-header-wrapper -->

                                    <div class="thumb-wrapper">
                                        <img src="<?php echo $blog[0]->imgUrl?>"
                                             class="img-responsive" alt="">
                                    </div>
                                    <!-- .post-thumb -->


                                    <div class="entry-content">
                                        <p><?php echo $blog[0]->content ?></p>
                                    </div>
                                    <!-- .entry-content -->

                                </article>
                                <!-- /.post-wrapper -->


                            </div><!-- /.posts-content -->
                        <?php
                        }
                        ?>
                    </div><!-- /.col-md-8 -->

                    <div class="col-md-4">
                      <div class="tt-sidebar-wrapper" role="complementary">
                          <div class="widget widget_search">
                            <form role="search" method="get" class="search-form" >
                              <input type="text" class="form-control" value="" name="s" id="s" placeholder="Write any keywords">
                              <button type="submit"><i class="fa fa-search"></i></button>
                            </form>
                          </div><!-- /.widget_search -->


                          <div  class="widget widget_tt_popular_post">
                            <div class="tt-popular-post border-bottom-tab">
                                <!-- Nav tabs -->
                                <ul class="nav nav-tabs">
                                    <li class="active">
                                        <a href="#tt-popular-post-tab1" data-toggle="tab" aria-expanded="true">Latest</a>
                                    </li>
                                </ul>

                                <!-- Tab panes -->
                                <div class="tab-content">
                                    <!-- latest post tab -->
                                    <div id="tt-popular-post-tab1" class="tab-pane fade active in">
                                        <?php
                                        if (isset($blog_latest) and $blog_latest != FALSE) {
                                            foreach ($blog_latest as $blog) {
                                                ?>
                                                <div class="media">
                                                    <a class="media-left" href="<?php echo base_url() . 'blogView/'.$blog->id ?>">
                                                        <img
                                                            src="<?php echo $blog->imgUrl ?>"
                                                            alt="">
                                                    </a>

                                                    <div class="media-body">
                                                        <h4><a href="<?php echo base_url() . 'blogView/'.$blog->id ?>"><?php echo $blog->heading ?></a></h4>
                                                    </div>
                                                    <!-- /.media-body -->
                                                </div> <!-- /.media -->
                                            <?php
                                            }
                                        }?>
                                    </div>

                                </div><!-- /.tab-content -->
                            </div><!-- /.tt-popular-post -->
                          </div><!-- /.widget_tt_popular_post -->



        
                      </div><!-- /.tt-sidebar-wrapper -->
                    </div><!-- /.col-md-4 -->

                  </div><!-- /.row -->
                  <nav class="single-post-navigation" role="navigation">
                          <div class="row">
                            <!-- Previous Post -->
                            <div class="col-xs-4">
                              <div class="previous-post-link">
                                <a class="waves-effect waves-light" href="#"><i class="fa fa-long-arrow-left"></i>Read Previous Post</a>
                              </div>
                            </div>

                            <!-- Back -->
                            <div class="col-xs-4">
                              <div class="previous-post-link">
                                <a class="waves-effect waves-light" href="blog"><i class="fa fa-home"></i>Back To Blog</a>
                              </div>
                            </div>

                            <!-- Next Post -->
                            <div class="col-xs-4">
                              <div class="next-post-link">
                                <a class="waves-effect waves-light" href="#">Read Next Post<i class="fa fa-long-arrow-right"></i></a>
                              </div>
                            </div>

                          </div> <!-- .row -->
                        </nav>
            </div><!-- /.container -->

                        
        </section>
        <!-- blog section end --><file_sep>/application/models/Slide_Image_Model.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 25/4/17
 * Time: 4:44 PM
 */


defined('BASEPATH') or exit ('No direct script access allowed');
require_once APPPATH . 'core/My_Model.php';

class Slide_Image_Model extends My_Model
{

    protected $table = 'slide_images';

    function __construct()
    {
        parent::__construct();
    }

    public function select($limit="", $order="")
    {
        $this->db->from($this->table);
        if ($limit != "") {
            $this->db->limit($limit);
        }
        if ($order != "") {
            $this->db->order_by('id', $order);
        }

        $result = $this->db->get();
        if ($result->num_rows() > 0) {
            $data = $result->result();
            foreach ($data as $value) {
                if ($value->file_id != null) {
                    $query = $this->db->get_where('files', ['id' => $value->file_id]);
                    if ($query->num_rows() > 0) {
                        $file = $query->result();
                        $value->file_name = $file[0]->file_name;
                        $value->file_type = $file[0]->file_type;
                        $value->imgUrl = public_url() . 'uploads/' . $file[0]->file_name;
                    }
                }
            }
            return $data;
        }else
            return FALSE;
    }

    public function select_where($where)
    {
        $this->db->from($this->table);
        $this->db->where($where);
        $result = $this->db->get();
        if ($result->num_rows() > 0) {
            $data = $result->result();
            foreach ($data as $value) {
                if ($value->file_id != null) {
                    $query = $this->db->get_where('files', ['id' => $value->file_id]);
                    if ($query->num_rows() > 0) {
                        $file = $query->result();
                        $value->file_name = $file[0]->file_name;
                        $value->file_type = $file[0]->file_type;
                        $value->imgUrl = public_url() . 'uploads/' . $file[0]->file_name;
                        $value->thumbImgUrl = public_url() . 'uploads/thumb/thumb_' . $file[0]->file_name;
                    }
                }
            }
            return $data;
        }else
            return FALSE;
    }

    public function add($data)
    {
        return $this->insert($data);
    }

    public function edit($data, $id)
    {
        return $this->update($data, $id);
    }

    public function remove($id)
    {
        return $this->drop($id);
    }

    public function trunc()
    {
        return $this->truncate();
    }
}

<file_sep>/application/models/Blog_Model.php
<?php
/**
 * Created by PhpStorm.
 * User: psybo-03
 * Date: 25/4/17
 * Time: 4:52 PM
 */


defined('BASEPATH') or exit ('No direct script access allowed');
require_once APPPATH . 'core/My_Model.php';

class Blog_Model extends My_Model
{

    protected $table = 'blogs';

    function __construct()
    {
        parent::__construct();
    }

    public function select($limit = "", $order = "")
    {
//        $this->db->select($this->fields);
        $this->db->from($this->table);
        if ($limit != "") {
            $this->db->limit($limit);
        }
        if ($order != "") {
            $this->db->order_by('id', $order);
        }

        $result = $this->db->get();
        if ($result->num_rows() > 0) {
            $data = $result->result();
            foreach ($data as $value) {
                if ($value->file_id != null) {
                    $query = $this->db->get_where('files', ['id' => $value->file_id]);
                    if ($query->num_rows() > 0) {
                        $file = $query->result();
                        $date = strtotime($value->date);
                        $value->day = date('d',$date);
                        $value->month = date('M',$date);
                        $value->file_name = $file[0]->file_name;
                        $value->file_type = $file[0]->file_type;
                        $value->imgUrl = public_url() . 'uploads/' . $file[0]->file_name;
                        $value->thumbImgUrl = public_url() . 'uploads/thumb/thumb_' . $file[0]->file_name;
                    }
                }
            }
            return $data;
        }else
            return FALSE;
    }

    public function select_where(array $where)
    {
        $this->db->from($this->table);
        $this->db->where($where);
        $result = $this->db->get();
        if ($result->num_rows() > 0) {
            $data = $result->result();
            foreach ($data as $value) {
                if ($value->file_id != null) {
                    $query = $this->db->get_where('files', ['id' => $value->file_id]);
                    if ($query->num_rows() > 0) {
                        $file = $query->result();
                        $date = strtotime($value->date);
                        $value->day = date('d',$date);
                        $value->month = date('M',$date);

                        $value->file_name = $file[0]->file_name;
                        $value->file_type = $file[0]->file_type;
                        $value->imgUrl = public_url() . 'uploads/' . $file[0]->file_name;
                        $value->thumbImgUrl = public_url() . 'uploads/thumb/thumb_' . $file[0]->file_name;
                    }
                }
            }
            return $data;
        }else
            return FALSE;
    }

    public function add($data)
    {
        return $this->insert($data);
    }

    public function edit($data, $id)
    {
        return $this->update($data, $id);
    }

    public function remove($id)
    {
        return $this->drop($id);
    }

    public function trunc()
    {
        return $this->truncate();
    }
}

