Changeset 43 for www/sunrisechat


Ignore:
Timestamp:
Feb 1, 2008, 9:56:41 PM (17 years ago)
Author:
george
Message:

Opraveno: Chyby přístupu k databázi.

Location:
www/sunrisechat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • www/sunrisechat

    • Property svn:ignore set to
      nohup.out
  • www/sunrisechat/sunrisechat2.php

    r24 r43  
    33include_once('../global.php');
    44include_once('webchatsend.php');
     5//$Config['Web']['ShowError'] = 1;
    56 
    67$Debug = 0;
     
    4142  if($Command == 'Alive')
    4243  {
    43     $Result = $Database->select('sunrisechat_onlinelist','*','sender_id='.$SenderID.' AND sender_ip="'.$SenderIP.'"');
    44     if($DbResult->num_rows() > 0)
     44    $DbResult = $Database->select('sunrisechat_onlinelist','*','sender_id='.$SenderID.' AND sender_ip="'.$SenderIP.'"');
     45    if($DbResult->num_rows > 0)
    4546    {
    4647      $Row = $DbResult->fetch_array();
     
    5960  if($Command == 'GoAway')
    6061  {
    61     $Result = $Database->select('sunrisechat_onlinelist','*','sender_id='.$SenderID.' AND sender_ip="'.$SenderIP.'"');
     62    $DbResult = $Database->select('sunrisechat_onlinelist','*','sender_id='.$SenderID.' AND sender_ip="'.$SenderIP.'"');
    6263    if($DbResult->num_rows() > 0)
    6364    {
     
    7071    $Nick = $Parts[7];
    7172    echo('UserInfo: '.$Nick."\n");
    72     $Result = $Database->select('sunrisechat_onlinelist','*','sender_id='.$SenderID.' AND sender_ip="'.$SenderIP.'"');
    73     if($DbResult->num_rows() > 0)
     73    $DbResult = $Database->select('sunrisechat_onlinelist','*','sender_id='.$SenderID.' AND sender_ip="'.$SenderIP.'"');
     74    if($DbResult->num_rows > 0)
    7475    {
    7576      $Row = $DbResult->fetch_array();
     
    9798  //$Row = DB_Row();
    9899  //echo($Row[0]-(time()-200)."\n");
    99   DB_Delete('sunrisechat_onlinelist','UNIX_TIMESTAMP(lasttime)<'.(time()-30));
     100  $Database->delete('sunrisechat_onlinelist','UNIX_TIMESTAMP(lasttime)<'.(time()-30));
    100101}
    101102
Note: See TracChangeset for help on using the changeset viewer.