Changeset 153 for www/otevreno.php


Ignore:
Timestamp:
Feb 16, 2009, 6:16:00 PM (16 years ago)
Author:
george
Message:
  • Přidáno: Zobrazování chyb v SQL povelech. Nastavení v konfigureaci.
  • Upraveno: Zpřístupnění stavu financí dle ip i dle přihlášení.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/otevreno.php

    r148 r153  
    1111  {
    1212    $Output = '<div align="center">';
    13     $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject');
    14     while($Subject = $DbResult->fetch_array())
     13    $DbResult = $this->Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject ORDER BY Name');
     14    while($Subject = $DbResult->fetch_assoc())
    1515    {
    1616      $Output .= '<strong>'.$Subject['Name'].':</strong><br />';
     
    1818      if($DbResult2->num_rows > 0)
    1919      {
    20         $DbRow = $DbResult2->fetch_array();
     20        $DbRow = $DbResult2->fetch_assoc();
    2121        $Output .= 'Zavírá za '.$DbRow['RemainTime'];
    2222      } else
    2323      {
    2424        $DbResult2 = $this->Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(OpenTime, DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") < OpenTime AND Subject='.$Subject['Subject'].' ORDER BY OpenTime LIMIT 1');
    25         $DbRow = $DbResult2->fetch_array();
     25        $DbRow = $DbResult2->fetch_assoc();
    2626        $Output .= 'Otevírá za '.$DbRow['RemainTime'];
    2727      }
     
    3434        if($DbResult2->num_rows)
    3535        {
    36           while($TimeInterval = $DbResult2->fetch_array())
     36          while($TimeInterval = $DbResult2->fetch_assoc())
    3737          {
    3838            $Output .= $TimeInterval['OpenTime'].' - '.$TimeInterval['CloseTime'].' &nbsp;&nbsp; ';
Note: See TracChangeset for help on using the changeset viewer.