• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Share [Share] Share mod bài ngẫu nhiên,xemnhiều cho JohnCMS

s2nhozs2

New Member
Ngẫu nhiên
<b>PHP Code:</b><?php
$req = mysql_query ( "SELECT * FROM `forum` WHERE `type`='t' AND `refid`=' $type1 [ refid ] ' AND`id`!=' $id ' ORDER BY RAND() LIMIT 5" );
$total = mysql_num_rows ( $req );
if( $total != 0 ) {
echo '<div class="mainblok"><div class="phdr"><b>Ngẫu nhiên</b></div>' ;
while ( $res = mysql_fetch_assoc ( $req )) {
echo '<div class="menu"><imgsrc="/images/ic.png"/> <a href="' . rw ( notags ( $res [ 'text' ])) . '-' . $res [ 'id' ] . '.htm">' . tags ( $res [ 'text' ]) . '</a></div>' ;
++ $i ;
}
echo '</div>' ;
}
?>
xem nhiều
<b>PHP Code:</b><?php
echo '<div class="phdr"><b>Xem nhiều</b></div>' ;
$sql = mysql_query ( "SELECT * FROM `forum` WHERE `type` = 't' && `close` = '0' order by view desc limit 5 " );
while( $row = mysql_fetch_assoc ( $sql )){
echo '<div class="list1"><img src="/images/new.gif"> <a href="' . $home . '/forum/' . rw ( notags ( $row [ 'text' ])) . '_' . $row [ 'id' ]. '.html" title="' . $row [ 'text' ]. '"><b>' . tags ( $row [ 'text' ]) . '</b></a>* ' . $row [ 'xem' ]. ' lượtxem</div>' ;
}
?>
 

Facebook Comments

New posts New threads New resources

Back
Top