<?php
header("Location: $lon"); ?>
<?php
// Toán tử số học
$t = $_GET['t'];
?>
<?php
$link = mysql_connect('localhost', 'db', 'mk');
if (!$link)
{
echo "Không thể kết nối được tới CSDL MySQL";
}
if (!mysql_select_db ("db"))
{
echo "Không thể lựa chọn được CSDL";
}
$sql = "select * from wp_posts where id = '$t'";
@$result = mysql_query($sql);
if(!$result)
{
echo 'Đã lỗi truy vấn: '.mysql_error();
echo "\r\n<br />";
echo 'Truy vấn: '.$sql;
exit;
}
while($data = mysql_fetch_assoc($result)){
$tieude = $data['post_title'];
}
$sql = "select * from wp_postmeta where post_id = '$t' AND meta_key = 'caodung_link_download'";
$result = mysql_query($sql);
while($data = mysql_fetch_assoc($result)){
$da = $data['meta_id'];
}
$sql = "select * from wp_postmeta where meta_id = $da";
$result1 = mysql_query($sql);
while($data = mysql_fetch_assoc($result1))
{
$lon = $data['meta_value'];
}
$sql3="update wp_posts set downstas=downstas + 1 where ID=$t"; mysql_query($sql3);
?>
</div>