onlinecode.aspx
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:4k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@ Page language="c#" AutoEventWireup="true" %>
  2. <%@ Import Namespace="DotNetTextBox" %>
  3. <html>
  4. <head>
  5. <meta http-equiv="pragma" content="no-cache" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <base target="_self" />
  8. <style type="text/css">
  9. body,a,table,input,select{font-size:12px;font-family:宋体,Verdana,Arial}
  10. </style>
  11. <script runat="server" language="C#">
  12. private void Page_Load(object sender, System.EventArgs e)
  13. {
  14.     if (Request.Cookies["languages"] != null)
  15.     {
  16.         ResourceManager.SiteLanguageKey = Request.Cookies["languages"].Value;
  17.     }
  18.     else
  19.     {
  20.         ResourceManager.SiteLanguageKey = HttpContext.Current.Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"].ToLower().Split(',')[0];
  21.     }
  22. }
  23. </script>
  24. <script type="text/javascript">
  25. var userAgent = navigator.userAgent.toLowerCase();
  26. var is_ie = (userAgent.indexOf('msie') != -1);
  27. var type;
  28. Request = {
  29.  QueryString : function(item){
  30.   var svalue = location.search.match(new RegExp("[?&]" + item + "=([^&]*)(&?)","i"));
  31.   return svalue ? svalue[1] : svalue;
  32.  }
  33. }
  34. if (window.dialogArguments)
  35. {
  36. type = dialogArguments;
  37. }
  38. else
  39. {
  40. type=Request.QueryString("type");
  41. }
  42. function insertOnlineCode()
  43. {
  44.     var arr=new Array;
  45.     if(document.getElementById("number").value!="")
  46.     {
  47.     if(is_ie)
  48.     {
  49.     if(type=="qq")
  50.     {
  51.     arr[0]=document.getElementById("number").value;
  52.     arr[1]=document.getElementById("qqstyle").value;
  53.   window.returnValue=arr;
  54.   }
  55.   else
  56.   {
  57.     window.returnValue=document.getElementById("number").value;
  58.   }}
  59.   else
  60.   {
  61.   if(type=="qq")
  62.     {
  63.     arr[0]=document.getElementById("number").value;
  64.     arr[1]=document.getElementById("qqstyle").value;
  65.   window.opener.inserObject(null,'qq',arr);
  66.   }
  67.   else
  68.   {
  69.   window.opener.inserObject(null,type,document.getElementById("number").value);
  70.   }
  71.   }
  72.   window.close();
  73.    }
  74. }
  75. </script>
  76. </head>
  77. <body leftmargin="5" topmargin="0">
  78. <form runat=server>
  79. <br />
  80. <fieldset>
  81. <span id="prompt"></span><br/><input id="number" style="width: 170px" type="text" />&nbsp;<br />
  82.     <label id="showstyle" style="visibility:hidden"><%=ResourceManager.GetString("qqstyle")%><select id="qqstyle">
  83.                                     <option selected="selected"  value="1">1</option>
  84.                                     <option value="2">2</option>
  85.                                     <option value="3">3</option>
  86.                                     <option value="4">4</option>
  87.                                     <option value="5">5</option>
  88.                                     <option value="6">6</option>
  89.                                     <option value="7">7</option>
  90.                                     <option value="8">8</option>
  91.                                     <option value="9">9</option>
  92.                                     <option value="10">10</option>
  93.                                     <option value="11">11</option>
  94.                                     <option value="12">12</option>
  95.                                     <option value="13">13</option>
  96.                                 </select></label>
  97.     <input onclick="insertOnlineCode()" type="button" value='<%=ResourceManager.GetString("insert")%>'/>
  98.     <input onclick="window.close();" type="button" value='<%=ResourceManager.GetString("close")%>'/><br />
  99.     <span style="visibility:hidden" id="viewstyle"><a href="http://is.qq.com/webpresence/code.shtml" target=_blank><%=ResourceManager.GetString("viewstyle")%></a></span>
  100. </fieldset></form>
  101. </body>
  102. <script language=javascript>
  103. if(is_ie)
  104. {
  105.     document.body.bgColor="ButtonFace";
  106. }
  107. else
  108. {
  109.     document.body.bgColor="#E0E0E0";
  110. }
  111. if(type=="qq")
  112. {
  113.    document.getElementById("prompt").innerHTML='<%=ResourceManager.GetString("inputqq")%>';
  114.    document.getElementById("showstyle").style.visibility="visible";
  115.    document.getElementById("viewstyle").style.visibility="visible";
  116.    document.title='<%=ResourceManager.GetString("qq")%>';
  117. }
  118. else if(type=="msn")
  119. {
  120.    document.getElementById("prompt").innerHTML='<%=ResourceManager.GetString("inputmsn")%>';
  121.    document.title='<%=ResourceManager.GetString("msn")%>';
  122. }
  123. else
  124. {
  125.    document.getElementById("prompt").innerHTML='<%=ResourceManager.GetString("inputicq")%>';
  126.    document.title='<%=ResourceManager.GetString("icq")%>';
  127. }
  128. </script></html>