Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Nesukuriu lentelės

Parašė linast2· 2016 Vas. 7 19:02:39
#3


if ($id == "on")
{
echo'<div class="s1">Dabar &#382;aidime: <b>'.mysql_num_rows(mysql_query("SELECT * FROM prisijunge")).'</b><br>
<small>Daugiausia prisijungusių: <b>'.$nst['max_online'].'</b></small><br/>
<small>Daugiausia šiandiena prisijungusių: <b>'.$nst['max_siande'].'</b></small></div>';
if(mysql_num_rows(mysql_query("SELECT * FROM prisijunge")) == false){
echo'<div class="s2"><font color="red"><b>Nieko n&#279;ra!</b></div>';
}
else
{
$zin = 20;
$eil = mysql_num_rows(mysql_query("SELECT * FROM prisijunge"));
$page = abs((int)@$_GET['page']);
if ($page == "") {
$page = 1;
}
if ($page == 1) {
$nuo = 0;
$iki = $zin;
} else {
$nuo = $page * $zin - $zin;
$iki = $page * $zin;
}
if ($eil <= $page * $zin) {
$iki = $eil;
}
$a = mysql_query("SELECT * FROM prisijunge ORDER BY statusas DESC LIMIT $nuo, $zin");
$nr = $nuo;
echo'<div class="s2"><div class="left">';
while($onl = mysql_fetch_assoc($a)){
$nr++;
$onl_inf = mysql_fetch_assoc(mysql_query("SELECT * FROM vartotojai WHERE nick='{$onl[kas]}'"));
if($onl_inf['statusas'] == 'Narys'){$onl_color = $onl['kas'];}
if($onl_inf['statusas'] == 'VIP'){$onl_color = '<font color="blue"><img src="paveiksliukai/vip.gif" alt=\"VIP\"/>'.$onl['kas'].'</font>';}
if($onl_inf['statusas'] == 'Moderatorius'){$onl_color = '<font color="red">~'.$onl['kas'].'</font>';}
if($onl_inf['statusas'] == 'Administratorius'){$onl_color = '<font color="green">@'.$onl['kas'].'</font>';}
echo'<b>'.$nr.'.</b> <a href="apie.php?id=&apie='.$onl['kas'].'">'.$onl_color.'</a> - '.$onl['kur'].'<br>';
unset($onl);
}
echo'';
$viso_puslapiu = $eil / $zin;
$psl = $page;
$puslapiu = ceil($viso_puslapiu);
if ($psl < 1 || $psl > $puslapiu || empty($psl)) {
$psl = 1;
}
$puslapiu1 = $puslapiu-1;
$psl1 = $psl-1;
$psl11 = $psl-2;
$psl2 = $psl + 1;
$psl22 = $psl + 2;
echo"<div class='line'></div>";
if ($puslapiu < 6) {
for($l = 1; $l <= $puslapiu; $l++) {
 
if ($psl == "$l") {
echo'(' . $psl . ')';
} else {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=' . $l . '">[' . $l . ']</a>';
}
}
echo"</div>";
} else {
if ($psl > 1) {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=1">[1]</a>';
} else {
echo'[1]';
}
if ($psl11 > 2) {
echo'...';
}
if ($psl11 > 1 && $psl11 < $psl1) {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=' . $psl11 . '">[' . $psl11 . ']</a>';
}
if ($psl1 > 1 && $psl > 2) {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=' . $psl1 . '">[' . $psl1 . ']</a>';
}
if ($psl > 1 && $psl < $puslapiu) {
echo'[' . $psl . ']';
}
if ($psl2 < $puslapiu && $psl < $puslapiu1) {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=' . $psl2 . '">[' . $psl2 . ']</a>';
}
if ($psl22 < $puslapiu && $psl22 > $psl2) {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=' . $psl22 . '">[' . $psl22 . ']</a>';
}
if ($psl22 < $puslapiu1) {
echo'...';
}
if ($puslapiu != "$psl") {
echo'<a href="prisijungus.php?id=on&nick='.$nick.'&pass='.$pass.'&page=' . $puslapiu . '">[' . $puslapiu . ']</a>';
} else {
echo'[' . $puslapiu . ']';
}
}
}
echo"<div class='line'></div>";
echo'
<a href="prisijungus.php?id=&nick='.$nick.'&pass='.$pass.'">&#302; Prad&#382;ia</a>
</div></div></div></div>';
}