Subversion Repositories DevTools

Rev

Rev 6070 | Rev 6827 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%
2
'=====================================================
3
'|                                                   |
4
'|			          _front_explorer				 |
5
'|                                                   |
6
'=====================================================
7
%>
8
<%
9
'------------ Variable Definition -------------
10
Dim rsProj
11
Dim rsTemp
12
Dim parListBy
13
'------------ Constants Declaration -----------
14
Const hlColor 	   = "#E3B62D"
15
'------------ Variable Init -------------------
16
parListBy = Request("listby")
17
If parListBy = "" Then parListBy = 3	' Default visible list is Projects
18
'----------------------------------------------
19
%>
20
<%
21
'-----------------------------------------------------------------------------------------------------------------------
22
Function Set_Row_Style ( SSLink )
23
	Set_Row_Style = "onMouseOver=""this.bgColor = '"& hlColor &"'"" onMouseOut =""this.bgColor = ''"" onClick=""location.href='"& SSLink &"'"""
24
End Function
25
'-----------------------------------------------------------------------------------------------------------------------
26
Function Get_Projects
27
	Get_Projects = _
6070 dpurdie 28
	"select unique p.* from release_tags rt, projects p where rt.PROJ_ID = p.PROJ_ID and rt.official in ('N','R','C','P') ORDER BY p.proj_name ASC"
119 ghuddy 29
End Function
30
'-----------------------------------------------------------------------------------------------------------------------
6070 dpurdie 31
Function Get_All_Projects
32
	Get_All_Projects = _
33
	"select p.* from projects p ORDER BY p.proj_name ASC"
34
End Function
35
'-----------------------------------------------------------------------------------------------------------------------
119 ghuddy 36
Function Format_Full_Name ( SSfullname )
37
	If InStr( SSfullname, " " ) = 0 Then
38
		' No space in full_name
39
		Format_Full_Name = SSfullname
40
 
41
	Else
42
		' Proper full_name found
43
 
44
		Format_Full_Name = Left( SSfullname, InStr( SSfullname, " " )  )
45
 
46
	End If
47
 
48
End Function
49
'-----------------------------------------------------------------------------------------------------------------------
6543 dpurdie 50
Sub GenerateAtoZ(idx, page,emode)
51
	Dim letter, LROW_ONE, LROW_TWO, LROW3, URL
119 ghuddy 52
 
53
	' Declare array of letters for browsing
6543 dpurdie 54
	LROW_ONE = Array("A","B","C","D","E","F","G","H","I","J","K","L","M")
119 ghuddy 55
	LROW_TWO = Array("N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
6543 dpurdie 56
	LROW3    = Array("1","2","3","4","5","6","7","8","9","0","*")
119 ghuddy 57
 
58
 
59
	Response.write "<table width='180'  border='0' cellspacing='1' cellpadding='2'>"
60
 
61
	' Render first row
62
	For Each letter In LROW_ONE
6543 dpurdie 63
		Response.write "<td width='10' bgcolor='#DDB02C' align='center'>"
64
        Response.Write "<a href ='"&page&"?listby="&idx&"&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
119 ghuddy 65
	Next
66
	Response.write "</tr>"
67
 
68
 
69
	' Render second row
70
	Response.write "<tr>"
71
	For Each letter In LROW_TWO
6543 dpurdie 72
		Response.write "<td bgcolor='#DDB02C' align='center'>"
73
        Response.Write "<a href ='"&page&"?listby="&idx&"&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
119 ghuddy 74
	Next
75
	Response.write "</tr>"
6543 dpurdie 76
 
77
    If eMode Then
78
    	' Render 3rd row
79
    	Response.write "<tr>"
80
    	For Each letter In LROW3
81
    		Response.write "<td bgcolor='#DDB02C' align='center'>"
82
            Response.Write "<a href ='"&page&"?listby="&idx&"&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
83
    	Next
84
    	Response.write "</tr>"
85
    End If
86
 
119 ghuddy 87
	Response.write "</table>"
88
 
89
End Sub
90
'-----------------------------------------------------------------------------------------------------------------------
91
%>
92
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
93
		<tr> 
94
	  		<td>
95
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
96
			  	<form name="fromlist">
97
                <tr>
98
                  <td nowrap>
6543 dpurdie 99
                  <script type="text/javascript">
100
                  $(document).ready(function(){
101
                    // Force focus to the inputbox when the page is rendered
102
                    setInputFocus(<%=parListBy%>);
103
                  });
104
                  // Set required div visible and give the input box focus
105
                  function setDivVisible(divNum) {
106
                    var ii;
107
                    for (ii=1; ii<=5; ii++) {
108
                        Visible('DIVLIST' + ii, 'none')
109
                    }
110
                    Visible('DIVLIST' + divNum, 'block');
111
                    setInputFocus(divNum);
112
                  }
113
                  // Set focus to the input box - set cursor to end of text
114
                  function setInputFocus(divNum){
115
                    var input = $("#DIVFOCUS" + divNum );
116
                    input.focus();
117
                    var tmpStr = input.val();
118
                    input.val('');
119
                    input.val(tmpStr);
120
                  }
121
                  </script>
122
				  <select name="listby" class='form_item' onChange="setDivVisible(this.value);">
119 ghuddy 123
					<option value="3" <%If parListBy = "3" Then%>selected<%End If%>>View by Projects</option>
6070 dpurdie 124
					<option value="4" <%If parListBy = "4" Then%>selected<%End If%>>View by Projects - ALL</option>
6543 dpurdie 125
					<option value="5" <%If parListBy = "5" Then%>selected<%End If%>>View by Releases</option>
119 ghuddy 126
					<option value="1" <%If parListBy = "1" Then%>selected<%End If%>>View by Packages</option>
127
					<option value="2" <%If parListBy = "2" Then%>selected<%End If%>>View by Files</option>
128
				  </select>
129
				  </td>
130
                </tr>
131
				</form>
2365 dpurdie 132
            </table>
119 ghuddy 133
			</td>
134
		</tr> 
135
		<tr> 
136
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
137
        </tr>
138
	</table>
6543 dpurdie 139
<!-- LIST BY RELEASES ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
140
	<DIV name="DIVLIST5" id="DIVLIST5" style="display:none;">
141
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
142
		<tr> 
143
		   <td>
144
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
145
                <tr>
146
                  <td nowrap>
147
				    <table width="100" border="0" cellspacing="0" cellpadding="0">
148
                      <form name="release_search" method="get" action="view_by_release.asp" onSubmit="MM_validateForm('releasename','Release keyword','R');return document.MM_returnValue">
149
                        <tr>
150
                          <td colspan="2" class="form_item">Find Release</td>
151
                        </tr>
152
                        <tr>
153
                          <td valign="top" class="form_txt"><input id="DIVFOCUS5" name="releasename" type="text" class="form_item" size="25" value="<%=Request("releasename")%>">
154
                          </td>
155
                          <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
156
                        </tr>
157
					  	<tr>
158
                          <td colspan="2" class="form_item">Browse</td>
159
                        </tr>
160
					  	<tr> 
161
	                      <td colspan="2"><%Call GenerateAtoZ(5,"view_by_release.asp", true)%></td>
162
	                    </tr>
163
						<input type="hidden" name="listby" value="5">
164
                      </form>
165
		          </table>
166
 
167
				  </td>
168
                </tr>
169
            </table>            
170
		</td>
171
		<tr> 
172
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
173
        </tr>
174
	</table>
175
	</DIV>
119 ghuddy 176
 
177
<!-- LIST BY PACKAGE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
178
	<DIV name="DIVLIST1" id="DIVLIST1" style="display:none;">
179
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
180
		<tr> 
181
		   <td>
182
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
183
                <tr>
184
                  <td nowrap>
185
				    <table width="100" border="0" cellspacing="0" cellpadding="0">
186
                      <form name="pkg_search" method="get" action="view_by_package.asp" onSubmit="MM_validateForm('pkgname','Package keyword','R');return document.MM_returnValue">
187
                        <tr>
188
                          <td colspan="2" class="form_item">Find Package</td>
189
                        </tr>
190
                        <tr>
6543 dpurdie 191
                          <td valign="top" class="form_txt"><input id="DIVFOCUS1" name="pkgname" type="text" class="form_item" size="25" value="<%=Request("pkgname")%>">
119 ghuddy 192
                          </td>
193
                          <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
194
                        </tr>
195
					  	<tr>
196
                          <td colspan="2" class="form_item">Browse</td>
197
                        </tr>
198
					  	<tr> 
6543 dpurdie 199
	                      <td colspan="2"><%Call GenerateAtoZ(1,"view_by_package.asp",false)%></td>
119 ghuddy 200
	                    </tr>
201
						<input type="hidden" name="listby" value="1">
202
                      </form>
203
		          </table>
204
 
205
				  </td>
206
                </tr>
207
            </table>            
208
		</td>
209
		<tr> 
210
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
211
        </tr>
212
	</table>
213
	</DIV>
214
<!-- LIST BY FILES AND FOLDERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
215
	<DIV name="DIVLIST2" id="DIVLIST2" style="display:none;">
216
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
217
		<tr> 
218
			<td>
219
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
220
                <tr>
221
                  <td nowrap>
222
				    <table width="100" border="0" cellspacing="0" cellpadding="0">
223
                      <form name="pkg_search" method="get" action="view_by_file.asp" onSubmit="MM_validateForm('filename','File keyword','R');return document.MM_returnValue">
224
                        <tr>
225
                          <td colspan="2" class="form_item">Find File</td>
226
                        </tr>
227
                        <tr>
6543 dpurdie 228
                          <td valign="top" class="form_txt"><input id="DIVFOCUS2" name="filename" type="text" class="form_item" size="25" value="<%=Request("filename")%>">
119 ghuddy 229
                          </td>
230
                          <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
231
                        </tr>
232
					  	<tr>
6543 dpurdie 233
                          <td colspan="2" class="form_item">HINTS:<br>- You can use * wildcard. e.g. *0123 or 0123* or *0123*<br></td>
119 ghuddy 234
                        </tr>                        
235
						<input type="hidden" name="listby" value="2">
236
                      </form>
237
		          </table>
238
 
239
				  </td>
240
                </tr>
241
            </table>            
242
		</td>
243
		<tr> 
244
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
245
        </tr>		
246
	</table>
247
	</DIV>
248
<!-- LIST BY PROJECT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
249
	<DIV name="DIVLIST3" id="DIVLIST3" style="display:none;">
250
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
251
 
252
		<%Set rsProj = OraDatabase.DbCreateDynaset( Get_Projects, cint(0))
253
		While ((NOT rsProj.BOF) AND (NOT rsProj.EOF))%>
254
        <tr <%=Set_Row_Style( "rtree.asp?proj_id="&  rsProj.Fields("proj_id") )%>> 
255
          <td nowrap><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><a href="rtree.asp?proj_id=<%=rsProj.Fields("proj_id")%>" class="form_txt_link"><%=UCase(rsProj.Fields("proj_name"))%></a></td>
256
        </tr>
257
        <tr> 
258
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
259
        </tr>
260
		<%rsProj.MoveNext
261
	    WEnd%>
262
		<%If rsProj.RecordCount < 1 Then%>
263
			<tr> 
264
	          <td nowrap class="err_alert"><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><b>No projects available!</b></td>
265
	        </tr>
266
	        <tr> 
267
	          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
268
	        </tr>
269
		<%End If%>
270
		<tr> 
5061 dpurdie 271
		<%If (canActionControl("CreateNewProject")) Then%>
5590 dpurdie 272
          <td align="right"><a href="#" onClick="MM_openVixIFrame('_wform_new_project.asp','Create a New Project')"><img src="images/bt_new_project.gif" width="16" height="16" border="0" vspace="5" hspace="5" align="absmiddle" alt="Create new Project" title="Create new Project"></a></td>
119 ghuddy 273
        </tr>
274
		<%End If%>
275
	</table>
276
	</DIV>	
6070 dpurdie 277
<!-- LIST BY PROJECT ALL ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
278
	<DIV name="DIVLIST4" id="DIVLIST4" style="display:none;">
279
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
280
 
281
		<%Set rsProj = OraDatabase.DbCreateDynaset( Get_All_Projects, cint(0))
282
		While ((NOT rsProj.BOF) AND (NOT rsProj.EOF))%>
283
        <tr <%=Set_Row_Style( "rtree.asp?proj_id="&  rsProj.Fields("proj_id") )%>> 
284
          <td nowrap><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><a href="rtree.asp?proj_id=<%=rsProj.Fields("proj_id")%>" class="form_txt_link"><%=UCase(rsProj.Fields("proj_name"))%></a></td>
285
        </tr>
286
        <tr> 
287
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
288
        </tr>
289
		<%rsProj.MoveNext
290
	    WEnd%>
291
		<%If rsProj.RecordCount < 1 Then%>
292
			<tr> 
293
	          <td nowrap class="err_alert"><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><b>No projects available!</b></td>
294
	        </tr>
295
	        <tr> 
296
	          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
297
	        </tr>
298
		<%End If%>
299
		<tr> 
300
		<%If (canActionControl("CreateNewProject")) Then%>
301
          <td align="right"><a href="#" onClick="MM_openVixIFrame('_wform_new_project.asp','Create a New Project')"><img src="images/bt_new_project.gif" width="16" height="16" border="0" vspace="5" hspace="5" align="absmiddle" alt="Create new Project" title="Create new Project"></a></td>
302
        </tr>
303
		<%End If%>
304
	</table>
305
	</DIV>	
306
 
119 ghuddy 307
<!-- END OF LIST BY ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
308
 
309
<script language="JavaScript" type="text/javascript">
310
<!-- 
311
 
312
// Set List visibility
6070 dpurdie 313
Visible ("DIVLIST1","none","DIVLIST2","none","DIVLIST3","none","DIVLIST4","none");
119 ghuddy 314
Visible ("DIVLIST<%=parListBy%>","block");
315
 
316
//-->
317
</script>
318
 
319