Changeset 298 for trunk/includes/global_function.php
- Timestamp:
- Dec 28, 2009, 5:13:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r295 r298 266 266 10 => array('Name' => 'Chyby', 'Color' => 'red', 'Description' => 'Zachycené chybové hlášení'), 267 267 11 => array('Name' => 'Import', 'Color' => '#A020F0', 'Description' => 'Záznam změn při importu'), 268 12 => array('Name' => 'Export', 'Color' => '#1080F0', 'Description' => 'Záznam akcí s exporty'), 268 269 ); 269 270 … … 280 281 } else 281 282 { 282 $user = @$_SESSION['UserID']; 283 if(array_key_exists('UserID', $_SESSION)) $user = $_SESSION['UserID']; 284 else $user = 0; 283 285 $ip = addslashes($_SERVER['REMOTE_ADDR']); 284 286 } 285 287 286 if($user == '') $user = 0;287 288 $Database->SelectDatabase($Config['Database']['Database']); 288 289 $Query = 'INSERT INTO `log` ( `user` , `type` , `text` , `date` , `IP` ) … … 524 525 } 525 526 527 function delete_directory($dirname) 528 { 529 if(is_dir($dirname)) 530 { 531 $dir_handle = opendir($dirname); 532 if(!$dir_handle) return(false); 533 while($file = readdir($dir_handle)) 534 { 535 if(($file != '.') and ($file != '..')) 536 { 537 if(!is_dir($dirname.'/'.$file)) unlink($dirname.'/'.$file); 538 else delete_directory($dirname.'/'.$file); 539 } 540 } 541 closedir($dir_handle); 542 rmdir($dirname); 543 } 544 return(true); 545 } 546 526 547 527 548 ?>
Note:
See TracChangeset
for help on using the changeset viewer.