@@ 66-71 (lines=6) @@ | ||
63 | // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) |
|
64 | if ($ratinguser != 0) { |
|
65 | $result = $xoopsDB->query('SELECT submitter FROM ' . $xoopsDB->prefix('mylinks_links') . " WHERE lid={$lid}"); |
|
66 | while (list($ratinguserDB) = $xoopsDB->fetchRow($result)) { |
|
67 | if ($ratinguserDB == $ratinguser) { |
|
68 | redirect_header('index.php', 4, _MD_MYLINKS_CANTVOTEOWN); |
|
69 | exit(); |
|
70 | } |
|
71 | } |
|
72 | ||
73 | // Check if REG user is trying to vote twice. |
|
74 | $result = $xoopsDB->query('SELECT ratinguser FROM ' . $xoopsDB->prefix('mylinks_votedata') . " WHERE lid={$lid}"); |
|
@@ 75-80 (lines=6) @@ | ||
72 | ||
73 | // Check if REG user is trying to vote twice. |
|
74 | $result = $xoopsDB->query('SELECT ratinguser FROM ' . $xoopsDB->prefix('mylinks_votedata') . " WHERE lid={$lid}"); |
|
75 | while (list($ratinguserDB) = $xoopsDB->fetchRow($result)) { |
|
76 | if ($ratinguserDB == $ratinguser) { |
|
77 | redirect_header('index.php', 4, _MD_MYLINKS_VOTEONCE2); |
|
78 | exit(); |
|
79 | } |
|
80 | } |
|
81 | } else { |
|
82 | ||
83 | // Check if ANONYMOUS user is trying to vote more than once per day. |