Changeset 92 for db/index.php
Legend:
- Unmodified
- Added
- Removed
-
db
-
Property svn:ignore
set to
config.php
-
Property svn:ignore
set to
-
db/index.php
r89 r92 4 4 if( !empty($session_id) ){ $session = $session_id; }; 5 5 6 /* =========== Config =========== */6 /* =========== Config aj. =========== */ 7 7 if( !file_exists('./config.php') ){ exit; }; 8 8 require_once './config.php'; 9 9 require_once "./menu.php"; 10 11 require_once "./language/".$Config['DB_read']['language'].".php"; 12 10 13 /* =========== Připojení k Databázi =========== */ 11 14 … … 33 36 }; 34 37 35 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID ,$DB){ 36 $pocet_radku = @mysql_num_rows(mysql_query($sql,$DB)); 38 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID){ 39 global $text; 40 $pocet_radku = @mysql_num_rows(mysql_query($sql)); 37 41 if( $pocet_radku > 0 ) { 38 42 $listovani = $pocet_radku/10; … … 52 56 if( $listovani <= 10 ){ 53 57 for( $i=1; ($i<=10)AND($i<=$listovani) ;$i++ ){ 54 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}55 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};58 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 59 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 56 60 }; 57 61 58 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\" Začátek\"><<</a>"." ";59 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\" Předchozí\"><</a> ";60 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\" Další\">></a>"." ";61 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\" Konec\">>></a>";62 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"".$text['navigation']['start']."\"><<</a>"." "; 63 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"".$text['navigation']['previous']."\"><</a> "; 64 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"".$text['navigation']['next']."\">></a>"." "; 65 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"".$text['navigation']['end']."\">>></a>"; 62 66 63 67 if( $limit == 1 ){ $navigace['zacatek'] = "<<"." < "; }; … … 67 71 if( $limit <= 6 ){ 68 72 for( $i=1; ($i<=10) ;$i++ ){ 69 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}70 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};73 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 74 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 71 75 }; $navigace['cisla'] .= " ... "; 72 76 } … … 76 80 for( $i=$limit-5; ($i<=$limit+5) ;$i++ ){ 77 81 78 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}79 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};82 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 83 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 80 84 81 85 }; $navigace['cisla'] .= " ... "; … … 84 88 $navigace['cisla'] .= " ... "; 85 89 for( $i=$listovani-10; ($i<=$listovani) ;$i++ ){ 86 if($i==$limit){$navigace['cisla'] .= " <b title=\" Jste na straně číslo$i\">".$i."</b>\n";}87 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\" Strana číslo$i\">".$i."</a>\n";};90 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";} 91 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";}; 88 92 }; 89 93 }; 90 94 91 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"Začátek\"><<</a>"." "; 92 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"Předchozí\"><</a> "; 93 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"Další\">></a>"." "; 94 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"Konec\">>></a>"; 95 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"".$text['navigation']['start']."\"><<</a>"." "; 96 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"".$text['navigation']['previous']."\"><</a> "; 97 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"".$text['navigation']['next']."\">></a>"." "; 98 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"".$text['navigation']['end']."\">>></a>"; 99 95 100 96 101 if( $limit == 1 ){ $navigace['zacatek'] = "<<"." < "; }; … … 105 110 }; 106 111 107 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID , $DB){108 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID , $DB);109 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu " ,$DB);112 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID){ 113 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID); 114 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu "); 110 115 $vysledek = array( '1' => $dotaz, 111 116 'strankovani' => $navigace ); … … 119 124 /* =========== GET hodnoty =========== */ 120 125 $id = $_GET['id']; // tady získá id z adresy 121 $q = addslashes($_GET['q']); 126 $q = addslashes($_GET['q']); 122 127 $limit = $_GET['list']; // tady získá list z adresy 123 128 if( is_numeric($limit) == FALSE ){ unset($limit); }; 124 if( $limit < 1 OR empty($limit) ){ $limit = 1; }; 129 if( $limit < 1 OR empty($limit) ){ $limit = 1; }; 130 $bug = addslashes($_GET['bug']); 131 if( is_numeric($bug) == FALSE ){ unset($bug); }; 125 132 $quest = addslashes($_GET['quest']); 126 133 if( is_numeric($quest) == FALSE ){ unset($quest); };
Note:
See TracChangeset
for help on using the changeset viewer.