Changeset 106 for www


Ignore:
Timestamp:
Aug 10, 2008, 10:47:08 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Přejmenování databáze historie chatu na ChatHistory. Přejmenovány také názvy sloupců na velké počáteční písmena.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/sunrisechat/history.php

    r32 r106  
    88$DateParts = explode('-',$Date);
    99 
    10 $DbResult = $Database->select('sunrisechat_history','MAX(time), MIN(time)');
     10$DbResult = $Database->select('ChatHistory','MAX(Time), MIN(Time)');
    1111$RowTotal = $DbResult->fetch_array();
    1212 
    13 $StartDateTimeParts = explode(' ',$RowTotal['MIN(time)']);
     13$StartDateTimeParts = explode(' ',$RowTotal['MIN(Time)']);
    1414$StartDateParts = explode('-',$StartDateTimeParts[0]);
    15 $EndDateTimeParts = explode(' ',$RowTotal['MAX(time)']);
     15$EndDateTimeParts = explode(' ',$RowTotal['MAX(Time)']);
    1616$EndDateParts = explode('-',$EndDateTimeParts[0]);
    1717 
     
    6565  echo('</div><div style="border-style: solid; border-bottom-color: gray; border-width: 0 0 1 0; margin-bottom: 3px; padding-bottom: 2px;"></div>');
    6666 
    67     $DbResult = $Database->select('sunrisechat_history','nick,color,text,UNIX_TIMESTAMP(time)',"roomtype=0 AND time>'".$Date." 00:00:00' AND time<'".$Date." 23:59:59' ORDER BY time DESC");
     67    $DbResult = $Database->select('ChatHistory','Nick,Color,Text,UNIX_TIMESTAMP(Time)',"RoomType=0 AND Time>'".$Date." 00:00:00' AND Time<'".$Date." 23:59:59' ORDER BY Time DESC");
    6868    //echo('Vpis posledn�h 100 zpr�:<br>');
    6969    echo('<div style="font-size: small;">');
    7070    while($Row = $DbResult->fetch_array())
    7171    {
    72       $Text = $Row['text'];;
     72      $Text = $Row['Text'];;
    7373      // StrTr($Row['text'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE");
    74       echo('['.date('d.m.Y H:i:s',$Row['UNIX_TIMESTAMP(time)']).'] <span style="color: #'.dechexr($Row['color']).'"><strong>&lt;'.$Row['nick'].'&gt;</strong> '.(htmlspecialchars($Text)).'</span><br>');
     74      echo('['.date('d.m.Y H:i:s',$Row['UNIX_TIMESTAMP(Time)']).'] <span style="color: #'.dechexr($Row['Color']).'"><strong>&lt;'.$Row['Nick'].'&gt;</strong> '.(htmlspecialchars($Text)).'</span><br>');
    7575      flush();
    7676    }
Note: See TracChangeset for help on using the changeset viewer.