Location: PHPKode > projects > PHPDug > templates/simple/digframe.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<link href="{SITE_URL}templates/{TPL_NAME}/images/style.css" type="text/css" rel="stylesheet">
<script language="JavaScript" type="text/JavaScript">
<!--
var http = createRequestObject();

function createRequestObject() 
{
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer")
	{
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		ro = new XMLHttpRequest();
	}
	return ro;
}
function digResponse() 
{
	if(http.readyState == 4)
	{
        var response = http.responseText;
		
		returned = response.split('|');

		if(response.indexOf('|' != -1)) 
		{
			var id=returned[1];
			var numdigs=returned[2];
			var status=returned[0];
			
			if(status == '1')
			{
				document.getElementById('digbut'+id).innerHTML = '{LANG_DUGG}';
				document.getElementById('numdigs'+id).innerHTML = numdigs;
  			}
			else if(status == '2')
			{
				document.getElementById('digbut'+id).innerHTML = '{LANG_DUGG}';
			}
			else if(status == '0')
			{
				document.getElementById('digbut'+id).innerHTML = '<a href="{SITE_URL}login.php" target="_parent">{LANG_LOGIN}<\/a>';
			}
		}
    }
}
function dig(id)
{
	document.getElementById('digbut'+id).innerHTML = 'sending';

	http.open('get', '{SITE_URL}dig.php?i='+id);
    http.onreadystatechange = digResponse;
    http.send(null);
}
//-->
</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>

<body>
<table width="60" border="0" cellspacing="0" cellpadding="0"><tr><td background="{SITE_URL}templates/{TPL_NAME}/images/digg_back.jpg"><table width="52" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" height="28" valign="bottom"><div class="digs" id="numdigs{STORY_ID}">{STORY_DIGS}</div></td>
      </tr>
	  <tr>
	  <td height="24" align="center" valign="middle"><span class="digg">{LANG_DIGGS}</span></td>
	  </tr>
      <tr>
        <td height="2"></td>
      </tr>
      <tr>
           <td height="25" align="center"><div class="digit" id="digbut{STORY_ID}">IF("{USER_DUGG}"=="1"){{LANG_DUGG}{:IF}IF("{USER_DUGG}"=="0"){<a href="javascript:dig({STORY_ID});">{LANG_DIGIT}</a>{:IF}</div></td>
      </tr>
    </table></td>
    </tr></table>
</body>
</html>
Return current item: PHPDug