• 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.

Ae help mod bv ra trang chủ

Tưởng vbb thì add ajax vietvbb là xong..cái này a chịu
 
chán quá em mày mò nãy giời k ra

Đây là code index của trang blog đó,có tách dc doạn blog mới ra dc k anh


<?php
error_reporting(0);
require_once("../in/tren.php");
require_once("../in/seo.php");
switch($_GET['b'])
{
default:
$tit = 'Blog Cảm Xúc';
echo '<div class="navigation"><b>BÃ*i Gá»*i Má»›i</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div>';
$blog=@mysql_query("select * from blog2 where tt = '0' order by time desc limit 0,5;");
$con=mysql_result(mysql_query("select count(*) from blog2 where tt = '0'"),0);
if($con == 0) {
echo '<div class="main_menu"><b style="color:red">Đang Trống</b></div>';
}else
while($ar=@mysql_fetch_array($blog2))
{
$url = seo($ar['tieude']);
echo'<div class="main_menu">&bull;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html"><b>'.$ar['tieude'].'</b></a> ['.mysql_result(mysql_query("select count(*) from `cmb2` WHERE `idb` = '".$ar['id']."'"),0).']';
if(!empty($ar['gcuoi']))
{ echo '<br>('.$ar['gcuoi'].')<br>'; }
echo '</div>';
}
echo '<br><div class="navigation"><b>Top Lượt Xem</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div>';
$blog= mysql_query("SELECT * FROM `blog2` WHERE `luotxem` > 0 and tt = 0 ORDER BY `luotxem` DESC LIMIT 5;");
$con=mysql_result(mysql_query("select count(*) from `blog2` WHERE `luotxem` > 0 and tt = 0"),0);
if($con==0) {
echo '<div class="main_menu"><b style="color:red">ChÆ°a Có BÃ*i Viết</b></div>';
}else while($ar=mysql_fetch_array($blog2)) {
$url = seo($ar['tieude']);
echo'<div class="main_menu">&bull;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html"><b>'.$ar['tieude'].'</b></a> ['.mysql_result(mysql_query("select count(*) from `cmb` WHERE `idb` = '".$ar['id']."'"),0).']';
if(!empty($ar['gcuoi']))
{ echo '<br>('.$ar['gcuoi'].')<br>'; }
echo '</div>';
}
echo '<br><div class="navigation"><b>Top Đánh Giá</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div>';
$blog = mysql_query("SELECT * FROM `blog2` WHERE `tot` > 0 and tt = '0' ORDER BY `tot` DESC LIMIT 5;");
$con=mysql_result(mysql_query("select count(*) from `blog2` WHERE `tot` > 0 and tt = '0'"),0);
if($con==0) {
echo '<div class="main_menu"><b style="color:red">ChÆ°a Có BÃ*i Viết</b></div>';
}else
while($ar=mysql_fetch_array($blog2)) {
$url = seo($ar['tieude']);
echo'<div class="main_menu">&bull;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html"><b>'.$ar['tieude'].'</b></a> ['.mysql_result(mysql_query("select count(*) from `cmb` WHERE `idb` = '".$ar['id']."'"),0).']';
if(!empty($ar['gcuoi']))
{ echo '<br>('.$ar['gcuoi'].')<br>'; }
echo '</div>';
}
echo '<br><div class="main_menu">&raquo;<a href="blog.php">Tất Cả Blog</a></div><div class="main_menu">&raquo;<a href="my.php">Blog Của Tôi</a></div><div class="main_menu">&raquo;<a href="gui.php">Gá»*i Blog Má»›i</a></div><div class="main_menu">&laquo;<a href="'.$set['home'].'">Trang Chủ</a></div>';
break;
case 'xem':
$sql = @mysql_query("SELECT id FROM blog2 WHERE id='".$_GET['id']."'");
$kd=@mysql_fetch_array(mysql_query("select * from blog2 where id='".$_GET['id']."'"));
if ( @mysql_num_rows($sql ) == 0)
{
$tit = 'Blog Cảm Xúc';
echo'<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu"><img src="'.$set['home'].'/img/loi.png"> BÃ*i viết không tồn tại.!<br><a href="index.php.php">Quay lại</a></div>';
}elseif($kd['tt'] == 1)
{
$tit = 'Blog Cảm Xúc';
echo'<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu"><img src="'.$set['home'].'/img/loi.png"> BÃ*i viết đã bị gỡ bỏ.!<br><a href="index.php.php">Quay lại</a></div>';
}else{
$array=@mysql_fetch_array(mysql_query("select * from blog2 where id='{$_GET['id']}'"));
$tit = ''.$array['tieude'].' - Blog Cảm Xúc';
echo'<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu"></div><div class="baiviet" style="text-align:left">&bull;<b style="color:red">'.$array['tieude'].'</b><br>['.$array['thoigian'].']<br>&bull;Gá»*i bởi: <b><a href="'.$set['home'].'/canhan/pro.php?profile='.$array['ngui'].'">'.$array['ngui'].'</a></b><br>+Lượt Xem: '.$array['luotxem'].'';
@mysql_query("UPDATE `blog2` SET `luotxem`=`luotxem`+1 WHERE `id`='".$array['id']."' LIMIT 1;");
echo '<br>+Đánh Giá: ';
$kd=mysql_result(mysql_query("select count(*) from danhgia where ndg='".$taikhoan['nick']."' and idb='".$array['id']."'"),0);
if($user_id && $kd == 0 && $taikhoan['nick'] != $array['ngui'] && $taikhoan['quyen'] != 0)
{
echo '<b style="color:blue">Bạn thấy bÃ*i viết nÃ*y thế nÃ*o?</b> <a href="'.$set['home'].'/blog2/?b=danhgia&id='.$array['id'].'&dg=1"><img src="'.$set['home'].'/img/thich.png"></a> <a href="'.$set['home'].'/blog2/?b=danhgia&id='.$array['id'].'&dg=0"><img src="'.$set['home'].'/img/khong.png"></a>';
}else{
echo '<img src="'.$set['home'].'/img/thich.png">'.$array['tot'].' - <img src="'.$set['home'].'/img/khong.png">'.$array['xau'].'';
}
echo '</div>';
$nd = bbcode(trim(nl2br($array['noidung'])));
if(strlen($nd) < 1000)
{ echo '<div class="main_menu"></div><div class="baiviet" style="text-align:left;">&bull; <font class="green">'.$nd.'</font><br><br></div>'; }else
{
$fnd = substr($nd, 0, 950);
echo '<div class="main_menu"></div><div class="baiviet" style="text-align:left;">&bull; <font class="green">'.$fnd.'</font><br><b style="color:blue">...<a href="'.$set['home'].'/blog2/?b=morong&id='.$array['id'].'">Xem Hết</a> &raquo;</b><br><br></div>';
}
if($taikhoan['quyen'] > 2)
{
echo '<div class="main_menu">[<a href="'.$set['home'].'/blog2/gui.php?b=xoab&id='.$array['id'].'">Xóa</a> | <a href="'.$set['home'].'/blog2/gui.php?b=sua&id='.$array['id'].'">Sá»*a</a>';
if(!empty($array['nkhoa']))
{ echo ' | <a href="'.$set['home'].'/blog2/gui.php?b=op&id='.$array['id'].'">Mở Blog</a>';
}else{ echo ' | <a href="'.$set['home'].'/blog2/gui.php?b=cl&id='.$array['id'].'">Khóa Blog</a>'; }
echo ']</div>'; }
if(!empty($array['sua']))
{ echo '<div class="main_menu">(Sá»*a Cuối '.$array['sua'].')</div>'; }
function tags($id)
{
$sql=mysql_fetch_row(mysql_query("select tieude from blog2 where id=$id")) or die(mysql_error());
$tags='';
$total_tag=substr_count($sql[0],' ')+1;
if ($total_tag > 0){
for($t=0; $t<$total_tag; $t++){
$keyword=explode(' ',$sql[0]);
$tags.='<a href="'.$set['home'].'/blog2/tim.php?key='.$keyword[$t].'">'.str_replace('-',' ',$keyword[$t]).'</a>'; if($t<$total_tag-1) $tags.='|';}
}
return $tags;
}
$url = seo($array['tieude']);
echo '<div class="baiviet" style="color:#555555;text-align:left">&bull;Url Blog:<input type="text" size="8" value="'.$set['home'].'/blog2/'.$array['id'].'_'.$url.'.html"></div><div class="baiviet" style="color:#555555">Tags: '.tags($array['id']).'</div><div class="main_menu"></div><br><div class="navigation"><b>Bình Luáº*n</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div>';
require_once("in.php");
echo '<br></div><div class="main_menu"></div><div class="navigation"><b>Cùng Tác Giả</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div>';
$tacgia=@mysql_query("select * from blog2 where ngui='".$array['ngui']."' and tt = '0' and id != '".$array['id']."' limit 3;");
$con=mysql_result(mysql_query("select count(*) from blog2 where ngui='".$array['ngui']."' and tt='0' and id != '".$array['id']."'"),0);
if($con==0) {
echo'<div class="main_menu">Không có bÃ*i viết khác.</div>';
}else
while($atg=@mysql_fetch_array($tacgia))
{
$url = seo($atg['tieude']);
echo'<div class="main_menu">&bull; <a href="'.$set['home'].'/blog2/'.$atg['id'].'_'.$url.'.html">'.$atg['tieude'].'</a></div>';
}
if($con > 3) { echo '<div align="right"><div class="xemthem1"><span class="xemthem2">&raquo;<a href="'.$set['home'].'/blog2/tacgia.php?by='.$array['ngui'].'">Xem Thêm..</a></span></div></div>';
}
echo '<br><div class="main_menu">&laquo;<a href="'.$set['home'].'/blog2">Về Danh Sách BÃ*i Viết</a></div></div>';
}
break;
case 'danhgia':
$ar=@mysql_fetch_array(mysql_query("select * from blog2 where id='{$_GET['id']}'"));
$url = seo($ar['tieude']);
$tit = 'Đánh Giá Blog '.$ar['ngui'].'';
echo'<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu">';
$ndg = $taikhoan['nick'];
$idb = $_GET['id'];
$dg = $_GET['dg'];
$kd=mysql_result(mysql_query("select count(*) from danhgia where ndg='{$taikhoan['nick']}' AND idb='{$ar['id']}'"),0);
if($kd > 0)
{
echo '<img src="'.$set['home'].'/img/loi.png">Bạn đã có má»™t đánh giá cho bÃ*i viết nÃ*y.!<br>&laquo;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html">Quay lại</a></div>';
}elseif($taikhoan['nick'] == $ar['ngui'])
{
echo '<img src="'.$set['home'].'/img/loi.png">Bạn không thể đánh giá cho bÃ*i viết của bạn!<br>&laquo;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html">Quay lại</a></div>';
}elseif(!$user_id)
{
echo '<img src="'.$set['home'].'/img/loi.png">Bạn chÆ°a đăng nháº*p!<br>&laquo;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html">Quay lại</a></div>';
}elseif($taikhoan['quyen'] == 0)
{
echo '<img src="'.$set['home'].'/img/loi.png">TÃ*i khoản bạn đã bị cấm!<br>&laquo;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html">Quay lại</a></div>';
}elseif($dg < 0 || $dg > 1)
{ echo '<img src="'.$set['home'].'/img/loi.png">Đường dẫn không hợp lệ!<br>&laquo;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html">Quay lại</a></div>';
}else{
if($dg == 1)
{ $tt = 'ThÃ*ch'; }else{ $tt = 'Không ThÃ*ch'; }
$tensk = 'Đánh Giá Blog';
$tg = date("d.m.y - H:i");
$noidung = 'ChÃ*o bạn '.$ar['ngui'].'.![br]Bạn @.']'.$taikhoan['nick'].' vừa đánh giá "'.$tt.'" cho bÃ*i viết @.'/blog/'.$ar['id'].'_'.$url.'.html]'.$ar['tieude'].' của bạn. Hệ thống gá»*i tặng bạn 20'.$set['tien'].'. Đây lÃ* tin nhắn tá»± Ä‘á»™ng chúc bạn vui vẻ nhé.!';
@mysql_query("UPDATE `taikhoan` SET `tien` = `tien`+'20' where nick = '".$ar['ngui']."'");
@mysql_query("insert into `sukien` SET `nnhan`='".$ar['ngui']."', `tensk`='$tensk', `noidung`='$noidung', `thoigian`='$tg', time='".time()."'");
if($dg == 1)
{
@mysql_query("UPDATE `blog2` SET `tot` = `tot`+'1' where id = '$idb'");
}else{
@mysql_query("UPDATE `blog2` SET `xau` = `xau`+'1' where id = '$idb'");
}
@mysql_query("INSERT INTO `danhgia` SET `ndg` = '$ndg', `idb` = '$idb'");
header('Location:'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html');
}
break;
case 'morong':
$sql = @mysql_query("SELECT * FROM blog WHERE id='".$_GET['id']."'");
if(mysql_num_rows($sql) == 0){
$tit = 'Blog Cảm Xúc';
echo'<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu"><img src="'.$set['home'].'/img/loi.png"> BÃ*i viết không tồn tại.!<br><a href="index.php.php">Quay lại</a></div>';
}elseif($ar['tt'] == 1){
$tit = 'Blog Cảm Xúc';
echo'<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu"><img src="'.$set['home'].'/img/loi.png"> BÃ*i viết đã bị gỡ bỏ.!<br><a href="index.php.php">Quay lại</a></div>';
}else{
$ar=@mysql_fetch_array($sql);
$tit = ''.$ar['tieude'].' - Blog Cảm Xúc';
$url = seo($ar['tieude']);
$nd = bbcode(trim(nl2br($ar['noidung'])));
echo '<div class="navigation"><b>Blog Cảm Xúc</b></div><div align="right"><div style="border-top: 3px solid #13cfeb;"></div></div></div><div class="main_menu"></div><div class="baiviet" style="text-align:left;">&bull; <font class="green">'.$nd.'</font><br><br></div>';
echo'<div class="main_menu">&laquo;<a href="'.$set['home'].'/blog2/'.$ar['id'].'_'.$url.'.html">Quay lại</a></div>';
}
break;
}
require_once("../in/duoi.php");
?>
 

Facebook Comments

New posts New threads New resources

Back
Top