3
<script language="javascript" src="SVG_httpAjax.js"></script>
4
<script language="javascript">
5
function returnedSVG(htmltext)
8
var conto=document.getElementById('content');
9
conto.innerHTML=htmltext;
11
str='var acanvas=document.getElementById("previewCanvas");acanvas.width=700;var c=acanvas.getContext("2d");'+htmltext;
19
<td style="border:outset 3px #ffeedd; background-color: #fff8f8;font-family:Calibri,Georgia,Serif;" valign="top">
22
function endsWith($haystack,$needle,$case=true) {
23
if($case){return (strcmp(substr($haystack, strlen($haystack) - strlen($needle)),$needle)===0);}
24
return (strcasecmp(substr($haystack, strlen($haystack) - strlen($needle)),$needle)===0);
28
while (($file = readdir($dir)) !== false) {
29
if(endsWith($file,".svg")){
30
echo "<span onmouseover='this.style.backgroundColor=\"#000\";this.style.color=\"#fff\"' onmouseout='this.style.backgroundColor=\"#fff8f8\";this.style.color=\"#000\"' style='cursor:pointer;' onclick='getSVG(\"".$file."\");'>".$file."</span><br>";
36
<td id='preview' style="border:outset 3px #ffeedd; background-color: #fff8f8;font-family:Calibri,Georgia,Serif;" valign="top">
38
<canvas width="700" height="700" id="previewCanvas">
41
<td style="border:outset 3px #ffeedd; background-color: #fff8f8;" valign="top">
42
<pre id='content' style='font-family:Calibri,Georgia,Serif;'>
4
<script language="javascript" src="SVG_httpAjax.js">
10
<td style="border:outset 3px #ffeedd; background-color: #fff8f8;font-family:Calibri,Georgia,Serif;" valign="top">
12
function endsWith($haystack, $needle, $case=true) {
14
return( strcmp( substr( $haystack, strlen( $haystack ) - strlen( $needle )), $needle ) === 0 );
16
return( strcasecmp( substr( $haystack, strlen( $haystack) - strlen( $needle )), $needle ) === 0 );
18
$dir = opendir( '.' );
19
while(( $file = readdir( $dir )) !== false ) {
20
if( endsWith( $file, ".svg" )) {
21
echo "<span onmouseover='this.style.backgroundColor=\"#000\";this.style.color=\"#fff\"' onmouseout='this.style.backgroundColor=\"#fff8f8\";this.style.color=\"#000\"' style='cursor:pointer;' onclick='getSVG(\"".$file."\");'>".$file."</span><br>";
26
<td id='preview' style="border:outset 3px #ffeedd; background-color: #fff8f8;font-family:Calibri,Georgia,Serif;" valign="top">
28
<canvas width="700" height="700" id="previewCanvas">
31
<td style="border:outset 3px #ffeedd; background-color: #fff8f8;" valign="top">
32
<pre id='content' style='font-family:Calibri,Georgia,Serif;'>
b'\\ No newline at end of file'