<?php
header ("Cache-Control: no-cache, must-revalidate"); 
header ("Pragma: no-cache");
include("qs.php");
require( '../data/config.php');
$conn=mysql_connect($db_host,$db_user,$db_pass);
mysql_query("set names 'utf8'");
mysql_select_db($db_name);
if (PHP_VERSION >= '5.1' && !empty($timezone))
{
    date_default_timezone_set($timezone);
}
$id=_get('id');
$ku=_get('ku');
$sql="select * from ".$ku." where art_id='$id'";
$rs=mysql_fetch_object(mysql_query($sql));
if($rs->tj==0)
   {
   mysql_query("update ".$ku." set tj=1 where art_id='$id'");
   echo "0,".$id.",images/righton.gif";
   exit();
   }
else
   {
   mysql_query("update ".$ku." set tj=0 where art_id='$id'");
   echo "0,".$id.",images/close.gif";
   exit();
   }
?>
