Changeset 243 for quests/ListQuests.php
- Timestamp:
- Jan 17, 2008, 6:08:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/ListQuests.php
r235 r243 1 1 <?php 2 2 include('includes/global.php'); 3 4 //Poèet questù na stránce 5 $NumberQuests = 200; 3 6 4 7 if(array_key_exists('order', $_GET)) { 5 8 $order = $_GET['order']; 6 9 $desc = $_GET['desc']; 10 $_SESSION['order'] = $_GET['order']; 11 $_SESSION['desc'] = $_GET['desc']; 7 12 } else { 8 $order = ''; 9 $desc = 'desc'; 13 if (isset($_SESSION['order'])) { 14 $order = $_SESSION['order']; 15 $desc = $_SESSION['desc']; 16 } else { 17 $order = ''; 18 $desc = 'desc'; 19 } 10 20 } 11 21 … … 64 74 65 75 for ($i=0; $i<24; ++$i) { 66 $limity = 200;76 $limity = $NumberQuests; 67 77 $limitx = $i*$limity; 68 78 $Under = $limitx+$limity; … … 84 94 85 95 if(array_key_exists('Translate', $_GET)) { 96 if(array_key_exists('trans_limitx', $_GET)) { 97 $_SESSION['limitx'] = mysql_escape_string($_GET['trans_limitx']); 98 $_SESSION['limity'] = mysql_escape_string($_GET['trans_limity']); 99 } else { 100 if (isset($_SESSION['limitx']) == false) { 101 $_SESSION['limitx'] = '0'; 102 $_SESSION['limity'] = $NumberQuests; 103 } 104 } 105 106 $Line = mysql_fetch_row($Database->SQLCommand("SELECT count(*) FROM quests WHERE quests.Language = '1' AND quests.Complete = '1'")); 107 $CountLists = $Line[0]/$NumberQuests; 108 109 echo 'Poèet questù: <b>'.$Line[0].'</b> Zobrazit stránku: '; 110 for ($i=0; $i< $CountLists; ++$i) { 111 $limity = $NumberQuests; 112 $limitx = $i*$limity; 113 $Page = $i+1; 114 if ($_SESSION['limitx'] == $limitx) $color = 'style="color: red"'; 115 else $color = ''; 116 echo '<a '.$color.' href="ListQuests.php?Translate&trans_limitx='.$limitx.'&trans_limity='.$limity.'">'.$Page.'</a> '; 117 } 118 86 119 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User FROM 87 quests WHERE quests.Language = '1' AND quests.Complete = '1'", '', 'Translate');120 quests WHERE quests.Language = '1' AND quests.Complete = '1'", $_SESSION['limitx'].','.$_SESSION['limity'], 'Translate'); 88 121 } 89 122
Note:
See TracChangeset
for help on using the changeset viewer.