Changeset 551


Ignore:
Timestamp:
Jun 18, 2013, 9:07:36 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Import přepracován na aplikační modul.
Location:
trunk
Files:
2 deleted
2 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Import/Import.php

    r550 r551  
    11<?php
     2
     3include_once(dirname(__FILE__).'/../../includes/dbc.php');
     4include_once(dirname(__FILE__).'/Manage.php');
     5
     6
     7class ModuleImport extends AppModule
     8{
     9        function __construct($System)
     10        {
     11                parent::__construct($System);
     12                $this->Name = 'Import';
     13                $this->Version = '1.0';
     14                $this->Creator = 'Chronos';
     15                $this->License = 'GNU/GPL';
     16                $this->Description = 'Support for import of data.';
     17                $this->Dependencies = array();
     18        }
     19
     20        function Start()
     21        {
     22                $this->System->RegisterPage('import', 'PageImport');           
     23        }
     24}
    225
    326class Import
     
    388411  }
    389412}
    390 
    391 ?>
  • trunk/Modules/Import/Manage.php

    r550 r551  
    11<?php
    22
    3 include_once('../includes/global.php');
    4 include_once('../includes/dbc.php');
    5 include_once('import.php');
    6 
    7 $Output = '';
    8 if(!$User->Licence(LICENCE_ADMIN))
     3class PageImport extends Page
    94{
    10   $Output .= ShowMessage('Nemáte oprávnění.', MESSAGE_CRITICAL);
    11 }
    125
    136function ShowInstructions()
     
    10093}
    10194
    102 if(array_key_exists('action', $_GET))
    103 {
    104   if($_GET['action'] == 'instructions') $Output .= ShowInstructions();
    105   else if($_GET['action'] == 'importgroup') $Output .= ShowImportGroup();
    106   else if($_GET['action'] == 'update_translated') $Output .= UpdateTranslated();
    107   else $Output .= ShowMenu();                                           
    108 } else $Output .= ShowMenu();
     95        function Show()
     96        {
     97                global $User;
    10998
    110 ShowPage($Output);
    111 
    112 ?>
     99    $Output = '';
     100    if($User->Licence(LICENCE_ADMIN))
     101    {
     102    if(array_key_exists('action', $_GET))
     103    {
     104      if($_GET['action'] == 'instructions') $Output .= $this->ShowInstructions();
     105      else if($_GET['action'] == 'importgroup') $Output .= $this->ShowImportGroup();
     106      else if($_GET['action'] == 'update_translated') $Output .= $this->UpdateTranslated();
     107      else $Output .= $this->ShowMenu();                                           
     108    } else $Output .= $this->ShowMenu();
     109    } else $Output .= ShowMessage('Nemáte oprávnění.', MESSAGE_CRITICAL);   
     110    return($Output);
     111        }
     112}
  • trunk/includes/Version.php

    r550 r551  
    11<?php
    22
    3 $Revision = 550; // Subversion revision
     3$Revision = 551; // Subversion revision
    44$DatabaseRevision = 543; // Database structure revision
    55$ReleaseTime = '2013-06-18';
  • trunk/includes/global.php

    r550 r551  
    2020include_once(dirname(__FILE__).'/../Modules/User/User.php');
    2121include_once(dirname(__FILE__).'/../Modules/Dictionary/Dictionary.php');
     22include_once(dirname(__FILE__).'/../Modules/Import/Import.php');
    2223include_once(dirname(__FILE__).'/../Modules/FrontPage/FrontPage.php');
    2324
     
    7172  $System->ModuleManager->RegisterModule(new ModuleDictionary($System));
    7273  $System->ModuleManager->RegisterModule(new ModuleTranslation($System));
     74  $System->ModuleManager->RegisterModule(new ModuleImport($System));
    7375  $System->ModuleManager->StartAll();
    7476}
Note: See TracChangeset for help on using the changeset viewer.