| Autor | Zpráva | ||
|---|---|---|---|
| Martinse Profil |
#1 · Zasláno: 10. 4. 2016, 15:53:13
zdravim mam problem s nasobenim vzdy kdyz jdu na dalsi stranku vynasobi se vetsinou 2x
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody><tr>
<td width="12%" height="16" align="center"><b>Steam ID:</b></td>
<td width="12%" height="16" align="center"><b>Credity:</b></td>
<?php
$test = mysqli_connect($server, $dbuser, $dbpass, $dbname);
$clanku_na_stranku = 25; // lze změnit
$limit1 = ($_GET['strana'] > 0) ? ($_GET['strana']-1)*$clanku_na_stranku : 0;
$limit2 = $limit1 + $clanku_na_stranku;
$pocitani = mysqli_query($test,"SELECT * FROM `sm_cookie_cache` WHERE `cookie_id` =1");
$pocet1 = mysqli_num_rows($pocitani);
$pocet = ceil($pocet1 / $clanku_na_stranku);
for($i = 1; $i <= $pocet; $i++) {
echo " <a href=\"?strana=$i\">$i</a>­ ";
}
$result = mysqli_query($test, "SELECT * FROM `sm_cookie_cache` WHERE `cookie_id` =1 ORDER BY `value` DESC limit $limit1, $limit2");
while($zaznam=mysqli_fetch_array($result)){
//echo"<tr><td height='16' align='center'><B>".$zaznam['name']."</B></td>";
echo"<tr><td height='16' align='center'>".$zaznam['player']."</td>";
echo"<td height='12' align='center'>".$zaznam['value']."</td></tr>";
}
?>
</tr>
</tbody></table> |
||
| Tomáš123 Profil |
#2 · Zasláno: 10. 4. 2016, 16:24:09
Martinse:
Riadok 12 uprav na $limit2 = $clanku_na_stranku;. Prípadne premennú $limit2 úplne vynechaj (používaš ju iba raz).
|
||
| Martinse Profil |
#3 · Zasláno: 10. 4. 2016, 16:29:17
Diky moc ale mam jeste jednu otazku a prijde mi trochu zbytecne otom zakladat nove tema potrebuju aby tohle psalo ceskou diakritiky zkousel jsem toho hodne ale pak mi to nepise š ale treba š zkousel jsem hodit i do headu <meta charset="windows-1250"> ale porad nic
$steamid64 = $zaznam['player']; $auth=(substr($steamid64,10)*2); $server=substr($steamid64,8,1); $baseid="76561197960265728"; $totalid=$auth + $server + $baseid; $friendid='http://steamcommunity.com/profiles/'.$totalid.'?xml=1'; $names = simplexml_load_file($friendid); |
||
| Lukáš66666 Profil |
#4 · Zasláno: 10. 4. 2016, 16:40:51
Martinse:
A co <meta charset="UTF-8"> ?
|
||
|
Časová prodleva: 10 let
|
|||
0