Subversion Repositories DevTools

Rev

Rev 5293 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5293 Rev 5338
Line 516... Line 516...
516
           GetFollowing = GetFollowing &  "<img class='image12 vixIframeDialog' href='_iframe_pkgs_followed.asp?proj_id=" & pkgInfoHash.Item ("proj_id") & "&pkg_id=" & pkgInfoHash.Item ("pkg_id") & "' title='Follow: " & pkgInfoHash.Item ("pkg_name") &"' src='images/i_follow.gif'>"
516
           GetFollowing = GetFollowing &  "<img class='image12 vixIframeDialog' href='_iframe_pkgs_followed.asp?proj_id=" & pkgInfoHash.Item ("proj_id") & "&pkg_id=" & pkgInfoHash.Item ("pkg_id") & "' title='Follow: " & pkgInfoHash.Item ("pkg_name") &"' src='images/i_follow.gif'>"
517
       End If
517
       End If
518
 
518
 
519
    End If
519
    End If
520
End Function
520
End Function
-
 
521
'-------------------------------------------------
-
 
522
' Description:  Return a string displaying licence information
-
 
523
'----------------------------------------------------------------------------------------------------------------------------------------
-
 
524
Function getLicence
-
 
525
   Dim rsQry, rsSql, lName
-
 
526
   Dim licenceList
-
 
527
   Dim joiner : joiner = ""
-
 
528
   Dim otherVersions : otherVersions = ""
-
 
529
 
-
 
530
   Set licenceList=Server.CreateObject("Scripting.Dictionary")
-
 
531
   getLicence = ""
-
 
532
 
-
 
533
   ' Determine license for this package-version
-
 
534
	OraDatabase.Parameters.Add "PV_ID", pkgInfoHash.Item ("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
535
 
-
 
536
    Set rsQry = OraDatabase.DbCreateDynaset( _
-
 
537
		"SELECT l.NAME FROM LICENCES l, LICENCING ld" &_
-
 
538
		" WHERE l.LICENCE = ld.LICENCE " &_
-
 
539
		" and ld.PV_ID = :PV_ID" &_
-
 
540
		" ORDER by l.NAME" _
-
 
541
		, cint(0))
-
 
542
 
-
 
543
	While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
544
       lName = rsQry("name")
-
 
545
	   getLicence = getLicence & joiner & lName 
-
 
546
	   licenceList.Add lName, "Y"
-
 
547
	   joiner = ", "
-
 
548
	   rsQry.MoveNext
-
 
549
	WEnd
-
 
550
    rsQry.Close()
-
 
551
    Set rsQry = nothing
-
 
552
 
-
 
553
	'
-
 
554
	' Indicate if other versions have licences - ignore those we already know about
-
 
555
	' The data is stored on a package-version basis
-
 
556
	'
-
 
557
    Set rsQry = OraDatabase.DbCreateDynaset( _
-
 
558
		"SELECT UNIQUE ld.NAME" &_
-
 
559
		" FROM licencing l,LICENCES ld" &_
-
 
560
		" WHERE l.pv_id IN" &_
-
 
561
		"  (SELECT pv_id" &_
-
 
562
		"  FROM package_versions" &_
-
 
563
		"  WHERE pkg_id IN" &_
-
 
564
		"    (SELECT pkg_id FROM package_versions WHERE pv_id=:PV_ID)" &_
-
 
565
		"    AND pv_id != :PV_ID" &_
-
 
566
		"  )" &_
-
 
567
		"  AND l.LICENCE = ld.LICENCE" &_
-
 
568
		"  ORDER by ld.NAME" _
-
 
569
		, cint(0))
-
 
570
 
-
 
571
	joiner = ""
-
 
572
	While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
573
       lName = rsQry("name")
-
 
574
       If NOT licenceList.Exists(lName) Then
-
 
575
           otherVersions = otherVersions & joiner & rsQry("name")
-
 
576
	       joiner = ", "
-
 
577
       End If
-
 
578
	   rsQry.MoveNext
-
 
579
	WEnd
-
 
580
    OraDatabase.Parameters.Remove "PV_ID"
-
 
581
    rsQry.Close()
-
 
582
    Set rsQry = nothing
-
 
583
 
-
 
584
	If otherVersions <> "" Then
-
 
585
		getLicence = getLicence & ". Other Versions: " & otherVersions
-
 
586
	End If
-
 
587
 
-
 
588
    OraDatabase.Parameters.Remove "PV_ID"
-
 
589
 
-
 
590
End Function
521
%>
591
%>
522
<%
592
<%
523
'------------------ MAIN LINE --------------------
593
'------------------ MAIN LINE --------------------
524
'-------------------------------------------------
594
'-------------------------------------------------
525
%>
595
%>
Line 628... Line 698...
628
            <%If IsNull( rsQry("pv_overview") ) Then%>
698
            <%If IsNull( rsQry("pv_overview") ) Then%>
629
               <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pv_overview") ) )%>
699
               <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pv_overview") ) )%>
630
            <%End If%>
700
            <%End If%>
631
         </td>
701
         </td>
632
      </tr>
702
      </tr>
-
 
703
	  <!-- Package Licence information -->
633
 
704
      <tr>
-
 
705
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Package Licence:</b> </td>
-
 
706
         <td bgcolor=#f5f5f5 class="sublbox_txt">
-
 
707
            <%=getLicence()%>
-
 
708
         </td>
-
 
709
      </tr>
634
      <%
710
      <%
635
        Dim shref
711
        Dim shref
636
        Dim smail
712
        Dim smail
637
        Dim sonclick
713
        Dim sonclick
638
 
714