Bonjour!!Je suis nul en asp et j'ai ma page qui suit. Si quelqu'un pourrait me la traduire je serais tres reconnaissant.Il ya des erreurs car j'ai essaye de faire la traduction mais ca n'a pas marche!
merci d'avance.
Voici le code qui suit:
<%
Option Explicit;
dim $find;
dim $oConn;
dim $oRs;
$find=@$_POST["find"];
if ($find == "") {$find = @$_GET["find"];}
if ($find == "") {header("Location: default.php");
Set $oConn = Server.CreateObject("ADODB.Connection");
Set $oRs = Server.CreateObject("ADODB.RecordSet");
$oConn.$connectionString="Provider=SQLOLEDB.1;UI
D=login;PWD=password;database=base";
$oConn.$Open;
$oRs.$CursorType = 2;
$oRs.$ActiveConnection=$oConn;
$find = str_replace( '"', "_",$find);
$find = str_replace( "'", "_",$find);
dim $f;
$f = explode(" ",$find);
$f = "'" + Join($f,"','") + "'";
$oRs.$source ="DtSmartFind " + $f;
$oRs.$open;
%>
<html>
<head>
<META name="ROBOTS" content="all">
<meta http-equiv="keywords" name="keywords" content="">
<meta http-equiv="description" name="description" content="">
<TITLE>""</TITLE><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language=javascript src=http://www.steelsrv.ru/count.js></script>
<script language="JavaScript">
<!--
function Validate()
{
if( form1.find.value.length < 3 )
{
alert( "Слиш&am
p;#1082;ом корт&
;#1082;ий шабл&
;#1086;н для поис&
;#1082;а" );
return;
}
form1.submit();
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVer
sion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i
])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.l
ength) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.l
ayers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]
=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function s1( i )
{
var s="service.asp?i='" + i + "'";
var p="scrollbars=1,resizable=1,resizable=yes,toolba
r=0,width=500,height=200,left=250,top=250";
wNew = window.open( s, 'Service', p);
wNew.focus();
}
function ss( firmid )
{
var s="firmservices.asp?f='" + firmid + "'";
var p="scrollbars=1,resizable=1,resizable=yes,toolba
r=0,width=400,height=150,left=250,top=250";
wNew = window.open( s, 'Services', p);
wNew.focus();
}
function ff( firmid )
{
var s="firm.asp?f='" + firmid + "'";
var p="scrollbars=1,resizable=1,toolbar=0,width=500,
height=400,left=250,top=150";
wNew = window.open( s, "Пара&am
p;#1084;етр
099;", p);
wNew.focus();
}
//-->
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(shapka/1_r1_c1.gif);
background-repeat: repeat-x;
}
a {
font-family: "Times New Roman", Times, serif;
font-size: 14px;
color: #4444D9;
}
td {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
.style2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #000000;
}
.style3 {font-family: Arial, Helvetica, sans-serif}
.style6 {
color: #FFFFFF;
font-size: 7px;
}
.style7 {color: #666666}
.style9 {color: #000000}
.style10 {
font-size: 16px;
font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<body>
<div align="center">
<form name="form1" method="post" action="findfirm.asp">
<table border="0" cellpadding="0" cellspacing="0" width="778">
<!-- fwtable fwsrc="Untitled" fwbase="1.gif" fwstyle="Dreamweaver" fwdocid = "1014121847" fwnested="0" -->
<tr>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="36" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="20" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="63" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="98" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="33" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="51" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="93" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="36" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="21" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="88" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="13" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="21" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="25" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="1" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="19" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="35" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="125" height="1" border="0" alt=""></td>
<td background="shapka/1_r5_c4.gif"><img src="shapka/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="17" background="shapka/1_r5_c4.gif"><img name="n1_r1_c1" src="shapka/1_r5_c4.gif" width="10" height="13" border="0" alt=""></td>
<td><img src="shapka/spacer.gif" width="1" height="13" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="4"> </td>
<td colspan="3"> </td>
<td rowspan="3"> </td>
<td rowspan="2"><img name="n1_r2_c6" src="shapka/1_r2_c6.gif" width="51" height="65" border="0" alt=""></td>
<td rowspan="2"> </td>
<td rowspan="2" colspan="2"><img name="n1_r2_c8" src="shapka/1_r2_c8.gif" width="57" height="65" border="0" alt=""></td>
<td rowspan="2"> </td>
<td rowspan="2" colspan="2"><img name="n1_r2_c11" src="shapka/1_r2_c11.gif" width="34" height="65" border="0" alt=""></td>
<td rowspan="2" colspan="3"> </td>
<td rowspan="3" colspan="2"><div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540
000" codebase="http://download.macromedia.com/pub/sho
ckwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100" height="100">
<param name="movie" value="banner.swf">
<param name="quality" value="high">
<embed src="banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getfla
shplayer" type="application/x-shockwave-flash" width="100" height="100"></embed>
</object>
</div></td>
<td><img src="shapka/spacer.gif" width="1" height="31" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="3" colspan="2"><a href="default.php"><img src="shapka/1_r3_c2.gif" alt="" name="n1_r3_c2" width="83" height="180" border="0"></a></td>
<td rowspan="2"><a href="default.php"><img name="n1_r3_c4" src="shapka/1_r3_c4.gif" width="98" height="108" border="0" alt=""></a></td>
<td><img src="shapka/spacer.gif" width="1" height="34" border="0" alt=""></td>
</tr>
<tr>
<td colspan="2" valign="top"><div align="left"><a href="http://www.map.tver.ru">
карт&
;#1072; Твер&
;#1080; <br>
и Твер&
;#1089;кой обла&
;#1089;ти</a></div><
;/td>
<td colspan="3" valign="top"><div align="left"><a href="about.php">
</a></div></td>
<td colspan="5" valign="top"><div align="left"><a href="
http:// ">
</a></div></td>
<td><img src="shapka/spacer.gif" width="1" height="74" border="0" alt=""></td>
</tr>
<tr>
<td colspan="11" background="shapka/1_r5_c4.gif"><div align="center">
<table width="394" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="179"><span class="style2">Вве
дите&
;nbsp;клюm
5;евое&a
mp;nbsp;сло
074;о:</span><span class="style9"> <
;/span> </td>
<td width="85">
<div align="left">
<input type="text" name="find" value="<%=$find%>" size="20">
</div></td>
<td width="86"><div align="right"><a href="javascript:Validate()"><img name="Image43" border="0" src="shapka/kno.gif" width="55" height="22"></a></div></td>
</tr>
</table>
</div></td>
<td colspan="2" rowspan="2" valign="bottom"><img name="n1_r5_c15" src="shapka/1_r5_c15.gif" border="0" alt=""></td>
<td rowspan="3">
<p align="center">
<a href="zayavka_besplatn.php" class="style7">Рег
истр&
;#1072;ция в спра&
;#1074;очн
80;ке</a>
</p>
<p align="center"><a href="dop_inform.php" class="style7">Пол
езна&
;#1103; инфо&
;#1088;мац
80;я</a></p>
<p align="center"><a href="reklama.php" class="style7"> Рекл&
;#1072;ма в спра&
;#1074;очн
80;ке</a></p></td>
<td><img src="shapka/spacer.gif" width="1" height="72" border="0" alt=""></td>
</tr>
<tr>
<td colspan="11" rowspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom"><div align="left" class="style7">
На с&
#1077;годl
5;яшни&a
mp;#1081; де
085;ь в &a
mp;#1089;пра
1074;очни
;ке о&
;#1082;оло<b>&l
t;br>
5 000 </b>о
1088;гани
;заци&am
p;#1081; и l
7;редп&a
mp;#1088;ият
1080;й Тв
ери &
#1080; Тве
;рско&am
p;#1081; обла&
;#1089;ти</div></td>
<td><div align="right" class="style7">
</div></td>
</tr>
</table></td>
<td colspan="3"><div align="right"><img name="n1_r6_c12" src="shapka/1_r6_c12.gif" border="0" alt=""></div></td>
<td><img src="shapka/spacer.gif" width="1" height="54" border="0" alt=""></td>
</tr>
<tr>
<td colspan="5"> </td>
<td><img src="shapka/spacer.gif" width="1" height="27" border="0" alt=""></td>
</tr>
<tr>
<td colspan="17"><p><img src="shapka/spacer.gif" width="778" height="1" border="0" alt=""></p>
<p><img name="n1_r8_c1" src="shapka/spacer.gif" width="56" height="1" border="0" alt=""></p></td>
<td><img src="shapka/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
</table>
<table width="62%" height="18" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <div align="left"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td width="15%" bgcolor="#DEE6F0"><div align="center">
Орга&
;#1085;иза
94;ии</div></td>
<td width="15%" bgcolor="#FFCC99" usemap="#Map"><div align="center"><a href="findservice.asp">Ру&am
p;#1073;рик
080;</a></div></td>
<td width="70%" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="3" bgcolor="#DEE6F0"> </td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="3" id="table1">
<%dim $i, $cname;
$i = 0;
$cname = "";
if ($oRs.$eof ) {
echo "По ваше&
;#1084;у запр&
;#1086;су ниче&
;#1075;о не найд&
;#1077;но.";
}
while not $oRs.$eof;
if ($cname != $oRs["f_name"]) {
$cname = $oRs["f_name"];
$i = $i+1 ?>
<tr bgcolor="#DEE6F0">
<td>
<%=$i.". "%>
<a href='javascript:ff("<%=$oRs["pk_firm"]%>")'>
<font size=2>
<%=$oRs["f_name"]%>
</font></a>
</td>
<td align="right">
<?
if ($oRs["f_iurl"].$ActualSize < 1) {
echo "<img src=images/i.gif border=0> ";
} else {
echo "<a href='".$oRs["f_iurl"]."' target=_blank>";
echo "<img src=images/i_1.gif border=0 alt='визи
;тка'>";
echo "</a> ";
}
if ($oRs["f_email"].$ActualSize < 1) {
echo "<img src=images/email.gif> ";
} else {
echo "<a href=mailto:".$oRs["f_email"].">";
echo "<img src=images/email_1.gif border=0 alt='Email'>";
echo "</a> ";
}
if ($oRs["f_url"].$ActualSize < 1) {
echo "<img src=images/dom.gif> ";
} else {
echo "<a href='".$oRs["f_url"]."' target=_blank>";
echo "<img src=images/dom_1.gif border=0 alt='сайт
;'>";
echo "</a> ";
}
echo '<a href=\'javascript:ss("'.$oRs["pk_firm"].'")\'>';
echo "<img src=images/books_1.gif border=0 alt='серв
;ис фирм&
;#1099;'>";
echo "</a> ";
// echo "<a href='edit.asp?" .oRs("pk_firm") . "'>"
// echo "<img src=images/pen_1.gif border=0>"
// echo "</a> "
?>
</td>
</tr>
<?if ($oRs["f_textshort"].$ActualSize > 1) {?>
<tr bgcolor=#FFFFFF><td colspan=2>
<font size=2 color="#666666" face="Times New Roman, Times, serif">
<?echo $oRs["f_textshort"]?>
</font>
</td></tr>
<?}?>
<tr bgcolor=#FFFFFF><td align="right" colspan=2>
<?echo $oRs["f_adr"]?>
<?if ($oRs["f_telefon"] != "") {?>
<br>
<?echo "т.".$oRs["f_telefon"]?>
<?}?>
</td></tr>
<tr><td></td></tr>
<?}?>
<tr bgcolor=#FFFFFF><td colspan=2>
<?if ($oRs["i_url"].$ActualSize > 1) {echo "<a href='".$oRs["i_url"]."' target='_blank'>";} ?>
<?if ($oRs["i_text"].$ActualSize > 1) {echo '<a href=\'javascript:s1("'.$oRs["pk_item"].'")\'> <font color=\'#003366\'>';} ?>
<?echo $oRs["i_name"]?>
<?if ($oRs["i_text"].$ActualSize > 1) {echo "</font></a>";} ?>
<?if ($oRs["i_url"].$ActualSize > 1) {echo "</a>";} ?>
</td></tr>
<?$oRs.$moveNext?>
<?}?>
</TABLE>
</td>
</tr>
</table>
<td width="23%" valign="top" background="shapka/1_r5_c4.gif"> </t
d>
</form>
<br>
<hr width="774" size="1">
<br>
<div border=1>тес
1090; ссыл&
;#1086;к<?php include("ssilki.php") ?></div>
<br>
<table width="691" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="540">
<div align="left">E-mail: <a href="mailto:" class="style3"></a><br>
<br>
</div></td>
<td width="151" valign="top"><div align="right">© </div></td>
</tr>
<tr>
<td width="540">
</td>
<td width="151" valign="top"> &
nbsp; &am
p;nbsp; <!--Rating@Mail.ru
COUNTEr--><script language="JavaScript" type="text/javascript"><!--
d=document;var a='';a+=';r='+escape(d.referrer)
js=10//--></script><script language="JavaScript1.1" type="text/javascript"><!--
a+=';j='+navigator.javaEnabled()
js=11//--></script><script language="JavaScript1.2" type="text/javascript"><!--
s=screen;a+=';s='+s.width+'*'+s.height
a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth
)
js=12//--></script><script language="JavaScript1.3" type="text/javascript"><!--
js=13//--></script><script language="JavaScript" type="text/javascript"><!--
d.write('<a href="
https://top.mail.ru/stat?id=1157166&from=jumpfrom "'+
' target=_top><img src="http://d8.ca.b1.a1.top.list.ru/counter'+
'?id=1157166;t=105;js='+js+a+';rand='+Math.rando
m()+
'" alt="Рейт
;инг@Mail.ru"'+' border=0 height=18 width=88/><\/a>')
if(11<js)d.write('<'+'!-- ')//--></script><noscript><a
target=_top href="
https://top.mail.ru/stat?id=1157166&from=jumpfrom "><
img
src="
http://top-fwz1.mail.ru/counter?js=n;ver=30
a;id=1157166;t=105"
border=0 height=18 width=88
alt="Рейт
;инг@Mail.ru"/><
;/a></noscript><script language="JavaScript" type="text/javascript"><!--
if(11<js)d.write('--'+'>')//--></script>&l
t;!--/COUNTER-->
</td>
</tr>
</table>
<p> </p>
</div>
<map name="Map">
<area shape="poly" coords="101,8,102,26,115,32,182,32,179,8" href="findservice.asp?find=<%=$find%>">
</map>
</body>
</html>
Afficher la suite