Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Retrieve Array Contents from Web Server
- #The idea was make a text file to add more categories and intern more columns
- #Semi-Dynamically even though this isn't as dynamic hopefully an
- #Update in the future.
- $Catagories = Get-Content \\Web-Server\Path\To\Text\catagories.txt |
- ? { $_ -like "CATAGORIES*" } |
- % { $_ -replace '.*?"([^"]*)".*', '$1' -split " " }
- #Creating the Table of Contents
- $TOCHTML += $TOCTableOpen
- $TOCHTML += $TOCTROpenSectionsStyled
- <#
- Fill Catagorie Names
- #>
- $CatagoryArr = @()
- for($i=0; $i -lt $Catagories.Length; $i++)
- {
- $CatagoryNames = ($Catagories[$i] + " Overview")
- $CatagoryArr += $CatagoryNames
- $TOCHTML += ($TOCCatagoryNames -f $CatagoryNames)
- }
- $TOCHTML += $TOCTRCloseSectionsStyled
- $LinksArr = New-Object System.Collections.Generic.List[System.Object]
- foreach ($pr in ($PluginResult | Where {$_.Details}))
- {
- $Links = $pr.PluginID, $pr.Title
- $LinksArr.Add($Links)
- <#Write-Host -ForegroundColor Yellow $LinksArr[0]
- Write-Host -ForegroundColor Yellow $LinksArr[1]#>
- <#$TOCHTML += ($TOCContentLinks -f $Links)#>
- }
- $TOCHTML += $TOCTRPluginsOpen
- for($x=0; $x -lt $CatagoryArr.Length; $x++)
- {
- if($CatagoryArr[$x] -eq $CatagoryArr[0])
- {
- $TOCHTML += $TOCTDLinksOpen
- #Place All Links for the Infrastructure Overview Here
- $TOCHTML += ($TOCContentLinks -f $LinksArr[0])
- }
- }
- $TOCHTML += $TOCTableOpen
- $TOCTDLinksOpen = @"
- <td style="text-align: left; height:auto;">
- <ul style="list-style-type:none; margin-top:2px; margin-bottom:2px;">
- "@
- #TOCContentLinks - HTML Code to Except Plugin and Title Information.
- $TOCContentLinks = @"
- <li style="list-style-type:none;">
- <a style='font-size: 8pt' href='#{0}'>{1}</a>
- </li>
- "@
- $TOCTDLinksClose = @"
- </ul>
- </td>
- "@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement