<?php

$url = new FunctionController();
?>
@foreach ($noidung as $kn)
@if ($kn != null)
<?php 
$urlReal = $url->getURL($kn->loai);
?>
<div>
    <a href="{{url($urlReal."/threads=".$kn->id)}}">
        @if(file_exists($kn->anhnho))
        {{ HTML::image($kn->anhnho, '', array('class' => 'pull-left', 'style' =>'width:96px;margin-right: 10px')) }}
        @else
        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
        @endif
    </a>
    <p><h4><a href="{{url($urlReal."/threads=".$kn->id)}}">{{HTML::decode($kn->tieude)}}</a></h4></p>
    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($kn->thoidiemdang))}}</p>
    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $kn->luotxem}}</p>
    <p><a href="{{url($urlReal."/threads=".$kn->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
</div>
<hr>
@endif
@endforeach
<div id='kinhnghiem_paging'>
    {{$phantrang}}
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
<?php

$url = new FunctionController();
?>
@foreach ($noidung as $klq)
@if ($klq != null)
<?php 
$urlReal = $url->getURL($klq->loai);
?>
<div>  
    <a href="{{url($urlReal."/".$klq->id)}}">
        @if(file_exists($klq->anhnho))
        {{ HTML::image($klq->anhnho, '', array('class' => 'pull-left', 'style' => 'width:96px;margin-right: 10px')) }}
        @else
        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
        @endif
    </a>
    <p><h4><a href="{{url($urlReal."/".$klq->id)}}">{{HTML::decode($klq->tieude)}}</a></h4></p>
    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($klq->thoidiemdang))}}</p>
    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $klq->luotxem}}</p>
    <p><a href="{{url($urlReal."/".$klq->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
</div>
<hr>
@endif
@endforeach
<div id='kimloaiquy_paging'>
    {{$phantrang}}
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
Beispiel #3
0
@extends('layouts.guest')
@section('main')
<div class="col-md-12 news" style="margin-top: 15px">
    <div class="col-md-8">
        <div class="panel panel-success">
            <div class="panel-heading"><h3><span class="glyphicon glyphicon-gift"></span>&nbsp;Sản Phẩm Giao Dịch</h3></div>
            <div class="panel-body" id="sp_gd_index">
                <?php 
$url = new FunctionController();
?>
                @foreach ($sp_gd as $gd)
                @if ($gd != null)
                <?php 
$urlReal = $url->getURL($gd->loai);
?>
                <div>
                    <a href="{{url($urlReal."/threads=".$gd->id)}}">
                        @if(file_exists($gd->anhnho))
                        {{ HTML::image($gd->anhnho, '', array('class' => 'pull-left', 'style' => 'width:96px;margin-right: 10px')) }}
                        @else
                        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
                        @endif
                    </a>
                    <p><h4><a href="{{url($urlReal."/threads=".$gd->id)}}">{{HTML::decode($gd->tieude)}}</a></h4></p>
                    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($gd->thoidiemdang))}}</p>
                    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $gd->luotxem}}</p>
                    <p><a href="{{url($urlReal."/threads=".$gd->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
                </div>
                <hr>
                @endif
                @endforeach
<?php

$url = new FunctionController();
?>
@foreach($noidung as $thread)
@if ($thread != null)
<?php 
$urlReal = $url->getURL($thread->loai);
?>
<div>   @if($url->isUnexpected($thread->loai))
    <a href="{{url($urlReal."/threads=".$thread->id)}}" target="_blank"><span class="glyphicon glyphicon-hand-right"></span>&nbsp;{{$thread->tieude}}</a>
    @else
    <a href="{{url($urlReal."/".$thread->id)}}" target="_blank"><span class="glyphicon glyphicon-hand-right"></span>&nbsp;{{$thread->tieude}}</a>
    @endif
</div>
<hr>
@endif
@endforeach
<div id='xemnhieu_paging' style="text-align: center">
    {{$phantrang}}
</div>
<style type='text/css'>
    .pagination
    {
        margin: 0px;
        margin-left: -20px;
    }
    .pagination li {
        display: inline;
        margin-left: 0.3em;
        margin-right: 0.3em;
Beispiel #5
0
<?php

$url = new FunctionController();
?>
@foreach ($forex as $fr)
@if ($fr != null)
<?php 
$urlReal = $url->getURL($fr->loai);
?>
<div>
    <a href="{{url($urlReal."/".$fr->id)}}">
        @if(File::exists($fr->anhnho))
        {{ HTML::image($fr->anhnho, '', array('class' => 'pull-left', 'style' => 'width:96px;margin-right: 10px')) }}
        @else
        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
        @endif
    </a>
    <p><h4><a href="{{url($urlReal."/".$fr->id)}}">{{ $fr->tieude }}</a></h4></p>
    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($fr->thoidiemdang))}}</p>
    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $fr->luotxem}}</p>
    <p><a href="{{url($urlReal."/".$fr->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
</div>
<hr>
@endif
@endforeach
<div id='forex_paging'>
    {{$forex->links()}} 
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
<?php

$url = new FunctionController();
$count = 0;
?>
@foreach ($noidung as $rs)
@if ($rs != null)
<?php 
$count++;
$urlReal = $url->getURL($rs->loai);
?>
<div>
    @if($url->isUnexpected($rs->loai))
    <a href="{{url($urlReal."/threads=".$rs->id)}}" target="_blank"><span class="glyphicon glyphicon-search"></span>&nbsp;{{$rs->tieude}}</a>
    @else
    <a href="{{url($urlReal."/".$rs->id)}}" target="_blank"><span class="glyphicon glyphicon-search"></span>&nbsp;{{$rs->tieude}}</a>
    @endif
</div>
<hr>
@endif
@endforeach
@if($count == 0)
Không tìm thấy kết quả nào phù hợp.
@endif
<div id='result_search_paging'>
    {{$phantrang}}
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
        margin-left: 0.5em;
<?php

$url = new FunctionController();
?>
@foreach ($hanghoa as $hh)
@if ($hh != null)
<?php 
$urlReal = $url->getURL($hh->loai);
?>
<div>
    <a href="{{url($urlReal."/".$hh->id)}}">
        @if(file_exists($hh->anhnho))
        {{ HTML::image($hh->anhnho, '', array('class' => 'pull-left', 'style' => 'width:96px;margin-right: 10px')) }}
        @else
        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
        @endif
    </a>
    <p><h4><a href="{{url($urlReal."/".$hh->id)}}">{{ HTML::decode($hh->tieude)}}</a></h4></p>
    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($hh->thoidiemdang))}}</p>
    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $hh->luotxem}}</p>
    <p><a href="{{url($urlReal."/".$hh->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
</div>
<hr>
@endif
@endforeach
<div id='hanghoa_paging'>
    {{$hanghoa->links()}}
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
<?php

$url = new FunctionController();
?>
@foreach ($noidung as $sp)
@if ($sp != null)
<?php 
$urlReal = $url->getURL($sp->loai);
?>
<div>  
    <a href="{{url($urlReal."/threads=".$sp->id)}}">
        @if(file_exists($sp->anhnho))
        {{ HTML::image($sp->anhnho, '', array('class' => 'pull-left', 'style' => 'width:96px;margin-right: 10px')) }}
        @else
        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
        @endif
    </a>
    <p><h4><a href="{{url($urlReal."/threads=".$sp->id)}}">{{HTML::decode($sp->tieude)}}</a></h4></p>
    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($sp->thoidiemdang))}}</p>
    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $sp->luotxem}}</p>
    <p><a href="{{url($urlReal."/threads=".$sp->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
</div>
<hr>
@endif
@endforeach
<div id='sp_gd_paging'>
    {{$phantrang}}
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
<?php

$url = new FunctionController();
?>
@foreach ($noidung as $san)
@if ($san != null) <?php 
$urlReal = $url->getURL($san->loai);
?>
<div>  
    <a href="{{url($urlReal."/threads=".$san->id)}}">
        @if(file_exists($san->anhnho))
        {{ HTML::image($fa->anhnho, '', array('class' => 'pull-left', 'style' => 'width:96px;margin-right: 10px')) }}
        @else
        {{ HTML::image('img/no_thumb.jpg', '', array('class' => 'pull-left', 'style' => 'margin-right: 10px')) }}
        @endif
    </a>
    <p><h4><a href="{{url($urlReal."/threads=".$san->id)}}">{{HTML::decode($san->tieude)}}</a></h4></p>
    <p><span class="glyphicon glyphicon-time"></span>&nbsp;{{date("h:i A | d/m/Y",strtotime($san->thoidiemdang))}}</p>
    <p><span class="glyphicon glyphicon-search"></span>&nbsp;Lượt xem:&nbsp;{{ $san->luotxem}}</p>
    <p><a href="{{url($urlReal."/threads=".$san->id)}}"><span class="glyphicon glyphicon-play"></span>&nbsp;Xem thêm</a></p>
</div>
<hr>
@endif
@endforeach
<div id='sangd_paging'>
    {{$phantrang}}
</div>
<style type='text/css'>
    .pagination li {
        display: inline;
        margin-left: 0.5em;
 public function showOthers($type, $id)
 {
     $url = new FunctionController();
     if ($url->isURL($type)) {
         $contacts = Contact::Select();
         $news = TinTuc::getANews($id, $url->getID($type));
         $title = $url->switchName($type);
         $title .= $news == null ? " || Lỗi" : " || " . $news->tieude;
         //bv cung chuyen muc
         $threads = TinTuc::SelectRelate("same", $id, $url->getID($type), 3);
         //ajax pagingation cung chuyen muc
         $bv['noidung'] = $threads;
         $bv['phantrang'] = $threads->links();
         if (Request::ajax() && Input::get("type") == "cungchuyenmuc") {
             $html = View::make("guest.relations.ajaxpagination_same", $bv)->render();
             return Response::json(array('html' => $html));
         }
         //end ajax pagingation cung chuyen muc
         //bv moi nhat
         $newthreads = TinTuc::SelectRelate("new", $id, null, 5);
         //ajax pagingation bv moi nhat
         $bvm['noidung'] = $newthreads;
         $bvm['phantrang'] = $newthreads->links();
         if (Request::ajax() && Input::get("type") == "baivietmoi") {
             $html = View::make("guest.relations.ajaxpagination_new", $bvm)->render();
             return Response::json(array('html' => $html));
         }
         //end ajax pagingation bv moi nhat
         //bv xem nhieu
         $viewsthreads = TinTuc::SelectRelate("views", $id, null, 5);
         //ajax pagingation bv xem nhieu
         $xemnhieu['noidung'] = $viewsthreads;
         $xemnhieu['phantrang'] = $viewsthreads->links();
         if (Request::ajax() && Input::get("type") == "xemnhieu") {
             $html = View::make("guest.relations.ajaxpagination_views", $xemnhieu)->render();
             return Response::json(array('html' => $html));
         }
         //end ajax pagingation bv xem nhieu
         return View::make('guest.news.view')->with('contacts', $contacts)->with('news', $news)->with('threads', $threads)->with('newthreads', $newthreads)->with('viewsthreads', $viewsthreads)->with("title", $title);
     } else {
         return $this->index();
     }
 }