VM LiveView Lite for rFactor & rFactor2

Discussion in 'Plugins' started by Frank Geyer, Feb 20, 2012.

  1. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Great it did solve by istself Pascal,

    thanx 4 ure feedback.

    Cheers
    Frank
     
  2. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    461
    Likes Received:
    0
    Hello,

    Hi Franck,

    We got a problem with Liveview recording far more laps than reallity since release 240.

    Do you have an idea what causes this issue? Perhaps running multiple server instances, but we didn't had this problem with the previous builds.

    Thanks in advance
     
  3. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Hi, Franck


    http://217.16.12.195/live3/hotlaps.php?TrackName=Palm+Beach+Int+Road+Course

    Is it possible to add a link removed at the end of each row of the table?
    If possible access by password or session (that I can do it again), or make a admin page :)
    but the first suggestion is principal. The rest is not difficult to set up, I have not found / tried things that work. You who make the code, I think you can get there easily, I even ask on forums specialize in php and nothing conclusive
    thank you Franck
     
  4. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    I managed to do what I wanted! you do not bothers Franck.
    So here's the php code:
    View résult : http://217.16.12.195/live2/hotlaps.php?TrackName=Circuit Thermalito (Full Layout)

    You add this line
    Code:
      "<th class='hotlaps' title='Delete'>Delete</th>" .
    after
    Another line :
    Add line in the file hotlaps php (Line 2 :
    Code:
    "<td>" . '<a href="suppr.php?id='.$row['ID'].'">Delete</a>' . "</td>";
    
    


    Do not forget to change the connection information in the file Suppr.php
    Page Suppr.php
    Code:
    <?php
    header('Content-Type: text/html; charset=utf-8');
    // Admin page by Valbuena72
    if ((isset($_GET['action'])) && ($_GET['action'] == 'logout'))
    {
    *$_SESSION = array();
    *session_destroy();
    *session_start();
    }
    *
    $_SESSION['login'] = '';
    $_SESSION['password'] = '';
    if (isset($_POST['submit']))
    {
    *$login = (isset($_POST['login'])) ? $_POST['login'] : '';
    *$pass = *(isset($_POST['pass'])) *? $_POST['pass'] *: '';
    *if (($login == "Valbuena72" ) && ($pass == "xxxx" )) // Mode connecter
    *{
    * if(isset($_GET['id']))
    * * {
    * * $con = mysql_connect("localhost","xxxxx","xxxx" );
    * * if (!$con)
    * * * {
    * * * die('Could not connect: ' . mysql_error());
    * * * }
    * * mysql_select_db("vmliveview02", $con);
    * * $id = $_GET['id'];
    * * $result = *mysql_query("delete FROM hotlaps where id=$id" );
    *	$_SESSION['login'] = "Valbuena72";
    *	$_SESSION['password'] = "xxxx";
    *	echo '<p style="color:#FF0000; font-weight:bold;">Supprimer avec sucès</p>';
    }}
    *else // Mode non admin
    *{
    *	echo '<p style="color:#FF0000; font-weight:bold;">Vous pouvez pas supprimer</p>';
    *}
    }
    if (!isset($_POST['submit']))
    {
    *echo '
    *<form id="conn" method="post" action="">
    *	<p><label for="login">Login :</label><input type="text" id="login" name="login" /></p>
    *	<p><label for="pass">Mot de Passe :</label><input type="password" id="pass" name="pass" /></p>
    *	<p><input type="submit" id="submit" name="submit" value="Connexion" /></p>
    *</form>';
    }; // fin if (!isset($_POST['submit'])))
    ?>
    
     
    Last edited by a moderator: Aug 10, 2013
  5. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    461
    Likes Received:
    0
    Hi Val,

    you don't have the problem of liveview recording more laps than it should?

    We got the problem when running multiple instances ...
     
  6. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    I do not have any problem
     
  7. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Salut Valbuena,
    Où mets tu la deuxème ligne ?
    Et à cette ligne " $con = mysql_connect("localhost","xxxxx","xxxx" ) ", tu mets le login et mot de passe de la base de donnée ?
     
  8. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Salut
    Juste après :
    Oui tu met ton nom d'utilisateur et le mot de passe de la base de donnée
     
  9. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Il me met " Parse error: syntax error, unexpected '*' in D:\wamp\www\wtcc\Suppr.php on line 6 " quand je veux essayer de supprimer un pilote
     
  10. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Voila sans les astérix :)
    Code:
    <?php
    header('Content-Type: text/html; charset=utf-8');
    // Admin page by Valbuena72
    if ((isset($_GET['action'])) && ($_GET['action'] == 'logout'))
    {
     $_SESSION = array();
     session_destroy();
     session_start();
    }
     
    $_SESSION['login'] = '';
    $_SESSION['password'] = '';
    if (isset($_POST['submit']))
    {
     $login = (isset($_POST['login'])) ? $_POST['login'] : '';
     $pass =  (isset($_POST['pass']))  ? $_POST['pass']  : '';
     if (($login == "Valbuena72" ) && ($pass == "xxxx" )) // Mode connecter
     {
      if(isset($_GET['id']))
        {
        $con = mysql_connect("localhost","xxxxx","xxxx" );
        if (!$con)
          {
          die('Could not connect: ' . mysql_error());
          }
        mysql_select_db("vmliveview02", $con);
        $id = $_GET['id'];
        $result =  mysql_query("delete FROM hotlaps where id=$id" );
     	$_SESSION['login'] = "Valbuena72";
     	$_SESSION['password'] = "xxxx";
     	echo '<p style="color:#FF0000; font-weight:bold;">Supprimer avec sucès</p>';
    }}
     else // Mode non admin
     {
     	echo '<p style="color:#FF0000; font-weight:bold;">Vous pouvez pas supprimer</p>';
     }
    }
    if (!isset($_POST['submit']))
    {
    echo '
    <form id="conn" method="post" action="">	<p><label for="login">Login :</label><input type="text" id="login" name="login" /></p>
    	<p><label for="pass">Mot de Passe :</label><input type="password" id="pass" name="pass" /></p>
    	<p><input type="submit" id="submit" name="submit" value="Connexion" /></p>
    </form>';
    }; // fin if (!isset($_POST['submit'])))
    ?>
    
     
  11. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Impeccable, ça fonctionne, un tout grand merci . :D
     
  12. fastorro

    fastorro Registered

    Joined:
    Oct 8, 2010
    Messages:
    79
    Likes Received:
    0
    Great valvuena!
     
  13. DerKutscher

    DerKutscher Registered

    Joined:
    Sep 13, 2011
    Messages:
    139
    Likes Received:
    1
    Where in the hotlap.php I have the inserting?
    "<th class='hotlaps' title='Delete'> Delete </ th>
    <td> ". '<a href="suppr.php?id='.$row['ID'].'"> Delete </ a>'." </ td> "

    I do not find the Suppr.php. Where is it?

    greeting

    Mike
     
  14. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    It must be created with the notepad:
     
  15. DerKutscher

    DerKutscher Registered

    Joined:
    Sep 13, 2011
    Messages:
    139
    Likes Received:
    1
    Where in the hotlap.php I have the inserting?

    <td> ". '<a href="suppr.php?id='.$row['ID'].'"> Delete </ a>'." </ td> "

    greeting

    Mike
     
  16. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    After :
    and
    after

     
  17. DerKutscher

    DerKutscher Registered

    Joined:
    Sep 13, 2011
    Messages:
    139
    Likes Received:
    1
    Thank you!

    Runs perfekt.
     
  18. Pascal Martin

    Pascal Martin Registered

    Joined:
    Apr 3, 2013
    Messages:
    46
    Likes Received:
    0
    Hello,
    What are the colors in hotlap?

    Thanks

    Bonjour,
    a quoi correspondent les couleurs dans les hotlaps ?

    Merci
     
  19. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    what color?
    I have no color on my hotlap me :)
    Ok, I understood the hotlap but not talking about the live timing
    *answer in 5 minutes. I'll make you a legend on photoshop!
    I watch the first message and let Franck Legend is written ...
    ---
    Salut;
    Quelle couleur ?
    je n'ai pas de couleur sur mes hotlaps moi :p

    Ok, j'ai compris tu parle pas du hotlaps mais du live timing.

    Je re, dans 5 min. Je vais te faire une légénde sur photoshop !

    Du coup, non j'ai regarder le premier post et c'est écrit :

    pilote:
    Magenta = dans la pitlineroule()
    Bleu = dans le box (arrêté)
    Rouge = Sur la piste (Au ralenti)

    CP (= Class position) Si tu es en P1,P2, GT1, GT2
    Gris = Classe inconnue
    Autres = En raison de la configuration du serveur

    Gap (= Ecart par rapport au leader):
    Gris :: 1 tour ou plus derrière le leader

    Intervalle (= Ecart suivant):
    = Within striking distance (pas compris, je suppose qu'il doit dire que tu dois être prêt de ton adversaire, truc du genre)
    Gris = 1 tour ou plus derrière

    Sector1:
    Rouge = plus lent que le meilleur temps personnel actuel
    Vert = Plus rapide que le meilleur temps personnel actuel

    secteur2:
    Rouge = plus lent que le meilleur temps personnel actuel
    Vert = Plus rapide que le meilleur temps personnel actuel
     
    Last edited by a moderator: Aug 14, 2013
  20. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Bonjour Valbuena ,

    J'ai vu sur tes hotlaps que tu pouvais "supprimer tout " les hotlaps sur un circuit. Pourrais-tu me dire le code que tu utilise et où le placer exactement ?

    Merci d'avance .
     

Share This Page