Changeset 293 for trunk/export/index.php
- Timestamp:
- Dec 27, 2009, 9:35:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r291 r293 35 35 array('Name' => 'UserName', 'Title' => 'Překladatel'), 36 36 array('Name' => 'Title', 'Title' => 'Popis'), 37 array('Name' => 'UsedCount', 'Title' => 'P očet stažení'),37 array('Name' => 'UsedCount', 'Title' => 'Prohlédnutí výstupu'), 38 38 array('Name' => 'UserCount', 'Title' => 'Překladatelů'), 39 39 array('Name' => 'GroupCount', 'Title' => 'Překladových skupin'), … … 48 48 { 49 49 $Action = '<a href="?Action=View&ExportId='.$Export['Id'].'">Zobrazit</a>'; 50 if($Export['User'] == $_SESSION['UserID']) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" ><div onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</div></a>';50 if($Export['User'] == $_SESSION['UserID']) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'; 51 51 echo('<tr><td>'.$Export['TimeCreate'].'</td><td>'.$Export['UserName'].'</td><td>'.$Export['Title'].'</td><td>'.$Export['UsedCount'].'</td><td>'.$Export['UserCount'].'</td><td>'.$Export['GroupCount'].'</td><td>'.$Action.'</td></tr>'); 52 52 } … … 94 94 if(array_key_exists('ExportId', $_GET)) 95 95 { 96 $Database->SQLCommand('DELETE FROM Export WHERE Id='.$_GET['ExportId']); 97 echo('Export smazán.<br/><br/>'); 98 $_GET['Filter'] = 'my'; 99 ExportList(); 96 $DbResult = $Database->SQLCommand('SELECT * FROM Export WHERE Id='.$_GET['ExportId'].' AND User='.$_SESSION['UserID']); 97 if(mysql_num_rows($DbResult) > 0) 98 { 99 $Database->SQLCommand('DELETE FROM Export WHERE Id='.$_GET['ExportId']); 100 echo('Export smazán.<br/><br/>'); 101 $_GET['Filter'] = 'my'; 102 ExportList(); 103 } else echo('Export '.$_GET['ExportId'].' nelze smazat.<br/>'); 100 104 } else echo('Nebylo zadáno Id'); 101 105 } else echo('Nemáte oprávnění'); … … 515 519 $DbResult = $Database->SQLCommand('SELECT * FROM Export WHERE Id='.$_GET['ExportId']); 516 520 $Export = mysql_fetch_assoc($DbResult); 517 ExportOutput($Export['Id'], $Export['OutputType']); 521 $DbResult = $Database->SQLCommand('SELECT * FROM ExportOutputType WHERE Id='.$Export['OutputType']); 522 if(mysql_num_rows($DbResult) > 0) 523 { 524 $DbResult = $Database->SQLCommand('SELECT * FROM ExportVersion WHERE ExportType='.$Export[ 'OutputType'].' AND ClientVersion='.$Export['ClientVersion']); 525 if(mysql_num_rows($DbResult) > 0) 526 { 527 $Database->SQLCommand('UPDATE Export SET UsedCount = UsedCount + 1 WHERE Id='.$Export['Id']); 528 ExportOutput($Export['Id'], $Export['OutputType']); 529 } else echo('Nebyla vybrána požadovaná verze klienta'); 530 } else echo('Nebyl vybrán formát výstupu.'); 518 531 } 519 532
Note:
See TracChangeset
for help on using the changeset viewer.