Changeset 4325 for trunk/include/functions_user.inc.php
- Timestamp:
- Nov 20, 2009, 3:17:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r4304 r4325 59 59 '.(is_numeric($user_id) ? 'and '.$conf['user_fields']['id'].' != \''.$user_id.'\'' : '').' 60 60 ;'; 61 list($count) = mysql_fetch_row(pwg_query($query));61 list($count) = pwg_db_fetch_row(pwg_query($query)); 62 62 if ($count != 0) 63 63 { … … 111 111 FROM '.USERS_TABLE.' 112 112 ;'; 113 list($next_id) = mysql_fetch_row(pwg_query($query));113 list($next_id) = pwg_db_fetch_row(pwg_query($query)); 114 114 115 115 $insert = 116 116 array( 117 117 $conf['user_fields']['id'] => $next_id, 118 $conf['user_fields']['username'] => mysql_real_escape_string($login),118 $conf['user_fields']['username'] => pwg_db_real_escape_string($login), 119 119 $conf['user_fields']['password'] => $conf['pass_convert']($password), 120 120 $conf['user_fields']['email'] => $mail_address … … 135 135 136 136 $inserts = array(); 137 while ($row = mysql_fetch_assoc($result))137 while ($row = pwg_db_fetch_assoc($result)) 138 138 { 139 139 array_push … … 250 250 WHERE '.$conf['user_fields']['id'].' = \''.$user_id.'\''; 251 251 252 $row = mysql_fetch_assoc(pwg_query($query));252 $row = pwg_db_fetch_assoc(pwg_query($query)); 253 253 254 254 while (true) … … 260 260 WHERE ui.user_id = \''.$user_id.'\''; 261 261 $result = pwg_query($query); 262 if ( mysql_num_rows($result) > 0)262 if (pwg_db_num_rows($result) > 0) 263 263 { 264 264 break; … … 270 270 } 271 271 272 $row = array_merge($row, mysql_fetch_assoc($result));272 $row = array_merge($row, pwg_db_fetch_assoc($result)); 273 273 274 274 foreach ($row as $key => $value) … … 325 325 WHERE category_id NOT IN ('.$userdata['forbidden_categories'].') 326 326 AND image_id '.$userdata['image_access_type'].' ('.$userdata['image_access_list'].')'; 327 list($userdata['nb_total_images']) = mysql_fetch_row(pwg_query($query));327 list($userdata['nb_total_images']) = pwg_db_fetch_row(pwg_query($query)); 328 328 329 329 … … 429 429 $result = pwg_query($query); 430 430 $authorizeds = array(); 431 while ($row = mysql_fetch_assoc($result))431 while ($row = pwg_db_fetch_assoc($result)) 432 432 { 433 433 array_push($authorizeds, $row['image_id']); … … 441 441 $result = pwg_query($query); 442 442 $favorites = array(); 443 while ($row = mysql_fetch_assoc($result))443 while ($row = pwg_db_fetch_assoc($result)) 444 444 { 445 445 array_push($favorites, $row['image_id']); … … 482 482 ;'; 483 483 $result = pwg_query($query); 484 while ($row = mysql_fetch_assoc($result))484 while ($row = pwg_db_fetch_assoc($result)) 485 485 { 486 486 array_push($private_array, $row['id']); … … 524 524 ;'; 525 525 $result = pwg_query($query); 526 while ($row = mysql_fetch_assoc($result))526 while ($row = pwg_db_fetch_assoc($result)) 527 527 { 528 528 array_push($forbidden_array, $row['id']); … … 648 648 649 649 $cats = array(); 650 while ($row = mysql_fetch_assoc($result))650 while ($row = pwg_db_fetch_assoc($result)) 651 651 { 652 652 $row['user_id'] = $userdata['id']; … … 693 693 global $conf; 694 694 695 $username = mysql_real_escape_string($username);695 $username = pwg_db_real_escape_string($username); 696 696 697 697 $query = ' … … 702 702 $result = pwg_query($query); 703 703 704 if ( mysql_num_rows($result) == 0)704 if (pwg_db_num_rows($result) == 0) 705 705 { 706 706 return false; … … 708 708 else 709 709 { 710 list($user_id) = mysql_fetch_row($result);710 list($user_id) = pwg_db_fetch_row($result); 711 711 return $user_id; 712 712 } … … 728 728 WHERE id = \''.$key.'\' 729 729 ;'; 730 list($count) = mysql_fetch_row(pwg_query($query));730 list($count) = pwg_db_fetch_row(pwg_query($query)); 731 731 if (0 == $count) 732 732 { … … 751 751 752 752 $result = pwg_query($query); 753 $cache['default_user'] = mysql_fetch_assoc($result);753 $cache['default_user'] = pwg_db_fetch_assoc($result); 754 754 755 755 if ($cache['default_user'] !== false) … … 866 866 { 867 867 $inserts = array(); 868 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));868 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 869 869 870 870 $default_user = get_default_user_info(false); … … 931 931 WHERE '.$conf['user_fields']['id'].' = '.$user_id; 932 932 $result = pwg_query($query); 933 if ( mysql_num_rows($result) > 0)934 { 935 $row = mysql_fetch_assoc($result);933 if (pwg_db_num_rows($result) > 0) 934 { 935 $row = pwg_db_fetch_assoc($result); 936 936 $username = stripslashes($row['username']); 937 937 $data = $time.stripslashes($row['username']).$row['password']; … … 1042 1042 WHERE '.$conf['user_fields']['username'].' = \''.mysql_real_escape_string($username).'\' 1043 1043 ;'; 1044 $row = mysql_fetch_assoc(pwg_query($query));1044 $row = pwg_db_fetch_assoc(pwg_query($query)); 1045 1045 if ($row['password'] == $conf['pass_convert']($password)) 1046 1046 {
Note: See TracChangeset
for help on using the changeset viewer.