This repository was archived by the owner on Nov 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.asp
More file actions
139 lines (127 loc) · 4.61 KB
/
Copy pathsettings.asp
File metadata and controls
139 lines (127 loc) · 4.61 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<%@ Language=VBScript %>
<!--#include file=scripts/inc_common.asp-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DBA:<%=langSettings%></title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<link href="default.css" rel="stylesheet" type="text/css">
<script type="text/javascript" language="javascript" src="scripts/common.js" defer></script>
</head>
<body>
<% call DBA_WriteNavigation%>
<%
DBA_BeginNewTable langSettings, "", "90%", ""
if Len(DBA_cfgProfilePath) > 0 then
if Request.Form("action") = "update" then
'only administrator allowed to change Session settings
if DBA_cfgAdminUsername = Session(DBA_cfgSessionUserName) then
Session(Request.Form("s_user").Item) = Session(DBA_cfgSessionUserName)
Session(Request.Form("s_upwd").Item) = Session(DBA_cfgSessionPwdName)
Session(Request.Form("s_dbpath").Item) = Session(DBA_cfgSessionDBPathName)
Session(Request.Form("s_dbpwd").Item) = Session(DBA_cfgSessionDBPassword)
DBA_cfgSessionUserName = Request.Form("s_user").Item
DBA_cfgSessionPwdName = Request.Form("s_upwd").Item
DBA_cfgSessionDBPathName = Request.Form("s_dbpath").Item
DBA_cfgSessionDBPassword = Request.Form("s_dbpwd").Item
DBA_cfgSessionTimeout = VBParseInt(Request.Form("s_timeout").Item)
if DBA_cfgSessionTimeout <> 0 Then Session.Timeout = DBA_cfgSessionTimeout
end if
DBA_cfgSaveDBPaths = CBool(Request.Form("save_paths").Item)
call DBA_SaveProfile
call StpProfile.SetValue("settings", "page_size", Request.Form("page_size").Item)
call StpProfile.SetValue("settings", "language-file", Request.Form("lang").Item)
call StpProfile.SetValue("settings", "sys_tables", Request.Form("sys_tables").Item)
call StpProfile.Save
call DBA_WriteSuccess(langSaveSuccess)
end if
call DBA_LoadProfile
%>
<form method="post" action="settings.asp">
<input type="hidden" name="action" value="update">
<table align="center" border="0">
<% if Session(DBA_cfgSessionUserName) = DBA_cfgAdminUsername then%>
<!--SESSION VARIABLES-->
<tr>
<th colspan="2"><%=langSessionVariables%></th>
</tr>
<tr>
<td><%=langSessionTimeout%></td>
<td>
<select name="s_timeout">
<option value="0"><%=langDefault%></option>
<%=DBA_GetComboOptions(1, 9, 1, DBA_cfgSessionTimeout)%>
<%=DBA_GetComboOptions(10, 29, 5, DBA_cfgSessionTimeout)%>
<%=DBA_GetComboOptions(30, 720, 30, DBA_cfgSessionTimeout)%>
<option value="1440" <%if DBA_cfgSessionTimeout = 1440 Then Response.Write " selected "%>><%=langMaxTimeout%></option>
</select>
</td>
</tr>
<tr>
<td><%=langUsername%></td>
<td><input type="text" name="s_user" value="<%=DBA_cfgSessionUserName%>"></td>
</tr>
<tr>
<td><%=langUserPassword%></td>
<td><input type="text" name="s_upwd" value="<%=DBA_cfgSessionPwdName%>"></td>
</tr>
<tr>
<td><%=langDBPath%></td>
<td><input type="text" name="s_dbpath" value="<%=DBA_cfgSessionDBPathName%>"></td>
</tr>
<tr>
<td><%=langDBPassword%></td>
<td><input type="text" name="s_dbpwd" value="<%=DBA_cfgSessionDBPassword%>"</td>
</tr>
<% end if%>
<!--USER SETTINGS-->
<tr>
<th colspan="2"><%=langOtherSettings%></th>
</tr>
<tr>
<td><%=langSaveDBPaths%></td>
<td><select name="save_paths">
<option value="-1"><%=langYes%></option>
<option value="0" <%if not DBA_cfgSaveDBPaths then Response.Write " selected "%>><%=langNo%></option>
</select></td>
</tr>
<tr>
<td><%=langRecordsPerPage%></td>
<td><select name="page_size">
<%=DBA_GetComboOptions(5, 50, 5, StpProfile.GetProfileNumber("settings", "page_size", 5))%>
</select></td>
</tr>
<tr>
<td><%=langShowSysTables%></td>
<td>
<select name="sys_tables" id="Select1">
<option value="0"><%=langNo%></option>
<option value="-1" <%if StpProfile.GetProfileNumber("settings", "sys_tables", 0) = -1 Then Response.Write " selected "%>><%=langYes%></option>
</select>
</td>
</tr>
<tr>
<td><%=langLanguage%></td>
<td>
<select name="lang">
<option value="">Default</option>
<%=GetAvailableLanguages()%>
</select>
</td>
</tr>
<tr><td align="center" colspan="2">
<input type="submit" name="submit" value="<%=langSubmit%>" class="button">
<input type="reset" value="<%=langReset%>" class="button">
</td></tr>
</table>
</form>
<%
else
Response.Write "<p align=center>" & langSettingsNotAvailable & "</p>"
end if
call DBA_EndNewTable
%>
<!--#include file=scripts/inc_footer.inc-->
</body>
</html>