Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 320 | Revision 371 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
{extends file="index.tpl"}
2
{block name="maincontent"}
3
    <script type="text/javascript">
4
        $(function () {
370 lars 5
            $('#dataTableBackendUsers').dataTable({
6
                "lengthMenu": [[100, -1], [100, "Alle"]],
7
                "language": {
8
                    "url": "/js/DataTables-1.10.19/German.json"
9
                }
10
            });
2 lars 11
            $('button,input:submit,input:button,input:reset,#getnewPWD,#shownewPWD ').button();
12
            $('.locked').uibutton({
13
                "icons": {
14
                    "primary": "ui-icon-locked"
15
                }
16
            }).click(deactivate2fa);
17
            $('.unlocked').uibutton({
18
                "icons": {
19
                    "primary": "ui-icon-unlocked"
20
                }
21
            });
22
 
23
            $('#en2fa').click(activate2fa)
24
        })
25
 
26
        function deactivate2fa() {
27
            let uId = $(this).attr("data-id");
28
            $.get("/toolbox/ga.php?mode=disable&id=" + uId, function () {
29
                document.location.reload();
30
            });
31
        }
32
 
33
        function activate2fa() {
34
            let uId = $(this).attr("data-id");
35
            document.location.href = "/toolbox/ga.php";
36
        }
37
 
38
        function randomPassword() {
39
            //$('#pwd').load("/generate_pwd.php");
40
            $.get("/generate_pwd.php", function (pwd) {
41
                $('#pwd').val(pwd);
42
                $('#pwdcheck').val($('#pwd').val());
43
            })
44
        }
45
 
46
        function deleteusersession() {
47
            $.get("../admin_user.php?action=delete_user_session&ID={$smarty.get.ID}", function (deletesessionuser) {
48
                alert(deletesessionuser);
49
            })
50
        }
51
 
52
        function showpass() {
53
            var x = document.getElementById("pwd");
54
            if (x.type === "password") {
55
                x.type = "text";
56
            } else {
57
                x.type = "password";
58
            }
59
        }
60
 
61
        function MM_swapImgRestore() { //v3.0
62
            var i, x, a = document.MM_sr;
63
            for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
64
        }
65
 
66
        function MM_preloadImages() { //v3.0
67
            var d = document;
68
            if (d.images) {
69
                if (!d.MM_p) d.MM_p = new Array();
70
                var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
71
                for (i = 0; i < a.length; i++) {
72
                    if (a[i].indexOf("#") != 0) {
73
                        d.MM_p[j] = new Image;
74
                        d.MM_p[j++].src = a[i];
75
                    }
76
                }
77
            }
78
        }
79
 
80
        function MM_swapImage() { //v3.0
81
            var i, j = 0, x, a = MM_swapImage.arguments;
82
            document.MM_sr = new Array;
83
            for (i = 0; i < (a.length - 2); i += 3) {
84
                if ((x = MM_findObj(a[i])) != null) {
85
                    document.MM_sr[j++] = x;
86
                    if (!x.oSrc) {
87
                        x.oSrc = x.src;
88
                    }
89
                    x.src = a[i + 2];
90
                }
91
            }
92
        }
93
 
94
        function MM_findObj(n, d) { //v4.01
95
            var p, i, x;
96
            if (!d) {
97
                d = document;
98
            }
99
            if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
100
                d = parent.frames[n.substring(p + 1)].document;
101
                n = n.substring(0, p);
102
            }
103
            if (!(x = d[n]) && d.all) {
104
                x = d.all[n];
105
            }
106
            for (i = 0; !x && i < d.forms.length; i++) {
107
                x = d.forms[i][n];
108
            }
109
            for (i = 0; !x && d.layers && i < d.layers.length; i++) {
110
                x = MM_findObj(n, d.layers[i].document);
111
            }
112
            if (!x && d.getElementById) {
113
                x = d.getElementById(n);
114
            }
115
            return x;
116
        }
117
    </script>
118
    <style type="text/css">
119
        #pwd {
120
            margin: auto;
121
        }
122
 
123
        i#hovereffekt {
124
            position: relative;
125
            z-index: 1;
126
        }
127
 
128
        i#hovereffekt:hover {
129
            z-index: 2;
130
        }
131
 
132
        i#hovereffekt p {
133
            display: none;
134
        }
135
 
136
        i#hovereffekt:hover p {
137
            display: block;
138
            position: absolute;
139
            top: 3em;
140
            left: 3em;
141
            width: 300px;
142
            border-style: solid;
143
            border-width: 1px;
144
            padding: 5px;
145
            font-size: 15px;
146
        }
147
 
148
        a:link {
149
            color: #000 !important;
150
        }
151
 
152
        span {
153
            text-decoration: none !important;
154
            color: unset;
155
        }
156
 
157
        .error {
158
            font-size: 50px;
159
            color: red;
160
            text-align: center;
161
        }
162
 
163
        .zuweisungTable {
164
            width: 100%;
165
            text-align: center;
166
            border-collapse: collapse;
167
            margin-bottom: 20px;
168
        }
169
 
170
        .zuweisungTable tr td:first-child {
171
            border-right: 1px solid #ccc;
172
        }
173
 
174
        .zuweisungTable tr:first-child td {
175
            border-bottom: 1px solid #ccc;
176
        }
177
 
178
        .zuweisungTable tr td label {
179
            clear: both;
180
            float: left;
181
 
182
        }
183
    </style>
370 lars 184
    <table class="keinRand" width="100%" cellspacing="0" cellpadding="3" id="dataTableBackendUsers">
2 lars 185
        <tr>
186
            <td class="headline" colspan="3">
187
                Benutzer: Bearbeiten
188
            </td>
189
        </tr>
190
        <tr>
191
            <td class="headline">
192
                Login
193
            </td>
194
            <td class="headline">
195
                2FA
196
            </td>
197
            <td class="headline">
198
                Letztes Login
199
            </td>
200
        </tr>
201
        {foreach $users as $user}
202
            {cycle values=' ,gerade' assign='class'}
203
            <tr class="rechts {$class}">
204
                <td>
320 lars 205
                    <a href="/backend_users/{$user.id}/edit">
2 lars 206
                        {$user.email}
207
                    </a>
208
                </td>
209
                <td>
210
                    {if $user["2fa"] == true}
211
                        <div class="locked" title="Zwei-Faktor-Authentifizierung aktiv"
212
                             data-id="{$users.id}"></div>
213
                    {else}
214
                        <div class="unlocked" title="Zwei-Faktor-Authentifizierung inaktiv"
215
                             {if $users.id==$smarty.session.admin.uid}data-id="{$user.id}"
216
                             id="en2fa"{/if}></div>
217
                    {/if}
218
                </td>
219
                <td>
220
                    {if !is_null($user.last_login)}
221
                        {$user.last_login|date_format:"%d.%m.%Y %H:%M"} |
222
                        <a href="#" id="ip_{$smarty.section.u_ind.index}_{$user.ip}"
320 lars 223
                           class="ipAddress">{$user.ip}</a>
2 lars 224
                    {/if}
225
                </td>
226
 
227
            </tr>
228
        {/foreach}
229
    </table>
230
{/block}