\n"; ?> Ortnamnsregistret | Kristianstads län < space XXX space LÄN > $sockenort = "%"; $haradort = "%"; $landskap = "%"; } if ($sockenort != "%") { $haradort = "%"; $lanort = "%"; $landskap = "%"; } if ($haradort != "%") { if ($haradort == "Allmänt") { $lanort = "Kristianstads"; $landskap = "%"; }else{ $lanort = "%"; $landskap = "%"; } } if ($rubrik == "%" && $lokal == "%" && $sockenort == "%" && $haradort == "%") { $lanort = "Kristianstads"; $landskap = "%"; } $lanort = "Kristianstads"; if (empty($belaggartal)) $belaggartal = "%"; if (empty($pubdatum)) $pubdatum = "%"; if (empty($etym)): $etym = false; endif; if (empty($alfasort)): $alfasort = false; endif; if (empty($avdnr)) $avdnr = "0"; if (empty($sprak)) $sprak = "alla"; if (empty($socken)) $socken = ""; if (empty($harad)) $harad = ""; //************************************************************************************************* if ($sprak == "alla") { $avdSVE = (int) $avdnr; // {0,1,2,3,4} $avdSVE = (string) $avdSVE; $avdFIN = (int) $avdnr; if ($avdFIN > 0) { $avdFIN = $avdFIN + 4; // {0,5,6,7,8} }else{ $avdFIN = 0; } $avdFIN = (string) $avdFIN; $avdSAM = (int) $avdnr + 64; $avdSAM = chr($avdSAM); $avdSAM = strtolower($avdSAM); // {@,a,b,c,d} if ($avdSAM == "@") { $avdSAM = "0"; } } if ($sprak == "sve") { $avd = (int) $avdnr; // {0,1,2,3,4} $avd = (string) $avd; } if ($sprak == "fin") { $avd = (int) $avdnr; if ($avd > 0) { $avd = $avd + 4; // {0,5,6,7,8} }else{ $avd = 0; } $avd = (string) $avd; } if ($sprak == "sam") { $avd = (int) $avdnr + 64; $avd = chr($avd); $avd = strtolower($avd); // {@,a,b,c,d} if ($avd == "@") { $avd = "0"; } } // echo $avd . " " . gettype($avd); //################################################################################################# ?> ">
Institutet för språk och folkminnen

ORTNAMNSREGISTRET  |  Sök i samlingen Kristianstads län  [ länet nu i Skåne län ]

Till registrets startsida Till information   Till Skånsk ortnamnsdatabas »

Sök på
Ortnamn
Lokal
Socken
Härad

Bebyggelse- och naturnamn '); printf(''); printf(''); printf(''); printf(''); }else{ $elementsRadio2 = array( array('name' => 'Bebyggelse- och naturnamn ', 'value' => '0'), array('name' => 'Bebyggelsenamn ', 'value' => '1'), array('name' => 'Naturnamn ', 'value' => '2'), array('name' => 'Bebyggelsenamn ', 'value' => '3'), array('name' => 'Naturnamn ', 'value' => '4') ); foreach ($elementsRadio2 as $element) { printf('', $element['value'], (isset($_REQUEST['avdnr']) and $_REQUEST['avdnr'] == $element['value']) ? 'checked="checked"' : '', $element['name']); } } //$avdnr == "0" if ($sprak == "alla") { printf(''); printf(''); printf(''); printf(''); } if ($sprak == "sve") { printf(''); printf(''); printf(''); printf(''); } if ($sprak == "fin") { printf(''); printf(''); printf(''); printf(''); } if ($sprak == "sam") { printf(''); printf(''); printf(''); printf(''); } // ############################################################################################################ ?>
 Välj kategori  Välj språk
 Samtliga  Äldre namnformer  Uppteckningar  
Bebyggelsenamn Naturnamn Bebyggelsenamn Naturnamn %sAllaSvenska Finska Samiska AllaSvenska Finska Samiska AllaSvenska Finska Samiska AllaSvenska Finska Samiska 

' Visa endast tolkningar', 'value' => 'e') ); foreach ($elementsCheckEtym as $element) { printf('%s', $element['value'], (isset($_REQUEST['etym']) and $_REQUEST['etym'] == $element['value']) ? 'checked="checked"' : '', $element['name']); } ?> ' Ordna sidnummer alfabetiskt  (Obs: kan ta tid!)', 'value' => 'e') ); foreach ($elementsCheckAlfasort as $element) { printf('%s', $element['value'], (isset($_REQUEST['alfasort']) and $_REQUEST['alfasort'] == $element['value']) ? 'checked="checked"' : '', $element['name']); } ?>
Söktips:  med %-tecken menas vilket antal tecken som helst och med understreck( _ ) ett tecken utelämnat.

"; $letter = array(); $total = 0; for ($j=0;$j<29;$j++){ //for ($j=0;$j<7;$j++){ if ($j < 26) { $bokst = chr(ord('A')+$j) . "%"; }else{ switch ($j) { case 26: $bokst = "Å%"; break; case 27: $bokst = "Ä%"; break; case 28: $bokst = "Ö%"; break; } } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } }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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } 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' AND LEFT(asok,1) LIKE '$bokst';"; $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' AND LEFT(asok,1) LIKE '$bokst';"; } } // **************************************************************************************** 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(); } } $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] . "

"; break; } } } //end_of $j //##################################################################### $m=0; for ($k=0;$k<29;$k++){ $m = $m + $letter[$k]; } //echo "Summa: " . $m . "

"; $n=1; $m=0; $justera=0; $summarader=0; $sve=0; $svetkn = array('Å','Ä','Ö'); $teckenvad = array(); $teckensid = array(); $bokstavindex = 0; for ($k=0;$k<29;$k++){ if (($letter[$k] > 0)) { $summarader = $summarader + $letter[$k]; $m = $m + ceil($letter[$k]/TABELL_LEN); $justera = ceil($summarader/TABELL_LEN); if ($m > $justera){ $m = $justera; } //echo "
" . $m . "
"; //echo $justera . "
"; if ((chr(ord('A')+$k)<='Z')) { $teckenvad[$bokstavindex] = chr(ord('A')+$k); $teckensid[$bokstavindex] = $n; //echo $teckenvad[$bokstavindex] . "= " . $n . "-" . $m . "
"; $bokstavindex++; }else{ $teckenvad[$bokstavindex] = $svetkn[$sve]; $teckensid[$bokstavindex] = $n; //echo $teckenvad[$bokstavindex] . "= " . $n . "-" . $m . "
"; $bokstavindex++; $sve++; } $n = $m; } } //echo $summarader . "
"; //if ($n > floor(($summarader+$rest) / TABELL_LEN)){ // $teckensid[$bokstavindex-1]--; //} $teckensid[$bokstavindex] = -1; // ############################################################################################################ // slut här om alfabetisering }else{ // if not alfasort if ($avdnr == "0") { if ($sprak == "alla") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } if ($sprak == "sve") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } if ($sprak == "fin") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } if ($sprak == "sam") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } }else{ if ($sprak == "alla") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } if ($sprak == "sve") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } if ($sprak == "fin") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } if ($sprak == "sam") { $sql1 = "SELECT COUNT(*) AS alan 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';"; $sql2 = "SELECT COUNT(*) AS alan 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';"; } } 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(); } } $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;$k
1) { $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 ">>"; } } ?>
 %s
", "Antal rader: " . $i . "
"); // if ($varde[0] != "") { // setlocale(LC_ALL, 'Swedish'); // setlocale(LC_ALL, 'swedish', 'sv_SE', 'sv_SE.ISO8859-1'); // usort($varde,'strcoll'); // sort($varde,SORT_STRING); // } // setlocale(LC_ALL, 'swedish', 'sv_SE', 'sv_SE.ISO8859-1'); // setlocale(LC_ALL, "sv_SE.ISO-8859-1"); // $veckodag_short = strftime('%a'); // $veckodag_long = strftime('%A'); // echo $veckodag_short; // echo '
'; // echo $veckodag_long; $j = 0; while ( $j < $i ) { // $pizza = $varde[$j]; // $pieces = explode(";", $pizza); // printf(" %s
", $varde[$j]); // printf(" %s
", $pieces[1]); /* $strAsok = $pieces[0]; $strArub = $pieces[1]; $strAsoc = $pieces[2]; $strAhrd = $pieces[3]; $strAlfk = $pieces[4]; $strAlok = $pieces[5]; $strAtol = $pieces[6]; $strAbea = $pieces[7]; $strApub = $pieces[8]; $bild_hela_adress = $pieces[9]; $html_sida_pekare = $pieces[10]; */ $strAsok = $kolumn[$j][0]; $strArub = $kolumn[$j][1]; $strAort = $kolumn[$j][2]; $strAhrd = $kolumn[$j][3]; $strAlfk = $kolumn[$j][4]; $strAlok = $kolumn[$j][5]; $strAtol = $kolumn[$j][6]; $strAbea = $kolumn[$j][7]; $strApub = $kolumn[$j][8]; $strAlkp = $kolumn[$j][9]; $bild_hela_adress = $kolumn[$j][10]; $html_sida_pekare = $kolumn[$j][11]; // printf(""); printf(""); // printf(""); printf(""); printf(""); if (empty($strAort)) { printf(""); }else{ printf(""); } if (empty($strAhrd)) { printf(""); }else{ printf(""); } if (empty($strAlfk)) { printf(""); }else{ printf(""); } /* printf("%s", ""); printf("%s", ""); */ printf("%s", ""); printf("%s", ""); printf("%s", ""); printf("%s\n", ""); $j++; } ?>
Nr Ortnamn Lokal Socken Härad Län Landskap Tolkat Tabell
%s",$j+1 . " 
%s",$j+1+($franx-1) . "  %s","$strAsok%s","$strArub%s","$strAlok%s"," ---%s","$strAort%s","---%s","$strAhrd%s"," ---%s","$strAlfk%s", $strAbea); printf(" %s", $strApub); printf(" %s", $strAlkp); printf(" %s", $strAtol); printf(" %s", " "); printf("#>
$antal):?>
"; echo ''; echo "<< "; ?> $total svar (nr $franx..$sum) sida $sidan($sidor)\n"; ?> ($sidor - 1) * TABELL_LEN) { $xfw = ($sidor - 1) * TABELL_LEN; } echo " "; echo ''; echo ">>"; ?>

" . $teckenvad[$bokstavindex] . ""; }else{ echo "

" . $teckenvad[$bokstavindex] . ""; } $f=1; }else{ echo ",  " . $teckenvad[$bokstavindex] . ""; } $bokstavindex++; if (($teckensid[$bokstavindex]>$j) || ($teckensid[$bokstavindex]==-1)) { echo "
"; } } //end_while } // if alfasort==true if ($j > 1) { $x = ($j - 1) * $antal; }else{ $x = 0; } if ($sidan == $j) { echo "$j"; }else{ echo "$j"; } if ($j < $sidor) echo ", "; } //for j ?>

Skriv ut

 ^