Changeset 14 for admin.php


Ignore:
Timestamp:
Oct 17, 2007, 7:53:48 PM (17 years ago)
Author:
george
Message:

Oprava: Funkce pro přestavbu cache.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin.php

    r13 r14  
    1313  case 'Edit':
    1414    $Output = ShowEdit(); 
     15    break;
     16  case 'RebuildCache':
     17    $Output = ShowRebuildCache(); 
    1518    break;
    1619  default:
     
    3033  while($Measure = $Result->fetch_array())
    3134  {
    32     array_push($Table['Rows'], array($Measure['Description'], MakeLink('?Operation=Edit&MeasureId='.$Measure['Id'], 'Editovat').' '.MakeLink('?Operation=Delete&MeasureId='.$Measure['Id'], 'Odstranit')));
     35    array_push($Table['Rows'], array($Measure['Description'], MakeLink('?Operation=Edit&MeasureId='.$Measure['Id'], 'Editovat').' '.MakeLink('?Operation=Delete&MeasureId='.$Measure['Id'], 'Odstranit').' '.MakeLink('?Operation=RebuildCache&MeasureId='.$Measure['Id'], 'Pøestavìt cache')));
    3336  }
    3437  $Output = '<h3>Seznam mìøení</h3>'.Table($Table).MakeLink('?Operation=Add', 'Pøidat');
     
    3942{
    4043  global $Database;
    41   $DbResult = $Database->select('measure', '*', 'Id='.$_GET['MeasureId']);
     44  $DbResult = $Database->select('measure', '*', 'Id='.addslashes($_GET['MeasureId']));
    4245  $Values = array();
    4346  $Values = $DbResult->fetch_array();
     
    5255}
    5356
     57function ShowRebuildCache()
     58{
     59  global $Database;
     60  echo("Vytvaøím novou cache...<br>");
     61  $DbResult = $Database->select('measure', '*', 'Id='.addslashes($_GET['MeasureId']));
     62  $Measure = $DbResult->fetch_array();
     63
     64  RebuildMeasureCache($Measure); 
     65  echo('Dokonèeno<br>');         
     66}
     67
    5468?>
Note: See TracChangeset for help on using the changeset viewer.