Changeset 498


Ignore:
Timestamp:
Mar 3, 2013, 6:02:17 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Přepracováno generování PDF dokladů. Nyní pro každý typ dokladu se definuje samostatná třída odvozená ze třídy Bill. Údaje se načítají přímo ze zdrojových tabulek namísto vytváření duplicitních dat v tabulce FinanceBills. Doklady jsou identifikovány jako soubor dle tabulky File.
  • Upraveno: Fronta emailů a seznam síťových služeb lze nyní upravovat přímo ze sekce Správa dat.
Location:
trunk
Files:
1 added
1 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/File.php

    r438 r498  
    5353    global $Config;
    5454   
    55     $DbResult = $this->Database->select('File', '*', 'Id='.addslashes($_GET['Id']));
     55    $DbResult = $this->Database->select('File', '*', 'Id='.addslashes($Id));
    5656    if($DbResult->num_rows > 0)
    5757    {
    5858      $DbRow = $DbResult->fetch_assoc();
    59       Header('Content-Type: '.$this->DetectMimeType($DbRow['Name']));
     59      Header('Content-Type: '.$this->DetectMimeType($this->System->FilesDir.'/'.$DbRow['Name']));
    6060      Header('Content-Disposition: attachment; filename="'.$DbRow['Name'].'"');
    61       echo(file_get_contents($Config['Web']['UploadFileFolder'].'/'.$DbRow['Id'].'_'.$DbRow['Name']));
     61      echo(file_get_contents($this->System->FilesDir.'/'.$DbRow['Name']));
    6262    } else echo('Soubor nenalezen!');
    6363  }
  • trunk/Common/Global.php

    r496 r498  
    118118  var $ModuleManager;
    119119  var $PathItems;
     120  var $FilesDir;
    120121
    121122  function __construct()
     
    126127    $this->Pages = array();
    127128    $this->ModuleManager = new AppModuleManager();
     129    $this->FilesDir = '';
    128130  } 
    129131 
     
    298300  $System = new System();
    299301  $System->Config = $Config;
     302  $System->FilesDir = dirname(__FILE__).'/../'.$Config['Web']['UploadFileFolder'].'/';
    300303  $System->Database = &$Database;
    301304  $System->AddModule(new Log());
  • trunk/Common/Types/Enumeration.php

    r445 r498  
    1818    $Type = $this->System->Type->GetTypeDefinition($Item['Type']);
    1919    $Output = '<select name="'.$Item['Name'].'">';
     20      if(array_key_exists('Null', $Item) and $Item['Null'])
     21    {
     22      if($Item['Value'] == NULL) $Selected = ' selected="1"'; else $Selected = '';
     23      $Output .= '<option value=""'.$Selected.'></option>';
     24    }
    2025    foreach($Type['Parameters']['States'] as $Index => $StateName)
    2126    {
     
    2934  function OnLoad($Item)
    3035  {
     36    if($_POST[$Item['Name']] == '') return(NULL);
    3137    return($_POST[$Item['Name']]);
     38  }
     39 
     40  function OnLoadDb($Item)
     41  {
     42    if($Item['Value'] == '') return(NULL);
     43    else return($Item['Value']);
    3244  }
    3345}
  • trunk/Common/Version.php

    r497 r498  
    11<?php
    22
    3 $Revision = 497; // Subversion revision
    4 $DatabaseRevision = 497;
     3$Revision = 498; // Subversion revision
     4$DatabaseRevision = 498;
    55$ReleaseTime = '2013-03-03';
    66
  • trunk/FileDownload.php

    r438 r498  
    22
    33include_once('Common/Global.php');
    4 if(array_key_exists('Id', $_GET))
     4if(array_key_exists('id', $_GET))
    55{
    66  $File = new File($Database);
    7   $File->Download($_GET['Id']);
     7  $File->System = &$System;
     8  $File->Download($_GET['id']);
    89}
    910
  • trunk/Modules/Chat/Chat.php

    r475 r498  
    11<?php
    2 
    3 include_once('Common/Global.php');
    42
    53class PageChatHistory extends Page
  • trunk/Modules/IS/IS.php

    r497 r498  
    212212        $this->System->Link('/images/edit.png').'"/></a>'.
    213213        '<a href="?a=delete&amp;t='.$Table.'&amp;id='.$Row['Id'].'"><img alt="Smazat" title="Smazat" src="'.
    214         $this->System->Link('/images/delete.png').'" onclick="return confirmAction(\'Opravdu smazat položku?\');"/></a></td>';
    215       $Output .= '</tr>';
     214        $this->System->Link('/images/delete.png').'" onclick="return confirmAction(\'Opravdu smazat položku?\');"/></a>';
     215      if(array_key_exists('ItemActions', $FormClass))
     216      {
     217        foreach($FormClass['ItemActions'] as $Action)
     218          $Output .= '<a href="'.$this->System->Link($Action['URL']).'&amp;id='.$Row['Id'].'"><img alt="'.$Action['Caption'].'" title="'.$Action['Caption'].'" src="'.
     219            $this->System->Link('/images/action.png').'"/></a>';
     220      }
     221      $Output .= '</td></tr>';
    216222    }
    217223    $Output .= '</table>';
  • trunk/Modules/User/UserList.php

    r496 r498  
    11<?php
    2 include_once('Common/Global.php');
    32
    43class PageUserList extends Page
  • trunk/Modules/WebCam/WebCam.php

    r476 r498  
    11<?php
    2 
    3 include_once('Common/Global.php');
    42
    53class PageWebcam extends Page
  • trunk/admin/Updates.php

    r497 r498  
    5252}
    5353
     54function UpdateTo498($Manager)
     55{
     56  $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ".
     57    "VALUES (NULL , 'Sítové služby', '1', 'NetworkConfiguration', '');");
     58  $Manager->Execute("INSERT INTO `centrala`.`ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ".
     59    "VALUES (NULL , 'Fronta e-mailů', '23', 'EmailQueue', '');");
     60  $Manager->Execute("CREATE TABLE IF NOT EXISTS `FinanceVAT` (
     61  `Id` int(11) NOT NULL AUTO_INCREMENT,
     62  `Name` varchar(255) NOT NULL,
     63  `ValidFrom` date NOT NULL,
     64  `Value` int(11) NOT NULL,
     65  PRIMARY KEY (`Id`)
     66) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     67INSERT INTO `FinanceVAT` (`Id`, `Name`, `ValidFrom`, `Value`) VALUES
     68(1, 'DPH snížená sazba', '2013-01-01', 15),
     69(2, 'DPH běžná sazba', '2013-01-01', 21);");
     70  $Manager->Execute("ALTER TABLE `Service` ADD `VAT` INT NOT NULL AFTER `Price`");
     71  $Manager->Execute("ALTER TABLE `Service` ADD INDEX ( `VAT` ) ");
     72  $Manager->Execute("UPDATE `Service` SET `VAT` = 2;");
     73  $Manager->Execute("ALTER TABLE `Service` ADD FOREIGN KEY ( `VAT` ) REFERENCES `FinanceVAT` (".
     74    "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;");
     75  $Manager->Execute("ALTER TABLE `FinanceInvoice` ADD `Cash` INT NOT NULL DEFAULT '0'");
     76}
     77
    5478$Updates = array(
    5579        491 => array('Revision' => 493, 'Function' => 'UpdateTo493'),
     
    5781  494 => array('Revision' => 495, 'Function' => 'UpdateTo495'),
    5882  495 => array('Revision' => 497, 'Function' => 'UpdateTo497'),
     83  497 => array('Revision' => 497, 'Function' => 'UpdateTo498'),
    5984);
    6085
  • trunk/finance/bills.php

    r486 r498  
    44{
    55  var $SpecificSymbol = 1; // počítačová sít
    6   var $FileFolder = 'doklady';
    7   var $FileNamePrefix = 'doklad-';
    86
    9   function GenerateBill($BillId)
     7  function GenerateHTML()
    108  {
    11     global $SpecificSymbol, $Config;
    12  
    13     $DbResult = $this->Database->select('FinanceBills', '*', '`Id`='.$BillId);
    14     $Bill = $DbResult->fetch_assoc();
    15  
    16     $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Bill['Subject']);
    17     $Subject = $DbResult->fetch_assoc();
    18 
    19     $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Config['Finance']['MainSubjectId']);
    20     $MainSubject = $DbResult->fetch_assoc();
    21 
    22     $DbResult = $this->Database->select('FinanceBankAccount', '*', '(`Subject`='.
    23       $Config['Finance']['MainSubjectId'].') AND (`Use`=1)');
    24     $MainSubjectAccount = $DbResult->fetch_assoc();
    25 
    26     $Dodavka = array();
    27     $DbResult = $this->Database->select('FinanceBillsItems', '*', 'Bill='.$BillId);
    28     while($Item = $DbResult->fetch_assoc())
    29     {
    30       $Dodavka[$Item['Id']] = $Item;
    31     }
    32  
    33     $PaymentType = array('převodem', 'hotově');
    34     $BooleanText = array('Ne', 'Ano');
    35    
    36     switch($Bill['Type'])
    37     {
    38     case 'invoice':
    39         $Output = '<table width="100%"><tr><td colspan="2">'.
    40         '<font size="6"><div align="center">Faktura - daňový doklad</font></div>'.
    41         '<hr></td></tr>'.
    42         '<tr><td valign="top" width="50%"><strong>Dodavatel:</strong><br>'.
    43         $MainSubject['Name'].'<br>'.
    44         $MainSubject['AddressStreet'].'<br>'.
    45         $MainSubject['AddressPSC'].' '.$MainSubject['AddressTown'].'<br>'.
    46         'IČ: '.$MainSubject['IC'].'<br>'.
    47         'DIČ: '.$MainSubject['DIC'].'<br>'.
    48         'Účet: '.$MainSubjectAccount['Number'].'<br>'.
    49         'Plátce DPH: '.$BooleanText[$MainSubject['PayVAT']].'<br>'.
    50         '</td><td valign="top">'.
    51         '<strong>Odběratel:</strong><br>'.
    52         $Subject['Name'].'<br>'.
    53         $Subject['AddressStreet'].'<br>'.
    54         $Subject['AddressPSC'].' '.$Subject['AddressTown'].'<br>';
    55         if($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>';
    56         if($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';
    57         $Output .=
    58         '</td></tr>'.
    59         '<tr><td colspan="2"><hr></td></tr>'.
    60         '<tr><td width="50%" valign="top">'.
    61         '<strong>Platební podmínky:</strong><br>'.
    62         'Číslo dokladu: '.$Bill['BillCode'].'<br>'.
    63         'Variabilní symbol: '.$Subject['Id'].'<br>'.
    64         'Specifický symbol: '.$this->SpecificSymbol.'<br>'.
    65         'Konstantní symbol:<br>'.
    66         'Způsob úhrady: '.$PaymentType[$Bill['Cash']].
    67         '</td><td valign="top">'.
    68         '<br>'.
    69         'Datum vystavení: '.HumanDate($Bill['TimeCreate']).'<br>'.
    70         'Datum zdanitel. plnění: '.HumanDate($Bill['TimeCreate']).'<br>'.
    71         'Datum splatnosti: '.HumanDate($Bill['TimeDue']).'<br>';
    72         if(($Bill['PeriodFrom'] != '') and ($Bill['PeriodTo'] != ''))
    73           $Output .= 'Fakturované období: '.HumanDate($Bill['PeriodFrom']).' - '.HumanDate($Bill['PeriodTo']).'<br>';
    74         $Output .= '</td></tr>'.
    75         '<tr><td colspan="2">'.
    76         '<hr>'.
    77         '<br>'.
    78         '<table border="0" width="100%">'.
    79         '<tr><th align="left">Dodávka</th><th align="right">Množství</th><th align="right">Cena/MJ</th><th align="right">Celkem</th></tr>'.
    80         '<tr><td colspan="4"><hr></td></tr>';
    81    
    82         $Total = 0;
    83         foreach($Dodavka as $Polozka)
    84         {
    85           $Output .= '<tr><td>'.$Polozka['Description'].'</td><td align="right">'.$Polozka['Quantity'].'</td><td align="right">'.$Polozka['Price'].'&nbsp;Kč</td><td align="right">'.($Polozka['Quantity'] * $Polozka['Price']).'&nbsp;Kč</td></tr>';
    86           $Total += ($Polozka['Quantity'] * $Polozka['Price']);
    87         }
    88         $Output .= '<tr><th colspan="3" align="left">Celkem</th><th align="right">'.$Total.'&nbsp;Kč</th></tr>';
    89         $Output .= '</table>'.
    90         '</td></tr>'.
    91         '<tr><td colspan="2"><hr></td></tr>'.
    92         '</table>';
    93       break;
    94     case 'income':
    95     $Output = '<table width="100%" border="1" cellspacing="0" cellpadding="3"><tr><td width="50%">'.
    96         '<strong>Firma:</strong><br>'.
    97         $MainSubject['Name'].'<br>'.
    98         $MainSubject['AddressStreet'].'<br>'.
    99         $MainSubject['AddressPSC'].' '.$MainSubject['AddressTown'].'<br>'.
    100         'IČ: '.$MainSubject['IC'].'<br>'.
    101         'DIČ: '.$MainSubject['DIC'].'<br>'.
    102         'Účet: '.$MainSubjectAccount['Number'].'<br>'.
    103         'Plátce DPH: '.$BooleanText[$MainSubject['PayVAT']].
    104         '</td><td width="50%" valign="top">'.
    105         '<font size="5"><strong>PŘÍJMOVÝ POKLADNÍ DOKLAD</strong></font><br><br>'.
    106         'Číslo dokladu: '.$Bill['BillCode'].'<br>'.
    107         'Datum vystavení: '.HumanDate($Bill['TimeCreate']).'<br>'.
    108         '</td></tr>'.
    109         '<tr><td colspan="2"><strong>Přijato od:</strong><br>'.
    110         $Subject['Name'].'<br>'.
    111         $Subject['AddressStreet'].'<br>'.
    112         $Subject['AddressPSC'].' '.$Subject['AddressTown'].'<br>';
    113         if($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>';
    114         if($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';
    115         $Total = 0;
    116     $Description = '';
    117         foreach($Dodavka as $Polozka)
    118         {
    119           $Description .= $Polozka['Description'].'<br>';
    120           $Total += ($Polozka['Quantity'] * $Polozka['Price']);
    121         }
    122         $Output .= '</td></tr>'.
    123         '<tr><td colspan="2"><strong>Částka:</strong> '.$Total.' Kč<br><br>'.
    124         '</td></tr>'.   
    125         '<tr><td colspan="2"><strong>Účel platby:</strong><br>'.$Description.'</td></tr>'.   
    126     '<tr><td><br><br>Podpis příjemce:</td><td><br><br>Podpis pokladníka:</td></tr>';
    127         $Output .= '</table>';
    128       break; 
    129     }
    130   return($Output);
     9    return('');
    13110  }
    13211
    133   function CreateBill($SubjectId, $Items, $TimeCreate, $TimeDue, $BillCode = '', $Type = 'invoice',
    134     $PeriodFrom, $PeriodTo)
    135   {
    136     $this->Database->insert('FinanceBills', array('TimeCreate' => TimeToMysqlDateTime($TimeCreate),
    137       'Subject' => $SubjectId, 'TimeDue' => TimeToMysqlDateTime($TimeDue),
    138       'BillCode' => $BillCode, 'Type' => $Type, 'PeriodFrom' => TimeToMysqlDate($PeriodFrom),
    139       'PeriodTo' => TimeToMysqlDate($PeriodTo)));
    140     $BillId = $this->Database->insert_id;
    141     foreach($Items as $Item)
    142     {
    143       $this->Database->insert('FinanceBillsItems', array('Bill' => $BillId,
    144         'Description' => $Item['Description'], 'Price' => $Item['Price'], 'Quantity' => $Item['Quantity']));
    145     }
    146     //Header('Content-Type: application/pdf');
    147     $PdfData = $this->HtmlToPdf($this->GenerateBill($BillId));
    148     //echo($PdfData);
    149     file_put_contents($this->FileFolder.'/'.$this->FileNamePrefix.$BillId.'.pdf', $PdfData);
    150     //$this->Database->query('UPDATE finance_bills SET pdf = 0x'.bin2hex($PdfData).' WHERE id='.$BillId);
    151     return($BillId);
    152   }
    153 
    154   function CreateIncomeBill($SubjectId, $Description, $Price, $BillCode)
    155   {
    156     $this->Database->insert('FinanceBills', array('TimeCreate' => TimeToMysqlDateTime(time()), 'Subject' => $SubjectId, 'BillCode' => $BillCode, 'Type' => 'income'));
    157     $BillId = $this->Database->insert_id;
    158     $this->Database->insert('FinanceBillsItems', array('Bill' => $BillId, 'Description' => $Description, 'Price' => $Price, 'Quantity' => 1));
    159     //Header('Content-Type: application/pdf');
    160     $PdfData = $this->HtmlToPdf($this->GenerateBill($BillId));
    161     //echo($PdfData);
    162     file_put_contents($this->FileFolder.'/'.$this->FileNamePrefix.$BillId.'.pdf', $PdfData);
    163     //$this->Database->query('UPDATE finance_bills SET pdf = 0x'.bin2hex($PdfData).' WHERE id='.$BillId);
    164     return($BillId);
    165   }
    166 
    167   function RegeneratePDF($BillId)
     12  function SaveToFile($FileName)
    16813  {
    16914    global $Database;
    17015
    171     $PdfData = $this->HtmlToPdf($this->GenerateBill($BillId));
    172     //echo($this->FileFolder.'/'.$this->FileNamePrefix.$BillId.'.pdf');
    173     echo(file_put_contents($this->FileFolder.'/'.$this->FileNamePrefix.$BillId.'.pdf', $PdfData));
    174     //$this->Database->query('UPDATE finance_bills SET pdf = 0x'.bin2hex($PdfData).' WHERE id='.$BillId);
    175   }
    176 
    177   function ShowStoredBill($BillId)
    178   {
    179     global $Database;
    180    
    181     //$DbResult = $this->Database->select('finance_bills', 'pdf', 'id='.$BillId);
    182     //if($DbResult->num_rows == 1)
    183     //{
    184     //  $DbRow = $DbResult->fetch_array();
    185     $FileName = $this->FileFolder.'/'.$this->FileNamePrefix.$BillId.'.pdf';
    186     if(file_exists($FileName))
    187     {
    188       Header('Content-Type: application/pdf');
    189       Header('Content-Disposition: attachment; filename="'.$this->FileNamePrefix.$BillId.'.pdf"');
    190       echo(file_get_contents($FileName));
    191     } else echo('Faktura nenalezena');
    192   }
    193 
    194   function ShowGeneratedBill($BillId)
    195   {
    196     global $Database;
    197    
    198     Header('Content-Type: application/pdf');
    199     Header('Content-Disposition: attachment; filename="'.$this->FileNamePrefix.$BillId.'.pdf"');
    200     echo($this->HtmlToPdf($this->GenerateBill($BillId)));
    201   }
    202 
    203   function HasPDFFile($BillId)
    204   {
    205     return(file_exists($this->FileFolder.'/'.$this->FileNamePrefix.$BillId.'.pdf'));
     16    $PdfData = $this->HtmlToPdf($this->GenerateHTML());
     17    file_put_contents($FileName, $PdfData);
    20618  }
    20719
    20820  function HtmlToPdf($HtmlCode)
    20921  {
    210     $Output = shell_exec('echo "'.addslashes(FromUTF8($HtmlCode)).'"|htmldoc --no-numbered --webpage --no-embedfonts --charset 8859-2 -t pdf -');
     22    $Output = shell_exec('echo "'.addslashes(FromUTF8($HtmlCode)).
     23      '"|htmldoc --no-numbered --webpage --no-embedfonts --charset 8859-2 -t pdf -');
    21124    return($Output);
    21225  }
     26}
    21327
    214   function ShowPage()
     28class BillInvoice extends Bill
     29{
     30  var $InvoiceId; 
     31
     32  function GenerateHTML()
    21533  {
    216     global $Database;
    217     if(array_key_exists('subject', $_GET))
     34    global $SpecificSymbol, $Config;
     35   
     36    $DbResult = $this->Database->select('FinanceInvoice', '*', '`Id`='.$this->InvoiceId);
     37    $Invoice = $DbResult->fetch_assoc();
     38   
     39    $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Invoice['Subject']);
     40    $Subject = $DbResult->fetch_assoc();
     41   
     42    $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Config['Finance']['MainSubjectId']);
     43    $MainSubject = $DbResult->fetch_assoc();
     44   
     45    $DbResult = $this->Database->select('FinanceBankAccount', '*', '(`Subject`='.
     46        $Config['Finance']['MainSubjectId'].') AND (`Use`=1)');
     47    $MainSubjectAccount = $DbResult->fetch_assoc();
     48   
     49    $Dodavka = array();
     50    $DbResult = $this->Database->select('FinanceInvoiceItem', '*', 'FinanceInvoice='.$this->InvoiceId);
     51    while($Item = $DbResult->fetch_assoc())
    21852    {
     53      $InvoiceItems[$Item['Id']] = $Item;
     54    }
     55   
     56    $PaymentType = array('převodem', 'hotově');
     57    $BooleanText = array('Ne', 'Ano');
     58
     59    $Output = '<table width="100%"><tr><td colspan="2">'.
     60      '<font size="6"><div align="center">Faktura - daňový doklad</font></div>'.
     61      '<hr></td></tr>'.
     62      '<tr><td valign="top" width="50%"><strong>Dodavatel:</strong><br>'.
     63      $MainSubject['Name'].'<br>'.
     64      $MainSubject['AddressStreet'].'<br>'.
     65      $MainSubject['AddressPSC'].' '.$MainSubject['AddressTown'].'<br>'.
     66      'IČ: '.$MainSubject['IC'].'<br>'.
     67      'DIČ: '.$MainSubject['DIC'].'<br>'.
     68      'Účet: '.$MainSubjectAccount['Number'].'<br>'.
     69      'Plátce DPH: '.$BooleanText[$MainSubject['PayVAT']].'<br>'.
     70      '</td><td valign="top">'.
     71      '<strong>Odběratel:</strong><br>'.
     72      $Subject['Name'].'<br>'.
     73      $Subject['AddressStreet'].'<br>'.
     74      $Subject['AddressPSC'].' '.$Subject['AddressTown'].'<br>';
     75      if($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>';
     76      if($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';
     77    $Output .=
     78      '</td></tr>'.
     79      '<tr><td colspan="2"><hr></td></tr>'.
     80      '<tr><td width="50%" valign="top">'.
     81      '<strong>Platební podmínky:</strong><br>'.
     82      'Číslo dokladu: '.$Invoice['BillCode'].'<br>'.
     83      'Variabilní symbol: '.$Subject['Id'].'<br>'.
     84      'Specifický symbol: '.$this->SpecificSymbol.'<br>'.
     85      'Konstantní symbol:<br>'.
     86      'Způsob úhrady: '.$PaymentType[$Invoice['Cash']].
     87      '</td><td valign="top">'.
     88      '<br>'.
     89      'Datum vystavení: '.HumanDate($Invoice['TimeCreation']).'<br>'.
     90      'Datum zdanitel. plnění: '.HumanDate($Invoice['TimeCreation']).'<br>'.
     91      'Datum splatnosti: '.HumanDate($Invoice['TimeDue']).'<br>';
     92    if(($Invoice['PeriodFrom'] != '') and ($Invoice['PeriodTo'] != ''))
     93      $Output .= 'Fakturované období: '.HumanDate($Invoice['PeriodFrom']).' - '.
     94        HumanDate($Invoice['PeriodTo']).'<br>';
     95    $Output .= '</td></tr>'.
     96      '<tr><td colspan="2">'.
     97      '<hr>'.
     98      '<br>'.
     99      '<table border="0" width="100%">'.
     100      '<tr><th align="left">Dodávka</th><th align="right">Množství</th><th align="right">Cena/MJ</th><th align="right">Celkem</th></tr>'.
     101      '<tr><td colspan="4"><hr></td></tr>';
     102   
     103    $Total = 0;
     104    foreach($InvoiceItems as $Item)
     105    {
     106      $Output .= '<tr><td>'.$Item['Description'].'</td><td align="right">'.
     107        $Item['Quantity'].'</td><td align="right">'.$Item['Price'].
     108        '&nbsp;Kč</td><td align="right">'.($Item['Quantity'] * $Item['Price']).'&nbsp;Kč</td></tr>';
     109      $Total += ($Item['Quantity'] * $Item['Price']);
     110    }
     111    $Output .= '<tr><th colspan="3" align="left">Celkem</th><th align="right">'.$Total.'&nbsp;Kč</th></tr>';
     112    $Output .= '</table>'.
     113      '</td></tr>'.
     114      '<tr><td colspan="2"><hr></td></tr>'.
     115      '</table>';
     116     
     117    return($Output);
     118  }
     119}
     120
     121class BillOperation extends Bill
     122{
     123  var $OperationId; 
    219124 
    220       $DbResult = $this->Database->select('FinanceBills', '*', 'Subject='.$_GET['subject']);
    221       while($Item = $DbResult->fetch_array())
    222       {
    223         echo('<a href="?bill='.$Item['Id'].'">faktura '.$Item['Id'].'</a> <a href="?billpdf='.$Item['Id'].'">Uložené PDF</a> <a href="?billpdf2='.$Item['Id'].'">Generované PDF</a> <a href="?regenerate='.$Item['Id'].'">Přegenerovat</a><br>');
    224       }
    225     } else
    226     if(array_key_exists('billpdf', $_GET))
    227     {
    228       $this->ShowStoredBill($_GET['billpdf']);
    229     } else
    230     if(array_key_exists('billpdf2', $_GET))
    231     {
    232       $this->ShowGeneratedBill($_GET['billpdf2']);
    233     } else
    234     if(array_key_exists('regenerate', $_GET))
    235     {
    236       $this->RegeneratePDF($_GET['regenerate']);
    237     } else
    238     if(array_key_exists('bill', $_GET))
    239     {
    240       echo($this->GenerateBill($_GET['bill']));
    241     } else
    242     if(array_key_exists('generate', $_GET))
    243     {
    244       $this->CreateBill(1, array(array('Description' => 'Poplatek za připojení k síti', 'Price' => 1000, 'Quantity' => 1)), time(), time());
    245     } else
    246     {
    247       ShowHeader('Doklady', 'Doklady');
    248       echo('Faktury:<br />');
    249       $DbResult = $this->Database->select('Subject', '*', '1 ORDER BY Name');
    250       while($Subject = $DbResult->fetch_assoc())
    251       {
    252         echo('<a href="?user='.$Subject['Id'].'">'.$Subject['Name'].'</a><br />');
    253       }
    254       ShowFooter();
    255     }
     125  function GenerateHTML()
     126  {
     127    $DbResult = $this->Database->select('FinanceOperation', '*', '`Id`='.$this->OperationId);
     128    $Operation = $DbResult->fetch_assoc();
     129   
     130    $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Operation['Subject']);
     131    $Subject = $DbResult->fetch_assoc();
     132   
     133    $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Config['Finance']['MainSubjectId']);
     134    $MainSubject = $DbResult->fetch_assoc();
     135   
     136    $DbResult = $this->Database->select('FinanceBankAccount', '*', '(`Subject`='.
     137        $Config['Finance']['MainSubjectId'].') AND (`Use`=1)');
     138    $MainSubjectAccount = $DbResult->fetch_assoc();
     139   
     140    //$Dodavka = array();
     141    //$DbResult = $this->Database->select('FinanceInvoiceItem', '*', 'FinanceInvoice='.$BillId);
     142    //while($Item = $DbResult->fetch_assoc())
     143    //{
     144    //  $InvoiceItems[$Item['Id']] = $Item;
     145    //}
     146
     147    $Output = '<table width="100%" border="1" cellspacing="0" cellpadding="3"><tr><td width="50%">'.
     148      '<strong>Firma:</strong><br>'.
     149      $MainSubject['Name'].'<br>'.
     150      $MainSubject['AddressStreet'].'<br>'.
     151      $MainSubject['AddressPSC'].' '.$MainSubject['AddressTown'].'<br>'.
     152      'IČ: '.$MainSubject['IC'].'<br>'.
     153      'DIČ: '.$MainSubject['DIC'].'<br>'.
     154      'Účet: '.$MainSubjectAccount['Number'].'<br>'.
     155      'Plátce DPH: '.$BooleanText[$MainSubject['PayVAT']].
     156      '</td><td width="50%" valign="top">'.
     157      '<font size="5"><strong>PŘÍJMOVÝ POKLADNÍ DOKLAD</strong></font><br><br>'.
     158      'Číslo dokladu: '.$Bill['BillCode'].'<br>'.
     159      'Datum vystavení: '.HumanDate($Bill['TimeCreate']).'<br>'.
     160      '</td></tr>'.
     161      '<tr><td colspan="2"><strong>Přijato od:</strong><br>'.
     162      $Subject['Name'].'<br>'.
     163      $Subject['AddressStreet'].'<br>'.
     164      $Subject['AddressPSC'].' '.$Subject['AddressTown'].'<br>';
     165    if($Subject['IC'] != 0) $Output .= 'IČ: '.$Subject['IC'].'<br>';
     166    if($Subject['DIC'] != '') $Output .= 'DIČ: '.$Subject['DIC'].'<br>';
     167    $Total = 0;
     168    $Description = '';
     169    //foreach($Dodavka as $Polozka)
     170    //{
     171    //  $Description .= $Polozka['Description'].'<br>';
     172    //  $Total += ($Polozka['Quantity'] * $Polozka['Price']);
     173    //}
     174    $Output .= '</td></tr>'.
     175      '<tr><td colspan="2"><strong>Částka:</strong> '.$Total.' Kč<br><br>'.
     176      '</td></tr>'.
     177      '<tr><td colspan="2"><strong>Účel platby:</strong><br>'.$Description.'</td></tr>'.
     178      '<tr><td><br><br>Podpis příjemce:</td><td><br><br>Podpis pokladníka:</td></tr>';
     179    $Output .= '</table>';
     180    return($Output);
    256181  }
    257182}
  • trunk/finance/manage.php

    r497 r498  
    357357   
    358358    // Generuj účetní položky
    359     $DbResult = $this->Database->query('SELECT Member.*, MemberPayment.MonthlyTotal, UNIX_TIMESTAMP(Member.BillingPeriodLastDate), Subject.Name AS SubjectName FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member JOIN Subject ON Subject.Id=Member.Subject');
     359    $DbResult = $this->Database->query('SELECT Member.*, MemberPayment.MonthlyTotal AS MonthlyTotal, '.
     360      'UNIX_TIMESTAMP(Member.BillingPeriodLastDate), Subject.Name AS SubjectName,'.
     361      'MemberPayment.MonthlyPlus AS MonthlyPlus '.
     362      'FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member '.
     363      'JOIN Subject ON Subject.Id=Member.Subject');
    360364    while($Member = $DbResult->fetch_assoc())
    361365    {
     
    365369      {
    366370        $this->Database->update('Member', 'Id='.$Member['Id'],
    367             array('BillingPeriod' => $Member['BillingPeriodNext']));
     371          array('BillingPeriod' => $Member['BillingPeriodNext']));
    368372        $Member['BillingPeriod'] = $Member['BillingPeriodNext'];
    369373      }
     
    374378        $InvoiceItems = array();
    375379        $MonthlyTotal = 0;
    376         $DbResult2 = $this->Database->query('SELECT Service.* FROM ServiceCustomerRel LEFT JOIN Service '.
    377           'ON Service.Id=ServiceCustomerRel.Service WHERE (ServiceCustomerRel.Customer='.
    378           $Member['Id'].') AND (ServiceCustomerRel.Action IS NULL)');
     380        $DbResult2 = $this->Database->query('SELECT Service.*, FinanceVAT.Value AS VAT '.
     381          'FROM ServiceCustomerRel LEFT JOIN Service '.
     382          'ON Service.Id=ServiceCustomerRel.Service '.
     383          'LEFT JOIN FinanceVAT ON FinanceVAT.Id=Service.VAT '.
     384          'WHERE (ServiceCustomerRel.Customer='.
     385          $Member['Id'].') AND (ServiceCustomerRel.Action IS NULL) ');
    379386        while($Service = $DbResult2->fetch_assoc())
    380387        {
    381388          $InvoiceItems[] = array('Description' => $Service['Name'], 'Price' => $Service['Price'],
    382               'Quantity' => $Period['MonthCount'], 'VAT' => 21);
     389            'Quantity' => $Period['MonthCount'], 'VAT' => $Service['VAT']);
    383390          $MonthlyTotal += $Service['Price'];
    384391        }
     
    396403        $TimePeriodText = date('j.n.Y', $Period['From']).' - '.date('j.n.Y', $Period['To']);
    397404        $Output .= $TimePeriodText.': '.$MonthlyTotal.' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />';
    398         $this->InsertInvoice($Member['Subject'], 'NOW()', 'DATE_ADD(NOW(), INTERVAL '.INVOICE_DUE_DAYS.' DAY)',
     405        $this->InsertInvoice($Member['Subject'], time(), time() + 3600 * 24 * INVOICE_DUE_DAYS,
    399406          $InvoiceItems, INVOICE_OUT_DOC_LINE, $Period['From'], $Period['To']);
    400407   
    401408        $Output .= $this->SendPaymentEmail($Member['Id']);
    402         $this->Database->update('Member', 'Id='.$Member['Id'], array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To'])));
     409        $this->Database->update('Member', 'Id='.$Member['Id'],
     410          array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To'])));
    403411      } else $Output .= '<br />';
    404412    } 
     
    491499    {
    492500      $Output .= 'Odečítám měsíční poplatek...<br />';
    493       $this->ProduceInvoices();   
     501      $Output .= $this->ProduceInvoices();   
    494502     
    495503      // Update finance charge
     
    498506
    499507      $Output .= 'Přidávám měsíční přehled...<br />';
     508      $DbResult = $this->Database->query('SELECT * FROM FinanceCharge WHERE Action IS NULL LIMIT 1');
     509      $Charge = $DbResult->fetch_assoc();
    500510      $this->Database->insert('FinanceMonthlyOverall', array('Date' => 'NOW()',
    501511        'Money' => $Finance->Internet, 'kWh' => $Finance->kWh,
     
    553563        'Váše aktuální služby: ';
    554564      $DbResult = $this->Database->query('SELECT GROUP_CONCAT(Service.Name) AS Name FROM ServiceCustomerRel LEFT JOIN Service '.
    555       'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer='.$Member['Id'].' AND ServiceCustomerRel.Period=0');
    556         $Service = $DbRow->fetch_assoc();
     565        'ON Service.Id=ServiceCustomerRel.Service WHERE (ServiceCustomerRel.Customer='.$Member['Id'].') '.
     566        'AND ServiceCustomerRel.Action IS NULL');
     567      $Service = $DbResult->fetch_assoc();
    557568      $Content .= '<strong>'.$Service['Name'].'</strong><br />'."\n".
    558569        'Vaše platební období: <strong>'.$this->System->Modules['Finance']->BillingPeriods[$Member['BillingPeriod']]['Name'].'</strong><br />'."\n".
     
    563574      $Content .= 'Nové finanční operace:<br/>'.
    564575        '<table style="margin-left: auto; margin-right: auto; border-style: solid; border-width: 1px; border-collapse: collapse;"><tr><th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center; font-weight: bold;">Čas</th><th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center;; font-weight: bold;">Popis</th><th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center;; font-weight: bold;">Částka [Kč]</th></tr>'."\n";
    565       //$Member['BillingPeriodLastDate'] = '2009-04-01';
    566       $DbResult = $this->Database->query('SELECT T1.* FROM ((SELECT Text, Time, Value AS Value, Bill FROM FinanceOperation WHERE (Subject='.$Member['Subject'].')) UNION ALL '.
    567       '(SELECT Text, TimeCreation as Time, -Value as Value, Bill FROM FinanceInvoice WHERE (Subject='.$Member['Subject'].')) ORDER BY Time DESC) AS T1 WHERE (T1.Time > "'.$Member['BillingPeriodLastDate'].'")');
     576      $DbResult = $this->Database->query('SELECT T1.* FROM ((SELECT Text, Time, Value AS Value, File FROM FinanceOperation WHERE (Subject='.$Member['Subject'].')) UNION ALL '.
     577      '(SELECT Text, TimeCreation as Time, -Value as Value, File FROM FinanceInvoice WHERE (Subject='.$Member['Subject'].')) ORDER BY Time DESC) AS T1 WHERE (T1.Time > "'.$Member['BillingPeriodLastDate'].'")');
    568578      while($DbRow = $DbResult->fetch_assoc())
    569579      {
     
    584594  function GenerateBills()
    585595  {
     596    $Output = '';
     597   
    586598    // FinanceInvoice
    587     $DbResult = $this->Database->query('SELECT * FROM FinanceInvoice WHERE (BillCode <> "") AND (Value != 0) AND (Bill = 0)');
     599    $DbResult = $this->Database->query('SELECT * FROM `FinanceInvoice` WHERE (`BillCode` <> "") '.
     600      'AND (`Value` != 0) AND (`File` IS NULL)');
    588601    while($Row = $DbResult->fetch_assoc())
    589602    {
    590       $BillId = $this->System->Modules['Bill']->CreateBill($Row['Subject'],
    591         array(array('Description' => $Row['Text'], 'Price' => $Row['Value'], 'Quantity' => 1)),
    592         MysqlDateTimeToTime($Row['TimeCreation']), MysqlDateTimeToTime($Row['TimeDue']),
    593         $Row['BillCode'], 'invoice', MysqlDateToTime($Row['PeriodFrom']), MysqlDateToTime($Row['PeriodTo']));
    594       $this->Database->update('FinanceInvoice', 'Id='.$Row['Id'], array('Bill' => $BillId));
    595       echo('.');
     603      $DbResult2 = $this->Database->insert('File', array('Name' => '', 'Size' => 0));
     604      $FileId = $this->Database->insert_id;
     605      $FileName = 'doklad-'.$FileId.'.pdf';
     606      $Bill = new BillInvoice();
     607      $Bill->Database = &$this->System->Database;
     608      $Bill->System = &$this->System;
     609      $Bill->InvoiceId = $Row['Id'];
     610      $FullFileName = $this->System->FilesDir.$FileName;
     611      $Bill->SaveToFile($FullFileName);
     612      $this->Database->update('File', 'Id='.$FileId, array('Name' => $FileName, 'Size' => filesize($FullFileName)));
     613      $this->Database->update('FinanceInvoice', 'Id='.$Row['Id'], array('File' => $FileId));
     614      $Output .= '.';
    596615    }
    597616
    598617    // FinanceOperations
     618    return($Output);
    599619  }
    600620}
  • trunk/finance/user_state.php

    r494 r498  
    8787      if($Row['Value'] > 0) $Row['Value'] = '+'.$Row['Value'];
    8888      if($Row['BillCode'] == '') $Row['BillCode'] = 'PDF';
    89       if($Row['File'] > 0) $Invoice = '<a href="'.$this->System->Link('/FileDownload.php?Id='.$Row['File']).'">'.$Row['BillCode'].'</a>';
     89      if($Row['File'] > 0) $Invoice = '<a href="'.$this->System->Link('/FileDownload.php?id='.$Row['File']).'">'.$Row['BillCode'].'</a>';
    9090        else $Invoice = '&nbsp;';
    9191      if($Row['PeriodFrom'] != '') $Period = HumanDate($Row['PeriodFrom']).' - '.HumanDate($Row['PeriodTo']);
     
    113113    $Output .= 'Rozpis měsíčního poplatku:<br><table class="WideTable">'.
    114114      '<tr><th>Služba</th><th>Cena [Kč]</th></tr>';
    115     $DbResult = $this->Database->query('SELECT Service.Name, Service.Price FROM ServiceCustomerRel LEFT JOIN Service '.
    116       'ON Service.Id=ServiceCustomerRel.Service WHERE (ServiceCustomerRel.Customer='.$Member['Id'].') AND (ServiceCustomerRel.Period=0)');
     115    $DbResult = $this->Database->query('SELECT Service.Name, Service.Price FROM ServiceCustomerRel '.
     116      'LEFT JOIN Service ON Service.Id=ServiceCustomerRel.Service '.
     117      'WHERE (ServiceCustomerRel.Customer='.$Member['Id'].') AND (ServiceCustomerRel.Action IS NULL)');
    117118    while($DbRow = $DbResult->fetch_assoc())
    118119    {
  • trunk/form_classes.php

    r497 r498  
    11<?php
     2
     3// TODO: Split all form class definitions to modules
    24
    35/*
     
    1517
    1618$FormClasses = array(   
     19  'EmailQueue' => array(
     20    'Title' => 'Fronta e-mailů',
     21    'Table' => 'EmailQueue',
     22    'Items' => array(
     23      'Time' => array('Type' => 'DateTime', 'Caption' => 'Vytvořeno'),
     24      'To' => array('Type' => 'String', 'Caption' => 'Příjemce', 'Default' => ''),
     25      'Subject' => array('Type' => 'String', 'Caption' => 'Předmět', 'Default' => ''),
     26      'Content' => array('Type' => 'Text', 'Caption' => 'Obsah', 'Default' => ''),
     27      'Headers' => array('Type' => 'String', 'Caption' => 'Hlavička', 'Default' => ''),
     28      'Archive' => array('Type' => 'Boolean', 'Caption' => 'Odesláno', 'Default' => '0'),
     29      'From' => array('Type' => 'String', 'Caption' => 'Odesílatel', 'Default' => ''),
     30      'AttachmentFile' => array('Type' => 'TFile', 'Caption' => 'Příloha', 'Default' => '', 'Null' => true),
     31    ),
     32    'Actions' => array(
     33      array('Caption' => 'Odeslat nové', 'URL' => ''),
     34    ),
     35  ),
     36  'NetworkConfiguration' => array(
     37    'Title' => 'Restart sítových služeb',
     38    'Table' => 'NetworkConfiguration',
     39    'Items' => array(
     40      'Caption' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     41      'Execute' => array('Type' => 'String', 'Caption' => 'Povely', 'Default' => ''),
     42      'Changed' => array('Type' => 'TNetworkConfigurationState', 'Caption' => 'Stav', 'Default' => 0),
     43      'LastTime' => array('Type' => 'DateTime', 'Caption' => 'Naposledy spuštěno', 'ReadOnly' => true),
     44      'ExecutionTime' => array('Type' => 'Integer', 'Caption' => 'Doba běhu', 'Default' => '0', 'Suffix' => 'sekund', 'ReadOnly' => true),
     45      'Enabled' => array('Type' => 'Boolean', 'Caption' => 'Povoleno', 'Default' => '0'),
     46      'Period' => array('Type' => 'Integer', 'Caption' => 'Min. perioda', 'Default' => '60', 'Suffix' => 'sekund'),
     47    ),
     48    'ItemActions' => array(
     49      array('Caption' => 'Záznam', 'URL' => '/is/?a=view&t=NetworkConfigurationLog'),
     50    ),
     51  ),
     52  'NetworkConfigurationLog' => array(
     53    'Title' => 'Záznam restartu sítových služeb',
     54    'Table' => 'NetworkConfiguration',
     55    'Items' => array(
     56      'Caption' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     57      'Log' => array('Type' => 'Text', 'Caption' => 'Záznam', 'Default' => '', 'ReadOnly' => true),
     58    ),
     59  ),
    1760  'MemberPayment' => array(
    1861    'Title' => 'Placení zákazníků',
     
    5598      'BaseTariffPrice' => array('Type' => 'Integer', 'Caption' => 'Základní cena tarifu', 'Default' => '0', 'Suffix' => 'Kč'),
    5699      'TopTariffPrice' => array('Type' => 'Integer', 'Caption' => 'Nejvyšší cena tarifu', 'Default' => '0', 'Suffix' => 'Kč'),
    57       'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => ''),       
     100      'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true),       
    58101      'ReplaceId' => array('Type' => 'TFinanceCharge', 'Caption' => 'Cílová položka', 'Default' => '0', 'Null' => true),
    59102    ),
     
    66109      'Directory' => array('Type' => 'TDirectory', 'Caption' => 'Adresář', 'Default' => '', 'Null' => true),
    67110      'Size' => array('Type' => 'Integer', 'Caption' => 'Velikost', 'Default' => ''),
     111    ),
     112    'ItemActions' => array(
     113      array('Caption' => 'Stáhnout', 'URL' => '/FileDownload.php?download'),
    68114    ),
    69115  ),
     
    137183      'Service' => array('Type' => 'TService', 'Caption' => 'Služba', 'Default' => ''),       
    138184      'Customer' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => ''),       
    139       'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => ''),       
     185      'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true),       
    140186      'ReplaceId' => array('Type' => 'TServiceCustomerRel', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true),       
    141187    ),
     
    353399      'Storage' => array('Type' => 'Integer', 'Caption' => 'Úložiště', 'Default' => '0', 'Suffix' => 'GB'),
    354400      'CPUCount' => array('Type' => 'Integer', 'Caption' => 'Počet jader', 'Default' => '0', 'Suffix' => ''),
    355       'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => ''),       
     401      'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => '', 'Null' => true),       
    356402      'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true),
    357403    ),
     
    471517      'MapPosition' => array('Type' => 'TMapPosition', 'Caption' => 'Pozice na mapě', 'Default' => '0'),
    472518    ),
     519    'Actions' => array(
     520      array('Caption' => 'Dostupnost zařízení', 'URL' => '/network/dostupnost.php'),
     521    ),
    473522  ),
    474523  'NetworkDeviceType' => array(
     
    757806    'States' => array('Nízká', 'Střední', 'Vysoká'),
    758807  ),
     808  'TNetworkConfigurationState' => array(
     809    'Type' => 'Enumeration',
     810    'States' => array('Neplánováno', 'V plánu', 'Provádí se'),
     811  ),   
    759812  'TNetworkDeviceState' => array(
    760813    'Type' => 'Enumeration',
     
    767820  'TActionEnum' => array(
    768821    'Type' => 'Enumeration',
    769     'States' => array('' => '', 'add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'),
     822    'States' => array('add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'),
    770823  ),   
    771824  'TService' => array(
     
    915968    'Table' => 'File',
    916969    'Id' => 'Id',
    917     'Name' => 'Id',
     970    'Name' => 'Name',
    918971    'Filter' => '1',
    919972  ),
  • trunk/network/administration.php

    r441 r498  
    3636    } else
    3737    $Output =
    38       //'<a href="'.$this->System->Config['Web']['RootFolder'].'/statistic/known_mac.php">Zachycené MAC adresy</a><br />'.
    39       //'<a href="'.$this->System->Config['Web']['RootFolder'].'/statistic/connections.php">Síťová připojení</a><br />'.
    40       //'<a href="'.$this->System->Config['Web']['RootFolder'].'/statistic/bandwidth.php">Zatížení linky do internetu</a><br />'.
    41       //'<a href="'.$this->System->Config['Web']['RootFolder'].'/statistic/bandwidth_full.php">Zatížení linky do internetu všechny počítače</a><br />'.
    42       '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/dostupnost.php">Dostupnost sítě</a><br />'.
    43       //'<a href="'.$this->System->Config['Web']['RootFolder'].'/is/wlan.php">Bezdrátové sítě v okolí</a><br />'.
    44       '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/restart.php">Ruční restart konfigurace sítě</a><br />'.
    45       //'<a href="'.$this->System->Config['Web']['RootFolder'].'/backup/index.php">Nastavení zálohování</a><br />'.
     38      //'<a href="'.$this->System->Config['Web']['RootFolder'].'/network/dostupnost.php">Dostupnost sítě</a><br />'.
    4639      '<a href="?Action=SendEmail">Zaslat email</a><br />'.
    4740      '<a href="?Action=ProcessEmailQueue">Zpracovat frontu emailů</a><br />';
    48       //'<a href="tc.php?dev=imq0">Traffic control IMQ0(Inet down)</a><br />'.
    49       //'<a href="tc.php?dev=imq1">Traffic control IMQ1(Inet up)</a><br />'.
    50       //'<a href="wlan.php">WiFi signál</a><br />';
    5141    return($Output);
    5242  }
  • trunk/sql/updates/491.sql

    r491 r498  
    1 ALTER TABLE `SystemVersion` CHANGE COLUMN `Rev486` `Rev491`;
     1ALTER TABLE `SystemVersion` CHANGE `Rev486` `Rev491` BIT( 1 ) NULL DEFAULT NULL ;
    22DROP TABLE `SystemVersion`;
    33CREATE TABLE IF NOT EXISTS `SystemVersion` (
Note: See TracChangeset for help on using the changeset viewer.