Changeset 164 for www/otevreno.php


Ignore:
Timestamp:
Feb 21, 2009, 11:04:42 AM (16 years ago)
Author:
george
Message:
  • Opraveno: Mazání položek ze seznamu online uživatelů.
  • Upraveno: Zobrazování členů sítě správcům financí.
  • Opraveno: Další menší opravy v souvislosti s předěláváním tabulky users.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/otevreno.php

    r153 r164  
    77  var $ShortTitle = 'Otvírací doby';
    88  var $DaysOfWeek = array('Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota', 'Neděle');
     9  var $DayShift = 3;
    910
    1011  function Show()
     
    1516    {
    1617      $Output .= '<strong>'.$Subject['Name'].':</strong><br />';
    17       $DbResult2 = $this->Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(CloseTime, DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") > OpenTime AND DATE_FORMAT(NOW(), "0000-01-%w %T") < CloseTime AND Subject='.$Subject['Subject']);
     18         
     19      $DbResult2 = $this->Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(DATE_FORMAT(CloseTime, "0000-01-%w %T"), DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") > OpenTime AND DATE_FORMAT(NOW(), "0000-01-%w %T") < CloseTime AND Subject='.$Subject['Subject']);
    1820      if($DbResult2->num_rows > 0)
    1921      {
     
    2628        $Output .= 'Otevírá za '.$DbRow['RemainTime'];
    2729      }
    28       $Output .= '<table class="WideTable">
     30
     31          $Output .= '<table class="WideTable">
    2932<tr><th>Den</th><th>Čas</th></tr>';
    3033      foreach($this->DaysOfWeek as $DayIndex => $DayOfWeek)
    3134      {
    32         $DbResult2 = $this->Database->query('SELECT *, DATE_FORMAT(OpenTime, "%k:%i") as OpenTime, DATE_FORMAT(CloseTime, "%k:%i") as CloseTime FROM SubjectOpenTimeInterval WHERE SubjectOpenTimeInterval.Subject = '.$Subject['Subject'].' AND ((DAYOFWEEK(OpenTime) + 0) MOD 7)='.$DayIndex);
     35        $DbResult2 = $this->Database->query('SELECT *, DATE_FORMAT(OpenTime, "%k:%i") as OpenTime2, DATE_FORMAT(CloseTime, "%k:%i") as CloseTime2, DAYOFWEEK(OpenTime) as Week FROM SubjectOpenTimeInterval WHERE SubjectOpenTimeInterval.Subject = '.$Subject['Subject'].' AND ((DAYOFWEEK(OpenTime) + 7) MOD 7)='.$DayIndex);
    3336        $Output .= '<tr><td>'.$DayOfWeek.'</td><td align="center">';
    3437        if($DbResult2->num_rows)
     
    3639          while($TimeInterval = $DbResult2->fetch_assoc())
    3740          {
    38             $Output .= $TimeInterval['OpenTime'].' - '.$TimeInterval['CloseTime'].' &nbsp;&nbsp; ';
     41            $Output .= $TimeInterval['OpenTime2'].' - '.$TimeInterval['CloseTime2'].' &nbsp;&nbsp; ';
    3942          }
    4043        } else
Note: See TracChangeset for help on using the changeset viewer.