Changeset 1565 for trunk/include/functions.inc.php
- Timestamp:
- Oct 19, 2006, 2:41:07 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r1510 r1565 385 385 global $conf, $user; 386 386 387 if ($conf['log']) 388 { 389 if (($conf['history_admin']) or ((! $conf['history_admin']) 390 and (!is_admin()))) 391 { 387 if ( is_admin() ) 388 { 389 $doit=$conf['history_admin']; 390 } 391 elseif ( $user['is_the_guest'] ) 392 { 393 $doit=$conf['history_guest']; 394 } 395 else 396 { 397 $doit = $conf['log']; 398 } 399 400 if ($doit) 401 { 392 402 $login = ($user['id'] == $conf['guest_id']) 393 403 ? 'guest' : addslashes($user['username']); 394 395 $query = ' 404 insert_into_history($login, $file, $category, $picture); 405 } 406 } 407 408 function pwg_log_login( $username ) 409 { 410 global $conf; 411 if ( $conf['login_history'] ) 412 { 413 insert_into_history($username, 'login', '', ''); 414 } 415 } 416 417 // inserts a row in the history table 418 function insert_into_history( $login, $file, $category, $picture) 419 { 420 $query = ' 396 421 INSERT INTO '.HISTORY_TABLE.' 397 422 (date,login,IP,file,category,picture) … … 404 429 \''.addslashes($picture).'\') 405 430 ;'; 406 pwg_query($query); 407 } 408 } 431 pwg_query($query); 409 432 } 410 433 … … 462 485 } 463 486 464 function pwg_stripslashes($value) 487 function pwg_stripslashes($value) 465 488 { 466 489 if (get_magic_quotes_gpc()) … … 471 494 } 472 495 473 function pwg_addslashes($value) 496 function pwg_addslashes($value) 474 497 { 475 498 if (!get_magic_quotes_gpc()) … … 480 503 } 481 504 482 function pwg_quotemeta($value) 505 function pwg_quotemeta($value) 483 506 { 484 507 if (get_magic_quotes_gpc()) { … … 700 723 { 701 724 global $conf; 702 725 703 726 $error = '<pre>'; 704 727 $error.= $header; … … 945 968 { 946 969 global $conf; 947 970 948 971 $query = ' 949 972 SELECT param,value … … 960 983 { 961 984 $conf[ $row['param'] ] = isset($row['value']) ? $row['value'] : ''; 962 985 963 986 // If the field is true or false, the variable is transformed into a 964 987 // boolean value.
Note: See TracChangeset
for help on using the changeset viewer.