-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathforms.asp
198 lines (183 loc) · 5.44 KB
/
forms.asp
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<%@ language="JavaScript" %>
<!DOCTYPE html>
<!--
///////////////////////////////////////////////////////////////////////////////
// Product : Online Tools(tm)
//
// Series : Dovetail Software Development Series(tm)
//
// Name : forms.asp
//
// Description : Details about a Form
//
// Author : Dovetail Software, Inc.
// 4807 Spicewood Springs Rd, Bldg 4 Suite 200
// Austin, TX 78759
// (512) 610-5400
// EMAIL: [email protected]
// www.dovetailsoftware.com
//
// Platforms : This version supports Clarify 9.0 and later
//
// Copyright (C) 2001-2012 Dovetail Software, Inc.
// All Rights Reserved.
///////////////////////////////////////////////////////////////////////////////
-->
<html>
<head>
<meta http-equiv="expires" content="0">
<meta name="KeyWords" content="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="Shortcut Icon" href="favicon.ico">
<link href="css/<%=Request.Cookies("boltTheme")%>bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/tablesorter.css" rel="stylesheet">
<!--#include file="inc/config.inc"-->
<!--#include file="inc/adojavas.inc"-->
<%
var sPageTitle = "Forms";
var sPageType = "Forms";
var FSO = Server.CreateObject("Scripting.FileSystemObject");
var udl_file = FSO.GetFile(dbConnect.replace("File Name=","").replace(/\\/g,"\\\\"));
%>
<!--#include file="inc/ddonline.inc"-->
</head>
<body>
<!--#include file="inc/navbar.inc"-->
<div class="container-fluid">
<div class="row">
<div class="col-12">
<%Attribute = Request("attribute");
Operator = Request("operator");
Filter = Request("filter");
var which = Request.Form("which");
if (Attribute == "ID") Filter = Filter - 0;
Filter = SQLFixup(Filter);
//Get the list of forms
TheSQL = "select * from table_window_db where " + Attribute;
//Build the correct where clause depending on the data passed in
switch (Operator + ""){
case "starts":
TheSQL+= " like '" + Filter + "%'";
break;
case "ends":
TheSQL+= " like '" + "%" + Filter + "'";
break;
case "contains":
TheSQL+= " like " + "'%" + Filter + "%'";
break;
case "equals":
TheSQL+= " = '" + Filter + "'";
break;
default:
TheSQL+= " like '" + Filter + "%'";
}
if (which == "baseline"){
TheSQL+=" and base_flag = 'B' ";
}
if (which == "custom"){
TheSQL+=" and base_flag <> 'B' ";
}
//Build the Order By Clause
TheSQL+=" order by title";
rsForms = retrieveDataFromDBStatic(TheSQL);
//If we only have one, then redirect to the details page for that form
if (rsForms.RecordCount == 1) {
FormObjid = rsForms("objid");
FormId = rsForms("id");
TheLink = BuildFormURL(FormObjid, FormId)
Response.Redirect(TheLink);
}
//If we have none, say so & exit
if (rsForms.EOF) {
rw("<h3 align='center'>No matches</h3>");
rw("</body>");
rw("</html>");
Response.End
}
//If we're still here, then we're building a list of forms
//Page Header:
rw("<h3 align='center'>Forms</h3>");
//Table Header
rw("<table class='tablesorter'>");
rw("<thead><tr>");
rw("<th>");
rw("Title");
rw("</th>");
rw("<th>");
rw("Name");
rw("</th>");
rw("<th type=Number>");
rw("Form ID");
rw("</th>");
rw("<th>");
rw("Clarify Ver");
rw("</th>");
rw("<th>");
rw("User Ver");
rw("</th>");
rw("<th>");
rw("Description");
rw("</th>");
rw("</tr></thead>");
rw("<tbody>");
while (!rsForms.EOF) {
FormTitle = Server.HtmlEncode(CleanUpString(rsForms("title")));
FormVerClarify = CleanUpString(rsForms("ver_clarify"));
FormVerCust = CleanUpString(rsForms("ver_customer"));
FormID = rsForms("id");
FormObjid = rsForms("objid");
FormName = rsForms("dialog_name");
FormDescription = CleanUpString(rsForms("description"));
rw("<tr>");
rw("<td>");
//We want the FormTitle to be a HyperLink
rw(BuildHyperLink(BuildFormURL(FormObjid,FormID), FormTitle));
rw("</td>");
rw("<td>");
rw(FormName);
rw("</td>");
rw("<td>");
rw(FormID);
rw("</td>");
rw("<td>");
rw(FormVerClarify);
rw("</td>");
rw("<td>");
rw(FormVerCust);
rw("</td>");
rw("<td>");
rw(FormDescription);
rw("</td>");
rw("</tr>");
rsForms.MoveNext();
}
rw("</tbody>");
rw("</table>");
rsForms.Close();
rsForms = null;
%>
</div>
</div>
</body>
<script type="text/javascript" src="js/jquery-3.0.0.min.js"></script>
<script type="text/javascript" src="js/tether.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("ul.navbar-nav li a[href$='formsonline.asp']").parent().addClass("active");
$(".navbar").find(".connected").text("<%=connect_info%>");
document.title = "Bolt: <%=sPageTitle%>";
$(".tablesorter").tablesorter();
$(".tablesorter tr").click(function () {
$(this).children("td").toggleClass("highlight");
});
});
</script>
</html>
<%
FSO = null;
udl_file = null;
%>