| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/baberankings.com.bak/members/modules/rating/ |
Upload File : |
<?
/* K-Rate
(C) Rinalds Uzkalns, 2003-2004. All Rights Reserved
http://turn-k.net
Version: 1.00 (22.09.04)
*/
?>
<?
//including image functions
include_once 'modules/rating/image_funcs.php';
//different cookies for profile / image rating modes
$cookie = (int)voting_type == 0 ? 'voted' : 'voted_images';
/* if ($en['is_video'] == "img")
$cookie = $cookie."-img";
else
$cookie = $cookie."-vid";
*/
//get members that have been voted for
if (vote_cookie != 'No')
$voted = unserialize(base64_decode($_COOKIE[$cookie]));
if (!is_array($voted)) $voted = array();
//get one to vote
$query = array();
//members that have been voted for
$skip = '';
$voted[] = (int)voting_type == 0 ? $en['id'] : $en['image'];
foreach ($voted as $key => $value) $skip .= ' AND '.((int)voting_type == 0 ? 'm_id' : 'i_id').'<>"'.$value.'"';
$skip = substr($skip,5);
if ($skip != '') $query[] = '('.$skip.')';
//member type
if ($en['type'] <> 'all')
$query[] = allow_more_cats == 'Yes' ? 'i_type='.$en['type'] : 'm_type='.$en['type'];
//user would like to get rated
$query[] = 'm_rateme=1';
//the category can receive votes?
$query[] = 't_enable_voting=0';
// to choose between the images/videos
if ($en['is_video'] == "vid") {
$query[] = "i_video = 1 ";
//image/user status
$query[] = 'i_video_status'.((int)voting_type == 0 ? '=2' : '>0').' AND m_confirmed>0';
}
if ($en['is_video'] == "img") {
$query[] = "i_video = 0 ";
//image/user status
$query[] = 'i_status'.((int)voting_type == 0 ? '=2' : '>0').' AND m_confirmed>0';
}
//build query
$q = implode(' AND ',$query);
$res = sql_query("SELECT * FROM $membtable LEFT JOIN $picstable ON m_id=i_user LEFT JOIN $typetable ON m_type=t_id WHERE $q ORDER BY RAND() LIMIT 1");
//echo("SELECT * FROM $membtable LEFT JOIN $picstable ON m_id=i_user LEFT JOIN $typetable ON m_type=t_id WHERE $q ORDER BY RAND() LIMIT 1"); exit();
//not anything left to vote on?
if (sql_num_rows($res) == 0) {
ob_clean();
header('Location:'.constant('dir').'?voted');
exit;
}
//get info
$line = sql_fetch_assoc($res);
foreach ($line as $key => $value) $en['v'.$key] = $value;
load_template('modules/rating/templates/quick_vote.tpl');
?>