Changeset 572
- Timestamp:
- Aug 26, 2013, 10:24:51 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Error/Error.php
r568 r572 73 73 $Backtrace[0]['line'] = $LineNumber; 74 74 $this->Report($Backtrace); 75 if((E_ERROR | E_PARSE) & $Number) die(); 75 //if((E_ERROR | E_PARSE) & $Number) 76 die(); 76 77 } 77 78 } … … 116 117 '<meta http-equiv="Content-Language" content="cs">'."\n". 117 118 '<meta http-equiv="Content-Type" content="text/html; charset='.$this->Encoding.'"></head><body>'."\n". 118 'Došlo k vnitřní chybě!<br/> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br/><br/>'; 119 'Došlo k vnitřní chybě!<br/> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br/><br/>'; 119 120 if($this->ShowError == true) 120 121 $Output .= '<pre>'.$Error.'</pre><br/>'; -
trunk/Modules/Export/Page.php
r571 r572 2 2 3 3 include_once('ExportOutput.php'); 4 5 define('TAB_GENERAL', 0); 6 define('TAB_TRANSLATORS', 1); 7 define('TAB_GROUPS', 2); 8 define('TAB_LANGUAGES', 3); 9 define('TAB_OUTPUT_FORMAT', 4); 10 define('TAB_VERSION', 5); 11 define('TAB_STAT', 6); 12 define('TAB_OUTPUT', 7); 4 13 5 14 class PageExport extends Page … … 54 63 '<a href="?Action=View&ExportId='.$Export['Id'].'&Tab=7">Exportovat</a>'; 55 64 if($Export['User'] == $User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'; 65 if($User->Id != null) $Action .= ' <a href="?Action=Clone&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu klonovat položku?\');">Klonovat</a>'; 56 66 $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'. 57 67 '<td><a href="'.$this->System->Link('/user.php?user='.$Export['User']).'">'.$Export['UserName'].'</a></td>'. … … 678 688 $Output .= ShowTabs(array('Obecné', 'Překladatelé', 'Překlady', 'Jazyky', 'Formát', 'Verze', 'Statistika', 'Výstup')); 679 689 $Output .= '<div id="content">'; 680 if($_SESSION['Tab'] == 0) $Output .= $this->ExportViewGeneral();681 else if($_SESSION['Tab'] == 1) $Output .= $this->ExportViewTranslators();682 else if($_SESSION['Tab'] == 2) $Output .= $this->ExportViewGroups();683 else if($_SESSION['Tab'] == 3) $Output .= $this->ExportViewLanguages();684 else if($_SESSION['Tab'] == 4) $Output .= $this->ExportViewOutputFormat();685 else if($_SESSION['Tab'] == 5) $Output .= $this->ExportViewVersion();686 else if($_SESSION['Tab'] == 6) $Output .= $this->ExportViewStat();687 else if($_SESSION['Tab'] == 7) $Output .= $this->ExportViewOutput();690 if($_SESSION['Tab'] == TAB_GENERAL) $Output .= $this->ExportViewGeneral(); 691 else if($_SESSION['Tab'] == TAB_TRANSLATORS) $Output .= $this->ExportViewTranslators(); 692 else if($_SESSION['Tab'] == TAB_GROUPS) $Output .= $this->ExportViewGroups(); 693 else if($_SESSION['Tab'] == TAB_LANGUAGES) $Output .= $this->ExportViewLanguages(); 694 else if($_SESSION['Tab'] == TAB_OUTPUT_FORMAT) $Output .= $this->ExportViewOutputFormat(); 695 else if($_SESSION['Tab'] == TAB_VERSION) $Output .= $this->ExportViewVersion(); 696 else if($_SESSION['Tab'] == TAB_STAT) $Output .= $this->ExportViewStat(); 697 else if($_SESSION['Tab'] == TAB_OUTPUT) $Output .= $this->ExportViewOutput(); 688 698 else $Output .= $this->ExportViewGeneral(); 689 699 … … 694 704 } 695 705 696 function Show() 706 function ExportClone() 707 { 708 if($this->System->User->Licence(LICENCE_USER)) 709 { 710 if(array_key_exists('ExportId', $_GET) and is_numeric($_GET['ExportId'])) 711 { 712 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `User`='.$this->System->User->Id); 713 $DbRow = $DbResult->fetch_row(); 714 if($DbRow[0] < $this->System->Config['MaxExportPerUser']) 715 { 716 $DbResult = $this->System->Database->query('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId']); 717 if($DbResult->num_rows > 0) 718 { 719 $DbRow = $DbResult->fetch_assoc(); 720 unset($DbRow['Id']); 721 $DbRow['UsedCount'] = '0'; 722 $DbRow['User'] = $this->System->User->Id; 723 $DbRow['TimeCreate'] = 'NOW()'; 724 $DbRow['Title'] .= ' - kopie'; 725 $this->System->Database->insert('Export', $DbRow); 726 $ExportId = $this->System->Database->insert_id; 727 $this->System->Database->query('INSERT INTO `ExportGroup` (SELECT NULL AS `Id`, '.$ExportId.' AS `Export`, `Group` FROM `ExportGroup` WHERE `Export`='.$_GET['ExportId'].')'); 728 $this->System->Database->query('INSERT INTO `ExportLanguage` (SELECT NULL AS `Id`, '.$ExportId.' AS `Export`, `Language`, `Sequence` FROM `ExportLanguage` WHERE `Export`='.$_GET['ExportId'].')'); 729 $this->System->Database->query('INSERT INTO `ExportUser` (SELECT NULL AS `Id`, '.$ExportId.' AS `Export`, `User`, `Sequence` FROM `ExportUser` WHERE `Export`='.$_GET['ExportId'].')'); 730 $Output = ShowMessage('Kopie exportu vytvořena.<br/>Přímý odkaz na tento export: <a href="?Action=View&ExportId='.$ExportId.'">zde</a>'); 731 WriteLog('Vytvořena kopie exportu <a href="'.$this->System->Link('/export/?Action=View&ExportId='.$ExportId).'">'.$ExportId.'</a>.', LOG_TYPE_EXPORT); 732 $_GET['Filter'] = 'my'; 733 $this->ExportList(); 734 } else $Output = ShowMessage('Zdrojový export nenalezen', MESSAGE_CRITICAL); 735 } else $Output = ShowMessage('Nemůžete vytvářet další export. Max. počet na uživatele je '. 736 $this->System->Config['MaxExportPerUser'].'.', MESSAGE_CRITICAL); 737 } else $Output = ShowMessage('Export nenalezen.', MESSAGE_CRITICAL); 738 } else $Output = ShowMessage('Nemáte oprávnění.', MESSAGE_CRITICAL); 739 return($Output); 740 } 741 742 function Show() 697 743 { 698 744 if(array_key_exists('Action', $_GET)) … … 702 748 else if($_GET['Action'] == 'View') $Output = $this->ExportView(); 703 749 else if($_GET['Action'] == 'Delete') $Output = $this->ExportDelete(); 750 else if($_GET['Action'] == 'Clone') $Output = $this->ExportClone(); 704 751 else $Output = $this->ExportList(); 705 752 } else $Output = $this->ExportList(); -
trunk/Modules/User/Profile.php
r571 r572 57 57 $Action = '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Export['Id'].'&Tab=0').'">Zobrazit</a> '. 58 58 '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Export['Id'].'&Tab=7').'">Exportovat</a>'; 59 if($Export['User'] == $this->System->User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'; 59 if($Export['User'] == $this->System->User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'; 60 if($this->System->User->Id != null) $Action .= ' <a href="'.$this->System->Link('/export/?Action=Clone&ExportId='.$Export['Id']).'" onclick="return confirmAction(\'Opravdu klonovat položku?\');">Klonovat</a>'; 60 61 $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'. 61 62 '<td>'.$Export['Title'].'</td>'. -
trunk/includes/Version.php
r571 r572 1 1 <?php 2 2 3 $Revision = 57 1; // Subversion revision3 $Revision = 572; // Subversion revision 4 4 $DatabaseRevision = 567; // Database structure revision 5 5 $ReleaseTime = '2013-08-26'; -
trunk/includes/global.php
r568 r572 68 68 // Initialize application modules 69 69 $System->ModuleManager->RegisterModule(new ModuleError($System)); 70 $System->ModuleManager->Modules['Error']->ShowError = $Config['Web']['ShowPHPError']; 70 71 $System->ModuleManager->RegisterModule(new ModuleLog($System)); 71 72 $System->ModuleManager->RegisterModule(new ModuleUser($System)); … … 83 84 $System->ModuleManager->RegisterModule(new ModuleNews($System)); 84 85 $System->ModuleManager->RegisterModule(new ModuleFrontPage($System)); 85 $System->ModuleManager->StartAll(); 86 $System->ModuleManager->StartAll(); 86 87 } 87 88
Note:
See TracChangeset
for help on using the changeset viewer.