- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
protected void WriteLoginBlock()
{
string s = "";
if (SiteSecurity.IsAuthenticated)
{
s = @"<div style=""margin-top: 3px;""><a href=""/login/"" style=""text-decoration: underline; color:#000; background:none;"">" + SiteSecurity.CurrentUser.Name + "</a></div>";
}
else
{
s = @"
<form action=""/login/"" method=""POST"" id=""gLoginForm"">
<div class=""rel_i"">
<input class=""txtinp"" type=""text"" value=""логин"" id=""gLogin"" name=""cllgn"" />
<input class=""txtinp"" type=""text"" name=""clpwd"" id=""gPwd"" value=""пароль"" onfocus=""if (this.value==this.defaultValue) {this.value='';this.type='password'}"" onblur=""if(this.value=='') {this.value=this.defaultValue;this.type='text'}"" />
<!--<label for=""clpwd"" class=""pwd_label"" id=""gPwdLabel"">пароль</label>-->
<a href=""/login/"" id=""blogin""> </a>
</div>
</form>
<script type=""text/javascript"">
function isChanged(obj) { return $(obj)[0]._changed; }
function isValue(obj, value) { return $.trim($(obj).val()).toLowerCase() == value.toLowerCase(); }
$(""#gLogin"")
.keydown ( function() { this._changed = true; } )
.focus( function() { if (!isChanged(this) && isValue(this, 'логин')) $(this).val(''); } )
.blur( function() { if(isValue(this, '')) { $(this).val('логин'); $(this)[0]._changed=false; } } );
$(""#blogin"").click(function(){
if(!isChanged(""#gLogin"") || isValue(""#gLogin"", '') || isValue(""#gPwd"",'')) return false;
$('#gLoginForm').submit();
return false; });
</script>";
}
Response.Write(s);
}
guest 15.10.2009 16:33 # 0
guest 15.10.2009 16:36 # 0
Ztranger 15.10.2009 17:27 # 0
guest 15.10.2009 18:10 # 0
Desktop 11.09.2023 13:53 # 0
striker 16.10.2009 09:41 # 0
guest6 11.09.2023 14:11 # 0
xeonix 16.10.2009 18:54 # 0
guest6 11.09.2023 14:10 # 0
Change my mind.