Pagina 2 di 2 PrimoPrimo 12
Visualizzazione risultati 31 fino 55 di 55

Discussione: Orario accanto all'username

  1. #31
    Guest

    Predefinito

    hai messo una funzione 09:08() :s
    posta tutto lo script

  2. #32
    Guest

    Predefinito

    fabio qua c'è il codice
    Codice PHP:
    <?php
    header
    ("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    //header('Content-type: application/vnd.wap.xhtml+xml');
    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    echo
    "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/>
    <meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
    </head>
    <?php

    include("config.php");
    include(
    "core.php");
    connectdb();
    $action=$_GET["action"];
    $id=$_GET["id"];
    $sid = $_GET["sid"];
    $rid=$_GET["rid"];
    $rpw=$_GET["rpw"];
    $uid = getuid_sid($sid);
    $uexist = isuser($uid);
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $data = date("H:i");

    if((
    islogged($sid)==false)||!$uexist)
    {
    echo
    "<head>";
    echo
    "<title>Error!!!</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<center>";
    echo
    "Non sei loggato<br/>";
    echo
    "O la tua sessione è scaduta<br/><br/>";
    echo
    "<a href=\"index.php\">Login</a>";
    echo
    "</center>";
    echo
    "</html>";
    echo
    "</body>";
    exit();
    }

    if(
    isbanned($uid))
    {
    echo
    "<head>";
    echo
    "<title>Error!!!</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<p align=\"center\">";
    echo
    "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";
    echo
    "<b>Sei stato Bannato</b><br/><br/>";
    $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
    $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
    $remain = $banto[0]- time();
    $rmsg = gettimemsg($remain);
    echo
    "<b>Tempo rimasto: </b>$rmsg<br/>";
    $nick = getnick_uid($banto[2]);
    echo
    "<b>By: </b>$nick<br/>";
    echo
    "<b>Reason: </b>$banto[1]";
    //echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    echo
    "</body>";
    echo
    "</html>";
    exit();
    }
    $isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE id='".$rid."'"));
    if(
    $isroom[0]==0)
    {
    echo
    "<head>";
    echo
    "<title>Error!!!</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<center>";
    echo
    "<b>La Room non esiste</b><br/><br/>";
    echo
    "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
    echo
    "</center>";
    echo
    "</body>";

  3. #33
    Guest

    Predefinito

    Codice PHP:
    echo "</html>";
    exit();
    }
    $passworded = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'"));
    if(
    $passworded[0]!="")
    {
    if(
    $rpw!=$passworded[0])
    {
    echo
    "<head>";
    echo
    "<title>Error!!!</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<center>";
    echo
    "<b>Password Errata!</b><br/>";
    echo
    "Non è possibile entrare in questa stanza<br/><br/>";
    echo
    "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
    echo
    "</center>";
    echo
    "</body>";
    echo
    "</html>";
    exit();
    }
    }
    if(!
    canenter($rid,$sid))
    {
    echo
    "<head>";
    echo
    "<title>Error!!!</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<center>";
    echo
    "<b>Autorizzazione negata!</b><br/><br/>";
    echo
    "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a>";
    echo
    "</center>";
    echo
    "</body>";
    echo
    "</html>";
    exit();
    }
    addtochat($uid, $rid);
    $timeto = 300;
    $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=="")
    {
    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=\"30; url=chat.php?time=";
    echo
    "".date("dmHis")."";
    echo
    "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">";
    }
    echo
    "</head>";
    echo
    "<body>";
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"Chatta in $rname ($mmsg)","chat.php?rid=$rid&amp;rpw=$rpw");
    //echo "<p>";
    echo popup($sid);
    echo
    "<b>1 </b><a name=\"top\" id=\"top\" accesskey=\"1\" href=\"chat.php?action=say&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Scrivi</a><br/>";
    echo
    "<b>2 </b><a accesskey=\"2\" href=\"#opt\">vai giu</a><br/>";
    echo
    "<b>* </b><a accesskey=\"*\" href=\"chat.php?time=";
    echo
    "".date("dmHis")."";
    echo
    "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Aggiorna</a><br/>";

    $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
    $unrd="".$unreadinbox[0]."";
    if (
    $unreadinbox[0]>0)
    {
    echo
    "<b>5 </b><a href=\"inbox.php?action=main&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">$unrd Nuovo Inbox!</a><br/>";
    }
    echo
    "<img src=\"http://universal3000.altervista.org/separatore.gif\" alt=\"\"/><br/>";
    //echo "</p>";
    //echo "<br/><br/>";

    $message=$_POST["message"];
    $who = $_POST["who"];
    $rinfo = mysql_fetch_array(mysql_query("SELECT censord, freaky FROM ibwf_rooms WHERE id='".$rid."'"));
    if (
    trim($message) != "")
    {
    if(!
    isblocked($message,$uid))
    {

    $chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='".$uid."', who='".$who."', timesent='".time()."', data='".time()."', msgtext='".$message."', rid='".$rid."';");
    $lstmsg = mysql_query("UPDATE ibwf_rooms SET lastmsg='".time()."' WHERE id='".$rid."'");

    $hehe=mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
    $totl = $hehe[0]+1;
    $msgst= mysql_query("UPDATE ibwf_users SET chmsgs='".$totl."' WHERE id='".$uid."'");
    }else{
    $bantime = time() + (30*24*60*60);
    echo
    "<img src=\"../images/notok.gif\" alt=\"X\"/>";
    echo
    "Impossibile inserire messaggio<br/><br/>";
    echo
    "Hai appena cercato di inviare un msg con un link ad uno dei siti <br/> I membri di questa community hanno molti spam, quindi vai a quel sito e stacci, se non ti piace qui<br/> come un risultato della vostra azione stupido:<br/>1. hai perso un opportunità<br/>2. hai perso tutti i tuoi plus<br/>3. Sei stato BANNATO!";
    $user = getnick_sid($sid);
    mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='<b>".getnick_uid(1)."</b> auto banned $user for spamming chat', actdt='".time()."'");
    mysql_query("INSERT INTO ibwf_penalties SET uid='".$uid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
    mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$uid."'");
    echo
    "</body>";
    echo
    "</html>";
    exit();
    }
    if(
    $rinfo[1]==2)
    {
    //oh damn i gotta post this message to ravebabe :(
    //will it succeed?
    $botid = "eeb070e74e366473";
    $hostname = "www.pandorabots.com";
    $hostpath = "/pandora/talk-xml";
    $sendData = "botid=".$botid."&input=".urlencode($message)."&custid=".$custid;

    $result = PostToHost($hostname, $hostpath, $sendData);

    $pos = strpos($result, "custid=\"");
    $pos = strpos($result, "<that>");
    if (
    $pos === false) {
    $reply = "";
    } else {
    $pos += 6;

  4. #34
    Guest

    Predefinito

    Codice PHP:
    $endpos = strpos($result, "</that>", $pos);
    $reply = unhtmlspecialchars2(substr($result, $pos, $endpos - $pos));
    $reply = mysql_escape_string($reply);
    }

    $chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='', timesent='".time()."', orario='".$orario."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");

    }
    $message = "";
    }

    echo
    "<br/>";
    $chats = mysql_query("SELECT chatter, who, timesent, msgtext, exposed,data FROM ibwf_chat WHERE rid='".$rid."' ORDER BY timesent DESC, id DESC");
    $counter=0;

    while(
    $chat = mysql_fetch_array($chats))
    {
    $canc = true;


    if(
    $counter<16)
    {
    if(
    istrashed($chat[0])){
    if(
    $uid!=$chat[0])
    {
    $canc = false;
    }
    }
    //////good
    /*if(isignored($chat[0],$uid)){
    $canc = false;
    }*/
    //////////good
    if($chat[0]!=$uid)
    {
    if(
    $chat[1]!=0)
    {
    if(
    $chat[1]!=$uid)
    {
    $canc = false;
    }
    }
    }
    if(
    $chat[4]=='1' && ismod($uid))
    {
    $canc = true;
    }
    if(
    $canc)
    {
    $cmid = mysql_fetch_array(mysql_query("SELECT chmood FROM ibwf_users WHERE id='".$chat[0]."'"));

    $iml = "";
    if((
    $cmid[0]!=0))
    {
    $mlnk = mysql_fetch_array(mysql_query("SELECT img, text FROM ibwf_moods WHERE id='".$cmid[0]."'"));
    $iml = "<img src=\"$mlnk[0]\" alt=\"$mlnk[1]\"/>";

    }
    $chnick = getnick_uid($chat[0]);
    $optlink = $iml.$chnick;
    if((
    $chat[1]!=0)&&($chat[0]==$uid))
    {
    ///out
    $iml = "<img src=\"../moods/out.gif\" alt=\"!\"/>";
    $chnick = getnick_uid($chat[1]);
    $optlink = $iml."Privato a ".$chnick;
    }
    if(
    $chat[1]==$uid)
    {
    ///out
    $iml = "<img src=\"../moods/in.gif\" alt=\"!\"/>";
    $chnick = getnick_uid($chat[0]);
    $optlink = $iml."Privato da ".$chnick;
    }
    if(
    $chat[4]=='1')
    {
    ///out
    $iml = "<img src=\"../moods/point.gif\" alt=\"!\"/>";
    $chnick = getnick_uid($chat[0]);
    $tonick = getnick_uid($chat[1]);
    $optlink = "$iml By ".$chnick." To ".$tonick;
    }

    $ds= date("H.i.s", $chat[2]);
    $text = parsepm($chat[3], $sid);
    $nos = substr_count($text,"<img src=");
    if(
    isspam($text))
    {
    $chnick = getnick_uid($chat[0]);
    echo
    addchatmsg($chat[0],$text,1,"*ehi! $chnick, Niente Spamming!*");
    }
    else if(
    $nos>20){
    $chnick = getnick_uid($chat[0]);
    echo
    addchatmsg($chat[0],$text,1,"*ehi! $chnick, solo 20 smilies per msg!*");
    }else{
    $sres = substr($chat[3],0,3);
    if(
    $sres == "/me")
    {
    $chco = strlen($chat[3]);
    $goto = $chco - 3;
    $rest = substr($chat[3],3,$goto);
    $tosay = parsepm($rest, $sid);

    echo
    addchatmsg($chat[0],$tosay,1,"");
    }
    else{
    if(
    $rinfo[0]==0){$tosay = getbbcode($chat[3], $sid, 0);}
    else{
    $tosay = parsepm($chat[3], $sid, 1);}
    if(
    $rinfo[1]==1){$tosay = strrev($tosay);}



    echo
    date("H:i",$chat['data'])."<a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$chat[0]&amp;rid=$rid&amp;rpw=$rpw\">$optlink</a>:<br> ";
    echo
    $tosay."<br/>";
    }
    }
    $counter++;
    }
    }
    }
    echo
    "<br/>";
    echo
    "<img src=\"http://universal3000.altervista.org/separatore.gif\" alt=\"\"/><br/>";
    echo
    "<a name=\"opt\" id=\"opt\"></a>";

  5. #35
    Guest

    Predefinito

    Codice PHP:
    echo "<b>* </b><a accesskey=\"*\" href=\"chat.php?time=";
    echo
    "".date("dmHis")."";
    echo
    "&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Aggiorna</a><br/>";
    echo
    "<a href=\"ravebabe.php?sid=$sid\">Chatta con Nancy</a><br/>";
    echo
    "<b>1 </b><a href=\"chat.php?action=say&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Scrivi</a><br/>";
    echo
    "<b>3 </b><a accesskey=\"3\" href=\"chat.php?action=options&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Impostazioni</a><br/>";
    $chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Chi c'e' in stanza $chatters[0]</a><br/>";
    echo
    "<b>5 </b><a accesskey=\"5\" href=\"inbox.php?action=main&amp;sid=$sid&amp;lstloc=cht&amp;rid=$rid\">Inbox</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
    echo
    forumlink($sid,8);
    echo
    "<b>9 </b><a accesskey=\"9\" href=\"#top\">vai su</a> ";
    echo
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo
    "</body>";
    }
    /////////////////////////////////////////////////////SAY

    else if ($action=="say")
    {
    echo
    "<head>";
    echo
    "<title>Scrivi Msg</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<p align=\"center\">";
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"Scrive un messaggio in chat ($mmsg)","");
    echo
    "<form action=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
    echo
    "<p>Messaggio:<input name=\"message\" type=\"text\" maxlength=\"255\"/><br/>";
    echo
    "<input type=\"Submit\" Name=\"sy2\" value=\"Invia\"></form><br/>";
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Indietro a $rname</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
    echo
    forumlink($sid,9);
    echo
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
    echo
    "</body>";
    }
    ////////////////////////////////////////////
    /////////////////////////////////////////////////////SAY2
    else if ($action=="say2") {
    echo
    "<head>";
    echo
    "<title>Inviare Privato</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<p align=\"center\">";
    $unick = getnick_uid($who);
    echo
    "<b>Invia privato a $unick</b>";
    echo
    "</p>";
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"scrive un messaggio in chat ($mmsg)","");
    echo
    "<form action=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
    echo
    "<input type=\"Hidden\" name=\"who\" value=\"$who\">";
    echo
    "<p>Messaggio:<input name=\"message\" type=\"text\" maxlength=\"255\"/><br/>";
    echo
    "<input type=\"Submit\" name=\"private\" Value=\"Privato\"></form>";
    echo
    "<br/>";
    if(
    ismod($uid))
    {
    echo
    "<b>* </b><a accesskey=\"*\" href=\"chat.php?action=clear&amp;sid=$sid&amp;who=$who&amp;lstloc=cht&amp;rid=$rid\">Cancella Msgs</a><br/>";
    }
    echo
    "<b>1 </b><a accesskey=\"1\" href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who&amp;lstloc=cht&amp;rid=$rid\">Guarda profilo di $unick's</a><br/>";
    echo
    "<b>2 </b><a accesskey=\"2\" href=\"chat.php?action=expose&amp;sid=$sid&amp;who=$who&amp;rid=$rid&amp;rpw=$rpw\">Esponi Msgs indesiderati $unick's allo Staff</a><br/>";
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Indietro a $rname</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
    echo
    forumlink($sid,9);
    echo
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
    echo
    "</body>";
    }
    /////////////////////////////////////////////////////CHAT OPTIONS

    else if ($action=="options")
    {
    echo
    "<head>";
    echo
    "<title>Chat Opzioni</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"è nelle Chat Opzioni ($mmsg)","");
    echo
    "<b>1 </b><a accesskey=\"1\" href=\"lists.php?action=chmood&amp;sid=$sid&amp;page=1\">Chat Mood</a><br/>";
    echo
    "<b>2 </b><a accesskey=\"2\" href=\"lists.php?action=smilies&amp;sid=$sid\">Lista Smilies</a><br/>";
    echo
    "<b>3 </b><a accesskey=\"3\" href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Chi c'è in stanza</a><br/>";
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Indietro a $rname</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
    echo
    forumlink($sid,9);

  6. #36
    Guest

    Predefinito

    Codice PHP:
    echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
    echo
    "</body>";
    }
    ////////////////////////////////////////////
    //////////////////////////////inside//////////
    else if ($action=="inside") {
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"guarda la lista utenti in chat ($mmsg)","");
    echo
    "<head>";
    echo
    "<title>Chat UserList</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<p><br/>";
    $inside=mysql_query("SELECT DISTINCT * FROM ibwf_chonline WHERE rid='".$rid."' and uid IS NOT NULL");

    while(
    $ins=mysql_fetch_array($inside))
    {
    $unick = getnick_uid($ins[1]);
    $userl = "<a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$ins[1]&amp;rid=$rid&amp;rpw=$rpw\">$unick</a><br/>";
    echo
    "$userl";
    }
    echo
    "<br/>";
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Indietro a $rname</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
    echo
    forumlink($sid,9);
    echo
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
    echo
    "</body>";
    }
    else if (
    $action=="expose") {
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"Espone mex indesiderati dell utente in chat ($mmsg)","");
    echo
    "<head>";
    echo
    "<title>Exposing ChatUser</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<p align=\"center\"><br/>";
    mysql_query("UPDATE ibwf_chat SET exposed='1' WHERE chatter='".$who."' AND who='".$uid."'");
    $unick = getnick_uid($who);
    echo
    "$unick i messaggi sono stati esposti allo Staff";
    echo
    "<br/><br/>";
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Indietro a $rname</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\"><img src=\"../images/chat.gif\" alt=\"\"/>RoomList</a><br/>";
    echo
    forumlink($sid,9);
    echo
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
    echo
    "</body>";
    }
    else if((
    $action=="clear")&&(ismod($uid)))
    {
    $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline($uid,"è nel Tools della Chat ($mmsg)","");
    echo
    "<head>";
    echo
    "<title>Cancella Users Msgs</title>";
    echo
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo
    "</head>";
    echo
    "<body>";
    echo
    "<p align=\"center\"><br/>";
    $trgtnick=getnick_uid($who);
    $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
    $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
    if(
    $trgtperm>$perm){
    echo
    "<b><img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permesso Negato...</b><br/>";
    echo
    "<br/>Non puoi cancellare $trgtnick's i Msgs<br/>";
    }else{
    if((
    $who!="")||($who!=0))
    {
    $res = mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."'");
    if(
    $res)
    {
    echo
    "$trgtnick msgs have been cleared<br/>";
    }else{
    echo
    "Failed clearing $trgtnick msgs<br/>";
    }
    }else{
    echo
    "Username non esiste<br/>";
    }
    }
    echo
    "<br/>";
    $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
    $rname = $rooms[1];
    echo
    "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Indietro a $rname</a><br/>";
    echo
    "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    echo
    "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">Lista Amici</a><br/>";
    echo
    "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\"><img src=\"../images/chat.gif\" alt=\"\"/>RoomList</a><br/>";
    echo
    forumlink($sid,9);
    echo
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a></p>";
    echo
    "</body>";
    }
    ?>
    </html>

  7. #37
    Guest

    Predefinito

    metti questo
    date("H:i",$chat[5]) invece di date("H:i",$chat['data']), comunque il problema non è la :s dovresti trovare il rigo 318

  8. #38
    Guest

    Predefinito

    fabio messo così non fa errore
    Codice PHP:
    echo date("H:i",$chat[5])."<a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$chat[0]&amp;rid=$rid&amp;rpw=$rpw\">$optlink</a>:<br> ";
    ma segna sempre 04:27

  9. #39
    Guest

    Predefinito

    ne sei sicuro? :s
    se è così dovresti rivedere il ciclo while ,04:27 è l'orario del primo messaggio presente nella tabella?

  10. #40
    Guest

    Predefinito

    fabio no è un orario nuovo.. non conosco nessun ciclo ah poi sei stato convalito nella community.. scusami

  11. #41
    Guest

    Predefinito

    allora nessuno lo sa?

  12. #42
    Guest

    Predefinito

    dovresti controllare il campo 'data' della tabella 'ibwf_chat' ,secondo me il timestamp non ci arriva nemmeno

  13. #43
    Guest

    Predefinito

    fabio il 'data' è fatto nella tabella del database come mi avete detto voi.. nei post precedenti.. madoo sto problema sembra come il cane che si morde la coda..

  14. #44
    Guest

    Predefinito

    sicuro che ci sia e che non sia vuoto?
    per darti la data attuale vuol dire che il timestamp è vuoto

  15. #45
    Guest

    Predefinito

    fabio nella tabella del database, il timestamp non c'è! C'è solo il timesend e il data! Infatti puoi andare a vedere nei messaggi precedenti.. ma non c'è timestamp. Se ci vuole come si fa?

  16. #46
    Guest

    Predefinito

    io dico dentro il campo 'data' cosa c'è? è vuoto o c'è qualcosa? clicca sulla tabella e poi mostra così vedi se dentro c'è qualcosa

  17. #47
    Guest

    Predefinito

    Fabio nel campo data c' è questo... data varchar(5) latin1_swedish_ci No

  18. #48
    Guest

    Predefinito

    intendeva il contenuto di 'data'... vai sulla tabella e clicca in alto su mostra su phpmyadmin e vedi se ha qualche valore

  19. #49
    Guest

    Predefinito

    C'è questo SELECT * FROM `ibwf_chat` WHERE 1

  20. #50
    Guest

    Predefinito

    si ma sotto c'è il contenuto della tabella , vedi se nei campi data c'è qualcosa oppure no

  21. #51
    Guest

    Predefinito

    fabio non c'è niente..

  22. #52
    Guest

    Predefinito

    guarda l'ultima cosa può essere questa .. da come ho visto ci sono due tipi di insert ( non so il perchè ) e nella seconda insert del post numero 34 c'è questo codice
    Codice PHP:
    $chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='', timesent='".time()."', orario='".$orario."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
    il campo orario non dovrebbe nemmeno esistere ... quindi prova a fare così

    Codice PHP:
    $chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='', timesent='".time()."',data='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
    se non funziona nemmeno questa mi arrendo
    ripeto La prima query che trovi sul POST numero 34
    Ultima modifica di fabio29 : 27-06-2009 alle ore 16.28.40

  23. #53
    securitybus non è connesso Neofita
    Data registrazione
    27-01-2009
    Messaggi
    1

    Predefinito

    io invece al post 34 metterei:

    Codice:
    <a href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">options</a>, ";
    echo "<a href=\"chat.php?time=";
    echo date('dmHis');
    echo "&sid=$sid&rid=$rid&rpw=$rpw";
    echo "\">refresh</a>";

  24. #54
    Guest

    Predefinito

    Non va! Secondo me manca una funzione quà, o bisigna aggiungere
    Codice PHP:
    {

    $timeto = 100;

    $timenw = time();

    $timeout = $timenw - $timeto;

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

    $timeto = 300;

    $timenw = time();

    $timeout = $timenw - $timeto;

    $exec = mysql_query("DELETE FROM ibwf_chat WHERE timesent<'".$timeout."'");

    $timeto = 60*60;

    $timenw = time();

    $timeout = $timenw - $timeto;

    $exec = mysql_query("DELETE FROM ibwf_search WHERE stime<'".$timeout."'");

  25. #55
    Guest

    Predefinito

    Ho risolto grazie fabio29 :)

Pagina 2 di 2 PrimoPrimo 12

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •