public function post_pricing_view()
 {
     $price = QuotationPriceAdjustments::find(URI::Segment(4));
     $update_layout = array('friendly_name' => trim(Input::get('friendly_name')), 'note' => trim(Input::get('note')));
     $price->update($price->id, $update_layout);
     return Redirect::to('/user/quotations/pricing_view/' . $price->id)->with('success', 'Update successfull');
 }
 public function __construct()
 {
     $this->filter('before', array('admin'));
     $this->filter('before', array('valid_page'))->except(array('index', 'create'));
     if (is_numeric(URI::Segment(4))) {
         $this->page_id = URI::Segment(4);
     }
 }
 public function __construct()
 {
     $this->filter('before', array('admin'));
     if (is_numeric(URI::Segment(4))) {
         $this->studio_id = URI::Segment(4);
         $this->layout_id = URI::segment(4);
     }
 }
 public function __construct()
 {
     if (is_numeric(URI::Segment(3))) {
         $this->layout_id = URI::Segment(3);
     }
 }
"><a href="/faqs">FAQ's</a></li>
                <li class="<?php 
    if (URI::Segment(1) == 'contact') {
        ?>
active<?php 
    }
    ?>
"><a href="/contact">Contact Us</a></li>
              </ul>
            </div><!-- /.navbar-collapse -->
          </div>
        </nav><?php 
}
?>
        <?php 
if (URI::Segment(1) == 'user') {
    ?>
<div class="main-margin"></div><?php 
}
?>
        <main role="main" id="main">
          @yield('content') 
        </main>
      </div>
    </div>

    <footer class="footer">
      <div class="container">
        <div class="strapline">
          <p class="strapline-top">The UK's no.1 supplier of</p>
          <p class="strapline-bottom">Zero maintenance &</p>
 public function post_removeimage()
 {
     $image_id = URI::Segment(4);
     $image = Image::find($image_id);
     $gallery = Image::find($image_id)->gallery()->first();
     // delete post
     $image->delete();
     return Redirect::to('user/galleries/view/' . $gallery->id)->with('success', 'The image has been removed from the gallery.');
 }
    ?>
active<?php 
}
?>
" href="#" data-toggle="dropdown">Quotating <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <!-- to do - make dynamic -->
                    <li><a class="<?php 
if (URI::Segment(3) == 'pricing') {
    ?>
active<?php 
}
?>
" href="/user/quotations/pricing/">Pricing</a></li>
                    <li><a class="<?php 
if (URI::Segment(3) == 'quotes') {
    ?>
active<?php 
}
?>
" href="/user/quotations/view/">View Quotations</a></li>
                </ul>
            </li>


        </ul>
      </div>
    </nav>
  </div>
  <div class="col-xs-12 col-sm-9 col-md-9 col-lg-9">
    @if (Session::get('error'))
Route::filter('before', function () {
    // Do stuff before every request to your application...
});
Route::filter('after', function ($response) {
    // Do stuff after every request to your application...
});
Route::filter('csrf', function () {
    if (Request::forged()) {
        return Response::error('500');
    }
});
Route::filter('auth', function () {
    if (Auth::guest()) {
        Session::flash('error', 'You do not have access level to be there.');
        return Redirect::to('user');
    }
});
Route::filter('admin', function () {
    if (Auth::user()->administrator == 0) {
        Session::flash('error', 'You do not have access level to be there.');
        return Redirect::to('user');
    }
});
Route::filter('valid_client', function () {
    $client_id = URI::Segment(4);
    $user = User::Find($client_id);
    if (!is_numeric($user->id)) {
        Session::flash('error', 'Unknown user.');
        return Redirect::to('user/clients/');
    }
});