- Timestamp:
- Aug 18, 2010, 10:43:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/include/functions.inc.php
r6757 r6775 498 498 pwg_query($query); 499 499 } 500 501 502 /* Function called from main.inc.php - Triggered on user deletion */ 503 function DeleteRedir($user_id) 504 { 505 $tab = array(); 506 507 $query = " 508 SELECT value 509 FROM ".CONFIG_TABLE." 510 WHERE param = 'UserAdvManager_Redir' 511 ;"; 512 513 $tab = pwg_db_fetch_row(pwg_query($query)); 514 515 $values = explode(',', $tab[0]); 516 517 unset($values[array_search($user_id, $values)]); 518 519 $query = " 520 UPDATE ".CONFIG_TABLE." 521 SET value = \"".implode(',', $values)."\" 522 WHERE param = 'UserAdvManager_Redir';"; 523 524 pwg_query($query); 525 } 526 500 527 501 528 /* Function called from ConfirmMail.php to verify validation key used by user according time limit */ … … 1185 1212 } 1186 1213 } 1214 1215 1216 // check_consult - Thx to LucMorizur 1217 // checks if a user id is registered as having already 1218 // visited his profile.php page. 1219 // @uid : the user id 1220 // @user_idsOK : (returned) array of all users ids having already visited 1221 // their profile.php pages 1222 // 1223 // @returns : true or false whether the users has already visited his 1224 // profile.php page or not 1225 function check_consult($uid, &$user_idsOK) 1226 { 1227 $t = array(); 1228 $v = false; 1229 1230 $query = " 1231 SELECT value 1232 FROM ".CONFIG_TABLE." 1233 WHERE param = 'UserAdvManager_Redir' 1234 ;"; 1235 1236 if ($v = (($t = pwg_db_fetch_row(pwg_query($query))) !== false)) 1237 { 1238 $user_idsOK = explode(',', $t[0]); 1239 $v = (in_array($uid, $user_idsOK)); 1240 } 1241 return $v; 1242 } 1187 1243 ?>
Note: See TracChangeset
for help on using the changeset viewer.