Changeset 298
- Timestamp:
- Dec 28, 2009, 5:13:29 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/download.php
r295 r298 32 32 $Database->SQLCommand('INSERT INTO `verseclient` (`verse` ,`date` ,`text` ,`user`) 33 33 VALUES ( "'.$_POST['verse'].'", NOW( ) , "'.$_POST['text'].'", "'.$_SESSION['UserID'].'");'); 34 WriteLog('Nová verze ('.$_POST['verse'].') češitny pro clienta uložena.', 4);34 WriteLog('Nová verze ('.$_POST['verse'].') češitny pro clienta uložena.', 4); 35 35 } else { //formulář 36 36 echo ('<form action"" method="post">'. … … 66 66 '<td><strong>'.$Line['verse'].'</strong> <a href="tmp/Addon/CzWoW_'.$Line['verse'].'.zip">Stáhnout</a> <br />'.$Line['date'].'</td>'. 67 67 '<td>'.str_replace(chr(13),'<br />',$Line['text']).'</td>'); 68 echo('</tr>');68 echo('</tr>'); 69 69 } 70 70 echo('</table>'); -
trunk/export/index.php
r297 r298 90 90 $ExportId = mysql_insert_id(); 91 91 echo('Nový export vytvořen.<br/>Přímý odkaz na tento export: <a href="?Action=View&ExportId='.$ExportId.'">zde</a><br/><br/>'); 92 WriteLog('Vytvořen nový export <a href="'.$Config['Web']['BaseURL'].'export/?Action=View&ExportId='.$ExportId.'">'.$ExportId.'</a>.', 12); 92 93 $_GET['Filter'] = 'my'; 93 94 ExportList(); … … 109 110 { 110 111 $Database->SQLCommand('DELETE FROM Export WHERE Id='.$_GET['ExportId']); 112 delete_directory('../tmp/Export/'.$_GET['ExportId'].'/'); 111 113 echo('Export smazán.<br/><br/>'); 112 114 $_GET['Filter'] = 'my'; 115 WriteLog('Smazán export '.$_GET['ExportId'], 12); 113 116 ExportList(); 114 117 } else echo('Export '.$_GET['ExportId'].' nelze smazat.<br/>'); -
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 ?> -
trunk/log.php
r291 r298 62 62 else $Where = ''; 63 63 } 64 if(($Where != '') and (array_key_exists('group', $_SESSION))) $Where .= ' AND text LIKE "%'.$TranslationTree[$_SESSION['group']]['Name'].'%"';64 //if(($Where != '') and (array_key_exists('group', $_SESSION))) $Where .= ' AND text LIKE "%'.$TranslationTree[$_SESSION['group']]['Name'].'%"'; 65 65 66 66 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `log` '.$Where); … … 81 81 82 82 $sql = 'SELECT *,(SELECT `user`.`user` FROM `user` WHERE `user`.`id` = `log`.`user`) AS `user` FROM `log` '.$Where.$Order['SQL'].$PageList['SQLLimit']; 83 $ID = $Database->SQLCommand($sql); 83 //echo($sql); 84 $ID = $Database->SQLCommand($sql); 84 85 while($Line = mysql_fetch_assoc($ID)) 85 86 {
Note:
See TracChangeset
for help on using the changeset viewer.