The online racing simulator
Hey,
I'm now putting the script in my website
I think you've done a very good job with this script!

There is just one more thing I think it's missing: 'Sort by NickName'.
I think this would a very cool option to add to the script, cause then you can search for friend that you know by nickname, but not by username.
What do you think?

I'll go make the tables fit in my website now. It's a hell of a job to put in the right width values everywhere. I don't understand the values you used, it aren't pixels, could you explain it to me?

Bye,
Tim
Wich table ?
About internal table where u select track or car u need edit menu.php, it's simple u can find "pixel" value of each "table".
Quote from michele0676 :Wich table ?
About internal table where u select track or car u need edit menu.php, it's simple u can find "pixel" value of each "table".

This is a code in page2.php for the tables that will be created. You can see what hapens on http://www.sinsanity.nl/testt/ ... y.nl/stats/demo/index.php.
(If you think, where are the drift options in the menu.php? I removed it, because i don't use it for 'demo'. I will use the drift option in ..../stats/drift/index.php)


<?php 
<tr valign='middle' align='center' (*I also tried to addwidth='636px'>*)
<
td width='28'><font $font><b>POS</b></font></td><td><font $font><b>LFS<br>USERNAME</b></font></td>
<
td><font $font><b>LFS<br>NICKNAME</b></font></td><td width='36'><font $font><b>TRACK</b></font></td>
<
td width='36'><font $font><b>CAR</b></font></td><td width='36'><font $font><b>LAPS</b></font></td>
<
td width='36'><font $font><b>PB<br>DATE</b></font></td><td width='36'><font $font><b>PB<br>TIME</b></font></td>
<
td width='64'><font $font><b>SPLIT 1</b></font></td><td width='64'><font $font><b>SPLIT 2<br>or<br>TOTAL</b></font></td>
<
td width='64'><font $font><b>SPLIT 3<br>or<br>TOTAL</b></font></td><td width='64'><font $font><b>TOTAL</b></font></td></tr>
?>

My website is smaller than the table is, so it won't show properly. I'm trying to make the table fit in my website. The place where it has to come is 650px wide, and has a 7px margin at the left and right. So the table has to be 636px.
When i try to reduce the width of a td, another td will just become bigger.. I can't get it xD

Tim
A ok perfect.

U have to edit page.php

Search
"<table bgcolor='#CCCCCC' border='1' bordercolor='1' cellspacing='0' cellpadding='1'>"

replace with

"<table bgcolor='#CCCCCC' border='1' bordercolor='1' cellspacing='0' cellpadding='1' width='XXX'>

XXX = what u want

U have to edit index.html too.

<frameset cols="200,*" frameborder="no">

in

<frameset cols="XXX,*" frameborder="no">

XXX = what u want
Hmm, it still won't work for me. I searched for the table you said in page.php and in page2.php and changed it.

But, the problem for me is, I haven't been able to use the frameset code from the index.html. I just tried this, but then the results page will open in a new window:

<?php 
<frameset cols="100,*" frameborder="no">
      <
frameset rows="140,*" frameborder="no">
             <
frame name="lfslapper" width="636px" src="page2.php?selectcar=&selecttrack=&orderby=times&usern=">
            </
frame>
    </
frameset>
</
frameset>
?>

The code I am using atm, but where the table is to wide for my site:

<?php 
    
<div id="sidebar">
        include 
'menu.php' 
    
</div>
    <
div id="content">
       <
script
        function 
changeContent() 
        { 
        
document.getElementById('statspage').innerHTML window.frames['lfslapper'].document.getElementsByTagName('html')[0].innerHTML
        } 
        
</script> 
      
        <div id = "statspage"><br>
        <iframe id = "lfslapper" name = "lfslapper" width="636px" src ="page2.php?selectcar=&selecttrack=&orderby=times&usern=" onLoad = "changeContent()" style = "height:0; width:636x; border-width:0;"></iframe>
        <a href="http://www.lfsforum.net/showthread.php?p=1373747#post1373747" target="_blank"><b><i>Based on script of mc0676</font></i></b></a>
        </div>
    </div>
?>

OK

<iframe id = "lfslapper" name = "lfslapper" width="636px" src ="page2.php?selectcar=&selecttrack=&orderby=times&usern=" onLoad = "changeContent()" style = "height:0; width:636x; border-width:0;">

change 636 in what u want
uhm, that code is exactly what i have now. So it has got to be something in the page2.php i think. (btw, i made an typing error with width:636x;, must be width:636px;.

Do you have any idea what it could be?
then change in page2.php the same think that u have change in page.php
done, with no results.. the problem isn't been solved or changed
Can u post in a zip all the file that u are using and explain again exactly what u want do ?
Quote from michele0676 :Can u post in a zip all the file that u are using and explain again exactly what u want do ?

It's hard to post a zip file, cause there are many files needed for it (stylesheet, header, footer, eg.).
But I think I can explain it some better than I did before.

The idea is to use my own made website template to show the LFSLapperscript.
My website template is 900pixels wide: 650px for the resultspage of lfslapperscript and 250px for the menu of lfslapperscript.
When you edit a filter on the menu, the resultpage will be changed.

In my code I work with divs to place every part of my website. For the menu I used the 'include' code of PHP and for the resultpage I used an 'iframe' with a javascript to stretch the iframe automaticly when it gets bigger.

As you can see, I don't use the index.html, header.html, logo.html and background.jpg.

This is my code:

<?php 
php
$rootfolder 
"../..";
$pagetitle "  -  Statistics: $!N - Demo";
require_once(
"../../styles/layout.inc.php");
echo 
$header;

    <
div id="subnav">
    </
div>
    <
div id="sidebar">
        include 
'menu.php' 
    
</div>
    <
div id="content">
       <
script
        function 
changeContent() 
        { 
        
document.getElementById('statspage').innerHTML window.frames['lfslapper'].document.getElementsByTagName('html')[0].innerHTML
        } 
        
</script> 
      
        <div id = "statspage"><br>
        <iframe id = "lfslapper" name = "lfslapper" width="636px" allowtransparency="yes" src ="page2.php?selectcar=&selecttrack=&orderby=times&usern=" onLoad = "changeContent()" style = "height:0; width:636px; border-width:0;"></iframe>
        <a href="http://www.lfsforum.net/showthread.php?p=1373747#post1373747" target="_blank"><b><i>Based on script of mc0676</font></i></b></a>
        </div>
    </div>
php
echo $footer;
?>

However, the code doens't work like i want it to work. Eg when filter on best times and BL1, the resulttable (of page2.php) will become too wide and will overlay the menu. I can't see why this happens. I think it has to do with the values of width in the page2.php. What do you think?

You can see an example about what I wrote here at: http://www.sinsanity.nl/testt/ ... y.nl/stats/demo/index.php

So what I want to do is, making the table fit into my website template.

Thanks in advance,
Tim
Uhm, since is really hard (for me) find a solution !
But u can try to use, in page.php and page2.php font size=1 and not 2.
Can u test this ?
Thanks, the font size=1 worked!
I decided to get the size as big as possible so I removed the whole size element.
So, my $font now looks like: $font = 'face=Arial'; instead of $font = 'face=Arial size=1';.

After removing this, I added the following to every <table> code:
style='font-size: amount-of-px;
In the case there are 4splits, I chose 11px and for 3splits or any other configurations I chose 12px.

So the text will now be as big as possible for my website template. Thanks for your solution, it helped me very good!
I'm now finishing the script for using in my website.

By the way, I have one more question. Is it possible to remove the AU tracks from menu.php? Cause when you click on it, it says: No Results, though there are values for it in the database. I can get why you've done this, cause the layouts are always diffirent on autocross and they haven't a real value to add it to the script. (Only if someone wants to show the results on his website of a layout he made)
Is it possible to disable the AU tracks from the menu.php? You can see what I mean at: http://www.sinsanity.nl/testt/ ... y.nl/stats/race/index.php

Thanks!

Bye,
Tim
Good for u !!!

About AU request, yes u can, in menu.php find this line:

$stringa = "select distinct track from lfslappertable order by track asc";

replace with:

$stringa = "select distinct track from lfslappertable where track not like 'AU%' order by track asc";

Thats great! Thanks!
While implementing the script, I found just one more thing that I'd like to have set:
I set the selected value of 'cars' in the menu.php, to FZR ($cont == 7), but you've got to scroll first in the car select menu till you see that option is selected.
Is it possible to scroll automaticly to that option, or to place the automatic selected function at the top?

EDIT: This does only occur in the browser: 'Chrome'. In IE8 and Firefox it works fine!

Many thanks for this great script.

Tim
In menu.php

<select name="selectcar" size="2" style="width:160px; height:114px;" onChange="form.submit()">
<option value="">All Car</option>
<option value="GT2">GT2 Cars</option>
<option value="GTL">GTL Cars</option>
<option value="GTR">GTR Cars</option>
<option value="TBO">TBO Cars</option>
<?php
$cont = 1;
$db = mysql_connect ($localhost, $user, $password);
mysql_select_db ($database, $db);
$stringa = "select distinct car from lfslappertable order by car asc";
$result = mysql_query($stringa, $db);
while ($row = mysql_fetch_array($result))
{
if ($cont == 1)
{
echo "<option value='$row[car]' selected='selected'>$row[car]</option>";
}
else
{
echo "<option value='$row[car]'>$row[car]</option>";
}
$cont = $cont + 1;
}
mysql_close($db);
?>
</select>


---

replace with

---

<select name="selectcar" size="2" style="width:160px; height:114px;" onChange="form.submit()">
<?php
$cont = 1;
$db = mysql_connect ($localhost, $user, $password);
mysql_select_db ($database, $db);
$stringa = "select distinct car from lfslappertable order by car asc";
$result = mysql_query($stringa, $db);
while ($row = mysql_fetch_array($result))
{
if ($cont == 1)
{
echo "<option value='$row[car]' selected='selected'>$row[car]</option>";
}
else
{
echo "<option value='$row[car]'>$row[car]</option>";
}
$cont = $cont + 1;
}
mysql_close($db);
?>
<option value="">All Car</option>
<option value="GT2">GT2 Cars</option>
<option value="GTL">GTL Cars</option>
<option value="GTR">GTR Cars</option>
<option value="TBO">TBO Cars</option>
</select>
Hmm, don't think thats a good solution for me. But I think I leave it this way, because it will only occur in Google Chrome. In any other browser it just works fine!
Or maybe you know how to withdraw values ​​from storedvalue.dbs Cash, Dist and Health and their show's website?

FGED GREDG RDFGDR GSFDG