\n"; ?>
Error performing query: " . mysql_error() . "
"); exit(); } }else{ $result = mysql_query($sql2); if (!$result) { echo("Error performing query: " . mysql_error() . "
"); exit(); } } $letter[$j] = mysql_num_rows($result); $total = $total + $letter[$j]; if ($j < 26) { echo chr(ord('A')+$j) . "=" . $letter[$j] .", "; }else{ switch ($j) { case 26: echo "Å=" . $letter[26] . ", "; break; case 27: echo "Ä=" . $letter[27] . ", "; break; case 28: echo "Ö=" . $letter[28] . "Error performing query: " . mysql_error() . "
"); exit(); } }else{ $result = mysql_query($sql2); if (!$result) { echo("Error performing query: " . mysql_error() . "
"); exit(); } } $total = @mysql_result($result,0); } // if alfasort } //if empty total // ############################################################################################################ if ($avdnr == "0") { if ($sprak == "alla") { $sql1 = "SELECT * FROM ortnaweb WHERE ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } if ($sprak == "sve") { $sql1 = "SELECT * FROM ortnaweb WHERE (ortnaweb.aurv LIKE '1' OR ortnaweb.aurv LIKE '3') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE (ortnaweb.aurv LIKE '1' OR ortnaweb.aurv LIKE '3') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } if ($sprak == "fin") { $sql1 = "SELECT * FROM ortnaweb WHERE (ortnaweb.aurv LIKE '5' OR ortnaweb.aurv LIKE '7') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE (ortnaweb.aurv LIKE '5' OR ortnaweb.aurv LIKE '7') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } if ($sprak == "sam") { $sql1 = "SELECT * FROM ortnaweb WHERE (ortnaweb.aurv LIKE 'a' OR ortnaweb.aurv LIKE 'c') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE (ortnaweb.aurv LIKE 'a' OR ortnaweb.aurv LIKE 'c') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } }else{ if ($sprak == "alla") { $sql1 = "SELECT * FROM ortnaweb WHERE (SUBSTRING(ortnaweb.akat FROM 2) = '$avdSVE' OR SUBSTRING(ortnaweb.akat FROM 2) = '$avdFIN' OR SUBSTRING(ortnaweb.akat FROM 2) = '$avdSAM') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE (SUBSTRING(ortnaweb.akat FROM 2) = '$avdSVE' OR SUBSTRING(ortnaweb.akat FROM 2) = '$avdFIN' OR SUBSTRING(ortnaweb.akat FROM 2) = '$avdSAM') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } if ($sprak == "sve") { $sql1 = "SELECT * FROM ortnaweb WHERE SUBSTRING(ortnaweb.akat FROM 2) = '$avd' AND (ortnaweb.aurv LIKE '1' OR ortnaweb.aurv LIKE '3') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE SUBSTRING(ortnaweb.akat FROM 2) = '$avd' AND (ortnaweb.aurv LIKE '1' OR ortnaweb.aurv LIKE '3') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } if ($sprak == "fin") { $sql1 = "SELECT * FROM ortnaweb WHERE SUBSTRING(ortnaweb.akat FROM 2) = '$avd' AND (ortnaweb.aurv LIKE '5' OR ortnaweb.aurv LIKE '7') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE SUBSTRING(ortnaweb.akat FROM 2) = '$avd' AND (ortnaweb.aurv LIKE '5' OR ortnaweb.aurv LIKE '7') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } if ($sprak == "sam") { $sql1 = "SELECT * FROM ortnaweb WHERE SUBSTRING(ortnaweb.akat FROM 2) = '$avd' AND (ortnaweb.aurv LIKE 'a' OR ortnaweb.aurv LIKE 'c') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' AND ortnaweb.atol LIKE '1' LIMIT $fran,$antal;"; $sql2 = "SELECT * FROM ortnaweb WHERE SUBSTRING(ortnaweb.akat FROM 2) = '$avd' AND (ortnaweb.aurv LIKE 'a' OR ortnaweb.aurv LIKE 'c') AND ortnaweb.asok LIKE '$rubrik' AND ortnaweb.alok LIKE '$lokal' AND ortnaweb.aort LIKE '$sockenort' AND ortnaweb.ahrd LIKE '$haradort' AND ortnaweb.alfk LIKE '$lanort' AND ortnaweb.alkp LIKE '$landskap' AND ortnaweb.abea LIKE '$belaggartal' AND ortnaweb.apub LIKE '$pubdatum' LIMIT $fran,$antal;"; } } if ($etym == true) { $result = mysql_query($sql1); if (!$result) { echo("Error performing query: " . mysql_error() . "
"); exit(); } }else{ $result = mysql_query($sql2); if (!$result) { echo("Error performing query: " . mysql_error() . "
"); exit(); } } // ############################################################################################################ ?> $antal) { $sum = $fran + $antal; }else{ $sum = $num_rows; } $franx = $fran + 1; if ($sum > $total) { $sum = $total; } if ($sum == 0) { $franx = 0; } $sidan = ceil($sum / TABELL_LEN); $sidor = ceil($total / $antal); ?> $strAlan, "akod_" => $strAkod, "aurv_" => $strAurv, "akat_" => $strAkat, "adok_" => $strAdok, "asok_" => $strAsok, "arub_" => $strArub, "alok_" => $strAlok, "atol_" => $strAtol, "abel_" => $strAbea, "apub_" => $strApub ); */ // $varde[$i] = $strAsok . ";" . $strArub . ";" . $sockenArr[1] . ";" . $sockenArr[2] . ";" . $sockenArr[3] . ";" . $strAlok . ";" . // $strAtol . ";" . $strAbea . ";" . $strApub . ";" . $bild_hela_adress . ";" . $html_sida_pekare; reset($kolumn); $kolumn[$i][0] = $strAsok; $kolumn[$i][1] = $strArub; $kolumn[$i][2] = $strAort; $kolumn[$i][3] = $strAhrd; $kolumn[$i][4] = $strAlfk; $kolumn[$i][5] = $strAlok; $kolumn[$i][6] = $strAtol; $kolumn[$i][7] = $strAbea; $kolumn[$i][8] = $strApub; $kolumn[$i][9] = $strAlkp; $kolumn[$i][10] = $bild_hela_adress; $kolumn[$i][11] = $html_sida_pekare; $c = ""; $a = $kolumn[$i][3]; for ($k=0;$k1) { $x = ($j - 1) * $antal; }else{ $x = 0; } if ($j == 1) { $xbw = $fran - TABELL_LEN; if ($xbw < 0) { $xbw = 0; } // echo ""; echo ""; echo ''; echo "<<"; } } ?> | $total svar (nr $franx..$sum) sida $sidan($sidor)\n"; ?> | 1) { $x = ($j - 1) * $antal; }else{ $x = 0; } if ($j == $sidor) { $xfw = $fran + TABELL_LEN; if ($xfw > ($sidor - 1) * TABELL_LEN) { $xfw = ($sidor - 1) * TABELL_LEN; } // echo ""; echo " "; echo ''; echo ">>"; } } ?> |
Nr | Ortnamn | Lokal | Socken | Härad | Län | Landskap | Tolkat | Tabell | ||||||
%s",$j+1 . " | "); printf("||||||||||||||
%s",$j+1+($franx-1) . " | "); // printf("%s","$strAsok | "); printf("%s","$strArub | "); printf("%s","$strAlok | "); if (empty($strAort)) { printf("%s"," --- | "); }else{ printf("%s","$strAort | "); } if (empty($strAhrd)) { printf("%s","--- | "); }else{ printf("%s","$strAhrd | "); } if (empty($strAlfk)) { printf("%s"," --- | "); }else{ printf("%s","$strAlfk | "); } /* printf("%s", $strAbea); printf(" | %s", ""); printf("%s", $strApub); printf(" | %s", ""); */ printf("%s", $strAlkp); printf(" | %s", ""); printf("%s", $strAtol); printf(" | %s", ""); printf("%s", " "); printf("#> | %s", ""); printf("%s
"; echo ''; echo "<< "; ?> | $total svar (nr $franx..$sum) sida $sidan($sidor)\n"; ?> | ($sidor - 1) * TABELL_LEN) { $xfw = ($sidor - 1) * TABELL_LEN; } echo " "; echo ''; echo ">>"; ?> |