الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Change the link to....

مغلق
بدأه iwi في 26 فبراير 2003 · 1 رد · 577 مشاهدة · في منتدى تصميم صفحات الويب
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

Alsalam alekoum

---------------------

please how we can change the search result linke to display in one page but with different ID's,i mean just the id can change

here in this code when u make search and click the results link it pass to different links so how we can change this code ,

the RED color should changed

and thanks

=================================original code

 <%

	Option Explicit

	Response.Buffer = True

	Response.Expires = 0

%>

<html>

<head>

	<style>

  body { font-family : Verdana; font-size : 8pt; }

	</style>

</head>

<body>

<!--#include file="editme.asp"-->

<%

' ADO Constants - Don't Change Them

Const adOpenForwardOnly = 0

Const adLockReadOnly = 1

Const adCmdText = &H0001

Const adUseClient = 3



Dim currentPage

	If Len(Request.QueryString("currentPage")) = 0 Then

        currentPage = 1

    Else

        currentPage = CInt(Request.QueryString("currentPage"))

    End If



Dim recordsToShow

	recordsToShow = 10



	' Keyword/s to search

Dim strKeyword

	strKeyword = split(Trim(Request.QueryString("look_for")), " ")



	' Our Connection Object

Dim con

	Set con = CreateObject("ADODB.Connection")

	con.Open strDB



	' Our Recordset Object

Dim rs

	Set rs = CreateObject("ADODB.Recordset")

	rs.CursorLocation = adUseClient

	rs.PageSize = recordsToShow

	rs.CacheSize = recordsToShow



	' Searching the records for the keywords entered

	Select Case UBound(strKeyword)

  Case 0 	 rs.Open "select * from all_pages where keywords like '%" & strKeyword(0) & "%' order by mydate desc", con, adOpenForwardOnly, adLockReadOnly, adCmdText

  Case 1  rs.Open "select * from all_pages where keywords like '%" & strKeyword(0) & "%' and keywords like '%" & strKeyword(1) & "%' order by mydate desc", con

  Case 2  rs.Open "select * from all_pages where keywords like '%" & strKeyword(0) & "%' and keywords like '%" & strKeyword(1) & "%' and keywords like '%" & strKeyword(2) & "%' order by mydate desc", con

  Case Else	rs.Open "select * from all_pages where keywords like '%" & strKeyword(0) & "%' and keywords like '%" & strKeyword(1) & "%' and keywords like '%" & strKeyword(2) & "%' order by mydate desc", con

  End Select



	' If the returning recordset is not empty

	If Not rs.EOF Then



Dim totalpages

	totalpages = rs.PageCount

	rs.AbsolutePage = currentPage



	' Showing total number of pages found and the current page number

    Response.Write "Displaying Page " & currentPage & " of " & totalPages & "
"

    Response.Write "Total Records Found : " & rs.RecordCount & "
"

    Response.Write "Search Results for : " & Request.QueryString("look_for")

    Response.Write "

"

    

	' Showing relevant records

	Dim rcount, i, x



	For i = 1 To rs.PageSize

 	 rcount = i

 	 If currentPage > 1 Then

    For x = 1 To (currentPage - 1)

   	 rcount = 10 + rcount

    Next

 	 End If



  If Not rs.EOF Then

  Response.Write rcount & ") [url="]" & rs("title") & "[/url]
" & vbcrlf  Response.Write "" & rs("description") & "
" & vbcrlf

  Response.Write "URL : " & rs("url") & "</b>
" & vbcrlf

  Response.Write "Last indexed on : " & rs("mydate") & "

" & vbcrlf



  rs.MoveNext

  End If

	Next



    ' Links to move through the records

    If currentPage > 1 Then

        Response.Write "[url="]Back[/url]"

  Else

        Response.Write "<u style=""color : silver;"">Back</u>"

    End If



	Response.Write "		  "



	If CInt(currentPage) <> CInt(totalPages) Then

        Response.Write "[url="]Next[/url]"

   	 Else

        Response.Write "<u style=""color : silver;"">Next</u>"

	End If



	Else

	Response.Write "Sorry, no matching record was found." & vbcrlf	



	End If



	' Done. Now release Objects

	con.Close

	Set con = Nothing

	Set rs = Nothing

%>






<div align="center" style="color:silver;">©Faisal Khan. www.stardeveloper.com</div>

</body></html>

====================

if u need the source u can have it from

http://www.stardeveloper.com/downloads/zip.../2000032001.zip

#2

بسم الله الرحمن الرحيم

لن يجيبك الكثير أكتب باللغة الأم

أو أنها لا تعجبك؟؟؟

أنت عربي أكتب بالعربية

:mad::mad::mad::mad::mad::mad:

هذا الموضوع مغلق.

مواضيع مشابهة