<%@LANGUAGE="VBSCRIPT"%> <% ref_file=Request.ServerVariables("HTTP_REFERER") if Instr(ref_file,"/links.asp") < 1 then Session("Special")="" Session("Category")="" end if special=Request.querystring("special") classification=special if NOT special="" then if special="'all categories'" then Session("Special")="" Session("Category")="" special="" else Session("Special")="AND classification=" & special & " " end if end if cat= Request.querystring("cat") if cat<>"" then Session("Category")=cat end if if Session("Category")="" then Session("Category")="classification" end if country=Request.querystring("country") if NOT country="" then 'if Session("category")="" then Session("Special")="AND country='" & country & "' " 'else 'Session("Special")="AND country='" & country & "' AND classification='" & Session("category") & "' " 'end if end if set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_kworld_STRING Recordset1.Source = "SELECT link_id,link, classification, description, link_txt, country FROM links WHERE confirmed=1 " & Session("Special") & " ORDER BY " & Session("Category") & " ASC" 'response.write(Recordset1.Source) Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = 20 Dim Repeat1__index Repeat1__index = 0 Recordset1_numRows = Recordset1_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables ' set the record count Recordset1_total = Recordset1.RecordCount ' set the number of rows displayed on this page If (Recordset1_numRows < 0) Then Recordset1_numRows = Recordset1_total Elseif (Recordset1_numRows = 0) Then Recordset1_numRows = 1 End If ' set the first and last displayed record Recordset1_first = 1 Recordset1_last = Recordset1_first + Recordset1_numRows - 1 ' if we have the correct record count, check the other stats If (Recordset1_total <> -1) Then If (Recordset1_first > Recordset1_total) Then Recordset1_first = Recordset1_total If (Recordset1_last > Recordset1_total) Then Recordset1_last = Recordset1_total If (Recordset1_numRows > Recordset1_total) Then Recordset1_numRows = Recordset1_total End If %> <% ' *** Move To Record and Go To Record: declare variables Set MM_rs = Recordset1 MM_rsCount = Recordset1_total MM_size = Recordset1_numRows MM_uniqueCol = "" MM_paramName = "" MM_offset = 0 MM_atTotal = false MM_paramIsDefined = false If (MM_paramName <> "") Then MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "") End If %> <% ' *** Move To Record: handle 'index' or 'offset' parameter if (Not MM_paramIsDefined And MM_rsCount <> 0) then ' use index parameter if defined, otherwise use offset parameter r = Request.QueryString("index") If r = "" Then r = Request.QueryString("offset") If r <> "" Then MM_offset = Int(r) ' if we have a record count, check if we are past the end of the recordset If (MM_rsCount <> -1) Then If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ' move the cursor to the selected record i = 0 While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1)) MM_rs.MoveNext i = i + 1 Wend If (MM_rs.EOF) Then MM_offset = i ' set MM_offset to the last possible record End If %> <% ' *** Move To Record: if we dont know the record count, check the display range If (MM_rsCount = -1) Then ' walk to the end of the display range for this page i = MM_offset While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size)) MM_rs.MoveNext i = i + 1 Wend ' if we walked off the end of the recordset, set MM_rsCount and MM_size If (MM_rs.EOF) Then MM_rsCount = i If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount End If ' if we walked off the end, set the offset based on page size If (MM_rs.EOF And Not MM_paramIsDefined) Then If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then If ((MM_rsCount Mod MM_size) > 0) Then MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If ' reset the cursor to the beginning If (MM_rs.CursorType > 0) Then MM_rs.MoveFirst Else MM_rs.Requery End If ' move the cursor to the selected record i = 0 While (Not MM_rs.EOF And i < MM_offset) MM_rs.MoveNext i = i + 1 Wend End If %> <% ' *** Move To Record: update recordset stats ' set the first and last displayed record Recordset1_first = MM_offset + 1 Recordset1_last = MM_offset + MM_size If (MM_rsCount <> -1) Then If (Recordset1_first > MM_rsCount) Then Recordset1_first = MM_rsCount If (Recordset1_last > MM_rsCount) Then Recordset1_last = MM_rsCount End If ' set the boolean used by hide region to check if we are on the last record MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount) %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %> <% ' *** Move To Record: set the strings for the first, last, next, and previous links MM_keepMove = MM_keepBoth MM_moveParam = "index" ' if the page has a repeated region, remove 'offset' from the maintained parameters If (MM_size > 0) Then MM_moveParam = "offset" If (MM_keepMove <> "") Then params = Split(MM_keepMove, "&") MM_keepMove = "" For i = 0 To UBound(params) nextItem = Left(params(i), InStr(params(i),"=") - 1) If (StrComp(nextItem,MM_moveParam,1) <> 0) Then MM_keepMove = MM_keepMove & "&" & params(i) End If Next If (MM_keepMove <> "") Then MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1) End If End If End If ' set the strings for the move to links If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&" urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "=" MM_moveFirst = urlStr & "0" MM_moveLast = urlStr & "-1" MM_moveNext = urlStr & Cstr(MM_offset + MM_size) prev = MM_offset - MM_size If (prev < 0) Then prev = 0 MM_movePrev = urlStr & Cstr(prev) if classification="" then classification=" - all" end if set countries = Server.CreateObject("ADODB.Recordset") countries.ActiveConnection = MM_kworld_STRING countries.Source = "SELECT DISTINCT country FROM links ORDER BY country ASC" countries.CursorType = 0 countries.CursorLocation = 2 countries.LockType = 3 countries.Open() countries_numRows = 0 do WHILE NOT countries.EOF country_code=countries("country") select case (country_code) case "cyberspace" country="Unspecified" case "AF" country="Afghanistan" case "AL" country="Albania" case "DZ" country="Algeria" case "AS" country="American Samoa" case "AD" country="Andorra" case "AO" country="Angola" case "AI" country="Anguilla" case "AQ" country="Antarctica" case "AG" country="Antigua and Barbuda" case "AR" country="Argentina" case "AM" country="Armenia" case "AW" country="Aruba" case "AU" country="Australia" case "AT" country="Austria" case "AZ" country="Azerbaijan" case "BS" country="Bahamas" case "BH" country="Bahrain" case "BD" country="Bangladesh" case "BB" country="Barbados" case "BY" country="Belarus" case "BE" country="Belgium" case "BZ" country="Belize" case "BJ" country="Benin" case "BM" country="Bermuda" case "BT" country="Bhutan" case "BO" country="Bolivia" case "BA" country="Bosnia and Herzegowina" case "BW" country="Botswana" case "BV" country="Bouvet Island" case "BR" country="Brazil" case "IO" country="British Indian Ocean Territory" case "BN" country="Brunei Darussalam" case "BG" country="Bulgaria" case "BF" country="Burkina Faso" case "BI" country="Burundi" case "KH" country="Cambodia" case "CM" country="Cameroon" case "CA" country="Canada" case "CV" country="Cape Verde" case "KY" country="Cayman Islands" case "CF" country="Central African Republic" case "TD" country="Chad" case "CL" country="Chile" case "CN" country="China" case "CX" country="Christmas Island" case "CC" country="Cocos (Keeling) Islands" case "CO" country="Colombia" case "KM" country="Comoros" case "CG" country="Congo" case "CD" country="Congo, the Democratic Republic of the" case "CK" country="Cook Islands" case "CR" country="Costa Rica" case "CI" country="Cote d'Ivoire" case "HR" country="Croatia (Hrvatska)" case "CU" country="Cuba" case "CY" country="Cyprus" case "CZ" country="Czech Republic" case "DK" country="Denmark" case "DJ" country="Djibouti" case "DM" country="Dominica" case "DO" country="Dominican Republic" case "TP" country="East Timor" case "EC" country="Ecuador" case "EG" country="Egypt" case "SV" country="El Salvador" case "GQ" country="Equatorial Guinea" case "ER" country="Eritrea" case "EE" country="Estonia" case "ET" country="Ethiopia" case "FK" country="Falkland Islands (Malvinas)" case "FO" country="Faroe Islands" case "FJ" country="Fiji" case "FI" country="Finland" case "FR" country="France" case "FX" country="France, Metropolitan" case "GF" country="French Guiana" case "PF" country="French Polynesia" case "TF" country="French Southern Territories" case "GA" country="Gabon" case "GM" country="Gambia" case "GE" country="Georgia" case "DE" country="Germany" case "GH" country="Ghana" case "GI" country="Gibraltar" case "GR" country="Greece" case "GL" country="Greenland" case "GD" country="Grenada" case "GP" country="Guadeloupe" case "GU" country="Guam" case "GT" country="Guatemala" case "GN" country="Guinea" case "GW" country="Guinea-Bissau" case "GY" country="Guyana" case "HT" country="Haiti" case "HM" country="Heard and Mc Donald Islands" case "VA" country="Holy See (Vatican City State)" case "HN" country="Honduras" case "HK" country="Hong Kong" case "HU" country="Hungary" case "IS" country="Iceland" case "IN" country="India" case "ID" country="Indonesia" case "IR" country="Iran (Islamic Republic of)" case "IQ" country="Iraq" case "IE" country="Ireland" case "IL" country="Israel" case "IT" country="Italy" case "JM" country="Jamaica" case "JO" country="Jordan" case "KZ" country="Kazakhstan" case "KE" country="Kenya" case "KI" country="Kiribati" case "KP" country="Korea, Democratic People's Republic of" case "KR" country="Korea, Republic of" case "KW" country="Kuwait" case "KG" country="Kyrgyzstan" case "LA" country="Lao People's Democratic Republic" case "LV" country="Latvia" case "LB" country="Lebanon" case "LS" country="Lesotho" case "LR" country="Liberia" case "LY" country="Libyan Arab Jamahiriya" case "LI" country="Liechtenstein" case "LT" country="Lithuania" case "LU" country="Luxembourg" case "MO" country="Macau" case "MK" country="Macedonia, The Former Yugoslav Republic of" case "MG" country="Madagascar" case "MW" country="Malawi" case "MY" country="Malaysia" case "MV" country="Maldives" case "ML" country="Mali" case "MT" country="Malta" case "MH" country="Marshall Islands" case "MQ" country="Martinique" case "MR" country="Mauritania" case "MU" country="Mauritius" case "YT" country="Mayotte" case "MX" country="Mexico" case "FM" country="Micronesia, Federated States of" case "MD" country="Moldova, Republic of" case "MC" country="Monaco" case "MN" country="Mongolia" case "MS" country="Montserrat" case "MA" country="Morocco" case "MZ" country="Mozambique" case "MM" country="Myanmar" case "NA" country="Namibia" case "NR" country="Nauru" case "NP" country="Nepal" case "NL" country="Netherlands" case "AN" country="Netherlands Antilles" case "NC" country="New Caledonia" case "NZ" country="New Zealand" case "NI" country="Nicaragua" case "NE" country="Niger" case "NG" country="Nigeria" case "NU" country="Niue" case "NF" country="Norfolk Island" case "MP" country="Northern Mariana Islands" case "NO" country="Norway" case "OM" country="Oman" case "PK" country="Pakistan" case "PW" country="Palau" case "PA" country="Panama" case "PG" country="Papua New Guinea" case "PY" country="Paraguay" case "PE" country="Peru" case "PH" country="Philippines" case "PN" country="Pitcairn" case "PL" country="Poland" case "PT" country="Portugal" case "PR" country="Puerto Rico" case "QA" country="Qatar" case "RE" country="Reunion" case "RO" country="Romania" case "RU" country="Russian Federation" case "RW" country="Rwanda" case "KN" country="Saint Kitts and Nevis" case "LC" country="Saint LUCIA" case "VC" country="Saint Vincent and the Grenadines" case "WS" country="Samoa" case "SM" country="San Marino" case "ST" country="Sao Tome and Principe" case "SA" country="Saudi Arabia" case "SN" country="Senegal" case "SC" country="Seychelles" case "SL" country="Sierra Leone" case "SG" country="Singapore" case "SK" country="Slovakia (Slovak Republic)" case "SI" country="Slovenia" case "SB" country="Solomon Islands" case "SO" country="Somalia" case "ZA" country="South Africa" case "GS" country="South Georgia and the South Sandwich Islands" case "ES" country="Spain" case "LK" country="Sri Lanka" case "SH" country="St. Helena" case "PM" country="St. Pierre and Miquelon" case "SD" country="Sudan" case "SR" country="Suriname" case "SJ" country="Svalbard and Jan Mayen Islands" case "SZ" country="Swaziland" case "SE" country="Sweden" case "CH" country="Switzerland" case "SY" country="Syrian Arab Republic" case "TW" country="Taiwan, Province of China" case "TJ" country="Tajikistan" case "TZ" country="Tanzania, United Republic of" case "TH" country="Thailand" case "TG" country="Togo" case "TK" country="Tokelau" case "TO" country="Tonga" case "TT" country="Trinidad and Tobago" case "TN" country="Tunisia" case "TR" country="Turkey" case "TM" country="Turkmenistan" case "TC" country="Turks and Caicos Islands" case "TV" country="Tuvalu" case "UG" country="Uganda" case "UA" country="Ukraine" case "AE" country="United Arab Emirates" case "UM" country="United States Minor Outlying Islands" case "UY" country="Uruguay" case "UZ" country="Uzbekistan" case "VU" country="Vanuatu" case "VE" country="Venezuela" case "VN" country="Viet Nam" case "VG" country="Virgin Islands (British)" case "VI" country="Virgin Islands (U.S.)" case "WF" country="Wallis and Futuna Islands" case "EH" country="Western Sahara" case "YE" country="Yemen" case "YU" country="Yugoslavia" case "ZM" country="Zambia" case "ZW" country="Zimbabwe" case "GB" by_pass=1 case "JP" by_pass=1 case "US" by_pass=1 end select if by_pass=0 then country_sel=country_sel & "" & Chr(13) end if by_pass=0 countries.MoveNext loop countries.Close() %> The Knitting Links Page
 

home artists at knitjapan   kntting links

KnitJapan.co.uk 


Submit a Link 

Japanese Links (in English)
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) link=(Recordset1.Fields.Item("link").Value) link=replace(link,",","") link=replace(link," ","") link_text=Recordset1("link_txt") %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Recordset1.MoveNext() Wend %>

you are looking at records matching: <%=classification%>

link

category description country

<%=(Recordset1.Fields.Item("classification").Value)%>

<% new_str="" counter=0 my_str=(Recordset1.Fields.Item("description").Value) str_array=split(my_str," ") if ubound(str_array) > 10 then do while counter < 10 new_str=new_str & str_array(counter) & " " counter=counter + 1 Loop new_str=new_str & " ..... (more)" else new_str=my_str end if response.write(new_str) %>

<%=(Recordset1.Fields.Item("country").Value)%>
<% Recordset1.Close() %>