- Timestamp:
- Mar 1, 2009, 2:13:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/inc/html.php
r445 r451 223 223 { 224 224 // TODO !! 225 while ($row = $sql -> fetch_array()) 225 226 while ($row = $sql -> fetch_array()) 226 227 { 227 228 switch ($row["category"]) … … 267 268 "; 268 269 } 270 271 mysql_connect($db_server, $db_user, $db_pass); 272 mysql_select_db($db_webu); 273 $limit = 5; 274 $pocet = mysql_result(mysql_query(" SELECT FOUND_ROWS()"), 0); 275 if ($_GET["offset"]) { 276 echo "<a href='$_SERVER[PHP_SELF]" . ($_GET["offset"] != $limit ? "?offset=" . ($_GET["offset"] - $limit) : "") . "'>zpět</a>\n"; 277 } 278 if ($pocet > $_GET["offset"] + $limit) { 279 echo "<a href='$_SERVER[PHP_SELF]?offset=" . ($_GET["offset"] + $limit) . "'>vpřed</a>\n"; 280 } 281 282 $result = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM tabulka ORDER BY datum DESC, id DESC LIMIT $limit OFFSET " . ($limit * $_GET["strana"])); 283 $pocet = mysql_result(mysql_query(" SELECT FOUND_ROWS()"), 0); 284 if ($_GET["strana"]) { 285 echo "<a href='$_SERVER[PHP_SELF]" . ($_GET["strana"] != 1 ? "?strana=" . ($_GET["strana"] - 1) : "") . "'>zpět</a>\n"; 286 } 287 if ($pocet > $limit * ($_GET["strana"] + 1)) { 288 echo "<a href='$_SERVER[PHP_SELF]?strana=" . ($_GET["strana"] + 1) . "'>vpřed</a>\n"; 289 } 290 269 291 } 270 292 else
Note:
See TracChangeset
for help on using the changeset viewer.