Thursday, August 22, 2013

Building an in-camp Information Website

I noticed that initial information is sparse when camp is being setup.  I decided to turn on the IIS services on the I-Suite server and host a local website catered for team mobile phone users.  As long as they're in range of our secure local Wi-Fi network signal, they can get pertinent information about the fire.  I've started with the various office phone numbers, current fire situation, GIS maps, and links to fire photos.  This will be expanded as units add their input.  I've also added a QR code for folks to directly.  Here is a portion of the default.htm:

<!DOCTYPE html>
<html>
<head>
<style>
body {width:100%;}
h2 {text-align:center;}
p {text-align:center;}
table {}
td {padding:3px}

</style>
</head>
<center><body>
<h2>Fire Information</h2>
<p><b>Section Telephone Numbers</b></p>
<table>
<tr><td>IC / Liaison</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr>
<tr><td>Information</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Finance/Cost/PIO</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Time/Procurement</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Situation/FBAN/GIS/CTSP</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Demob/Resources/Check-in</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Communications</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Ordering</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Human Resources</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>Helibase</td><td><a href="tel:18005555555">(800) 555-5555</a></td></tr></p>
<tr><td>FAX</td><td>(800) 555-5555</td></tr></p>
</table>

<p><b>Maps</b></p>
<p><a href="/maps/landscape.pdf">Landscape</a></p>
<p><a href="/maps/roadclosure.pdf">Road Closure</a></p>
<p><a href="/maps/transportation.pdf">Transporation</a></p>
<p><h3><a href="/Photos/index.htm"><b>Photos</b></a></h3></p>
<p><a href="http://www.inciweb.org/"><img width=100 src="/images/inciweb.gif"></a><a href="http://www.nwcg.gov/""><img width=100 src="/images/nwcg.jpg"></a>
<p><a href="http://thunderstorm.vaisala.com/explorer.html" title="Lightning"><img width=100 src="/images/lightning.jpg"></a><a href="http://www.nifc.gov/"><img width=100 src="/images/nifc.gif"></a><a href="http://activefiremaps.fs.fed.us/lg_fire2.php" title="Active Fire Maps"><img width=100 src="/images/activefire.jpg"></a>
<p><a href="http://www.nwccweb.us/information/firemap.aspx" title="NW Interagency Coordination Center"><img src="/images/nwcc.jpg"></a><a href="http://www.nifc.gov/nicc/sitreprt.pdf" title="NIFC Situation Report">NIFC SitRep</a><a href="http://gacc.nifc.gov/"><img src="/images/
</body></center>
</html>

To make it easy for posting pictures, I created a PowerShell script that takes existing photos and makes thumbnails of them then outputs an index.htm file.  Here is the script:

[void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") 
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing.Imaging") 

del c:\inetpub\wwwroot\photos\thumbnails\*.*
$photos = gci c:\inetpub\wwwroot\photos\*.jpg
$index = write "<center><a href='/'>Return to Fire Information Page</a><br>"

foreach ($p in $photos){
$orig = $p
$origdir = $orig.directoryname
$origext = $orig.extension
$origbase = $orig.basename
$outfile = write ($origdir + "\thumbnails\" + $origbase + "_thumb" + $origext)

$picture = new-object system.drawing.bitmap $orig.fullname
$newwidth = [math]::round($picture.width * .10)
$newheight = [math]::round($picture.height * .10)

$thumb = $picture.getthumbnailimage($newwidth,$newheight,$null,[intptr]::zero)
$thumb.save($outfile)
}

$thumbs = gci c:\inetpub\wwwroot\photos\thumbnails\*.jpg

foreach ($t in $thumbs){
$tn = $t.name
$tnn = $t.name.replace('_thumb','')
$index += write "<a href='/photos/$tnn'><img src='/photos/thumbnails/$tn'></a><br>"`n
}
$index|out-file c:\inetpub\wwwroot\photos\index.htm

Now staff can dump photos into the c:\inetpub\wwwroot\photos folder and I can use the script to replace outdated thumbnails with the current photos.  Doing this simplifies the process and gives more time to continue putting the network together while also hosting a time-saving website which helps new fire staff.

No comments:

Post a Comment