Авторизация сайта на iframe C#
#38993826
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
Ссылка на профиль пользователя:
|
Участник
Откуда: London
Сообщения: 6 513
|
|
Kreol2009,
А так лучше?
ссылка
Page source code:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>
Komatsu Extranet
</title>
<style type="text/css">
BODY { BACKGROUND-COLOR: #ffffff }
#logo { BACKGROUND-POSITION: center 50%; LEFT: 33px; BACKGROUND-IMAGE: url(images/login_logo.gif); WIDTH: 189px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 16px; HEIGHT: 34px }
#corner { BACKGROUND-POSITION: center 50%; LEFT: 240px; BACKGROUND-IMAGE: url(images/login_corner.gif); WIDTH: 20px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 34px; HEIGHT: 38px }
#lock { BACKGROUND-POSITION: center 50%; LEFT: 124px; BACKGROUND-IMAGE: url(images/login_lock.gif); WIDTH: 67px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 173px; HEIGHT: 128px }
#warning { BACKGROUND-POSITION: center 50%; TEXT-JUSTIFY: kashida; FONT-SIZE: 12px; LEFT: 77px; WIDTH: 175px; COLOR: #fff6d7; BACKGROUND-REPEAT: no-repeat; FONT-FAMILY: verdana,arial,helvetica,sans-serif; POSITION: absolute; TOP: 319px; BACKGROUND-COLOR: #666699; TEXT-ALIGN: justify; solid: }
.spacer { BACKGROUND-COLOR: white }
.bodyLink { FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: verdana,arial,helvetica,sans-serif; TEXT-DECORATION: underline }
.loginContent { FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #000066; FONT-FAMILY: verdana,arial,helvetica,sans-serif }
.loginContentB { FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000066; FONT-FAMILY: verdana,arial,helvetica,sans-serif }
.loginLink { FONT-SIZE: 12px; COLOR: #343480; FONT-FAMILY: verdana,arial,helvetica,sans-serif; TEXT-DECORATION: none }
.submit { FONT-SIZE: 11px; FONT-FAMILY: Verdana,Arial,sans-serif }
.errMsg { FONT-SIZE: 11px; FONT-FAMILY: Verdana,Arial,sans-serif; COLOR:RED; }
A.loginLink:hover { TEXT-DECORATION: underline }
A.bodyLink:hover { TEXT-DECORATION: none }
</style>
<script type="text/javascript" language="javascript">
function validateUser()
{
var xmlHttpObj = getXMLHttpRequest();
var strUser = encodeURIComponent(document.getElementById("txtUserID").value);
var strPassword = encodeURIComponent(document.getElementById("Password").value);
xmlHttpObj.open("GET", "validateLogin.aspx?username=" + strUser + "&password=" + strPassword, false, "", "");
xmlHttpObj.send("");
var xmlDOM = xmlHttpObj.responseXML;
var strStatus = xmlDOM.selectSingleNode("//Status/text()").nodeValue;
if (strStatus == "OK")
{
var strUser = xmlDOM.selectSingleNode("//UserName/text()").nodeValue;
document.getElementById("UserName").value = strUser;
return true;
}
else
{
var strError = xmlDOM.selectSingleNode("//Error/text()").nodeValue;
document.getElementById("ErrorMessage").innerHTML = strError;
return false;
}
}
function getXMLHttpRequest()
{
if (window.XMLHttpRequest) {
browserIE = false;
return new XMLHttpRequest();
}
else if (window.ActiveXObject) {
return new ActiveXObject('Microsoft.XMLHTTP');
}
else {
alert("Could not create XMLHttpRequest on this browser. Please upgrade your browser version.");
return null;
}
}
//Code for FireFox / Opera for selectSingleNode and selectNodes
if( document.implementation.hasFeature("XPath", "3.0") ){
if( typeof XMLDocument == "undefined" ){ XMLDocument = Document; }
XMLDocument.prototype.selectNodes = function(cXPathString, xNode){
if( !xNode ) { xNode = this; }
var oNSResolver = this.createNSResolver(this.documentElement)
var aItems = this.evaluate(cXPathString, xNode, oNSResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
var aResult = [];
for( var i = 0; i < aItems.snapshotLength; i++){aResult[i] = aItems.snapshotItem(i); }
return aResult;
}
XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode){
if( !xNode ) { xNode = this; }
var xItems = this.selectNodes(cXPathString, xNode);
if( xItems.length > 0 ){return xItems[0]; }
else{return null; }
}
Element.prototype.selectNodes = function(cXPathString){
if(this.ownerDocument.selectNodes){ return this.ownerDocument.selectNodes(cXPathString, this);}
else{throw "For XML Elements Only";}
}
Element.prototype.selectSingleNode = function(cXPathString){
if(this.ownerDocument.selectSingleNode){return this.ownerDocument.selectSingleNode(cXPathString, this); }
else{throw "For XML Elements Only";}
}
}
function setFocus(){
document.getElementById("txtUserID").focus();
}
</script>
</head>
<body rightmargin="0" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"
onload="setFocus()">
<form name="LogonForm" action="/logon" method="POST" onsubmit="return(validateUser())">
<div><img src="images/spacer.gif" height="50px" /></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tr>
<td align="center" valign="center" >
<table border="2" cellpadding="0" cellspacing="0" >
<tr>
<td >
<table width="400" cellspacing="0" cellpadding="0" bgcolor="#fff6d8">
<tr>
<td ><img src="images/spacer.gif" width="27" /></td>
<td bgcolor="#fff6d8" align="left" colspan="2" class="loginContentB">
Login:
</td>
</tr>
<tr>
<td width="55" height="128" valign="bottom" bgcolor="#fff6d8" rowspan="4" colspan="1" align="left"
style="background-image: url(images/login_arrow.gif); background-repeat: no-repeat">
</td>
<td width="335" height="32" valign="center" bgcolor="#fff6d8" colspan="2" class="loginContentB">
<div id="ErrorMessage" class="errMsg"></div>
</td>
</tr>
<tr>
<td width="80" height="32" valign="center" bgcolor="#fff6d8" class="loginContent">
Username:</td>
<td width="255" height="32" valign="center" bgcolor="#fff6d8" class="loginContent">
<input type="text" name="txtUserID" maxlength="40" id="txtUserID" value="" style="width: 200px">
<input type="hidden" id="UserName" name="UserName" />
</td>
</tr>
<tr>
<td width="80" valign="center" bgcolor="#fff6d8" class="loginContent">
Password:</td>
<td width="255" valign="center" bgcolor="#fff6d8" class="loginContent">
<input type="password" name="Password" id="Password" maxlength="40" style="width: 200px"></td>
</tr>
<tr>
<td width="335" valign="center" align="center" bgcolor="#fff6d8" colspan="2" class="loginContent" style="height: 32px">
<input type="submit" id="btnSubmit" class="submit" value="Submit">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="center"><a href="resources/registration/eparts/user_reg_1.aspx"><img border="0" src="images/registernow.jpg"></a></p>
</form>
</body>
</html>
|
|