No to w takim razie jak to skrócić. Może ktoś mógłby podać całość?
<?
if ($snd1==\"1\")
{
$file11=fopen(\"snd/1.txt\", \"r\"); $wassup11=fgets($file11); $file21=fopen(\"snd/1.txt\", \"w\"); }
if ($snd1==\"2\")
{
$file12=fopen(\"snd/2.txt\", \"r\"); $wassup12=fgets($file12); $file22=fopen(\"snd/2.txt\", \"w\"); }
if ($snd1==\"3\")
{
$file13=fopen(\"snd/3.txt\", \"r\"); $wassup13=fgets($file13); $file23=fopen(\"snd/3.txt\", \"w\"); }
if ($snd1==\"4\")
{
$file14=fopen(\"snd/4.txt\", \"r\"); $wassup14=fgets($file14); $file24=fopen(\"snd/4.txt\", \"w\"); }
$file31=fopen(\"snd/1.txt\", \"r\"); $wassup21=fgets($file31); $file32=fopen(\"snd/2.txt\", \"r\"); $wassup22=fgets($file32); $file33=fopen(\"snd/3.txt\", \"r\"); $wassup23=fgets($file33); $file34=fopen(\"snd/4.txt\", \"r\"); $wassup24=fgets($file34);
$allvotes=$wassup21+$wassup22+$wassup23+$wassup24;
if ($wassup21==0)
{
$srednia1=0;
}
if ($wassup22==0)
{
$srednia2=0;
}
if ($wassup23==0)
{
$srednia3=0;
}
if ($wassup24==0)
{
$srednia4=0;
}
if ($wassup21>0)
{
$srednia1=($wassup21/$allvotes)*100;
}
if ($wassup22>0)
{
$srednia2=($wassup22/$allvotes)*100;
}
if ($wassup23>0)
{
$srednia3=($wassup23/$allvotes)*100;
}
if ($wassup24>0)
{
$srednia4=($wassup24/$allvotes)*100;
}
$taktak1=\"$srednia1% ($wassup21)\";
$taktak2=\"$srednia2% ($wassup22)\";
$taktak3=\"$srednia3% ($wassup23)\";
$taktak4=\"$srednia4% ($wassup24)\";
echo(\"Oto wyniki:<P>\"); echo(\"Download:<BR><img src=1.jpg width=$srednia1 height=8>$taktak1<br>\"); echo(\"Chat:<BR><img src=1.jpg width=$srednia2 height=8>$taktak2<br>\"); echo(\"Instrukcje:<BR><img src=1.jpg width=$srednia3 height=8>$taktak3<br>\"); echo(\"Linki:<BR><img src=1.jpg width=$srednia4 height=8>$taktak4<P>\"); echo(\"<div align=center><a href=index.php>Powrót</a></div>\"); ?>