Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.167 1999/07/10 21:40:01 peter Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.168 1999/07/19 22:05:03 neotron Exp $";   constant thread_safe=1;      #include <config.h>   #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0
Roxen.git/server/modules/graphics/graphic_text.pike:714:    return image_cache->http_file_answer( id_text[0][1..] +"$"+ second_key, rid );    }    }    return image_cache->http_file_answer( f, rid );   }      string magic_javascript_header(object id)   {    if(!id->supports->netscape_javascript || !id->supports->images) return "";    return -  ("\n<script>\n" +  ("<script>\n"    "function i(ri,hi,txt)\n"    "{\n"    " document.images[ri].src = hi.src;\n"    " setTimeout(\"top.window.status = '\"+txt+\"'\", 100);\n"    "}\n" -  "</script>\n"); +  "</script>");      }         string magic_image(string url, int xs, int ys, string sn,    string image_1, string image_2, string alt,    string mess,object id,string input,string extra_args,string lp)   {    if(!id->supports->images) return (lp?lp:"")+alt+(lp?"</a>":"");    if(!id->supports->netscape_javascript)    return (!input)?    ("<a "+extra_args+"href=\""+url+"\"><img src=\""+image_1+"\" name="+sn+" border=0 "+    "alt=\""+alt+"\"></a>"):    ("<input type=image "+extra_args+" src=\""+image_1+"\" name="+input+">");       return    ("<script>\n"    " "+sn+"l = new Image("+xs+", "+ys+");"+sn+"l.src = \""+image_1+"\";\n"    " "+sn+"h = new Image("+xs+", "+ys+");"+sn+"h.src = \""+image_2+"\";\n" -  "</script>\n"+ +  "</script>"+    ("<a "+extra_args+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"")    +"onMouseover=\"i('"+sn+"',"+sn+"h,'"+(mess||url)+"'); return true;\"\n"    "onMouseout=\"top.window.status='';document.images['"+sn+"'].src = "+sn+"l.src;\"><img "    "width="+xs+" height="+ys+" src=\""+image_1+"\" name="+sn+    " border=0 alt=\""+alt+"\" ></a>"));   }         string extra_args(mapping in)
Roxen.git/server/modules/graphics/graphic_text.pike:1030:    res = magic_javascript_header(id);    defines->magic_java="yes";    if(!size) size = ([ ]);    return replace(res +    magic_image(url||"", size->xsize, size->ysize, "i"+(defines->mi++),    query_internal_location()+num+gif,    query_internal_location()+num2+gif,    (arg->alt?arg->alt:replace(gt, "\"","'")),    (magic=="magic"?0:magic),    id,input?na||"submit":0,ea,lp), -  "</script>\n<script>",""); +  "</script><script>","");    }    if(input)    return (pre+"<input type=image name=\""+na+"\" border=0 alt=\""+    (arg->alt?arg->alt:replace(gt,"\"","'"))+    "\" src="+query_internal_location()+num+gif    +" align="+(al || defalign)+ea+    (size?(" width="+size->xsize+" height="+size->ysize):"")+">"+    rest+post);       return (pre+(lp?lp:"")