• User Attivo

    Probabile che manca la funzione canreg!! ..ma come si mette la funzione canreg? e dove esattamente?


  • Bannato User Attivo

    **nella tabella ibwf_settings setta ****value = 1 dove nome='reg' **


  • User Attivo

    Non lo capito.. puoi essere più preciso?:?


  • Bannato User Attivo

    canreg esiste e controlla se nella tabella ibwf_settings il valore del record con nome 'reg' è uguale a 1, probabilmente nella tua tabella è =0 prova a metterlo = 1:

    ///////////////////////////if registration is allowed
    function canreg()
    {
       $getreg = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='reg'"));
       if($getreg[0]=='1')
       {
         return true;
       }else
       {
         return false;
       }
    }
    ```esegui la query sotto:
    > UPDATE ibwf_settings SET value=1 WHERE name='reg'

  • User Attivo

    A si grazie non l'avevo vista. Alora, nella cartella database c'è
    value text latin1_swedish_ciNo

    cosa dovrei fare? non sono molto pratico 😞 se mi puoi guidare passo dopo passo. Mai ho provato a settare. Da dove devo cominciare?


  • Bannato User Attivo

    più che "non pratico" direi che sei a digiuno 😢
    Non posso aiutarti passo passo, spiacente, sarebbero mille passi ora che arrivi alla soluzione.

    ti dico in due passi cosa fare il resto ci arrivi da te se riesci.

    1. apri phpmyadmin (accedi al tuo database)
    2. lanci l'update che ti ho dato prima

    in bocca al lupo.


  • User Attivo

    lanci... nel senso che me lo dovrei salvare nel mio pc.. e poi importare nel mio database?? Gia' ci sono nel mio database.


  • Moderatore

    lanci significa cliccare sul tastino SQL di phpmyadmin e incollare nel campo di testo

    
     UPDATE ibwf_settings SET value=1 WHERE name='reg'
    
    

    poi invii e se il ragionamento è giusto dovrebbe fungere 🙂


  • User Attivo

    Grazie massi.. funziona:)


  • User Attivo

    Mi sono registrato con successo,, mi sono pure loggato e quando ento mi dice che non sono loggato o la sessione è scaduta.. penso che disogna impostare la cartella del database, come i messaggi precedenti.. metto il codice
    [PHP]////////////////////////////////////////////IS LOGGED?
    function islogged($sid)
    {
    //delete old sessions first
    $deloldses = mysql_query("DELETE FROM ibwf_ses WHERE expiretm<'".time()."'");
    //does sessions exist?
    $sesx = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_ses WHERE id='".$sid."'"));
    if($sesx[0]>0)
    {
    if(!isuser(getuid_sid($sid)))
    {
    return false;
    }
    //yip it's logged in
    //first extend its session expirement time
    $xtm = time() + (60
    getsxtm());
    $extxtm = mysql_query("UPDATE ibwf_ses SET expiretm='".$xtm."' WHERE id='".$sid."'");
    return true;
    }else{
    //nope its session must be expired or something
    return false;
    }
    }
    ////////////////////////Get user nick from session id
    function getnick_sid($sid)
    {
    $uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));
    $uid = $uid[0];
    return getnick_uid($uid);
    }
    ////////////////////////Get user id from session id
    function getuid_sid($sid)
    {
    $uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));
    $uid = $uid[0];
    return $uid;
    }
    [/PHP]


  • User Attivo

    Mi sono registrato con successo,, mi sono pure loggato e quando ento mi dice che non sono loggato o la sessione è scaduta.. penso che disogna impostare la cartella del database, come i messaggi precedenti.. metto il codice
    [php]////////////////////////////////////////////IS LOGGED?
    function islogged($sid)
    {
    //delete old sessions first
    $deloldses = mysql_query("DELETE FROM ibwf_ses WHERE expiretm<'".time()."'");
    //does sessions exist?
    $sesx = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_ses WHERE id='".$sid."'"));
    if($sesx[0]>0)
    {
    if(!isuser(getuid_sid($sid)))
    {
    return false;
    }
    //yip it's logged in
    //first extend its session expirement time
    $xtm = time() + (60
    getsxtm());
    $extxtm = mysql_query("UPDATE ibwf_ses SET expiretm='".$xtm."' WHERE id='".$sid."'");
    return true;
    }else{
    //nope its session must be expired or something
    return false;
    }
    }
    ////////////////////////Get user nick from session id
    function getnick_sid($sid)
    {
    $uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));
    $uid = $uid[0];
    return getnick_uid($uid);
    }
    ////////////////////////Get user id from session id
    function getuid_sid($sid)
    {
    $uid = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_ses WHERE id='".$sid."'"));
    $uid = $uid[0];
    return $uid;
    }
    [/php]