Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
[/quote]<?php $id = (is_numeric($_GET['id']) && $_GET['id'] > 0$_GET['username']) ? $_GET['id'] : $_GET['username']; ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Система за гласуване :: Powered by HunteR ::</title>
<?php $id = (is_numeric($_GET['id']) && $_GET['id'] > 0) ? $_GET['id'] : 0; ?>
<script type="text/javascript" src="vote.js"></script>
<script language="JavaScript">
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
</script>
</head>
<?php
require "connect.php";
$row = mysql_fetch_array(mysql_query("SELECT `yes`,`no` FROM `votes` WHERE `id` = '$id'"));
$yess = (empty($row['yes'])) ? 0 : $row['yes'];
$noo = (empty($row['no'])) ? 0 : $row['no'];
$timestamp_vote = (is_numeric(TIMESTAMP_VOTE) && TIMESTAMP_VOTE > 0) ? time() - (TIMESTAMP_VOTE * 3600) : 0;
$query = mysql_query("SELECT `vote` FROM `ips` WHERE `id` = '$id' AND `ip` = '".$_SERVER['REMOTE_ADDR']."' AND `timestamp` > '$timestamp_vote' LIMIT 1");
$vote_ip = mysql_fetch_object($query);
$vote_yes = (($vote_ip -> vote) == 1) ? "vote_up" : "vote_up2";
$vote_no = (($vote_ip -> vote) == -1) ? "vote_down" : "vote_down2";
?>
<body>
<div id="txtHint"><?php if (!mysql_num_rows($query)) { ?><a href="javascript:void(null)" onclick="showHint('1','<?=$id?>')" onmouseover="movepic('pic1','vote_up.gif');"
onmouseout="movepic('pic1','vote_up2.gif');"><? } ?><img name="pic1" src="<?=$vote_yes?>.gif" border="0"><?php if (!mysql_num_rows($query)) { ?></a><? } ?> <b><?=$yess?></b>
<?php if (!mysql_num_rows($query)) { ?><a href="javascript:void(null)" onclick="showHint('-1','<?=$id?>')" onmouseover="movepic('pic2','vote_down.gif');"
onmouseout="movepic('pic2','vote_down2.gif');"><? } ?><img name="pic2" src="<?=$vote_no?>.gif" border="0"><?php if (!mysql_num_rows($query)) { ?></a><? } ?> <b><?=$noo?></b></div>
</body>
</html>