Создание веб-приложения, сочетающего в себе проектирование и создание баз данных, работу со сторонними форматами данных, программирование в NET и веб-разработку, страница 57

$("input[id='LoginView_userinfo_ContentPlaceHolder1_Login1_UserName']").focusout(function () {

            if ($(this).val() == "") $(this).val("username");

        });

$("input[id='LoginView_userinfo_ContentPlaceHolder1_Login1_Password']").val("password");

$("input[id='LoginView_userinfo_ContentPlaceHolder1_Login1_Password']").focus(function () {

            if ($(this).val() == "password") $(this).val("");

        });

$("input[id='LoginView_userinfo_ContentPlaceHolder1_Login1_Password']").focusout(function () {

            if ($(this).val() == "") $(this).val("password");

        });

    });

//=====================================================

    //вставка копирайта

//=====================================================

    //    function copyright() {

    //        var year = new Date();

    //        $('#copyright').prepend("POWERPLAY © " + year.getYear());

    //    };

//=====================================================

    //нажатие кнопки меню, формирование новой страницы

//=====================================================    function slidepage(event, url) {

        event.preventDefault();

        $('#page')

            .animate({

                'left': '3000px'

            }, { duration: 'slow', complete: function () {

                window.location = url;

            }

            });

        $('#pagepr')

            .animate({

                'left': '3000px'

            }, { duration: 'slow', complete: function () {

                window.location = url;

            }

            });

    };

    $("#keepbackmenu li a").click(function (event) {

        var url = $(this).attr('href');

        slidepage(event, url);

    });

    $("#menu li a").click(function (event) {

        var url = $(this).attr('href');

        slidepage(event, url);

    });

    $("#showhidebutton").click(function (event) {

        event.preventDefault();

        if ($('#keepbacknav').css('display') != 'none') {

            $('#showhidebutton').css('background-image', "url(/img/showbutton.png)");

            $('#keepbacknav').slideUp();

        }

        if ($('#keepbacknav').css('display') == 'none') {

            $('#showhidebutton').css('background-image', 'url(/img/hidebutton.png)');

            $('#keepbacknav').slideDown();

        }

    });

});


Приложение Е.

Е.1 Файл PowerPlayProvider.cs

namespace powerplay

{

    public class PowerPlayProvider: MembershipProvider

    {

        private int newPasswordLength;

        private string connectionString;

        private string applicationName;

        private bool enablePasswordReset;

        private bool enablePasswordRetrieval;

        private bool requiresQuestionAndAnswer;

        private bool requiresUniqueEmail;

        private int maxInvalidPasswordAttempts;

        private int passwordAttemptWindow;

        private int minRequiredNonAlphanumericCharacters;

        private int minRequiredPasswordLength;

        private string passwordStrengthRegularExpression;

        private MembershipPasswordFormat passwordFormat;

        private string providerName;

        public override void Initialize(string name, NameValueCollection config)

        {

            string database = "powerplay";

            string password_db = "admin";

            string user_db = "root";

            string server_db = "localhost";

            connectionString = ("server=" + server_db + "; user id=" + user_db + "; password=" + password_db + "; database=" + database + "");

            providerName = "PowerPlayProvider";

            applicationName = "powerplay";

            maxInvalidPasswordAttempts = 5;

            passwordAttemptWindow = 10;