-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvote_link.php
More file actions
62 lines (53 loc) · 1.43 KB
/
vote_link.php
File metadata and controls
62 lines (53 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?
/**
* Allomani Weblinks v1.0
*
* @package Allomani.Weblinks
* @version 1.0
* @copyright (c) 2006-2013 Allomani , All rights reserved.
* @author Ali Allomani <info@allomani.com>
* @link http://allomani.com
* @license GNU General Public License version 3.0 (GPLv3)
*
*/
include "global.php" ;
if($vote_num && $id){
$vote_num = intval($vote_num);
$id = intval($id);
if(!$HTTP_COOKIE_VARS["links_vote_$id"]){
db_query("update links_links set votes=votes+$vote_num , votes_total=votes_total+1 where id='$id'");
setcookie('links_vote_'.$id, "ok", time() + (60 * 60 * 24),"/");
}
print "<html dir=$settings[html_dir]>";
print "<title> ÊÞííã ãæÞÚ </title>";
print "<LINK href='style.css' type=text/css rel=StyleSheet>";
open_table("ÊÞííã ãæÞÚ");
print "<center> ÔßÑÇ áß áÞÏ Êã ÊÞííã ÇáãæÞÚ </center>";
close_table();
}else{
print "<html dir=$settings[html_dir]>";
print "<title> ÊÞííã ãæÞÚ </title>";
print "<LINK href='style.css' type=text/css rel=StyleSheet>";
open_table("ÊÞííã ãæÞÚ");
$id = intval($id);
print "
<form action='vote_link.php' method=post>
<input type=hidden name=id value=$id>
<center>
<table width=50%>
<tr><td width=30%>
ÇáÊÞííã : </td>
<td>
<select name=vote_num>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
</select>
</td>
<td><input type=submit value='ÊÞííã'></td>
</tr>
</table></form>";
close_table();
}