📄 openie.gml
字号:
#ifndef OPENIE
#define OPENIE
<script>
function FBoxCreate(id,width,height,OnInit)
{
var str="<script>"+
"function _GXonCmd_"+id+"(type,cmd)\n{\n"+
" switch(type){\n"+
" case 'appinit':"+id+".OnGameInit();break;\n"+
" case 'runfun':eval(cmd);break;\n"+
" case 'script':execScript(cmd,'javascript');break;\n"+
" }\n"+
"}\n"+
"</"+"script>\n"+
"<SCRIPT LANGUAGE=javascript FOR="+id+" EVENT=OnCmd(type,cmd)>_GXonCmd_"+id+"(type,cmd)</"+"SCRIPT>\n"+
"<OBJECT ID="+id+" CODEBASE='../../system/activex/gamex.cab' CLASSID='CLSID:2D4851FD-0BFE-11D4-9260-9AF666D52059' width="+width+" height="+height+" VIEWASTEXT></OBJECT>\n"+
"<script>\n"+
" document.all['"+id+"'].OnGameInit="+(OnInit?OnInit:FBoxInit)+";\n"+
"</"+"script>"+
""
return str;
}
function FBoxInit()
{
if (!document.gmllocation) return;
this.Cmd("<:desktop bwnd=1><sys setid="+this.id+";urlpath="+document.gmlurlpath+";import=desktop,"+document.gmllocation+">");
}
function FBoxOnUnload()
{
if (opener && opener.document.closeGmlWnd){
var wnd=opener
opener=null
wnd.document.closeGmlWnd(document.wndid,window);
};
opener=null;
}
</script>
<script>
if (!document.GMLWndArray)
{
var GMLWndArray=new Array()
var GMLWndIds=new Array()
document.GMLWndArray=GMLWndArray;
if(!document.gmllocation) window.onunload=window_onunload
}
function openGmlWnd(id,gml,title,w,h)
{
var urlpath=$GX.Getinfo("objparam:desktop,urlpath")
var wndid=id;
var str="<html><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><head><title>明翔网络资讯:"+title+"</title>\n<body bgcolor=0 scroll=no topmargin=0 leftmargin=0\" onload='if (opener==null) close()';>\n"
str+="<script>\n"
str+="document.wndid=\""+wndid+"\"\n";
str+="document.gmlurlpath=\""+urlpath+"\"\n";
str+="document.gmllocation='"+gml+"'\n";
str+=FBoxOnUnload+"\n";
str+="window.onunload=FBoxOnUnload\n;";
str+=FBoxInit+"\n";
str+="<"+"/script>\n"
if (gml.indexOf(".gml")>0)
{
str+=FBoxCreate("FBOX","100%","100%","FBoxInit")+"\n";
}
else
{
if (gml.indexOf("www.")==0 && gml.indexOf("http:")<0) gml="http:/"+"/"+gml;
str+="<iframe width=100% height=100% scroll=auto src="+gml+" marginwidth=0 marginheight=0 frameborder=0></iframe>";
}
str+="</body></html>"
var x=(screen.width-w)/2;
var y=(screen.height-h)/2;
var wnd=window.open("about:blank",title,"toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,status=0,left="+x+",top="+y+",width="+w+",height="+h+"")
if (!wnd) return;
wnd.document.open()
wnd.document.write(str);
wnd.document.close()
GMLWndArray[wndid]=new Function();
GMLWndArray[wndid].wnd=wnd;
GMLWndArray[wndid].mid=id;
for(var i=0;i<GMLWndIds.length;i++) {if (!GMLWndIds[i]) {GMLWndIds[i]=wndid;return;}}
GMLWndIds[GMLWndIds.length]=wndid
//wnd.moveTo(x,y)
}
function closeIeWnd()
{
if (PLAYWND!=null && !PLAYWND.closed)
{
PLAYWND.close();
PLAYWND=null;
}
}
function closeGmlWnd(gml,wnd)
{
var o=GMLWndArray[gml]
if (o==null) return;
if (wnd==null)
{
if (o.wnd && o.wnd.opener) o.wnd.close()
return
}
GMLWndArray[gml]=null;
$GX.Cmd("<:"+o.mid+" eve=closewnd>");
for(var i=0;i<GMLWndIds.length;i++)
{
if (GMLWndIds[i]==gml)
{
GMLWndIds[i]=null
}
}
}
document.closeGmlWnd=closeGmlWnd
function window_onunload()
{
var gml
for(var i=0;i<GMLWndIds.length;i++)
{
if ( !(gml=GMLWndIds[i])) continue;
var o=GMLWndArray[gml]
if (o==null) continue;
if (o.wnd==null) continue;
o.wnd.opener=null;
if (!o.wnd.closed) o.wnd.close();
GMLWndArray[gml]=null
GMLWndIds[i]=null
}
}
//
//openGmlWnd("1234","vi-sky.com/forums/forum.asp?FORUM_ID=40&CAT_ID=6&Forum_Title=%A1%BAKELE8%D3%E9%C0%D6%CC%EC%B5%D8%A1%BB","tmp",640,480)
//openGmlWnd("12342","login.gml","tmp2",640,480)
//closeGmlWnd("12342")
</script>
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -