Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1249 | Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1248 lars 1
{extends file="admin/index.tpl"}
2
{block name="maincontent"}
3
    <script type="text/javascript">
4
        $(function () {
5
            $('button,input:submit,input:button,input:reset,#getnewPWD,#shownewPWD ').button();
6
            $('.locked').button({
7
                "icons": {
8
                    "primary": "ui-icon-locked"
9
                }
10
            }).click(deactivate2fa);
11
            $('.unlocked').button({
12
                "icons": {
13
                    "primary": "ui-icon-unlocked"
14
                }
15
            });
16
 
17
            $('#en2fa').click(activate2fa)
18
        })
19
 
20
        function deactivate2fa() {
21
            let uId = $(this).attr("data-id");
22
            $.get("/toolbox/ga.php?mode=disable&id=" + uId, function () {
23
                document.location.reload();
24
            });
25
        }
26
 
27
        function activate2fa() {
28
            let uId = $(this).attr("data-id");
29
            document.location.href = "/toolbox/ga.php";
30
        }
31
 
32
        function randomPassword() {
33
            //$('#pwd').load("/generate_pwd.php");
34
            $.get("/generate_pwd.php", function (pwd) {
35
                $('#pwd').val(pwd);
36
                $('#pwdcheck').val($('#pwd').val());
37
            })
38
        }
39
 
40
        function deleteusersession() {
41
            $.get("../admin_user.php?action=delete_user_session&ID={$smarty.get.ID}", function (deletesessionuser) {
42
                alert(deletesessionuser);
43
            })
44
        }
45
 
46
        function showpass() {
47
            var x = document.getElementById("pwd");
48
            if (x.type === "password") {
49
                x.type = "text";
50
            } else {
51
                x.type = "password";
52
            }
53
        }
54
 
55
        function MM_swapImgRestore() { //v3.0
56
            var i, x, a = document.MM_sr;
57
            for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
58
        }
59
 
60
        function MM_preloadImages() { //v3.0
61
            var d = document;
62
            if (d.images) {
63
                if (!d.MM_p) d.MM_p = new Array();
64
                var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
65
                for (i = 0; i < a.length; i++) {
66
                    if (a[i].indexOf("#") != 0) {
67
                        d.MM_p[j] = new Image;
68
                        d.MM_p[j++].src = a[i];
69
                    }
70
                }
71
            }
72
        }
73
 
74
        function MM_swapImage() { //v3.0
75
            var i, j = 0, x, a = MM_swapImage.arguments;
76
            document.MM_sr = new Array;
77
            for (i = 0; i < (a.length - 2); i += 3) {
78
                if ((x = MM_findObj(a[i])) != null) {
79
                    document.MM_sr[j++] = x;
80
                    if (!x.oSrc) {
81
                        x.oSrc = x.src;
82
                    }
83
                    x.src = a[i + 2];
84
                }
85
            }
86
        }
87
 
88
        function MM_findObj(n, d) { //v4.01
89
            var p, i, x;
90
            if (!d) {
91
                d = document;
92
            }
93
            if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
94
                d = parent.frames[n.substring(p + 1)].document;
95
                n = n.substring(0, p);
96
            }
97
            if (!(x = d[n]) && d.all) {
98
                x = d.all[n];
99
            }
100
            for (i = 0; !x && i < d.forms.length; i++) {
101
                x = d.forms[i][n];
102
            }
103
            for (i = 0; !x && d.layers && i < d.layers.length; i++) {
104
                x = MM_findObj(n, d.layers[i].document);
105
            }
106
            if (!x && d.getElementById) {
107
                x = d.getElementById(n);
108
            }
109
            return x;
110
        }
111
    </script>
112
{/block}