Sie sind auf Seite 1von 10

<?php include("konfiguracija.php"); include("header-usamljena-srca-poruke.php"); ?

>

<body> <!-- BEGIN wrapper --> <div id="wrapper"> <!-- BEGIN header --> <div id="header"> <!-- begin pages --> <?php include ("./include-php/head-top-pages.php"); ?> <!-- end pages --> <!-- begin logo --> <div class="logo"> <h1><a href="http://www.smsljubavneporuke.com/">Ljubavne Poruke</a></h1> <p>Sve Ljubavne SMS Poruke na jednom mjestu</p> </div> <!-- end logo --> <!-- begin advertisement --> <div class="ad"><a title="Ljubavne Poruke" href="http://www.smsljubavneporuk e.com"><img src="http://www.smsljubavneporuke.com/custom/head-logo-468x60.png" a lt="ljubavne-poruke" /></a> </div> <!-- end advertisement --> <!-- begin categories --> <ul class="categories" style="background-image: url(http://smsljubavneporuke .com/custom/hot-red.png); background-position: left center; background-repeat:no -repeat; padding-left: 24px; margin-left: 6px;"> <?php include ("./include-php/head-trending-tag.php"); ?> </ul> <!-- end categories --> </div>

<!-- END header --> <!-- BEGIN left sidebar --> <div id="lsidebar"> <!-- begin categories --> <div class="box"> <h2>Kategorije</h2> <ul><?php include ("./include-php/content-left-categories.php"); ?> </ul> </div> <!-- end categories --> <!-- begin ads --> <div class="box"> <h2>Sponsored Links</h2> <p style="padding-left: 10px; padding-top: 5px;"><script type="text/javasc ript"><!-google_ad_client = "ca-pub-6567764712481954"; /* 160x600-sms */ google_ad_slot = "3801378224"; google_ad_width = 160; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> </div> <!-- end ads --> <?php include ("./include-php/content-left-block.php"); ?> </div> <!-- END left sidebar --> <!-- BEGIN content --> <div id="content"> <!-- BEGIN recent posts --> <div class="recent"> <h2>Nove Poruke za Usamljena Srca</h2> <!-- begin post --> <?php

/* Place code to connect to your DB here. */ include('konfiguracija.php'); global $idkat; // include your code to connect to DB.

$tbl_name="downloadwall";

//your table name

// How many adjacent pages should be shown on each side? $adjacents = 3;

/* First get total number of rows in data table. If you have a WHERE clause in your query, make sure you mirror it her e. */ $query = "SELECT COUNT(*) as num FROM vijesti WHERE kategorija = 'usamlj ena-srca'"; $total_pages = mysql_fetch_array(mysql_query($query)); $total_pages = $total_pages[num];

/* Setup vars for query. */ $targetpage = "/usamljena-srca-poruke"; ame of this file) $limit = 5; //how many items to show per page $page = $_GET['page']; if($page) $start = ($page - 1) * $limit; display on this page else $start = 0; //if no page var is given, set start to 0 //first item to //your file name (the n

/* Get data. */ $sql = "SELECT * FROM vijesti WHERE kategorija = 'usamljena-srca' ORDER by id DESC LIMIT $start, $limit"; $result = mysql_query($sql);

/* Setup page vars for display. */ if ($page == 0) $page = 1; page var is given, default to 1. $prev = $page - 1; //Previous page is page - 1 $Next = $page + 1; //Next page is page + 1 $lastpage = ceil($total_pages/$limit); ges / items per page, rounded up. $lpm1 = $lastpage - 1; age minus 1 //lastpage is = total pa //last p //if no

/* Now we apply our rules and draw the pagination object. We're actually saving the code to a variable in case we want to draw it more than once. */ $pagination = ""; if($lastpage > 1) { $pagination .= "<div class=\"pagination\">"; //Previous button if ($page > 1) $pagination.= "<a href=\"$targetpage/$prev\"> &laquo; </ a>"; else $pagination.= "<span class=\"disabled\"> &laquo; </span> ";

//pages if ($lastpage < 7 + ($adjacents * 2)) ther breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination.= "<span class=\"current\">$ counter</span>"; else $pagination.= "<a href=\"$targetpage/$co unter\">$counter</a>"; } } elseif($lastpage > 5 + ($adjacents * 2)) o hide some { //close to beginning; only hide later pages if($page < 1 + ($adjacents * 2)) { for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { if ($counter == $page) //enough pages t //not enough pages to bo

$pagination.= "<span class=\"cur rent\">$counter</span>"; else $pagination.= "<a href=\"$target page/$counter\">$counter</a>"; } $pagination.= "..."; $pagination.= "<a href=\"$targetpage/$lpm1\">$lp m1</a>";

$pagination.= "<a href=\"$targetpage/$lastpage\" >$lastpage</a>"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ( $adjacents * 2)) { $pagination.= "<a href=\"$targetpage/1\">1</a>"; $pagination.= "<a href=\"$targetpage/2\">2</a>"; $pagination.= "..."; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination.= "<span class=\"cur rent\">$counter</span>"; else $pagination.= "<a href=\"$target page/$counter\">$counter</a>"; } $pagination.= "..."; $pagination.= "<a href=\"$targetpage/$lpm1\">$lp m1</a>"; $pagination.= "<a href=\"$targetpage/$lastpage\" >$lastpage</a>"; } //close to end; only hide early pages else { $pagination.= "<a href=\"$targetpage/1\">1</a>"; $pagination.= "<a href=\"$targetpage/2\">2</a>"; $pagination.= "..."; for ($counter = $lastpage - (2 + ($adjacents * 2 )); $counter <= $lastpage; $counter++)

{ if ($counter == $page) $pagination.= "<span class=\"cur rent\">$counter</span>"; else $pagination.= "<a href=\"$target page/$counter\">$counter</a>"; } } }

//Next button if ($page < $counter - 1) $pagination.= "<a href=\"$targetpage/$Next\"> &raquo; </ a>"; else $pagination.= "<span class=\"disabled\"> &raquo; </span> "; $pagination.= "</div>\n"; } ?> <?php while ($row = mysql_fetch_array($result)) { $naslovnewslast = $row['naslov']; $naslovnewslast2 = $row['naslov_en']; $tekstnewslast = $row['seodescription']; $kategorijanewslast = $row['kategorija']; $kategorijanewslast = strtolower("$kategorijanewslast"); $slikanewslast = $row['slika']; $datumvijesti = $row['datum']; $datumnews = strtotime($datumvijesti); $datumlast2 = date('d.m.Y',$datumnews);

echo"<div class='post' style='border-top: dotted 1px #777; margin-top: 10px;'> <span class='comments'><a href='http://www.smsljubavneporuke.com/$kategorijanews last/$naslovnewslast2/#komentari'>+</a></span> <a href='http://www.smsljubavneporuke.com/$kategorijanewslast/$naslovnewslast2/' ><img src='http://www.smsljubavneporuke.com/slike/$slikanewslast' width='64' alt ='$naslovnewslast' /></a> <p><h3><a href='http://www.smsljubavneporuke.com/$kategorijanewslast/$naslovnews last2/'>$naslovnewslast</a></h3>$tekstnewslast</p> <p class='details'>$datumlast2 | <a href='http://www.smsljubavneporuke.com/$kate gorijanewslast-poruke/'>$kategorijanewslast</a> | <a href='http://www.smsljubavn eporuke.com/$kategorijanewslast/$naslovnewslast2/'>Procitaj poruku ... </a></p>

<div style='border: solid 1px #3b59a3; background-color:#f4f4f4; padding: 2px 10 px; margin-top: 5px; height:25px;'> <div style='padding-top:2px; float:left; display:block;'> <div id='fb-root'></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/en_US/all.js#xfbml=1'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

<div class='fb-like' data-href='http://www.smsljubavneporuke.com/$kategorijanews last/$naslovnewslast2/' data-send='true' data-layout='button_count' data-width=' 100' data-show-faces='false'></div></div>

<div style='float:left; display:inline; padding-top: 3px;'> <span style='font-size: 11px; color:#3B59A3; background-color:#eceef5; border:so lid 1px #dce1eb; padding: 2px 4px;'><a style=\"color: #3b59a3\" href=\"javascrip t: void(0);\" onclick=\"window.open('http://www.facebook.com/sharer.php?u=http:/ /www.smsljubavneporuke.com/$kategorijanewslast/$naslovnewslast2/', 'popup', 'too lbar=0, status=0, width=650, height=450');\">Postavi kao Status</a></span>&nbsp; &nbsp;<span style='font-size: 11px; color:#3B59A3; background-color:#eceef5; bor der:solid 1px #dce1eb; padding: 2px 4px;'><a href='http://www.facebook.com/lajkt v' style='color:#3B59A3'>Fan Page</a></span></div> </div></div>"; }?>

<!-- end post --></div>

<div class="recent"> <!-- begin post navigation --> <div class="postnav"> <?=$pagination?> </div></div> <!-- end post navigation --> <div class="break"></div> <!-- END recent posts --> </div> <!-- END content --> <!-- BEGIN right sidebar --> <div id="rsidebar">

<!-- begin search box --> <div class="box"> <?php include ("./include-php/content-right-search.php"); ?> <h2 style="margin-top: 5px;">Sponsored Links</h2> <p class="ads" style="margin-left: -5px;"><script type="text/javascript">< !-google_ad_client = "ca-pub-6567764712481954"; /* 300x250-img */ google_ad_slot = "7313247829"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </p></div> <!-- end advertisement -->

<!-- begin popular posts -->

<?php include ("./include-php/content-right-popularno.php"); ?> <!-- end popular posts --> <!-- begin featured video --> <?php include ("./include-php/content-right-video.php"); ?> <!-- end featured video -->

</div> <!-- END right sidebar --> </div> <!-- END wrapper -->

<?php include("footer.php"); ?></div>

</body> </html>

Das könnte Ihnen auch gefallen