View file servis/konvektorjs/index.php

File size: 1.87Kb
<?php
include $_SERVER['DOCUMENT_ROOT']."/template/head.php";
?>
<head>


</head>

<body>

<SCRIPT LANGUAGE="JavaScript">
<!--Hide JavaScript from Java-Impaired Browsers
var ls="";
var dq='"';
var sq="'";
var rr="\r";

function jsPars(){ 
ls=document.isn.txt.value; 
if (ls==""){ 
alert("Введите какой-нибудь текст"); 
} 
else{ 
htmlPar(); 
} 
}

function htmlPar(){ 
document.isn.txt.value="Работа......."; 
pos=ls.indexOf(dq); 
pos1=ls.indexOf(sq); 
if ((pos>-1)&&(pos1>-1)){ 
reWrt(); 
} 
if (pos>-1){ 
qt=sq; 
} 
else{ 
qt=dq; 
} 
while (ls.indexOf(rr)>-1){ 
lc=ls.indexOf(rr); 
ls=ls.substring(0,lc)+" "+ls.substring(lc+1,ls.length); 
} 
nls="<SCRIPT LANGUAGE="+qt+"JavaScript"+qt+">"+rr +"<!-- Hide from JavaScript-Impaired Browsers"+rr +" document.write("+qt+ls.substring(0,36)+qt; 

ls=ls.substring(36,ls.length); 
lsl=ls.length 
pp=50; 
if (pp>lsl) { 
pp=lsl; 
} 
while (lsl>0){ 
nls+="\r +"+qt+ls.substring(0,pp)+qt; 
ls=ls.substring(pp,lsl); 
lsl=ls.length; 
if (pp>lsl){ 
pp=lsl; 
} 
} 
nls+=");"+rr+"// End Hiding -->"+rr+"</SC" +"RIPT>"; 
document.isn.txt.value=nls+rr+"<!-- Size: "+nls.length +" bytes --> "+rr; 
}

function reWrt(){ 
pos=-1; 
while (ls.indexOf(dq)>-1){ 
lc=ls.indexOf(dq); 
ls=ls.substring(0,lc)+sq+ls.substring(lc+1,ls.length); 
} 
}

function iA(){ 
this.length=iA.arguments.length; 
for (var i=0;i<this.length;i++){ 
this[i]=iA.arguments[i]; 
}
}

// End Hiding -->
</SCRIPT>

<FORM NAME="isn">
<TABLE BORDER=0 width="100%">
<TR><TD>
<DIV ALIGN="center">
<INPUT TYPE="button" NAME="but" VALUE="Конвертировать в JAVASCRIPT код" onClick="jsPars()">
</DIV>
<P>
<TEXTAREA NAME="txt" ROWS=20 STYLE="width:95%" cols="20">
</TEXTAREA>
</td></tr></table>
</form> 




</body>
<?php
include $_SERVER['DOCUMENT_ROOT']."/template/foot.php";
?>