class/publicWall.php 1 location
|
@@ 253-266 (lines=14) @@
|
250 |
|
* @param int $msgid |
251 |
|
* @return int |
252 |
|
*/ |
253 |
|
public function HasVoted($userid, $type, $comid, $msgid) |
254 |
|
{ |
255 |
|
global $xoopsUser, $xoopsDB; |
256 |
|
if ('msg' === $type) { |
257 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '0' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
258 |
|
$result = $xoopsDB->queryF($sql); |
259 |
|
$i = $xoopsDB->getRowsNum($result); |
260 |
|
} else { |
261 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '" . $comid . "' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
262 |
|
$result = $xoopsDB->queryF($sql); |
263 |
|
$i = $xoopsDB->getRowsNum($result); |
264 |
|
} |
265 |
|
return $i; |
266 |
|
} |
267 |
|
|
268 |
|
/** |
269 |
|
* @count messages per user |
class/PublicWallUpdates.php 1 location
|
@@ 255-268 (lines=14) @@
|
252 |
|
* @param int $msgid |
253 |
|
* @return int |
254 |
|
*/ |
255 |
|
public function HasVoted($userid, $type, $comid, $msgid) |
256 |
|
{ |
257 |
|
global $xoopsUser, $xoopsDB; |
258 |
|
if ('msg' === $type) { |
259 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '0' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
260 |
|
$result = $xoopsDB->queryF($sql); |
261 |
|
$i = $xoopsDB->getRowsNum($result); |
262 |
|
} else { |
263 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '" . $comid . "' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
264 |
|
$result = $xoopsDB->queryF($sql); |
265 |
|
$i = $xoopsDB->getRowsNum($result); |
266 |
|
} |
267 |
|
return $i; |
268 |
|
} |
269 |
|
|
270 |
|
/** |
271 |
|
* @count messages per user |
class/wall.php 1 location
|
@@ 312-325 (lines=14) @@
|
309 |
|
* @param int $msgid |
310 |
|
* @return int |
311 |
|
*/ |
312 |
|
public function HasVoted($userid, $type, $comid, $msgid) |
313 |
|
{ |
314 |
|
global $xoopsUser, $xoopsDB; |
315 |
|
if ('msg' === $type) { |
316 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '0' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
317 |
|
$result = $xoopsDB->queryF($sql); |
318 |
|
$i = $xoopsDB->getRowsNum($result); |
319 |
|
} else { |
320 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '" . $comid . "' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
321 |
|
$result = $xoopsDB->queryF($sql); |
322 |
|
$i = $xoopsDB->getRowsNum($result); |
323 |
|
} |
324 |
|
return $i; |
325 |
|
} |
326 |
|
|
327 |
|
/** |
328 |
|
* @count messages per user |
class/WallUpdates.php 1 location
|
@@ 317-330 (lines=14) @@
|
314 |
|
* @param int $msgid |
315 |
|
* @return int |
316 |
|
*/ |
317 |
|
public function HasVoted($userid, $type, $comid, $msgid) |
318 |
|
{ |
319 |
|
global $xoopsUser, $xoopsDB; |
320 |
|
if ('msg' === $type) { |
321 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '0' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
322 |
|
$result = $xoopsDB->queryF($sql); |
323 |
|
$i = $xoopsDB->getRowsNum($result); |
324 |
|
} else { |
325 |
|
$sql = 'SELECT * FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '" . $comid . "' AND msg_id = '" . $msgid . "' AND user_id = '" . $userid . "'"; |
326 |
|
$result = $xoopsDB->queryF($sql); |
327 |
|
$i = $xoopsDB->getRowsNum($result); |
328 |
|
} |
329 |
|
return $i; |
330 |
|
} |
331 |
|
|
332 |
|
/** |
333 |
|
* @count messages per user |