-
Notifications
You must be signed in to change notification settings - Fork 4
/
profile.rsp
102 lines (98 loc) · 2.27 KB
/
profile.rsp
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
<%
changed?: saved?: no
params: request/content
user: get-user user-id: session/content/user-id
if all [
none? validate/full [
action word! -
pass - *
pass2 - *
]
params/action = 'change
params/pass = params/pass2
][
update-user-pass params
changed?: yes
]
if params/action = 'save-defs [
update-user-defaults
saved?: yes
]
title: say "Your Profile"
include %head.rsp
%>
<br><br>
<div align="center">
<table class="tbl">
<tr>
<th>#[Login ID]</th>
<td><%=any [user/1 ""]%></td>
</tr><tr>
<th>#[Email]</th>
<td><%=any [user/2 ""]%></td>
</tr>
<tr>
<th>#[Role]</th>
<td><%=any [user/4 ""]%></td>
</tr>
<tr>
<th>#[Creation Date]</th>
<td><%=any [user/5 ""]%></td>
</tr>
</table>
<form method="POST" action="profile.rsp">
<table style="margin-top:20px;">
<tr>
<th>#[New Password]</th>
<td><input type="password" name="pass" value=""></td>
</tr><tr>
<th>#[Confirmation]</th>
<td><input type="password" name="pass2" value=""></td>
</tr><tr>
<td colspan="2" align="right">
<%if changed? [%><font color="red">#[Password changed!]</font><%]%>
<input type="submit" value="#[Change]">
<input type="hidden" name="action" value="change">
</td>
</tr>
</table>
</form>
<form method="POST" action="profile.rsp">
<table style="margin-top:40px;">
<tr>
<td colspan="2" align="right">
<%either saved? [%><font color="red">#[Default project and filters saved!]</font><%][%>
<input type="submit" value="#[Set current project and filters as default]">
<input type="hidden" name="action" value="save-defs">
<%]%>
</td>
</tr>
</table>
</form>
</div>
<br>
<%if not empty? projects: enum-projects/priv [%>
<div align="center">
<h4>#[Private Projects Rights]</h4>
<form method="POST" action="profile.rsp">
<table class="tbl" width="300">
<tr>
<th>#[Private Project Name]</th>
<th>#[Your Role]</th>
</tr>
<% either empty? list: get-rights user-id [%>
<tr><td colspan="2" align="center">#[no rights granted]</td></tr>
<%][
foreach right list [%>
<tr>
<td><%=any [right/3 ""]%></td>
<td><%=say any [right/4 ""]%></td>
</tr>
<%]
]%>
</table>
<input type="hidden" name="id" value="<%=user-id%>">
</form>
</div>
<%]%>
<%include-file %footer.inc%>