Changeset 9253 for extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php
- Timestamp:
- Feb 16, 2011, 7:28:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php
r9177 r9253 105 105 case 'global': 106 106 107 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_ CustomPasswRetr']))107 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail'])) 108 108 { 109 109 … … 551 551 } 552 552 553 // Avoid jquery accordeon menu bug when there is no users to display 554 if (empty($visible_user_list)) 553 // Avoid jquery accordion menu bug when there is no users to display 554 // Pending because it causes php warnings when no users are listed (when $visible_user_list[] is empty) 555 /*if (empty($visible_user_list)) 555 556 { 556 557 $visible_user_list[] = null; 557 } 558 }*/ 558 559 559 560 foreach ($visible_user_list as $local_user) … … 1029 1030 1030 1031 // Avoid jquery accordeon menu bug when there is no users to display 1031 if (empty($visible_user_list)) 1032 // Pending because it causes php warnings when no users are listed (when $visible_user_list[] is empty) 1033 /*if (empty($visible_user_list)) 1032 1034 { 1033 1035 $visible_user_list[] = null; 1034 } 1036 }*/ 1035 1037 1036 1038 foreach ($visible_user_list as $local_user) … … 1353 1355 } 1354 1356 1355 if (isset($_POST['GhostTracker_Init'])) 1356 { 1357 //Reset is only allowed for admins ! 1358 if (is_admin()) 1359 { 1360 $query1 = ' 1357 if (isset($_POST['GhostTracker_Init']) and is_admin()) //Reset is only allowed for admins ! 1358 { 1359 $query1 = ' 1361 1360 SELECT * 1362 1361 FROM '.USER_LASTVISIT_TABLE.';'; 1363 1362 1364 1365 1366 1367 1368 1363 $count = pwg_db_num_rows(pwg_query($query1)); 1364 1365 if ($count <> 0) 1366 { 1367 $query = ' 1369 1368 SELECT DISTINCT u.id, 1370 1369 ui.status AS status … … 1379 1378 ;'; 1380 1379 1381 1380 $result = pwg_query($query); 1382 1381 1383 1384 1385 1382 while ($row = pwg_db_fetch_assoc($result)) 1383 { 1384 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 1386 1385 1387 1386 $query = " 1388 1387 INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder) 1389 1388 VALUES ('".$row['id']."','".$dbnow."','false') 1390 1389 ;"; 1391 pwg_query($query); 1392 } 1390 pwg_query($query); 1393 1391 } 1394 else if ($count == 0) 1395 { 1396 $query = ' 1392 } 1393 else if ($count == 0) 1394 { 1395 $query = ' 1397 1396 SELECT DISTINCT u.id, 1398 1397 ui.status AS status … … 1406 1405 ;'; 1407 1406 1408 1407 $result = pwg_query($query); 1409 1408 1410 1411 1412 1409 while($row = pwg_db_fetch_assoc($result)) 1410 { 1411 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 1413 1412 1414 1413 $query = " 1415 1414 INSERT INTO ".USER_LASTVISIT_TABLE." (user_id, lastvisit, reminder) 1416 1415 VALUES ('".$row['id']."','".$dbnow."','false') 1417 1416 ;"; 1418 pwg_query($query); 1419 } 1417 pwg_query($query); 1420 1418 } 1419 } 1421 1420 1422 array_push($page['infos'], l10n('UAM_GhostTracker_Init_OK')); 1423 } 1421 array_push($page['infos'], l10n('UAM_GhostTracker_Init_OK')); 1424 1422 } 1425 1423
Note: See TracChangeset
for help on using the changeset viewer.