Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Problema messaggi chat

  1. #1

    Problema messaggi chat

    Salve gente!! Mi sapete dire perchè i messaggi della chat dopo 1 minuto spariscono?
    addtochat($uid, $rid);
    $timeto = 86400;
    $timenw = time();
    $timeout = $timenw-$timeto;
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    $nick = getnick_sid($sid);


    if ($action=="")
    {
    $check = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_chonline WHERE uid='".$uid."', rid='".$rid."'"));
    if($check[0]!=$uid){

    mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'");
    }
    addtochat($uid, $rid);
    echo "<head>";
    echo "<title>$rname</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'"));
    if ($unreadpopup[0]<1)
    {
    echo "<meta http-equiv=\"refresh\" content=\"20; url=chat.php?time=";
    echo "".date("dmHis")."";
    echo "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">";
    Grazie a chi mi sa rispondere VVoVe:

  2. #2
    Utente di HTML.it
    Registrato dal
    Mar 2007
    Messaggi
    1,611
    addtochat sembra una funzione, dov'è questa funzione? cosa fa?
    NON ABBANDONATE CANI O GATTI!!!

  3. #3
    la funzione principale è questa
    Codice PHP:
    function addtochat($uid$rid)

    {
      
    $bago mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."'"));
    if(
    $bago[0]==0){
    $msg "*mat Enter the Room";
    mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', chatter='".$uid."', text='".$msg."'");
    }

      
    $timeto 86400;

      
    $timenw time();

      
    $timeout $timenw $timeto;

      
    //$exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<'".$timeout."'");

      
    $res mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");

      if(!
    $res)
      if(
    $counter<15)

      {
        
        
    mysql_query("UPDATE ibwf_chonline SET lton='".time()."', rid='".$rid."' WHERE uid='".$uid."'");

      }


    se devi aggiungere opzioni nella chat

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.