Parašė gtinas· 2011 Sau. 7 23:01:17
#1
Norejau suzinoti kaip padaryti psulapiavima tokiam dalykui:
<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";
openside("top naujienos");
$result = dbquery("SELECT tn.*, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes FROM
".$db_prefix."news tn
LEFT JOIN ".$db_prefix."ratings tr ON tn.news_id=tr.rating_item_id AND tr.rating_type='N'
GROUP BY news_subject
ORDER BY news_reads DESC LIMIT 150");
if (dbrows($result)) {
echo "<table cellpadding='0' cellspadding='0' class='tbl-border'>";
echo "<tr>
</td>
</tr>";
$i = 0;
$rating = "<div style='background:url(http://img80.imageshack.us/img80/3918/ratingsbghp8.gif); height:21px; width:105px;'>".($data['count_votes'] > 0 ? str_repeat("<img src='http://img165.imageshack.us/img165/8202/starwd7.gif' alt='*' style='vertical-align:middle'>", ceil($data['sum_rating'] / $data['count_votes'])) : "")."</div>";
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<td width='100%' class='tbl2'><b><big><a href='".BASEDIR."news.php?readmore=".$data['news_id']."'>
".trimlink($data['news_subject'],30)."</a></big></b></td></table>
<table border='0' cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<td width='80%' class='tbl1'><small>".$data['news_news']."</small></td></table>
<table border='0' cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<td width='100%' class='tbl2'><center><small>· ".$data['news_reads']." Peržiuros · <a href='".BASEDIR."news.php?readmore=".$data['news_id']."'>
Toliau...</a></small></center></td><td class='".($i%2?"tbl1":"tbl2")."'>$rating</td></table>";
$i++;
}
echo "</table>";
} else {
echo "<center>Naujeinu Nera</center>";
}
closeside();
require_once THEMES."templates/footer.php";
?>
Kas galit padekit, labai reikia, kokias 3h bandziau ir taip ir anaip nieko nesigauna :(
Lauksiu jusu pagalbos.
Parašė gtinas· 2011 Sau. 8 17:01:53
#4
Nezinau, geras tinklapis sis bet ir vienaip ir kitaip darau, nesigauna :(
ispradziu isejo puslapius padaryti bet man rodos naujieu sukuriau, bet nereikia.
Po to padariau kad rodytu mano pasirinkima, atsirado puslapevimas, na tik jo apacioja to 1 2 3 ..55
neatsirado.... o per narsykle eijo puslapiuoti, nezinau ka daryti dbr :(
..
Parašė gtinas· 2011 Sau. 9 14:01:56
#5
Na dw chebra kas dar galit padet, taip nedaug jau truksta :)