Subversion Repositories DevTools

Rev

Rev 1281 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%
'=====================================================
'|                                                   |
'|                                _front_explorer                                |
'|                                                   |
'=====================================================
%>
<%
'------------ Variable Definition -------------
Dim rsProj
Dim rsTemp
Dim parListBy
'------------ Constants Declaration -----------
Const hlColor      = "#E3B62D"
'------------ Variable Init -------------------
parListBy = Request("listby")
If parListBy = "" Then parListBy = 3    ' Default visible list is Projects
'----------------------------------------------
%>
<%
'-----------------------------------------------------------------------------------------------------------------------
Function Set_Row_Style ( SSLink )
        Set_Row_Style = "onMouseOver=""this.bgColor = '"& hlColor &"'"" onMouseOut =""this.bgColor = ''"" onClick=""location.href='"& SSLink &"'"""
End Function
'-----------------------------------------------------------------------------------------------------------------------
Function Get_Projects
        Get_Projects = _
        " SELECT * FROM projects ORDER BY proj_name ASC"
End Function
'-----------------------------------------------------------------------------------------------------------------------
Function Format_Full_Name ( SSfullname )
        If InStr( SSfullname, " " ) = 0 Then
                ' No space in full_name
                Format_Full_Name = SSfullname
                
        Else
                ' Proper full_name found
                
                Format_Full_Name = Left( SSfullname, InStr( SSfullname, " " )  )
                
        End If
        
End Function
'-----------------------------------------------------------------------------------------------------------------------
Sub GenerateAtoZ()
        Dim letter, LROW_ONE, LROW_TWO, URL
        
        ' Declare array of letters for browsing
        LROW_ONE = Array("#","A","B","C","D","E","F","G","H","I","J","K","L","M")
        LROW_TWO = Array("N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
        
        
        Response.write "<table width='180'  border='0' cellspacing='1' cellpadding='2'>"
        
        ' Render first row
        Response.write "<tr>"
        
        For Each letter In LROW_ONE
                Response.write "<td width='10' bgcolor='#DDB02C' align='center'><a href='view_by_package.asp?listby=1&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
        Next
        
        Response.write "</tr>"
        
        
        ' Render second row
        Response.write "<tr>"
        Response.write "<td bgcolor='#DDB02C' align='center' class='form_txt_link'>&nbsp;</td>"
        For Each letter In LROW_TWO
                Response.write "<td bgcolor='#DDB02C' align='center'><a href='view_by_package.asp?listby=1&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
        Next
        
        Response.write "</tr>"
        
        Response.write "</table>"
        
End Sub
'-----------------------------------------------------------------------------------------------------------------------
%>


        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                        <td>
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
                                <form name="fromlist">
                <tr>
                  <td nowrap>
                                  <select name="listby" class='form_item' onChange="Visible ('DIVLIST1','none','DIVLIST2','none','DIVLIST3','none'); Visible('DIVLIST' + this.value,'block');">
                                        <option value="3" <%If parListBy = "3" Then%>selected<%End If%>>View by Projects</option>
                                        <option value="1" <%If parListBy = "1" Then%>selected<%End If%>>View by Packages</option>
                                        <option value="2" <%If parListBy = "2" Then%>selected<%End If%>>View by Files</option>
                                  </select>
                                  
                                  </td>
                </tr>
                                </form>
            </table>
                        </td>
                </tr> 
                <tr> 
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
        </tr>
        </table>
        
<!-- LIST BY PACKAGE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <DIV name="DIVLIST1" id="DIVLIST1" style="display:none;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                   <td>
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
                <tr>
                  <td nowrap>
                                    <table width="100" border="0" cellspacing="0" cellpadding="0">
                      <form name="pkg_search" method="get" action="view_by_package.asp" onSubmit="MM_validateForm('pkgname','Package keyword','R');return document.MM_returnValue">
                        <tr>
                          <td colspan="2" class="form_item">Find Package</td>
                        </tr>
                        <tr>
                          <td valign="top" class="form_txt"><input name="pkgname" type="text" class="form_item" size="25" value="<%=Request("pkgname")%>">
                          </td>
                          <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
                        </tr>
                                                <tr>
                          <td colspan="2" class="form_item">Browse</td>
                        </tr>
                                                <tr> 
                              <td colspan="2"><%Call GenerateAtoZ()%></td>
                            </tr>
                                                <input type="hidden" name="listby" value="1">
                      </form>
                          </table>
                                  
                                  </td>
                </tr>
            </table>            
                </td>
                <tr> 
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
        </tr>
        </table>
        </DIV>
<!-- LIST BY FILES AND FOLDERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <DIV name="DIVLIST2" id="DIVLIST2" style="display:none;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                        <td>
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
                <tr>
                  <td nowrap>
                                    <table width="100" border="0" cellspacing="0" cellpadding="0">
                      <form name="pkg_search" method="get" action="view_by_file.asp" onSubmit="MM_validateForm('filename','File keyword','R');return document.MM_returnValue">
                        <tr>
                          <td colspan="2" class="form_item">Find File</td>
                        </tr>
                        <tr>
                          <td valign="top" class="form_txt"><input name="filename" type="text" class="form_item" size="25" value="<%=Request("filename")%>">
                          </td>
                          <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
                        </tr>
                                                <tr>
                          <td colspan="2" class="form_item">HINTS:<br>
                - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br></td>
                        </tr>                        
                                                <input type="hidden" name="listby" value="2">
                      </form>
                          </table>
                                  
                                  </td>
                </tr>
            </table>            
                </td>
                <tr> 
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
        </tr>           
        </table>
        </DIV>
<!-- LIST BY PROJECT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <DIV name="DIVLIST3" id="DIVLIST3" style="display:none;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        
                <%Set rsProj = OraDatabase.DbCreateDynaset( Get_Projects, cint(0))
                While ((NOT rsProj.BOF) AND (NOT rsProj.EOF))%>
        <tr <%=Set_Row_Style( "rtree.asp?proj_id="&  rsProj.Fields("proj_id") )%>> 
          <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>
        </tr>
        <tr> 
          <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
        </tr>
                <%rsProj.MoveNext
            WEnd%>
                <%If rsProj.RecordCount < 1 Then%>
                        <tr> 
                  <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>
                </tr>
                <tr> 
                  <td background="images/bg_home_orglite.gif"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
                </tr>
                <%End If%>
                <tr> 
                <%If (objAccessControl.IsActive("CreateNewProject")) Then%>
          <td align="right"><a href="#" onClick="MM_openBrWindow('_wform_new_project.asp','ReleaseManager','resizable=yes,width=400,height=200')"><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>
        </tr>
                <%End If%>
        </table>
        </DIV>  
<!-- END OF LIST BY ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<script language="JavaScript" type="text/javascript">
<!-- 

// Set List visibility
Visible ("DIVLIST1","none","DIVLIST2","none","DIVLIST3","none");
Visible ("DIVLIST<%=parListBy%>","block");

//-->
</script>