- Timestamp:
- Sep 20, 2007, 3:00:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_7/include/functions_rate.inc.php
r1903 r2099 51 51 } 52 52 53 $ip_components = explode('.', $_SERVER["REMOTE_ADDR"]); 54 if (count($ip_components) > 3) 55 { 56 array_pop($ip_components); 57 } 58 $anonymous_id = implode ('.', $ip_components); 59 53 60 if ($user_anonymous) 54 61 { 55 $ip_components = explode('.', $_SERVER["REMOTE_ADDR"]);56 if (count($ip_components) > 3)57 {58 array_pop($ip_components);59 }60 $anonymous_id = implode ('.', $ip_components);61 62 62 if (isset($_COOKIE['pwg_anonymous_rater'])) 63 63 { … … 79 79 WHERE user_id = '.$user['id'].' 80 80 AND anonymous_id = \''.$_COOKIE['pwg_anonymous_rater'].'\' 81 AND element_id NOTIN ('.implode(',', $already_there).')81 AND element_id IN ('.implode(',', $already_there).') 82 82 ;'; 83 83 pwg_query($query); … … 117 117 AND user_id = '.$user['id'].' 118 118 '; 119 if (isset($ anonymous_id))119 if (isset($user_anonymous)) 120 120 { 121 121 $query.= ' AND anonymous_id = \''.$anonymous_id.'\''; … … 129 129 (' 130 130 .$user['id'].',' 131 . (isset($anonymous_id) ? '\''.$anonymous_id.'\'' : "''").','131 .'\''.$anonymous_id.'\',' 132 132 .$image_id.',' 133 133 .$rate
Note: See TracChangeset
for help on using the changeset viewer.