IPB

Здравствуйте, гость ( Вход | Регистрация )

> Правила форума

Все ссылки на сторонние ресурсы, за исключением офсайтов программ, должны оформляться с помошью тега скрытого текста - [hide=1]Ссылка[/hide]

> Ищу скрипт телефонного стравочника
djtood
13.08.2007 - 17:23
Сообщение #1


No Avatar
Novice
*
Группа: Пользовaтели
Сообщений: 1
Регистрация: 13.08.2007

Пользователь №: 193785




скрипт телефонного справочника в вазможностью импорта телефонных номеров из файлов Excel

Зарание сасибо!
User is offlineProfile Card PM
Go to the top of the page
+
 
Reply to this topicStart new topic
Ответов(1 - 3)
najort
14.08.2007 - 19:07
Сообщение #2



Full Member
***
Группа: Full member
Сообщений: 281
Регистрация: 18.08.2004

Пользователь №: 57150




изучайте технологию php + MySQL, справочник легко сделать.


Комментарий от Ann
Просьба придерживаться заданной автором темы.
Если есть скрипт - предложите.
Разговоры о том, что и как быстро можно сделать - оффтопик и флуд.
User is offlineProfile Card PM
Go to the top of the page
+
taren
6.09.2007 - 10:06
Сообщение #3


No Avatar
Novice
*
Группа: Новичок
Сообщений: 1
Регистрация: 6.09.2007

Пользователь №: 195675




Вот пример соединения базы access на asp
<%
displayRecs = 50
recRange = 10
%>

<%
' Get table name
tablename = "[tarif]"
dbwhere = ""
a_search = ""
b_search = ""
%>



<%
' Get search criteria for basic search
pSearch = Request.QueryString("psearch")
If pSearch <> "" Then
pSearch = replace(pSearch,"'","''")
pSearch = replace(pSearch,"[","[[]")
b_search = b_search & "[naim_rabot] LIKE '%" & pSearch & "%' OR "
b_search = b_search & "[yk] LIKE '%" & pSearch & "%' OR "
End If
If len(b_search) > 4 Then
b_search = mid(b_search,1,len(b_search)-4)
b_search = "(" & b_search & ")"
End If
%>



<%
'Build search criteria
If a_search <> "" Then
dbwhere = dbwhere & a_search 'advance search
ElseIf b_search <> "" Then
dbwhere = dbwhere & b_search 'basic search
End If

'Save search criteria
If dbwhere <> "" Then
Session("tablename") = tablename
Session("dbwhere") = dbwhere
'reset start record counter
startRec = 1
Session("startRec") = startRec
Else
If tablename = Session("tablename") Then
dbwhere = Session("dbwhere")
Else
'reset search criteria
dbwhere = ""
Session("dbwhere") = dbwhere
End If
End If

'Get clear search cmd
If Request.QueryString("cmd").Count > 0 then
cmd=Request.QueryString("cmd")
If ucase(cmd) = "RESET" Then
'reset search criteria
dbwhere = ""
Session("dbwhere") = dbwhere
End If
End If

%>


<%
' Load Default Order
DefaultOrder = ""
DefaultOrderType = ""

' Check for an Order parameter
OrderBy = ""
If Request.QueryString("order").Count > 0 Then
OrderBy = Request.QueryString("order")
' Check if an ASC/DESC toggle is required
If Session("company_OB") = OrderBy Then
If Session("company_OT") = "ASC" Then
Session("company_OT") = "DESC"
Else
Session("company_OT") = "ASC"
End if
Else
Session("company_OT") = "ASC"
End If
Session("company_OB") = OrderBy
Session("company_REC") = 1
Else
OrderBy = Session("company_OB")
if OrderBy = "" then
OrderBy = DefaultOrder
Session("company_OB") = OrderBy
Session("company_OT") = DefaultOrderType
End If
End If

' Check for a START parameter
If Request.QueryString("start").Count > 0 Then
startRec = Request.QueryString("start")
Session("downloads_REC") = startRec
Else
startRec = Session("company_REC")
if not isnumeric(startRec) or startRec = "" then
'reset start record counter
startRec = 1
Session("company_REC") = startRec
End If
End If

' Open Connection to the database
set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str

' Build Query
strsql = "select * from [tarif]"

If dbwhere <> "" Then
strsql = strsql & " WHERE " & dbwhere
End If

if OrderBy <> "" then
strsql = strsql & " ORDER BY [" & OrderBy & "] " & Session("company_OT")
end if

'response.write strsql

set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
totalRecs = rs.RecordCount
%>


<form>


<tr>

<td colspan=6 height=2 background=images/br_line.gif></tr>
<tr>
<td width=150 align=center valign=top>
<a href="search.asp?order=<%= Server.URLEncode("naim_rabot") %>">Наименование работ</a></td>

<td width="60" align=center valign=top>
<a href="search.asp?order=<%= Server.URLEncode("ed_izm") %>">Ед. измерения</a></td>

<td width="60" align=center valign=top>
<a href="search.asp?order=<%= Server.URLEncode("norm_na_ed") %>">Норма времени, на ед. изм., чел/час</a></td>

<td width="60" align=center valign=top>
<a href="search.asp?order=<%= Server.URLEncode("tarif_na_ed") %>">Тариф на ед. изм., руб. с НДС</a></td>

<td width="60" align=center valign=top>
<a href="search.asp?order=<%= Server.URLEncode("gar") %>">Гарантийный срок, месяцев
</a></td>

<td width="100" align=center valign=top>
<a href="search.asp?order=<%= Server.URLEncode("yk") %>">Управляющая компания</a></td>
<tr>

<td colspan=6 height=2 background=images/br_line.gif></tr>
</tr>

<%
'Avoid starting record > total records
if clng(startRec) > clng(totalRecs) then
startRec = totalRecs
end if
'Set the last record to display
stopRec = startRec + displayRecs - 1

'Move to first record directly for performance reason
recCount = startRec - 1
if not rs.eof then
rs.movefirst
rs.move startRec - 1
end if

recActual = 0
Do While (NOT rs.EOF) AND (recCount < stopRec)
recCount = recCount + 1
If Clng(recCount) >= Clng(startRec) Then
recActual = recActual + 1 %>
<%
'set row color
bgcolor="#FFFFFF"
%>
<%
' Display alternate color for rows
If recCount mod 2 <> 0 Then
bgcolor="#F5F5F5"
End If
%>
<%
x_ID = rs("Код")
x_nazv = rs("naim_rabot")
x_index = rs("ed_izm")
x_street = rs("norm_na_ed")
x_tel = rs("tarif_na_ed")
x_fax = rs("gar")
x_email = rs("yk")

%>

<tr bgcolor="<%= bgcolor %>">

<td><SPAN class=text><% response.write x_nazv %>&nbsp; </SPAN></td>

<td><SPAN class=text><% response.write x_index %>&nbsp; </SPAN></td>

<td align=center><SPAN class=text> <% response.write x_street %>&nbsp; </SPAN></td>

<td align=center><SPAN class=text><% response.write x_tel %>&nbsp; </SPAN></td>

<td align=center><SPAN class=text><% response.write x_fax %>&nbsp; </SPAN></td>

<td><SPAN class=text><% response.write x_email %>&nbsp; </SPAN></td>
<tr>

<td colspan=6 height=2 background=images/br_line.gif></tr>
</tr>
<%
end if

rs.MoveNext
Loop
%>
</form>


<%
if totalRecs > 0 then

' Find out if there should be Backward or Forward Buttons on the table.
If startRec = 1 Then
isPrev = False
Else
isPrev = True
PrevStart = startRec - displayRecs
If PrevStart < 1 Then PrevStart = 1 %>
<hr size="1">
<strong><a href="search.asp?start=<%=PrevStart%>"><SPAN
class=text>[&lt;&lt;&nbsp;Пред.]</span></a></strong>
<%
End If

' Display Page numbers
If (isPrev OR (NOT rs.EOF)) Then
If (NOT isPrev) Then Response.Write "<HR SIZE=1>"
x = 1
y = 1

dx1 = ((startRec-1)\(displayRecs*recRange))*displayRecs*recRange+1
dy1 = ((startRec-1)\(displayRecs*recRange))*recRange+1
If (dx1+displayRecs*recRange-1) > totalRecs then
dx2 = (totalRecs\displayRecs)*displayRecs+1
dy2 = (totalRecs\displayRecs)+1
Else
dx2 = dx1+displayRecs*recRange-1
dy2 = dy1+recRange-1
End If

While x <= totalrecs
If x >= dx1 and x <= dx2 Then
If Clng(startRec) = Clng(x) Then %>
<strong><SPAN class=text><%=y%></SPAN></strong>
<% Else %>
<strong><a href="search.asp?start=<%=x%>"><SPAN class=text><%=y%></SPAN></A></strong>
<% End If
x = x + displayRecs
y = y + 1
elseif x >= (dx1-displayRecs*recRange) and x <= (dx2+displayRecs*recRange) then
if x+recRange*displayRecs < totalRecs then %>
<a href="search.asp?start=<%=x%>"><SPAN class=text><%=y%>-<%=y+recRange-1%></SPAN></a>
<% else
ny=(totalRecs-1)\displayRecs+1
if ny = y then %>
<a href="search.asp?start=<%=x%>"><SPAN class=text><%=y%></SPAN></a>
<% else %>
<a href="search.asp?start=<%=x%>"><SPAN class=text><%=y%>-<%=ny%></SPAN></a>
<% end if
end if
x=x+recRange*displayRecs
y=y+recRange
else
x=x+recRange*displayRecs
y=y+recRange
End If
Wend
End If

' Next link
If NOT rs.EOF Then
NextStart = startRec + displayRecs
isMore = True %>
<strong><a href="search.asp?start=<%=NextStart%>"><SPAN
class=text>[След.&nbsp;&gt;&gt;]</span></a></strong>
<% Else
isMore = False
End If %>
<hr size="1">
<% If stopRec > recCount Then stopRec = recCount %>
<SPAN
class=text>Записи с <%= startRec %> по <%= stopRec %> из <%= totalRecs %></span>
<% Else %>
<br>
<br>
<SPAN class=text>По Вашему запросу ничего не найдено!</span>
<br>
<br>
<% End If %>
<%
' Close recordset and connection
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing %>


</table>
</td>
User is offlineProfile Card PM
Go to the top of the page
+
GuestWho
12.02.2008 - 23:54
Сообщение #4


No Avatar
Member
**
Группа: Пользовaтели
Сообщений: 37
Регистрация: 28.10.2007

Пользователь №: 199884




а на php есть что-нибудь?
я поиск cutenews переделал в базу телефонов =)
(база очень маленькая)
User is offlineProfile Card PM
Go to the top of the page
+
Реклама

Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0 -

 



- Текстовая версия Сейчас: 28.03.2024 - 15:41
]]> ]]>
]]> Яндекс.Метрика ]]>