<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
if(isset($arcID))
{
	$aid = $arcID;
}
$arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
if($aid==0)
{
	die(" Request Error! ");
}

$row = $dsql->GetOne("select * from `dede_addondj` as a left join `dede_archives` as b on a.aid=b.id where aid='$aid'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<title>舞曲顶踩</title>
<link href="/skin/img/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript">
function etabit(btn){var idname = new String(btn.id);var s = idname.indexOf("_");var e = idname.lastIndexOf("_")+1;var tabName = idname.substr(0, s);var id = parseInt(idname.substr(e, 1));
var tabNumber = btn.parentNode.childNodes.length;for(i=0;i<tabNumber;i++){document.getElementById(tabName+"_div_"+i).style.display = "none";document.getElementById(tabName+"_btn_"+i).className = "";};document.getElementById(tabName+"_div_"+id).style.display = "block";btn.className = "curr";};</script>
<script language="javascript" type="text/javascript" src="/include/dedeajax2.js"></script>
<script language="javascript" type="text/javascript" src="/skin/selectcss.js"></script>
<script language="javascript" type="text/javascript">
function postDigg(ftype,aid)
{
	var taget_obj = document.getElementById('newdigg');
	var saveid = GetCookie('diggid');
	if(saveid != null)
	{
		var saveids = saveid.split(',');
		var hasid = false;
		saveid = '';
		j = 1;
		for(i=saveids.length-1;i>=0;i--)
		{
			if(saveids[i]==aid && hasid) continue;
			else {
				if(saveids[i]==aid && !hasid) hasid = true;
				saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);
				j++;
				if(j==20 && hasid) break;
				if(j==19 && !hasid) break;
			}
		}
		if(hasid) { alert("您24小时内已经 顶 (踩) 过此舞曲了！"); return; }
		else saveid += ','+aid;
		SetCookie('diggid',saveid,1);
	}
	else
	{
		SetCookie('diggid',aid,1);
	}
	myajax = new DedeAjax(taget_obj,false,false,'','','');
	var url = "/plus/digg_ajax.php?action="+ftype+"&id="+aid;
	myajax.SendGet2(url);
}
function getDigg(aid)
{
	var taget_obj = document.getElementById('newdigg');
	myajax = new DedeAjax(taget_obj,false,false,'','','');
	myajax.SendGet2("/plus/digg_ajax.php?id="+aid);
	DedeXHTTP = null;
}
-->
</script>
</head>
<body>
<div style="margin-top:-10px;padding-left:1px;">
<div id="albumend">

  <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
      <td width="252" valign="top">
  <!--  顶 --><div class=viewbox>
			<div class="newdigg" id="newdigg">
				<div class="diggbox digg_good" onmousemove="this.style.backgroundPosition='left bottom';" onmouseout="this.style.backgroundPosition='left top';" onclick="javascript:postDigg('good',1)">
					<div class="digg_act">顶一下</div>
					<div class="digg_num">(0)</div>
					<div class="digg_percent">
						<div class="digg_percent_bar"><span style="width:0%"></span></div>
						<div class="digg_percent_num">0%</div>
					</div>
				</div>
				<div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition='right bottom';" onmouseout="this.style.backgroundPosition='right top';" onclick="javascript:postDigg('bad',1)">
					<div class="digg_act">踩一下</div>
					<div class="digg_num">(0)</div>
					<div class="digg_percent">
						<div class="digg_percent_bar"><span style="width:0%"></span></div>
						<div class="digg_percent_num">0%</div>
					</div>
				</div>
			</div>
			 <script language="javascript" type="text/javascript">getDigg(<?echo $row['id'];?>);</script>				
	  </div>
<div style="display:none">
	<script src="/plus/djhits.php?view=yes&aid=<?echo $row['id'];?>&mid=1" type='text/javascript' language="javascript"></script>
</div>