Merge branch 'master' of ssh://apples.lambdacomplex.org/git/disclosr
Merge branch 'master' of ssh://apples.lambdacomplex.org/git/disclosr


Former-commit-id: 4734f5390c1e31ca41d2ae836d07ccbe262876e8

file:a/about.php -> file:b/about.php
<?php <?php
include_once('include/common.inc.php'); include_once('include/common.inc.php');
include_header('About'); include_header('About');
?> ?>
<div class="foundation-header"> <div class="foundation-header">
<h1><a href="about.php">About/FAQ</a></h1> <h1><a href="about.php">About/FAQ</a></h1>
</div> </div>
  <a href="http://thenounproject.com/noun/document-dump/">Document Dump icon designed by Iconathon, 2013</a>
  Contact us: maxious@lambdacomplex.org
   
  Exports: <a href="admin/exportAll.csv.php">All Agencies</a> <a href="admin/exportEmployees.csv.php">Agency Employee Headcounts</a>
<h2> Attributions </h2> <h2> Attributions </h2>
National Archives of Australia, Australian Governments’ Interactive Functions Thesaurus, 2nd edition, September 2005, published at http://www.naa.gov.au/recordkeeping/thesaurus/index.htm <br/> National Archives of Australia, Australian Governments’ Interactive Functions Thesaurus, 2nd edition, September 2005, published at http://www.naa.gov.au/recordkeeping/thesaurus/index.htm <br/>
data.gov.au http://data.gov.au/dataset/directory-gov-au-full-data-export/ <br/> data.gov.au http://data.gov.au/dataset/directory-gov-au-full-data-export/ <br/>
directory.gov.au <br/> directory.gov.au <br/>
australia.gov.au http://australia.gov.au/about/copyright <br/> australia.gov.au http://australia.gov.au/about/copyright <br/>
   
<h2>Organisational Data Sources</h2> <h2>Organisational Data Sources</h2>
   
http://www.comlaw.gov.au/Browse/Results/ByTitle/AdministrativeArrangementsOrders/Current/Ad/0 defines departments http://www.comlaw.gov.au/Browse/Results/ByTitle/AdministrativeArrangementsOrders/Current/Ad/0 defines departments
Agencies can be found in the Schedule to an Appropriation Bill (budget), Schedule to FMA Regulations and/or Public Service Act.<br> Agencies can be found in the Schedule to an Appropriation Bill (budget), Schedule to FMA Regulations and/or Public Service Act.<br>
   
http://www.finance.gov.au/publications/flipchart/docs/FMACACFlipchart.pdf summarises these. view-source:https://www.tenders.gov.au/?event=public.advancedsearch.home is great for the suspended/active status<br> http://www.finance.gov.au/publications/flipchart/docs/FMACACFlipchart.pdf summarises these. view-source:https://www.tenders.gov.au/?event=public.advancedsearch.home is great for the suspended/active status<br>
   
Fraud in gov depts by Fairfax Media http://www.smh.com.au/national/public-service-keeps-fraud-cases-private-20110923-1kpdr.html <br> Fraud in gov depts by Fairfax Media http://www.smh.com.au/national/public-service-keeps-fraud-cases-private-20110923-1kpdr.html <br>
   
When defining the hierachy, this system is designed towards monitoring accountablity. Thus large agencies that have registered their own ABN When defining the hierachy, this system is designed towards monitoring accountablity. Thus large agencies that have registered their own ABN
and have their own accountablity mechanisms/website receive a seperate record as a child of their department.<br> and have their own accountablity mechanisms/website receive a seperate record as a child of their department.<br>
Some small agencies will choose to simply rely on their parent department's accountablity measures.<br> Some small agencies will choose to simply rely on their parent department's accountablity measures.<br>
   
This flows through to organisation name and other/past names. A department that completely accounts for an agency will list that agency as an other child name.<br> This flows through to organisation name and other/past names. A department that completely accounts for an agency will list that agency as an other child name.<br>
As agencies themselves shift between departments, there may be scope for providing time ranges but typically the newest hierarchy will be the one recorded.<br> As agencies themselves shift between departments, there may be scope for providing time ranges but typically the newest hierarchy will be the one recorded.<br>
A department/agency name will be the newest active name assigned to that ABN.<br> A department/agency name will be the newest active name assigned to that ABN.<br>
   
ABN information is derived from the ABR. This is the definitive umpire about which former name should be linked to which current name. <br> ABN information is derived from the ABR. This is the definitive umpire about which former name should be linked to which current name. <br>
For example "Department of Transport and Regional Services" became "Department of Infrastructure, Transport, Regional Development and Local Government" (same ABN) For example "Department of Transport and Regional Services" became "Department of Infrastructure, Transport, Regional Development and Local Government" (same ABN)
however it later split into "Department of Infrastructure and Transport" (same ABN) however it later split into "Department of Infrastructure and Transport" (same ABN)
and "Department of Regional Australia, Regional Development and Local Government" (new ABN).<br> and "Department of Regional Australia, Regional Development and Local Government" (new ABN).<br>
   
Statistical information from http://www.apsc.gov.au/stateoftheservice/1011/statsbulletin/section1.html#t2total https://www.apsedii.gov.au/apsedii/CustomQueryx33.shtml Statistical information from http://www.apsc.gov.au/stateoftheservice/1011/statsbulletin/section1.html#t2total https://www.apsedii.gov.au/apsedii/CustomQueryx33.shtml
and individual annual reports.<br> and individual annual reports.<br>
   
<?php <?php
include_footer(); include_footer();
?> ?>
   
file:b/admin/logo.ai (new)
 
  1 0 obj <</Metadata 2 0 R/OCProperties<</D<</ON[5 0 R 6 0 R]/Order 7 0 R/RBGroups[]>>/OCGs[5 0 R 6 0 R]>>/Pages 3 0 R/Type/Catalog>> endobj 2 0 obj <</Length 21938/Subtype/XML/Type/Metadata>>stream
  <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
  <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-c060 61.134777, 2010/02/12-17:32:00 ">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
  xmlns:xmp="http://ns.adobe.com/xap/1.0/"
  xmlns:xmpGImg="http://ns.adobe.com/xap/1.0/g/img/">
  <xmp:CreatorTool>Adobe Illustrator CS5</xmp:CreatorTool>
  <xmp:CreateDate>2013-06-22T15:58:27+10:00</xmp:CreateDate>
  <xmp:ModifyDate>2013-06-22T15:58:27+10:00</xmp:ModifyDate>
  <xmp:MetadataDate>2013-06-22T15:58:27+10:00</xmp:MetadataDate>
  <xmp:Thumbnails>
  <rdf:Alt>
  <rdf:li rdf:parseType="Resource">
  <xmpGImg:width>256</xmpGImg:width>
  <xmpGImg:height>196</xmpGImg:height>
  <xmpGImg:format>JPEG</xmpGImg:format>
  <xmpGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA&#xA;AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK&#xA;DBAMDAwMD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w0+eA1W7Zi4+IcF8XlzeW3/wD0LV9af1/0J6tfi9Cn&#xA;Cvt6PwfdmMfB8noMf8q1t4lef7d2WeSf+VWV/wCdP/RXrcfi+pej9Y4/5dP3v/BZbj4P4addr/zn&#xA;+X46/pXX6mX5a6x2KuxV2KuxV2KuxV2KuxV2KuxV2KpV5k/wt+jj/iX6l+jq7/pH0vRrT/i74a0y&#xA;M+GvU5Ol8bi/dcXF/Ru/seaP/wBCy+q1f0Py5GvHlxrXtT4afLbMb9z5O+H8rV/lHoflL/BP1E/4&#xA;T/R31Pbn+jfR417c/S/a/wBbfMiHDXpp0ms/McX77j4v6V/pT3JuG7FXYq7FXYq7FXYq7FXYq//Z</xmpGImg:image>
  </rdf:li>
  </rdf:Alt>
  </xmp:Thumbnails>
  </rdf:Description>
  <rdf:Description rdf:about=""
  xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"
  xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
  xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/">
  <xmpTPg:NPages>1</xmpTPg:NPages>
  <xmpTPg:HasVisibleTransparency>False</xmpTPg:HasVisibleTransparency>
  <xmpTPg:HasVisibleOverprint>False</xmpTPg:HasVisibleOverprint>
  <xmpTPg:MaxPageSize rdf:parseType="Resource">
  <stDim:w>100.000000</stDim:w>
  <stDim:h>100.000000</stDim:h>
  <stDim:unit>Points</stDim:unit>
  </xmpTPg:MaxPageSize>
  <xmpTPg:PlateNames>
  <rdf:Seq>
  <rdf:li>Cyan</rdf:li>
  <rdf:li>Magenta</rdf:li>
  <rdf:li>Yellow</rdf:li>
  <rdf:li>Black</rdf:li>
  </rdf:Seq>
  </xmpTPg:PlateNames>
  <xmpTPg:SwatchGroups>
  <rdf:Seq>
  <rdf:li rdf:parseType="Resource">
  <xmpG:groupName>Default Swatch Group</xmpG:groupName>
  <xmpG:groupType>0</xmpG:groupType>
  </rdf:li>
  </rdf:Seq>
  </xmpTPg:SwatchGroups>
  </rdf:Description>
  <rdf:Description rdf:about=""
  xmlns:illustrator="http://ns.adobe.com/illustrator/1.0/">
  <illustrator:Type>Document</illustrator:Type>
  </rdf:Description>
  <rdf:Description rdf:about=""
  xmlns:dc="http://purl.org/dc/elements/1.1/">
  <dc:format>application/pdf</dc:format>
  <dc:title>
  <rdf:Alt>
  <rdf:li xml:lang="x-default">logo</rdf:li>
  </rdf:Alt>
  </dc:title>
  </rdf:Description>
  <rdf:Description rdf:about=""
  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
  <xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>
  <xmpMM:DocumentID>uuid:4fae17bc-59c6-9342-b6da-8cb94c264d4a</xmpMM:DocumentID>
  <xmpMM:InstanceID>uuid:ecb84851-93a3-9547-b0ae-1dc3fa2c0ab0</xmpMM:InstanceID>
  </rdf:Description>
  <rdf:Description rdf:about=""
  xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
  <pdf:Producer>Adobe PDF library 9.90</pdf:Producer>
  </rdf:Description>
  </rdf:RDF>
  </x:xmpmeta>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  <?xpacket end="w"?> endstream endobj 3 0 obj <</Count 1/Kids[8 0 R]/Type/Pages>> endobj 8 0 obj <</ArtBox[3.0 13.543 96.5889 84.2764]/BleedBox[0.0 0.0 100.0 100.0]/Contents 9 0 R/LastModified(D:20130622155827+10'00')/MediaBox[0.0 0.0 100.0 100.0]/Parent 3 0 R/PieceInfo<</Illustrator 10 0 R>>/Resources<</ExtGState<</GS0 11 0 R>>/Properties<</MC0 5 0 R/MC1 6 0 R>>>>/Thumb 12 0 R/TrimBox[0.0 0.0 100.0 100.0]/Type/Page>> endobj 9 0 obj <</Filter/FlateDecode/Length 1114>>stream
 
 
 
 
 
 
  8;VGJ_$pAe$j%5g#Y/8.G]f[^A#Q9pU$sJ@-BS$94,G-<WGQ8j'TDl!%+#tGRN2bX
  mZsjSF>#9J"p"S6@ES~> endstream endobj 13 0 obj [/Indexed/DeviceRGB 255 14 0 R] endobj 14 0 obj <</Filter[/ASCII85Decode/FlateDecode]/Length 428>>stream
  8;X]O>EqN@%''O_@%e@?J;%+8(9e>X=MR6S?i^YgA3=].HDXF.R$lIL@"pJ+EP(%0
  b]6ajmNZn*!='OQZeQ^Y*,=]?C.B+\Ulg9dhD*"iC[;*=3`oP1[!S^)?1)IZ4dup`
  E1r!/,*0[*9.aFIR2&b-C#s<Xl5FH@[<=!#6V)uDBXnIr.F>oRZ7Dl%MLY\.?d>Mn
  6%Q2oYfNRF$$+ON<+]RUJmC0I<jlL.oXisZ;SYU[/7#<&37rclQKqeJe#,UF7Rgb1
  VNWFKf>nDZ4OTs0S!saG>GGKUlQ*Q?45:CI&4J'_2j<etJICj7e7nPMb=O6S7UOH<
  PO7r\I.Hu&e0d&E<.')fERr/l+*W,)q^D*ai5<uuLX.7g/>$XKrcYp0n+Xl_nU*O(
  l[$6Nn+Z_Nq0]s7hs]`XX1nZ8&94a\~> endstream endobj 5 0 obj <</Intent 15 0 R/Name(docs)/Type/OCG/Usage 16 0 R>> endobj 6 0 obj <</Intent 17 0 R/Name(trunk)/Type/OCG/Usage 18 0 R>> endobj 17 0 obj [/View/Design] endobj 18 0 obj <</CreatorInfo<</Creator(Adobe Illustrator 15.0)/Subtype/Artwork>>>> endobj 15 0 obj [/View/Design] endobj 16 0 obj <</CreatorInfo<</Creator(Adobe Illustrator 15.0)/Subtype/Artwork>>>> endobj 11 0 obj <</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>> endobj 10 0 obj <</LastModified(D:20130622155827+10'00')/Private 19 0 R>> endobj 19 0 obj <</AIMetaData 20 0 R/AIPrivateData1 21 0 R/AIPrivateData2 22 0 R/ContainerVersion 11/CreatorVersion 15/NumBlock 2/RoundtripStreamType 1/RoundtripVersion 15>> endobj 20 0 obj <</Length 970>>stream
  %!PS-Adobe-3.0 %%Creator: Adobe Illustrator(R) 15.0 %%AI8_CreatorVersion: 15.0.0 %%For: (Alex) () %%Title: (noun_project_15207.svg) %%CreationDate: 22/06/13 3:58 PM %%Canvassize: 16383 %%BoundingBox: 258 373 353 444 %%HiResBoundingBox: 258.5 373.0879 352.0889 443.8213 %%DocumentProcessColors: Cyan Magenta Yellow Black %AI5_FileFormat 11.0 %AI12_BuildNumber: 399 %AI3_ColorUsage: Color %AI7_ImageSettings: 0 %%RGBProcessColor: 0 0 0 ([Registration]) %AI3_Cropmarks: 255.5 359.5449 355.5 459.5449 %AI3_TemplateBox: 305.5 396.5 305.5 396.5 %AI3_TileBox: 26 29.5449 585 812.5449 %AI3_DocumentPreview: None %AI5_ArtSize: 14400 14400 %AI5_RulerUnits: 2 %AI9_ColorModel: 1 %AI5_ArtFlags: 0 0 0 1 0 0 1 0 0 %AI5_TargetResolution: 800 %AI5_NumLayers: 2 %AI9_OpenToView: -491 815 1 1595 821 18 0 0 43 134 0 0 0 1 1 0 1 1 0 1 %AI5_OpenViewLayers: 77 %%PageOrigin:0 0 %AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9 %AI9_Flatten: 1 %AI12_CMSettings: 00.MS %%EndComments endstream endobj 21 0 obj <</Length 16577>>stream
  %%BoundingBox: 258 373 353 444 %%HiResBoundingBox: 258.5 373.0879 352.0889 443.8213 %AI7_Thumbnail: 128 100 8 %%BeginData: 16428 Hex Bytes %0000330000660000990000CC0033000033330033660033990033CC0033FF %0066000066330066660066990066CC0066FF009900009933009966009999 %0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66 %00FF9900FFCC3300003300333300663300993300CC3300FF333300333333 %3333663333993333CC3333FF3366003366333366663366993366CC3366FF %3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99 %33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033 %6600666600996600CC6600FF6633006633336633666633996633CC6633FF %6666006666336666666666996666CC6666FF669900669933669966669999 %6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33 %66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF %9933009933339933669933999933CC9933FF996600996633996666996699 %9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33 %99CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF %CC0000CC0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399 %CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933 %CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF %CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC %FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699 %FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33 %FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100 %000011111111220000002200000022222222440000004400000044444444 %550000005500000055555555770000007700000077777777880000008800 %000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB %DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF %00FF0000FFFFFF0000FF00FFFFFF00FFFFFF %524C45FD6BFFA8CAA7A7A0A7A1FD76FFA8A77CA17CA17CA17CA1A7FD74FF %A1A17CA7A1A17CA7A1A17CA7FD72FFA77CA17CA17CA17CA17CA17CA17CA8 %FD6FFFCFA77CA7A1A7A0A7A1A7A0A7A1A7A0A7A1FD6EFFA8A17CA17CA17C %A17CA17CA17CA17CA17CA1A7FD6CFFA8A17CA7A1A17CA7A1A17CA7A1A17C %A7A1A17CA7FD6BFFA1A17CA17CA17CA17CA17CA17CA17CA17CA17CA17CA8 %FD69FFA7A1A1A7A0A7A1A7A0A7A1A7A0A7A1A7A0A7A1A7A0A7A1FD68FFA7 %A07CA17CA17CA17CA17CA17CA17CA17CA17CA17CA17CA1A7FD67FFCAA0A1 %7CA7A1A17CA7A1A17CA7A1A17CA7A1A17CA7A1A17CA7CFFD67FFA77CA17C %A17CA17CA17CA17CA17CA17CA17CA17CA17CA17CA7FD68FFA7A0A7A1A7A0 %A7A1A7A0A7A1A7A0A7A1A7A0A7A1A7A0A7A0FD68FFA8A07CA17CA17CA17C %A17CA17CA17CA17CA17CA17CA17CA1A7FD4EFFA8FD19FFA7A17CA7A1A17C %A7A1A17CA7A1A17CA7A1A17CA7A1CAA8FD4FFFA17CA7A1A8A8FD15FF7CA1 %7CA17CA17CA17CA17CA17CA17CA17CA7A8FD52FFA0A7A0A17CA7A1A7A7FF %CFFD10FFCF7CA7A1A7A0A7A1A7A0A7A1A7A0A7A7FD54FFA8A17CA17CA17C %A17CA07CA1A1A7A7FFCFFD0CFFA77CA17CA17CA17CA17CA17CA1A8FD55FF %CAA0A17CA7A1A17CA7A1A17CA7A0A17CA7A1A8A8FD0AFFA77CA7A1A17CA7 %A1A17CA7CAFD56FFA1A17CA17CA17CA17CA17CA17CA17CA17CA17CA17CA8 %FD08FFA8A07CA17CA17CA17CA1A8FD4CFFCFFFA8CFA7A8A1FD04FFA7A1A7 %A0A7A1A7A0A7A1A7A0A7A1A7A0A7A1A7A0A1A8FD09FFA7A7A1A7A0A7A0A7 %CFFD44FFA8FFA8A8A7A8A1A17CA17CA17CA17CA0A7FFFFCF7CA17CA17CA1 %7CA17CA17CA17CA17CA17CA17CA17CCFFD0AFF7CA17CA17CA1A8FD42FFA8 %A7A1A17CA1A0A17CA1A0A17CA7A1A17CA7A0A7FFFFA8A17CA7A1A17CA7A1 %A17CA7A1A17CA7A1A17CA7A0A7CFFD0BFF7CA7A0A1A8FD43FFCF7CA17CA1 %7CA17CA17CA17CA17CA17CA17CA17CCFFFA87CA17CA17CA17CA17CA17CA1 %A1A77CA17CA17CA1A1FD0CFFA87CA1A8FD45FFCAA0A7A0A7A1A7A0A7A1A7 %A0A7A1A7A0A7A1A1A8FFA1A1A0A7A1A7A0A7A1A77CA7A8FFA8A7A1A7A0A7 %A0CAFD0DFFA7A8FD46FFA8A17CA17CA17CA17CA17CA17CA17CA17CA17CA7 %A8A77CA17CA17CA17CA17CA1A8FFFFFF7CA17CA17CA1A8FD0DFFA8FD48FF %A0A7A1A17CA7A1A17CA7A1A17CA7A1A17CA7A1CA7CA7A1A17CA7A1A17CCA %FD05FFA77CA7A1A17CFD57FFA77CA17CA17CA17CA17CA17CA17CA17CA17C %A1A1A17CA17CA17CA1A1FD07FFA8A07CA17CA1A8CFA8CAA8CACAFFFFFFA8 %FD4CFFA8A7A0A1A0A7A1A7A0A7A1A7A0A7A1A7A0A7A1A7A0A7A1A17CA7A8 %FD09FFA0A7A1A7A0A7A0A1A0A1A7FD04FFA7A0FD4CFFCACFA1A17CA17CA1 %7CA17CA17CA17CA17CA17CA17CA1A1A8FD06FFA1A8FFFFFFA77CA17CA17C %A17CA17CFD04FFA77CA17CA8FD4DFFCFCAA1A1A0A17CA1A0A17CA1A0A17C %A7A0A7A8FD06FFCFA1A1A1FFFFFFA8A17CA7A1A17CA7A0FD04FFCA7CA7A1 %A17CA7FD4FFFA8A8A1A7A1A7A1A7A1A7A1A8A8FD07FFA8A77CA17CA1A8FF %FFFF7CA17CA17CA17CCAFD04FF7CA17CA17CA17CA1A8FD47FFBD9ACBFD16 %FFA7A7A0A7A0A7A0CAFFFFFFA7A0A7A1A77CCAFD04FFA1A1A0A7A1A7A0A7 %A0A1A7FD46FF688C6894A1FD11FFA8A87CA07CA17CA17CA1A1FFFFFFA7A0 %7CA17CA1A8FFFFFFA1A17CA17CA17CA17CA17CA0A1FD44FFA18C8C8C688C %8DBDA8FD0BFFA8CFA7A17CA7A1A17CA7A1A17CA7FD04FFA0A17CA1A8FFFF %FFA8A17CA7A1A17CA7A1A17CA7A1A1A0FD43FF93688C688C688C688C6FC3 %CAFD05FFA8A87CA076A17CA17CA17CA17CA17CA17CCAFFFFA8A77CA0A1FF %FFFFA8A17CA17CA17CA17CA17CA17CA17CA17CA8FD40FFCA688D8C8D688D %8C8D688C68939ACAFD06FFA8A7A0A1A0A7A1A7A0A7A1A7A0A7A7FFFFFFA7 %A1A1FD04FFA7A0A7A0A7A1A7A0A7A1A7A0A7A1A7A0A7A0A7FD3FFF9A8C68 %8C688C688C688C688C688C6893A1FD07FFA7A17CA17CA17CA17CA17CA1CF %FFFFCF7CFD04FFA87CA17CA17CA17CA17CA17CA17CA17CA17CA17CA1A8FD %3DFF938C8C688D8C8C688D8C8C688D8C8C688C8C9AA1FD06FFCAA1A7A0A1 %7CA7A1A17CCFFFFFCFCFFD04FFA0A17CA7A1A17CA7A1A17CA7A0A17CA7A1 %A17CA7A0A1A7FD3BFFC4688C688C688C688C688C688C688C688C688C688C %69C3A8FD05FFA8A87CA07CA17CA0A1FD07FF7CA17CA17CA17CA17CA17CA1 %7CA7A8A87CA17CA17CA17CA0A1FD3AFF948C8C8D688D8C8D688D8C8D688D %8C8D688D8C8D688C689394CAFD06FFA8A8A1A17CA7FD06FFA7A7A1A7A0A7 %A1A7A0A7A0A1A1FD04FFCAA0A7A0A7A1A77CA7FD39FFCA8C688C688C688C %688C688C688C688C688C688C688C688C688C68939ACAFD06FFA7A17CCFFD %04FFA8A07CA17CA17CA17CA17CA1A8FD06FFA77CA17CA17CA1A8FD39FFC3 %688C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688C8C9A %A1FD06FFCAA8FFFFFFA8A7A0A17CA7A1A17CA1A0A8CFFD07FFCFA7A0A17C %A1A8FD3AFF6F8C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C689BA8FD08FFA17CA17CA17CA17CA07CCFFD05FFCAA8FF %FFFFA8A17CA0A1FD3AFFCA8D8C8D688D8C8D688D8C8D688D8C8D688D8C8D %688D8C8D688D8C8D688D8C8D688C688D93CAFD06FFA8CAA1A1A0A7A0A1A7 %FD06FFCA7CA7FD04FFA8A1A1FD3BFF9A688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C68939ACAFD06FFA7 %A17CA7A8FD05FFA8A77CA17CA7FD04FFA7CAFD3BFF8D8C688D8C8C688D8C %8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C68 %8C8C94A1FD06FFCFFD06FFA1A17CA7A1A17CA8FD3FFFA18C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688C689AA8FD08FFA87CA17CA17CA17CA17CA8FD0EFFA8FD2FFF %BC8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C %8D688D8C8D688D8C8D688D8C8D688C688C93C3FD06FFA8CAA1A1A0A7A1A7 %A0A7A0CFFD0BFFCAA1A7FD2EFFCA688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C68939ACAFD06FFA8A77CA17CA17CA17CCFFD07FFCAA1A17CA17CFD2E %FFA18C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C %8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688C8C93A1FD07FFFD %04A17CA1A1FD05FFA7A7A0A17CA7A1A1A8FD2DFF93688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C689AA1FD05FF7CA17CA17CA1A1FD04 %FFA77CA17CA17CA17CA8FD0FFFA1FD14CAFD08FFCA8C8C688D8C8D688D8C %8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D68 %8D8C8D688D8C8D688D8C8D688D8C8D688D688C93C3CAFFFFCFA0A7A0A7A1 %A1A7FD04FFA8A0A7A0A7A1A1A7FD0DFFCA688C688C688C688C688C688C68 %8C688C688C688C688CA8FD07FF9A8C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C9BFFFFA77CA17CA17CA0A7FFFFFFA8 %A77CA17CA17CA7FD0CFFCA688C8C8C688C8C8C688C8C8C688C8C8C688C8C %8C688C8CCAFD07FF93688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C68 %8D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C %8C688D8C8C688D8C8C688CCAFFA8A1A1A17CA7A0A1A8FFFFFFA8A7A0A17C %A7A1FD0BFFCA688C688C688C688C688C688C688C688C688C688C688C688C %A8FD06FFC3688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C689AFFFFA1A17CA17CA17CA1A8FFFFFFA8A17CA17CA1CA %FD0AFF8C8C688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8CFD07 %FF938C688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C %8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D68 %8D8C8D688D8CCAFFFFA0A7A0A7A1A77CA7FD04FFA8A1A0A7A1FD09FFCA68 %8C688C688C688C688C688C688C688C688C688C688C688C688CCAFD05FFA8 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C93FFFFA87CA17CA17CA7A8FD05FFA7A17CA1A8FD08FF8C8C68 %8D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C68FD06FFC3688D %8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C %688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D %8C8C688CA1FFCFA7A0A1A1FD09FFA1A17CCAFD06FFCB688C688C688C688C %688C688C688C688C688C688C688C688C688C688CA8FD05FF938C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %6893CAFFA7A7A8FD07FFA8A77CA17CA0A1FD06FF8D8C8C8D688D8C8D688D %8C8D688D8C8D688D8C8D688D8C8D688D8C8C8CFD05FFCA8C688D8C8D688D %8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D %688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D %68C3FD08FFA8CAA1A17CA7A1A77CA8FD05FF8C8C688C688C688C688C688C %688C688C688C688C688C688C688C688C688CA8FD04FF9A688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C68CAFD05FFCAA1A17CA17CA17CA17CA17CFD04FF8D8C8C8C688D8C8C68 %8D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688C8CCAFD04FFFD048C68 %8D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C %8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C68 %8D8C8C688C9AFFFFFFCAA77CA1A1A17CA7A1A17CA7A0A1CFFFFF698C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688CA8FF %FFFFA18C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688CA1FFA8A17CA17CA17CA17CA17CA17CA1 %7CCFFF938C688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D68 %8D8C8D688D8CFD04FF9A688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D %688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D %8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C94FFFFA7A1A0A7A1A7 %A0A7A1A7A0A7A1A1A8698C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688CCAFFFFCA688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %C3FFFF7CA17CA17CA17CA17CA17CA17CA88C688D8C8C688D8C8C688D8C8C %688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C68FFFFFFCAC3938C688C %8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C %688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D %8C8C688D8C8C688C93FFFFCAA0A17CA7A1A17CA7A1A17CA1A7688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688CA8 %FD05FFA194688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C688C9AFFA8A17CA17CA17CA17CA17CA17C %A78D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D %688D8C8C8CFD09FFA193688C8C8D688D8C8D688D8C8D688D8C8D688D8C8D %688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D %8C8D688D8C8D688D8C8D688D8C8D688D8C8DCAFFA8A1A0A7A1A7A0A7A1A1 %7CA7A1688C688C688C688C688C688C688C688C688C688C688C688C688C68 %8C688C688C688CA8FD0AFFCA938D688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C689AFFFFA1A17CA17CA17CA1 %A0A7A7FF8D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C %8C688D8C8C688C8CCAFD0CFFCAC3938C688C8C8C688D8C8C688D8C8C688D %8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C %688D8C8C688D8C8C688D8C8C688D8C8C688D8CCAFFFFA0A17CA7A1CAA8FD %04FF688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688CA8FD0FFFA19A688C688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C688C688C688C688C688C688C688C688C %688C688C688C688C688C688C688C93FFFFCAA7CFA8FD07FF8D8C8D688D8C %8D688D8C8D688D8C8D688D8C8D688D8C8C688C8C938C8D8C8C688D8CFD13 %FFA193688C8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D8C %8C688D8C93688C688C688D8C8D688D8C8D688D8C8D688D8C8D688D8C8D68 %8D8C9AFD0DFF688C688C688C688C688C688C688C688C688C688C688C939A %A1CACACAA1C39A93688CCAFD14FFCA9493688C688C688C688C688C688C68 %8C688C688C688C688C68939AC3A1CACACAA1C3938C688C688C688C688C68 %8C688C688C688C688C688C688CA1FD0DFF8C688D8C8C688D8C8C688D8C8C %688D8C8C688C8C9AA8FD0AFFCA93CBFD16FFCAC3938C688C8C8C688D8C8C %688D8C8C688D8C8C688C93CAFD0AFFCA9A688C8C8C688D8C8C688D8C8C68 %8D8C8C688D8C8C93FD0EFF688C688C688C688C688C688C688C688C688C68 %CAFD0EFFA8FD19FFA89A688C688C688C688C688C688C688C688C9AFD0EFF %CA698C688C688C688C688C688C688C688C688C68A1FFFFA7CFFD0AFF8D68 %8D8C8D688D8C8D688D8C8D688D8C8C93FD07FFA1C4A1CACAFD21FFA19A68 %8C8C8D688D8C8D688D8C93CAFD05FFCBCAA1C4C3CBFD06FF9A8C688D8C8D %688D8C8D688D8C8D688D8C8DCAFFA8A1A0A8A8FD08FF688C688C688C688C %688C688C688C688C93FD05FFA193688C688C688C93C4FD21FFCA9A93688C %688C688C6893CAFD04FFCA9393688C688C68939AFD05FF9A8C688C688C68 %8C688C688C688C688C93FFFFA77CA17CA1A1FD07FF8D8C8C688D8C8C688D %8C8C688D8C8C8DFD04FFCA938C688C8C8C688D8C8C6894CAFD04FFC39AC3 %9ABD9AC39ABD9AC39ABD9AC39ABD9AC39ABD9BFD08FFCA938D688C8C8CA8 %FFFFFFCA9A688C688D8C8C688C688C8CCAFD04FF938C688D8C8C688D8C8C %688D8C8C68CAFFFF7CA7A1A17CA1A1CFFD05FF688C688C688C688C688C68 %8C688C68CAFFFFFFC3688C688C688C688C688C688C688CA1FFFFFFA16868 %8C688C688C688C688C688C688C688C688C688C689AA1FD07FFA8A1688CA1 %FFFFFFA88C688C688C688C688C688C688C68A1FD04FF688C688C688C688C %688C688C688DA8FFA7A07CA17CA17CA17CA8FD04FF8D8C8D688D8C8D688D %8C8D688D68C3FFFFFFCA688C8C8D688D8C8D688D8C8D688D8C8CCAFFFFFF %948C8C8D688D8C8D688D8C8D688D8C8D688D8C8D688D688C93C3CAFD07FF %CAFFFFFFCA93688D8C8D688D8C8D688D8C8D688D68C3FFFFFFC3688D8C8D %688D8C8D688D8C8C9AFFFFA7A0A7A1A7A0A7A1A17CCFFFFFFF688C688C68 %8C688C688C688C688DCAFFFFFF688C688C688C688C688C688C688C688C68 %93CAFFFFCA688C688C688C688C688C688C688C688C688C688C688C688C68 %8D93C4CAFD08FF93688C688C688C688C688C688C688C688C68CAFFFFFF93 %688C688C688C688C688C68CAFFCF7CA17CA17CA17CA17CA17CCAFFFF8C68 %8D8C8C688D8C8C688D8C8C9AFFFFFF948C8C8C688D8C8C688D8C8C688D8C %8C688D68C3FFFFFF9A688D8C8C688D8C8C688D8C8C688D8C8C688D8C8C68 %8D8C8C688C68939ACAFD05FFC3688D8C8C688D8C8C688D8C8C688D8C8C68 %8C93FFFFFFA18C688D8C8C688D8C8C6893FFFFFD04A17CA7A1A17CA7A1A1 %7CCFFF688C688C688C688C688C688C68CAFFFFA88C688C688C688C688C68 %8C688C688C688C688C68FFFFFFA18C688C688C688C688C688C688C688C68 %8C688C688C688C688C688C688C6894A8FFFFFF8D8C688C688C688C688C68 %8C688C688C688C688CA1FFFFCA688C688C688C688C688C9AFFA8A17CA17C %A17CA17CA17CA17CA17CCA8C688C8C8C688C8C8C688C8C93FFFFFFC3688D %8C8D688D8C8D688D8C8D688D8C8D688D8C8CA1FFFFFF688C8C8C688C8C8C %688C8C8C688C8C8C688C8C8C688C8C8C688C8C8C688C68CAFFFFCA8C688D %8C8D688D8C8D688D8C8D688D8C8D688D68BDFFFFFF93688D8C8D688D8C8C %8CFFFFCA7CA7A1A7A0A7A1A7A0A7A1A7A0A7A18D9368938D9368938D9368 %9393FFFFFF938C688C688C688C688C688C688C688C688C688C689AFFFFFF %9368938D9368938D9368938D9368938D9368938D9368938D9368938D9368 %93CAFFFFC3688C688C688C688C688C688C688C688C688C688C93FFFFFF94 %8C688C688C688C689AFFFFA1A17CA17CA17CA17CA17CA17CA17CFD04FFCA %FFFFFFCAFFFFFFCAFD04FF938C8C688D8C8C688D8C8C688D8C8C688D8C8C %688C93FD05FFCAFFFFFFCAFFFFFFCAFFFFFFCAFFFFFFCAFFFFFFCAFFFFFF %CAFFFFFFCAFFFFFF9A8C8C8C688D8C8C688D8C8C688D8C8C688D8C8C6893 %FFFFFFC3688C688D8C8C688CA1FFA8A1A1A17CA7A1A17CA7A1A17CA7A0CF %FD11FF688C688C688C688C688C688C688C688C688C688C6894FD25FF9A68 %8C688C688C688C688C688C688C688C688C688C68FFFFFF9A8C688C688C68 %8C68FFFFA77CA17CA17CA17CA17CA17CA17CA8FD12FF938C8D688D8C8D68 %8D8C8D688D8C8D688D8C8D688C93FD25FF9A8C8C8D688D8C8D688D8C8D68 %8D8C8D688D8C8D6893FFFFFFC3688D688D8C8D68C3FFFFA0A7A1A7A0A7A1 %A7A0A7A1A77CCAFD13FF938C688C688C688C688C688C688C688C688C688C %689AFD25FF9B688C688C688C688C688C688C688C688C688C688C68FFFFFF %938C688C688C688CA2FFFFA77CA17CA17CA17CA17CA17CA1CAFD13FFBD68 %8D8C8C688D8C8C688D8C8C688D8C8C688D8C8CA1FD25FFA18C688D8C8C68 %8D8C8C688D8C8C688D8C8C688D689AFFFFFF9A688C8C8C688C93FD04FFCA %7CA7A1A17CA7A1A17CA7CFFD14FFA18C688C688C688C688C688C688C688C %688C688C68CAFD26FF688C688C688C688C688C688C688C688C688C688CA1 %FFFFFFCAC3938C688C68C3FD05FFA87CA17CA17CA17CA0A7FD16FF938C8C %8D688D8C8D688D8C8D688D8C8D688D689AFD27FFBC688D8C8D688D8C8D68 %8D8C8D688D8C8D688C8CFD07FFCAC38D8DCAFD06FFCAA0A7A0A7A1A1A7FD %17FFC4688C688C688C688C688C688C688C688C688CA8FD27FFCA8C688C68 %8C688C688C688C688C688C688C68C3FD0AFFA8FD07FFCFA77CA17CA1A1FD %19FF9A688D8C8C688D8C8C688D8C8C688D8C8C9AFD29FFA18C688D8C8C68 %8D8C8C688D8C8C688D689AFD14FFCAA7A0A1A0FD1BFF93688C688C688C68 %8C688C688C688C94FD2BFF9A8C688C688C688C688C688C688C6893CAFD15 %FFA8A17CCAFD1CFFBD8C8C688D8C8D688D8C8C688C9BFD2DFFA18D688C68 %8D8C8D688D8C8C68BCFD18FFA7CAFD1EFFCA938C688C688C688C6893A1FD %2FFFA89A688C688C688C688C93C3FD3BFFCAC3939A939A9ACAFD33FFCBA1 %9A939A94C3A1FDA5FFFF %%EndData endstream endobj 22 0 obj <</Length 21057>>stream
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  0000000016 00000 n
  0000000156 00000 n
  0000022171 00000 n
  0000000000 00000 f
  0000024532 00000 n
  0000024599 00000 n
  0000064018 00000 n
  0000022222 00000 n
  0000022562 00000 n
  0000025012 00000 n
  0000024899 00000 n
  0000023745 00000 n
  0000023971 00000 n
  0000024019 00000 n
  0000024783 00000 n
  0000024814 00000 n
  0000024667 00000 n
  0000024698 00000 n
  0000025086 00000 n
  0000025260 00000 n
  0000026280 00000 n
  0000042909 00000 n
  0000064047 00000 n
  trailer <</Size 24/Root 1 0 R/Info 23 0 R/ID[<A0B43D3BE9404E559B188985E5B021C8><89A09C775629479581326F0B9EF6E592>]>> startxref 64215 %%EOF
file:b/admin/logo.svg (new)
  <?xml version="1.0" encoding="utf-8"?>
  <!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100px"
  height="100px" viewBox="0 -25.635 100 100" enable-background="new 0 -25.635 100 100" xml:space="preserve">
  <g id="docs">
  <path fill="#C2A385" d="M86.108-9.909l5.229,9.952c0,0-1.832,0.083-5.297,1.95c-2.312,1.249-6.468,6.246-6.468,6.246L71.827-2.909
  c0,0,4.201-3.996,6.513-5.242C81.805-10.022,86.108-9.909,86.108-9.909"/>
  <path fill="#C2A385" d="M65.604,20.731l-3.152-9.868c0,0-5.441,3.56-8.017,4.074c-1.008,0.202-1.93,0.335-2.749,0.425
  L65.604,20.731z"/>
  <path fill="#C2A385" d="M72.326,23.321c0.268-0.226,0.537-0.44,0.804-0.616c3.104-2.054,6.139-3.685,6.268-3.755l1.882-1.005
  l1.369,1.634l2.864,3.417l3.198-4.334L76.68,9.783l-8.74,11.847L72.326,23.321z"/>
  <path fill="#C2A385" d="M39.918,10.823l4.825,1.86l3.33,0.212c0.04,0.001,0.269,0.015,0.652,0.015c0.91,0,2.798-0.072,5.196-0.551
  c1.427-0.284,5.007-2.332,7.092-3.695l2.889-1.888l1.05,3.285l2.496,7.812l5.889-7.985l-4.625,0.163l1.348-6.225L55.133,0.593
  l-2.095,9.667c-0.531-2.599-1.841-5.727-1.841-5.727L37.709,6.055c0,0,0.885,2.206,1.586,4.529L39.918,10.823z"/>
  <path fill="#C2A385" d="M91.233,45.562c-1.102-0.691-2.323-1.142-3.415-1.433l-3.779,9.804c1.932,1.246,5.197,5.738,5.197,5.738
  l7.336-9.206C96.572,50.466,93.162,46.771,91.233,45.562z"/>
  <path fill="#C2A385" d="M93.192,32.166l-3.656,1.224c-0.019,0.007-1.779,0.613-4.117,2.069l2.817,4.868l0.626,1.08
  c3.306-0.562,7.727-1.922,7.727-1.922l-2.332-15.261c0,0-2.934,1.277-5.852,2.221l2.318,2.765L93.192,32.166z"/>
  <path fill="#C2A385" d="M79.272,25.999l0.864,0.334l0.46,0.801l3.503,6.05c2.646-1.636,4.611-2.287,4.611-2.287l-8.075-9.632
  c0,0-2.584,1.391-5.376,3.188L79.272,25.999z"/>
  </g>
  <g id="trunk">
  <circle fill="#C00000" cx="66.019" cy="52.945" r="7.877"/>
  <circle fill="#C00000" cx="22.693" cy="52.945" r="7.877"/>
  <path fill="#C00000" d="M22.693,42.441c1.915,0,3.705,0.522,5.251,1.421V28.001H12.191L3,37.192v14.439h9.281
  C12.931,46.459,17.347,42.441,22.693,42.441z"/>
  <path fill="#C00000" d="M55.925,50.075l-9.583-3.695H30.88c1.186,1.476,1.978,3.28,2.225,5.252h22.502
  C55.674,51.1,55.78,50.58,55.925,50.075z"/>
  <path fill="#C00000" d="M79.312,28.328L39.961,13.149l-9.384,24.335l26.381,10.174c1.824-3.115,5.198-5.218,9.062-5.218
  c5.791,0,10.503,4.712,10.503,10.502c0,0.744-0.081,1.471-0.229,2.173l4.713,1.817L86.95,41.52L79.312,28.328z"/>
  </g>
  </svg>
 
file:a/charts.php (deleted)
<?php  
include_once('include/common.inc.php');  
include_header('Charts');  
$db = $server->get_db('disclosr-agencies');  
?>  
<div class="foundation-header">  
<h1><a href="about.php">Charts</a></h1>  
<h4 class="subheader">Lorem ipsum.</h4>  
</div>  
<div id="scores" style="width:900px;height:500px;"></div>  
<div id="employees" style="width:1000px;height:900px;"></div>  
<script id="source">  
window.onload = function() {  
$(document).ready(function() {  
var d1 = [];  
var scorelabels = [];  
<?php  
try {  
$rows = $db->get_view("app", "scoreHas?group=true", null, true)->rows;  
 
 
$dataValues = Array();  
foreach ($rows as $row) {  
$dataValues[$row->value] = $row->key;  
}  
$i = 0;  
ksort($dataValues);  
foreach ($dataValues as $value => $key) {  
 
echo " d1.push([$i, $value]);" . PHP_EOL;  
echo " scorelabels.push('$key');" . PHP_EOL;  
$i++;  
}  
} catch (SetteeRestClientException $e) {  
setteErrorHandler($e);  
}  
?>  
function scoretrackformatter(obj) {  
if (scorelabels[Math.floor(obj.x)]) {  
return (scorelabels[Math.floor(obj.x)])+"="+obj.y;  
 
} else {  
return "";  
}  
}  
function scoretickformatter(val, axis) {  
if (scorelabels[Math.floor(val)]) {  
return '<p style="margin-top:8em;-webkit-transform:rotate(-90deg);">'+(scorelabels[Math.floor(val)])+"</b>";  
 
} else {  
return "";  
}  
}  
Flotr.draw(document.getElementById("scores"), [ {data: d1}], {  
HtmlText: true,  
bars : {  
show : true  
},  
mouse : {  
track : true,  
relative : true,  
trackFormatter: scoretrackformatter  
},yaxis: {  
autoscaling: true  
},  
xaxis: {  
autoscaling: true,  
minorTickFreq: 0.6,  
noTicks : scorelabels.length,  
tickFormatter: scoretickformatter  
}  
});  
 
 
 
 
 
 
 
 
var emplabels = [];  
function emptrackformatter(obj) {  
 
return (obj.series.label)+" = "+obj.y+" in "+emplabels[Math.floor(obj.x)];  
 
}  
function emptickformatter(val, axis) {  
if (emplabels[Math.floor(val)]) {  
return '<p style="margin-top:8em;-webkit-transform:rotate(-90deg);">'+(emplabels[Math.floor(val)])+"</b>";  
 
} else {  
return "";  
}  
}  
function onDataReceived(series) {  
emplabels = series.labels;  
Flotr.draw(document.getElementById("employees"), series.data, {  
mouse : {  
track : true,  
relative : true,  
trackFormatter: emptrackformatter  
},yaxis: {  
max: 10000,  
scaling: 'logarithmic'  
},  
xaxis: {  
minorTickFreq: 1,  
noTicks: emplabels.length,  
showMinorLabels: true,  
tickFormatter: emptickformatter  
},  
legend: {  
show: false  
}  
});  
}  
 
$.ajax({  
url: "admin/exportEmployees.csv.php?format=json",  
method: 'GET',  
dataType: 'json',  
success: onDataReceived  
});  
 
 
});  
};  
 
</script>  
 
<?php  
include_footer();  
?>  
<?php <?php
include('template.inc.php'); include('template.inc.php');
include_once('../include/common.inc.php'); include_once('../include/common.inc.php');
$agenciesdb = $server->get_db('disclosr-agencies'); $agenciesdb = $server->get_db('disclosr-agencies');
   
$idtoname = Array(); $idtoname = Array();
foreach ($agenciesdb->get_view("app", "byCanonicalName")->rows as $row) { foreach ($agenciesdb->get_view("app", "byCanonicalName")->rows as $row) {
$idtoname[$row->id] = trim($row->value->name); $idtoname[$row->id] = trim($row->value->name);
} }
$foidocsdb = $server->get_db('disclosr-foidocuments'); $foidocsdb = $server->get_db('disclosr-foidocuments');
   
include_header_documents((isset($_REQUEST['id']) ? $idtoname[$_REQUEST['id']] : 'Entries by Agency')); include_header_documents((isset($_REQUEST['id']) ? $idtoname[$_REQUEST['id']] : 'Entries by Agency'));
$endkey = (isset($_REQUEST['end_key']) ? $_REQUEST['end_key'] : '9999-99-99'); $endkey = (isset($_REQUEST['end_key']) ? $_REQUEST['end_key'] : '9999-99-99');
?> ?>
<div class="headline">Read all the information released by Australian Federal Government agencies under the FOI Act <div class="headline">Read all the information released by Australian Federal Government agencies under the FOI Act
in one place! in one place!
</div> </div>
<a style='float:right' href="rss.xml.php"><img src="img/feed-icon-14x14.png" alt="RSS Icon"/> All Agencies RSS Feed</a> <a style='float:right' href="rss.xml.php"><img src="img/feed-icon-14x14.png" alt="RSS Icon"/> All Agencies RSS Feed</a>
<br> <br>
<?php <?php
try { try {
if ($_REQUEST['id']) { if (isset($_REQUEST['id'])) {
$rows = $foidocsdb->get_view("app", "byAgencyID", $_REQUEST['id'], false, false, false)->rows; $rows = $foidocsdb->get_view("app", "byAgencyID", $_REQUEST['id'], false, false, false)->rows;
foreach ($rows as $row) { foreach ($rows as $row) {
//print_r($rows); //print_r($rows);
echo displayLogEntry($row, $idtoname); echo displayLogEntry($row, $idtoname);
if (!isset($startkey)) if (!isset($startkey))
$startkey = $row->key; $startkey = $row->key;
$endkey = $row->key; $endkey = $row->key;
} }
} else { } else {
$rows = $foidocsdb->get_view("app", "byAgencyID?group=true", null, false, false, true)->rows; $rows = $foidocsdb->get_view("app", "byAgencyID?group=true", null, false, false, true)->rows;
if ($rows) { if ($rows) {
foreach ($rows as $row) { foreach ($rows as $row) {
echo '<a href="agency.php?id=' . $row->key . '">' . $idtoname[$row->key] . " (" . $row->value . " records)</a> <br>\n"; echo '<a href="agency.php?id=' . $row->key . '">' . $idtoname[$row->key] . " (" . $row->value . " records)</a> <br>\n";
} }
} }
} }
} catch (SetteeRestClientException $e) { } catch (SetteeRestClientException $e) {
setteErrorHandler($e); setteErrorHandler($e);
} }
echo "<a class='btn btn-large btn-primary' href='?end_key=$endkey' style='float:right;'>next page <i class='icon-circle-arrow-right icon-white'></i></a>"; echo "<a class='btn btn-large btn-primary' href='?end_key=$endkey' style='float:right;'>next page <i class='icon-circle-arrow-right icon-white'></i></a>";
include_footer_documents(); include_footer_documents();
?> ?>
   
<?php <?php
include('template.inc.php'); include('template.inc.php');
include_header_documents("Charts"); include_header_documents("Charts");
include_once('../include/common.inc.php'); include_once('../include/common.inc.php');
$agenciesdb = $server->get_db('disclosr-agencies'); $agenciesdb = $server->get_db('disclosr-agencies');
   
$idtoname = Array(); $idtoname = Array();
foreach ($agenciesdb->get_view("app", "byCanonicalName")->rows as $row) { foreach ($agenciesdb->get_view("app", "byCanonicalName")->rows as $row) {
$idtoname[$row->id] = trim($row->value->name); $idtoname[$row->id] = trim($row->value->name);
} }
$foidocsdb = $server->get_db('disclosr-foidocuments'); $foidocsdb = $server->get_db('disclosr-foidocuments');
   
?> ?>
<div class="foundation-header"> <div class="foundation-header">
<h1><a href="about.php">Charts</a></h1> <h1><a href="about.php">Charts</a></h1>
<h4 class="subheader">Lorem ipsum.</h4> <h4 class="subheader"></h4>
</div> </div>
<div id="bydate" style="width:1000px;height:300px;"></div> <div id="bydate" style="width:1000px;height:300px;"></div>
<div id="byagency" style="width:1200px;height:300px;"></div> <div id="byagency" style="width:1000px;height:1400px;"></div>
<script id="source"> <script id="source">
window.onload = function () { window.onload = function () {
$(document).ready(function () { $(document).ready(function () {
var var
d1 = [], d1 = [],
options1, options1,
o1; o1;
   
<?php <?php
try { try {
$rows = $foidocsdb->get_view("app", "byDateMonthYear?group=true",null, false,false,true)->rows; $rows = $foidocsdb->get_view("app", "byDateMonthYear?group=true",null, false,false,true)->rows;
   
   
$dataValues = Array(); $dataValues = Array();
foreach ($rows as $row) { foreach ($rows as $row) {
$dataValues[$row->key] = $row->value; $dataValues[$row->key] = $row->value;
} }
$i = 0; $i = 0;
ksort($dataValues); ksort($dataValues);
foreach ($dataValues as $key => $value) { foreach ($dataValues as $key => $value) {
$date = date_create_from_format('Y-m-d', $key); $date = date_create_from_format('Y-m-d', $key);
if (date_format($date, 'U') != "") { if (date_format($date, 'U') != "") {
echo " d1.push([".date_format($date, 'U')."000, $value]);" . PHP_EOL; echo " d1.push([".date_format($date, 'U')."000, $value]);" . PHP_EOL;
// echo " emplabels.push('$key');" . PHP_EOL; // echo " emplabels.push('$key');" . PHP_EOL;
$i++; $i++;
} }
} }
} catch (SetteeRestClientException $e) { } catch (SetteeRestClientException $e) {
setteErrorHandler($e); setteErrorHandler($e);
} }
?> ?>
   
   
options1 = { options1 = {
xaxis: { xaxis: {
mode: 'time', mode: 'time',
labelsAngle: 45 labelsAngle: 45
}, },
selection: { selection: {
mode: 'x' mode: 'x'
}, },
HtmlText: false, HtmlText: false,
title: 'Time' title: 'Disclosure Log entries added by Date'
}; };
   
// Draw graph with default options, overwriting with passed options // Draw graph with default options, overwriting with passed options
function drawGraph(opts) { function drawGraph(opts) {
   
// Clone the options, so the 'options' variable always keeps intact. // Clone the options, so the 'options' variable always keeps intact.
o1 = Flotr._.extend(Flotr._.clone(options1), opts || {}); o1 = Flotr._.extend(Flotr._.clone(options1), opts || {});
   
// Return a new graph. // Return a new graph.
return Flotr.draw( return Flotr.draw(
document.getElementById("bydate"), document.getElementById("bydate"),
[ d1 ], [ d1 ],
o1 o1
); );
} }
   
graph = drawGraph(); graph = drawGraph();
   
Flotr.EventAdapter.observe(document.getElementById("bydate"), 'flotr:select', function (area) { Flotr.EventAdapter.observe(document.getElementById("bydate"), 'flotr:select', function (area) {
// Draw selected area // Draw selected area
graph = drawGraph({ graph = drawGraph({
xaxis: { min: area.x1, max: area.x2, mode: 'time', labelsAngle: 45 }, xaxis: { min: area.x1, max: area.x2, mode: 'time', labelsAngle: 45 },
yaxis: { min: area.y1, max: area.y2 } yaxis: { min: area.y1, max: area.y2 }
}); });
}); });
   
// When graph is clicked, draw the graph with default area. // When graph is clicked, draw the graph with default area.
Flotr.EventAdapter.observe(document.getElementById("bydate"), 'flotr:click', function () { Flotr.EventAdapter.observe(document.getElementById("bydate"), 'flotr:click', function () {
graph = drawGraph(); graph = drawGraph();
}); });
   
}); });
}; };
   
var d2 = []; var d2 = [];
var agencylabels = []; var agencylabels = [];
function agencytrackformatter(obj) { function agencytrackformatter(obj) {
   
return agencylabels[Math.floor(obj.x)] + " = " + obj.y; return agencylabels[Math.floor(obj.y)] + " = " + obj.x;
   
} }
function agencytickformatter(val, axis) { function agencytickformatter(val, axis) {
if (agencylabels[Math.floor(val)]) { if (agencylabels[Math.floor(val)]) {
return '<p style="margin-top:8em;-webkit-transform:rotate(-90deg);">' + (agencylabels[Math.floor(val)]) + "</b>"; return (agencylabels[Math.floor(val)]) ;
   
} else { } else {
return ""; return "";
} }
} }
<?php <?php
try { try {
$rows = $foidocsdb->get_view("app", "byAgencyID?group=true",null, false,false,true)->rows; $rows = $foidocsdb->get_view("app", "byAgencyID?group=true",null, false,false,true)->rows;
   
   
$dataValues = Array(); $dataValues = Array();
$i = 0; $i = 0;
foreach ($rows as $row) { foreach ($rows as $row) {
echo " d2.push([".$i.", $row->value]);" . PHP_EOL; echo " d2.push([ $row->value,$i]);" . PHP_EOL;
echo " agencylabels.push(['".str_replace("'","",$idtoname[$row->key])."']);" . PHP_EOL; echo " agencylabels.push(['".str_replace("'","",$idtoname[$row->key])."']);" . PHP_EOL;
   
$i++; $i++;
} }
} catch (SetteeRestClientException $e) { } catch (SetteeRestClientException $e) {
setteErrorHandler($e); setteErrorHandler($e);
} }
?> ?>
// Draw the graph // Draw the graph
Flotr.draw( Flotr.draw(
document.getElementById("byagency"), document.getElementById("byagency"),
[d2], [d2],
{ {
  title: "Disclosure Log entries by Agency",
bars: { bars: {
show: true, show: true,
horizontal: false, horizontal: true,
shadowSize: 0, shadowSize: 0,
barWidth: 0.5 barWidth: 0.5
}, },
mouse: { mouse: {
track: true, track: true,
relative: true, relative: true,
trackFormatter: agencytrackformatter trackFormatter: agencytrackformatter
}, },
yaxis: { yaxis: {
min: 0,  
autoscaleMargin: 1  
},  
xaxis: {  
minorTickFreq: 1, minorTickFreq: 1,
noTicks: agencylabels.length, noTicks: agencylabels.length,
showMinorLabels: true, showMinorLabels: true,
tickFormatter: agencytickformatter tickFormatter: agencytickformatter
  },
  xaxis: {
  min: 0,
  autoscaleMargin: 1
}, },
legend: { legend: {
show: false show: false
} }
} }
); );
</script> </script>
   
<?php <?php
include_footer_documents(); include_footer_documents();
?> ?>
   
   
import sys import sys
import os import os
   
sys.path.insert(0, os.path.join(os.path.dirname(__file__) or '.', '../')) sys.path.insert(0, os.path.join(os.path.dirname(__file__) or '.', '../'))
import scrape import scrape
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from time import mktime from time import mktime
import feedparser import feedparser
import abc import abc
import unicodedata import unicodedata
import re import re
import dateutil import dateutil
from dateutil.parser import * from dateutil.parser import *
from datetime import * from datetime import *
import codecs import codecs
   
import difflib import difflib
   
from StringIO import StringIO from StringIO import StringIO
   
from pdfminer.pdfparser import PDFDocument, PDFParser from pdfminer.pdfparser import PDFDocument, PDFParser
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf
from pdfminer.pdfdevice import PDFDevice, TagExtractor from pdfminer.pdfdevice import PDFDevice, TagExtractor
from pdfminer.converter import TextConverter from pdfminer.converter import TextConverter
from pdfminer.cmapdb import CMapDB from pdfminer.cmapdb import CMapDB
from pdfminer.layout import LAParams from pdfminer.layout import LAParams
   
   
class GenericDisclogScraper(object): class GenericDisclogScraper(object):
__metaclass__ = abc.ABCMeta __metaclass__ = abc.ABCMeta
agencyID = None agencyID = None
disclogURL = None disclogURL = None
   
def remove_control_chars(self, input): def remove_control_chars(self, input):
return "".join([i for i in input if ord(i) in range(32, 127)]) return "".join([i for i in input if ord(i) in range(32, 127)])
   
def getAgencyID(self): def getAgencyID(self):
""" disclosr agency id """ """ disclosr agency id """
if self.agencyID is None: if self.agencyID is None:
self.agencyID = os.path.basename(sys.argv[0]).replace(".py", "") self.agencyID = os.path.basename(sys.argv[0]).replace(".py", "")
return self.agencyID return self.agencyID
   
def getURL(self): def getURL(self):
""" disclog URL""" """ disclog URL"""
if self.disclogURL is None: if self.disclogURL is None:
agency = scrape.agencydb.get(self.getAgencyID()) agency = scrape.agencydb.get(self.getAgencyID())
self.disclogURL = agency['FOIDocumentsURL'] self.disclogURL = agency['FOIDocumentsURL']
return self.disclogURL return self.disclogURL
   
@abc.abstractmethod @abc.abstractmethod
def doScrape(self): def doScrape(self):
""" do the scraping """ """ do the scraping """
return return
   
   
class GenericHTMLDisclogScraper(GenericDisclogScraper): class GenericHTMLDisclogScraper(GenericDisclogScraper):
def doScrape(self): def doScrape(self):
foidocsdb = scrape.couch['disclosr-foidocuments'] foidocsdb = scrape.couch['disclosr-foidocuments']
(url, mime_type, rcontent) = scrape.fetchURL(scrape.docsdb, (url, mime_type, rcontent) = scrape.fetchURL(scrape.docsdb,
self.getURL(), "foidocuments", self.getAgencyID()) self.getURL(), "foidocuments", self.getAgencyID())
content = rcontent content = rcontent
dochash = scrape.mkhash(content) dochash = scrape.mkhash(content)
doc = foidocsdb.get(dochash) doc = foidocsdb.get(dochash)
if doc is None: if doc is None:
print "saving " + dochash print "saving " + dochash
description = "This log may have updated but as it was not in a table last time we viewed it, we cannot extract what has changed. Please refer to the agency's website Disclosure Log to see the most recent entries" description = "This log may have updated but as it was not in a table last time we viewed it, we cannot extract what has changed. Please refer to the agency's website Disclosure Log to see the most recent entries"
last_attach = scrape.getLastAttachment(scrape.docsdb, self.getURL()) last_attach = scrape.getLastAttachment(scrape.docsdb, self.getURL())
if last_attach != None: if last_attach != None:
html_diff = difflib.HtmlDiff() html_diff = difflib.HtmlDiff()
diff = html_diff.make_table(last_attach.read().split('\n'), diff = html_diff.make_table(last_attach.read().split('\n'),
content.split('\n')) content.split('\n'))
edate = date.today().strftime("%Y-%m-%d") edate = date.today().strftime("%Y-%m-%d")
doc = {'_id': dochash, 'agencyID': self.getAgencyID() doc = {'_id': dochash, 'agencyID': self.getAgencyID()
, 'url': self.getURL(), 'docID': dochash, , 'url': self.getURL(), 'docID': dochash,
"date": edate, "title": "Disclosure Log Updated", "date": edate, "title": "Disclosure Log Updated",
"description": self.remove_control_chars(description), "diff": self.remove_control_chars(diff)} "description": self.remove_control_chars(description), "diff": self.remove_control_chars(diff)}
foidocsdb.save(doc) foidocsdb.save(doc)
else: else:
print "already saved" print "already saved"
   
   
class GenericPDFDisclogScraper(GenericDisclogScraper): class GenericPDFDisclogScraper(GenericDisclogScraper):
def doScrape(self): def doScrape(self):
foidocsdb = scrape.couch['disclosr-foidocuments'] foidocsdb = scrape.couch['disclosr-foidocuments']
(url, mime_type, content) = scrape.fetchURL(scrape.docsdb, (url, mime_type, content) = scrape.fetchURL(scrape.docsdb,
self.getURL(), "foidocuments", self.getAgencyID()) self.getURL(), "foidocuments", self.getAgencyID())
laparams = LAParams() laparams = LAParams()
rsrcmgr = PDFResourceManager(caching=True) rsrcmgr = PDFResourceManager(caching=True)
outfp = StringIO() outfp = StringIO()
device = TextConverter(rsrcmgr, outfp, codec='utf-8', device = TextConverter(rsrcmgr, outfp, codec='utf-8',
laparams=laparams) laparams=laparams)
fp = StringIO() fp = StringIO()
fp.write(content) fp.write(content)
   
process_pdf(rsrcmgr, device, fp, set(), caching=True, process_pdf(rsrcmgr, device, fp, set(), caching=True,
check_extractable=True) check_extractable=True)
description = outfp.getvalue() description = outfp.getvalue()
fp.close() fp.close()
device.close() device.close()
outfp.close() outfp.close()
dochash = scrape.mkhash(description) dochash = scrape.mkhash(description)
doc = foidocsdb.get(dochash) doc = foidocsdb.get(dochash)
if doc is None: if doc is None:
print "saving " + dochash print "saving " + dochash
edate = date.today().strftime("%Y-%m-%d") edate = date.today().strftime("%Y-%m-%d")
doc = {'_id': dochash, 'agencyID': self.getAgencyID() doc = {'_id': dochash, 'agencyID': self.getAgencyID()
, 'url': self.getURL(), 'docID': dochash, , 'url': self.getURL(), 'docID': dochash,
"date": edate, "title": "Disclosure Log Updated", "description": self.remove_control_chars(description)} "date": edate, "title": "Disclosure Log Updated", "description": self.remove_control_chars(description)}
foidocsdb.save(doc) foidocsdb.save(doc)
else: else:
print "already saved" print "already saved"
   
   
class GenericDOCXDisclogScraper(GenericDisclogScraper): class GenericDOCXDisclogScraper(GenericDisclogScraper):
def doScrape(self): def doScrape(self):
foidocsdb = scrape.couch['disclosr-foidocuments'] foidocsdb = scrape.couch['disclosr-foidocuments']
(url, mime_type, content) = scrape.fetchURL(scrape.docsdb (url, mime_type, content) = scrape.fetchURL(scrape.docsdb
, self.getURL(), "foidocuments", self.getAgencyID()) , self.getURL(), "foidocuments", self.getAgencyID())
mydoc = zipfile.ZipFile(file) mydoc = zipfile.ZipFile(file)
xmlcontent = mydoc.read('word/document.xml') xmlcontent = mydoc.read('word/document.xml')
document = etree.fromstring(xmlcontent) document = etree.fromstring(xmlcontent)
## Fetch all the text out of the document we just created ## Fetch all the text out of the document we just created
paratextlist = getdocumenttext(document) paratextlist = getdocumenttext(document)
# Make explicit unicode version # Make explicit unicode version
newparatextlist = [] newparatextlist = []
for paratext in paratextlist: for paratext in paratextlist:
newparatextlist.append(paratext.encode("utf-8")) newparatextlist.append(paratext.encode("utf-8"))
## Print our documnts test with two newlines under each paragraph ## Print our documnts test with two newlines under each paragraph
description = '\n\n'.join(newparatextlist).strip(' \t\n\r') description = '\n\n'.join(newparatextlist).strip(' \t\n\r')
dochash = scrape.mkhash(description) dochash = scrape.mkhash(description)
doc = foidocsdb.get(dochash) doc = foidocsdb.get(dochash)
   
if doc is None: if doc is None:
print "saving " + dochash print "saving " + dochash
edate = time().strftime("%Y-%m-%d") edate = time().strftime("%Y-%m-%d")
doc = {'_id': dochash, 'agencyID': self.getAgencyID() doc = {'_id': dochash, 'agencyID': self.getAgencyID()
, 'url': self.getURL(), 'docID': dochash, , 'url': self.getURL(), 'docID': dochash,
"date": edate, "title": "Disclosure Log Updated", "description": description} "date": edate, "title": "Disclosure Log Updated", "description": description}
foidocsdb.save(doc) foidocsdb.save(doc)
else: else:
print "already saved" print "already saved"
   
   
class GenericRSSDisclogScraper(GenericDisclogScraper): class GenericRSSDisclogScraper(GenericDisclogScraper):
def doScrape(self): def doScrape(self):
foidocsdb = scrape.couch['disclosr-foidocuments'] foidocsdb = scrape.couch['disclosr-foidocuments']
(url, mime_type, content) = scrape.fetchURL(scrape.docsdb, (url, mime_type, content) = scrape.fetchURL(scrape.docsdb,
self.getURL(), "foidocuments", self.getAgencyID()) self.getURL(), "foidocuments", self.getAgencyID())
feed = feedparser.parse(content) feed = feedparser.parse(content)
for entry in feed.entries: for entry in feed.entries:
#print entry #print entry
print entry.id print entry.id
dochash = scrape.mkhash(entry.id) dochash = scrape.mkhash(entry.id)
doc = foidocsdb.get(dochash) doc = foidocsdb.get(dochash)
#print doc #print doc
if doc is None: if doc is None:
print "saving " + dochash print "saving " + dochash
edate = datetime.fromtimestamp( edate = datetime.fromtimestamp(
mktime(entry.published_parsed)).strftime("%Y-%m-%d") mktime(entry.published_parsed)).strftime("%Y-%m-%d")
doc = {'_id': dochash, 'agencyID': self.getAgencyID(), doc = {'_id': dochash, 'agencyID': self.getAgencyID(),
'url': entry.link, 'docID': entry.id, 'url': entry.link, 'docID': entry.id,
"date": edate, "title": entry.title} "date": edate, "title": entry.title}
self.getDescription(entry, entry, doc) self.getDescription(entry, entry, doc)
foidocsdb.save(doc) foidocsdb.save(doc)
else: else:
print "already saved" print "already saved"
   
def getDescription(self, content, entry, doc): def getDescription(self, content, entry, doc):
""" get description from rss entry""" """ get description from rss entry"""
doc.update({'description': content.summary}) doc.update({'description': content.summary})
   
return return
   
   
class GenericOAICDisclogScraper(GenericDisclogScraper): class GenericOAICDisclogScraper(GenericDisclogScraper):
__metaclass__ = abc.ABCMeta __metaclass__ = abc.ABCMeta
   
@abc.abstractmethod @abc.abstractmethod
def getColumns(self, columns): def getColumns(self, columns):
""" rearranges columns if required """ """ rearranges columns if required """
return return
   
def getColumnCount(self): def getColumnCount(self):
return 5 return 5
   
def getDescription(self, content, entry, doc): def getDescription(self, content, entry, doc):
""" get description from rss entry""" """ get description from rss entry"""
descriptiontxt = "" descriptiontxt = ""
for string in content.stripped_strings: for string in content.stripped_strings:
descriptiontxt = descriptiontxt + " \n" + string descriptiontxt = descriptiontxt + " \n" + string
doc.update({'description': descriptiontxt}) doc.update({'description': descriptiontxt})
   
def getTitle(self, content, entry, doc): def getTitle(self, content, entry, doc):
doc.update({'title': (''.join(content.stripped_strings))}) doc.update({'title': (''.join(content.stripped_strings))})
   
def getTable(self, soup): def getTable(self, soup):
return soup.table return soup.table
   
def getRows(self, table): def getRows(self, table):
return table.find_all('tr') return table.find_all('tr')
   
def getDate(self, content, entry, doc): def getDate(self, content, entry, doc):
strdate = ''.join(content.stripped_strings).strip() strdate = ''.join(content.stripped_strings).strip()
(a, b, c) = strdate.partition("(") (a, b, c) = strdate.partition("(")
strdate = self.remove_control_chars(a.replace("Octber", "October").replace("1012","2012").replace("Janrurary", "January").replace("1012","2012")) strdate = self.remove_control_chars(a.replace("Octber", "October").replace("1012","2012").replace("Janrurary", "January").replace("1012","2012"))
print strdate print strdate
try: try:
edate = parse(strdate, dayfirst=True, fuzzy=True).strftime("%Y-%m-%d") edate = parse(strdate, dayfirst=True, fuzzy=True).strftime("%Y-%m-%d")
except ValueError: except ValueError:
print >> sys.stderr, "ERROR date invalid %s " % strdate print >> sys.stderr, "ERROR date invalid %s " % strdate
print >> sys.stderr, "ERROR date originally %s " % ''.join(content.stripped_strings).strip() print >> sys.stderr, "ERROR date originally %s " % ''.join(content.stripped_strings).strip()
edate = date.today().strftime("%Y-%m-%d") edate = date.today().strftime("%Y-%m-%d")
print edate print edate
doc.update({'date': edate}) doc.update({'date': edate})
return return
   
def getLinks(self, content, entry, doc): def getLinks(self, content, entry, doc):
links = [] links = []
for atag in entry.find_all("a"): for atag in entry.find_all("a"):
if atag.has_key('href'): if atag.has_key('href'):
links.append(scrape.fullurl(content, atag['href'])) links.append(scrape.fullurl(content, atag['href']))
if links != []: if links != []:
doc.update({'links': links}) doc.update({'links': links})
return return
   
def doScrape(self): def doScrape(self):
foidocsdb = scrape.couch['disclosr-foidocuments'] foidocsdb = scrape.couch['disclosr-foidocuments']
(url, mime_type, content) = scrape.fetchURL(scrape.docsdb, (url, mime_type, content) = scrape.fetchURL(scrape.docsdb,
self.getURL(), "foidocuments", self.getAgencyID()) self.getURL(), "foidocuments", self.getAgencyID())
if content is not None: if content is not None:
if mime_type == "text/html" or mime_type == "application/xhtml+xml" or mime_type == "application/xml": if mime_type == "text/html" or mime_type == "application/xhtml+xml" or mime_type == "application/xml":
# http://www.crummy.com/software/BeautifulSoup/documentation.html # http://www.crummy.com/software/BeautifulSoup/documentation.html
print "parsing" print "parsing"
soup = BeautifulSoup(content) soup = BeautifulSoup(content)
table = self.getTable(soup) table = self.getTable(soup)
for row in self.getRows(table): for row in self.getRows(table):
columns = row.find_all('td') columns = row.find_all('td')
if len(columns) is self.getColumnCount(): if len(columns) is self.getColumnCount():
(id, date, title, (id, date, title,
description, notes) = self.getColumns(columns) description, notes) = self.getColumns(columns)
print self.remove_control_chars( print self.remove_control_chars(
''.join(id.stripped_strings)) ''.join(id.stripped_strings))
if id.string is None: if id.string is None:
  print "no id, using date as hash"
dochash = scrape.mkhash( dochash = scrape.mkhash(
self.remove_control_chars( self.remove_control_chars(
url + (''.join(date.stripped_strings)))) url + (''.join(date.stripped_strings))))
else: else:
dochash = scrape.mkhash( dochash = scrape.mkhash(
self.remove_control_chars( self.remove_control_chars(
url + (''.join(id.stripped_strings)))) url + (''.join(id.stripped_strings))))
doc = foidocsdb.get(dochash) doc = foidocsdb.get(dochash)
   
if doc is None: if doc is None:
print "saving " + dochash print "saving " + dochash
doc = {'_id': dochash, doc = {'_id': dochash,
'agencyID': self.getAgencyID(), 'agencyID': self.getAgencyID(),
'url': self.getURL(), 'url': self.getURL(),
'docID': (''.join(id.stripped_strings))} 'docID': (''.join(id.stripped_strings))}
self.getLinks(self.getURL(), row, doc) self.getLinks(self.getURL(), row, doc)
self.getTitle(title, row, doc) self.getTitle(title, row, doc)
self.getDate(date, row, doc) self.getDate(date, row, doc)
self.getDescription(description, row, doc) self.getDescription(description, row, doc)
if notes is not None: if notes is not None:
doc.update({'notes': ( doc.update({'notes': (
''.join(notes.stripped_strings))}) ''.join(notes.stripped_strings))})
badtitles = ['-', 'Summary of FOI Request' badtitles = ['-', 'Summary of FOI Request'
, 'FOI request(in summary form)' , 'FOI request(in summary form)'
, 'Summary of FOI request received by the ASC', , 'Summary of FOI request received by the ASC',
'Summary of FOI request received by agency/minister', 'Summary of FOI request received by agency/minister',
'Description of Documents Requested', 'FOI request', 'Description of Documents Requested', 'FOI request',
'Description of FOI Request', 'Summary of request', 'Description', 'Summary', 'Description of FOI Request', 'Summary of request', 'Description', 'Summary',
'Summary of FOIrequest received by agency/minister', 'Summary of FOIrequest received by agency/minister',
'Summary of FOI request received', 'Description of FOI Request', 'Summary of FOI request received', 'Description of FOI Request',
"FOI request", 'Results 1 to 67 of 67'] "FOI request", 'Results 1 to 67 of 67']
if doc['title'] not in badtitles and 'description' in doc.keys() and doc['description'] != '': if doc['title'] not in badtitles and 'description' in doc.keys() and doc['description'] != '':
print "saving" print "saving"
foidocsdb.save(doc) foidocsdb.save(doc)
else: else:
print "already saved " + dochash print "already saved " + dochash
   
elif len(row.find_all('th')) is self.getColumnCount(): elif len(row.find_all('th')) is self.getColumnCount():
print "header row" print "header row"
   
else: else:
print >> sys.stderr, "ERROR number of columns incorrect" print >> sys.stderr, "ERROR number of columns incorrect"
print row print row
   
<?php <?php
   
function include_header_documents($title) function include_header_documents($title)
{ {
header('X-UA-Compatible: IE=edge,chrome=1'); header('X-UA-Compatible: IE=edge,chrome=1');
?> ?>
<!doctype html> <!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <!--[if IE 8]>
<html class="no-js lt-ie9" lang="en"> <![endif]--> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline --> <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
   
<title>Australian Disclosure Logs<?php if ($title != "") echo " - $title"; ?></title> <title>Australian Disclosure Logs<?php if ($title != "") echo " - $title"; ?></title>
<meta name="description" content=""> <meta name="description" content="">
   
<!-- Mobile viewport optimized: h5bp.com/viewport --> <!-- Mobile viewport optimized: h5bp.com/viewport -->
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link rel="alternate" type="application/rss+xml" title="Latest Disclosure Log Entries" href="rss.xml.php"/> <link rel="alternate" type="application/rss+xml" title="Latest Disclosure Log Entries" href="rss.xml.php"/>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
<meta name="google-site-verification" content="jkknX5g2FCpQvrW030b1Nq2hyoa6mb3EDiA7kCoHNj8"/> <meta name="google-site-verification" content="jkknX5g2FCpQvrW030b1Nq2hyoa6mb3EDiA7kCoHNj8"/>
   
<!-- Le styles --> <!-- Le styles -->
<link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/bootstrap.min.css" rel="stylesheet">
<style type="text/css"> <style type="text/css">
body { body {
padding-top: 60px; padding-top: 60px;
padding-bottom: 40px; padding-bottom: 40px;
} }
   
.sidebar-nav { .sidebar-nav {
padding: 9px 0; padding: 9px 0;
} }
</style> </style>
<link href="css/bootstrap-responsive.min.css" rel="stylesheet"> <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
   
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
<!-- More ideas for your <head> here: h5bp.com/d/head-Tips --> <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
   
<!-- All JavaScript at the bottom, except this Modernizr build. <!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. Modernizr enables HTML5 elements & feature detects for optimal performance.
Create your own custom Modernizr build: www.modernizr.com/download/ Create your own custom Modernizr build: www.modernizr.com/download/
<script src="js/libs/modernizr-2.5.3.min.js"></script>--> <script src="js/libs/modernizr-2.5.3.min.js"></script>-->
<script src="js/jquery.js"></script> <script src="js/jquery.js"></script>
<script type="text/javascript" src="js/flotr2.min.js"></script> <script type="text/javascript" src="js/flotr2.min.js"></script>
   
</head> </head>
<body> <body>
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <!--<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</a> </a> -->
<a class="brand" href="#">Australian Disclosure Logs</a> <a class="brand" href="#">Australian Disclosure Logs</a>
   
<div class="nav-collapse collapse"> <div class="nav-collapse collapse">
<p class="navbar-text pull-right"> <p class="navbar-text pull-right">
<small> <small>
Subsites on: Subsites on:
</small> </small>
<a href="http://orgs.disclosurelo.gs">Government Agencies</a> <a href="http://orgs.disclosurelo.gs">Government Agencies</a>
• <a href="http://lobbyists.disclosurelo.gs">Political Lobbyists</a> • <a href="http://lobbyists.disclosurelo.gs">Political Lobbyists</a>
• <a href="http://contracts.disclosurelo.gs">Government Contracts and Spending</a> • <a href="http://contracts.disclosurelo.gs">Government Contracts and Spending</a>
   
</p> </p>
<ul class="nav"> <ul class="nav">
<li><a href="agency.php">By Agency</a></li> <li><a href="agency.php">By Agency</a></li>
<li><a href="date.php">By Date</a></li> <li><a href="date.php">By Date</a></li>
<li><a href="disclogsList.php">List of Disclosure Logs</a></li> <li><a href="disclogsList.php">List of Disclosure Logs</a></li>
  <li><a href="charts.php">Charts</a></li>
<li><a href="about.php">About</a></li> <li><a href="about.php">About</a></li>
   
</ul> </ul>
</div> </div>
<!--/.nav-collapse --> <!--/.nav-collapse -->
</div> </div>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<?php <?php
} }
   
function include_footer_documents() function include_footer_documents()
{ {
global $ENV; global $ENV;
?> ?>
</div> <!-- /container --> </div> <!-- /container -->
<hr> <hr>
   
<footer> <footer>
<p>Not affiliated with or endorsed by any government agency.</p> <p>Not affiliated with or endorsed by any government agency.</p>
</footer> </footer>
<?php <?php
if ($ENV != "DEV") { if ($ENV != "DEV") {
echo "<script type='text/javascript'> echo "<script type='text/javascript'>
   
var _gaq = _gaq || []; var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12341040-4']); _gaq.push(['_setAccount', 'UA-12341040-4']);
_gaq.push(['_setDomainName', 'disclosurelo.gs']); _gaq.push(['_setDomainName', 'disclosurelo.gs']);
_gaq.push(['_setAllowLinker', true]); _gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']); _gaq.push(['_trackPageview']);
   
(function() { (function() {
var ga = document.createElement('script'); var ga = document.createElement('script');
ga.type = 'text/javascript'; ga.type = 'text/javascript';
ga.async = true; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s); s.parentNode.insertBefore(ga, s);
})(); })();
   
</script>"; </script>";
} }
?> ?>
<!-- Le javascript <!-- Le javascript
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<!-- <!--
<script src="js/bootstrap-transition.js"></script> <script src="js/bootstrap-transition.js"></script>
<script src="js/bootstrap-alert.js"></script> <script src="js/bootstrap-alert.js"></script>
<script src="js/bootstrap-modal.js"></script> <script src="js/bootstrap-modal.js"></script>
<script src="js/bootstrap-dropdown.js"></script> <script src="js/bootstrap-dropdown.js"></script>
<script src="js/bootstrap-scrollspy.js"></script> <script src="js/bootstrap-scrollspy.js"></script>
<script src="js/bootstrap-tab.js"></script> <script src="js/bootstrap-tab.js"></script>
<script src="js/bootstrap-tooltip.js"></script> <script src="js/bootstrap-tooltip.js"></script>
<script src="js/bootstrap-popover.js"></script> <script src="js/bootstrap-popover.js"></script>
<script src="js/bootstrap-button.js"></script> <script src="js/bootstrap-button.js"></script>
<script src="js/bootstrap-collapse.js"></script> <script src="js/bootstrap-collapse.js"></script>
<script src="js/bootstrap-carousel.js"></script> <script src="js/bootstrap-carousel.js"></script>
<script src="js/bootstrap-typeahead.js"></script>--> <script src="js/bootstrap-typeahead.js"></script>-->
   
   
</body> </body>
</html> </html>
<?php <?php
} }
   
function truncate($string, $length, $stopanywhere = false) function truncate($string, $length, $stopanywhere = false)
{ {
//truncates a string to a certain char length, stopping on a word if not specified otherwise. //truncates a string to a certain char length, stopping on a word if not specified otherwise.
if (strlen($string) > $length) { if (strlen($string) > $length) {
//limit hit! //limit hit!
$string = substr($string, 0, ($length - 3)); $string = substr($string, 0, ($length - 3));
if ($stopanywhere) { if ($stopanywhere) {
//stop anywhere //stop anywhere
$string .= '...'; $string .= '...';
} else { } else {
//stop on a word. //stop on a word.
$string = substr($string, 0, strrpos($string, ' ')) . '...'; $string = substr($string, 0, strrpos($string, ' ')) . '...';
} }
} }
return $string; return $string;
} }
   
function displayLogEntry($row, $idtoname) function displayLogEntry($row, $idtoname)
{ {
$result = ""; $result = "";
$result .= '<div itemscope itemtype="http://schema.org/Article">'; $result .= '<div itemscope itemtype="http://schema.org/Article">';
$result .= '<h2><a href="http://disclosurelo.gs/view.php?id=' . $row->value->_id . '"> <span itemprop="datePublished">' . $row->value->date . "</span>: <span itemprop='name headline'>" . truncate($row->value->title, 120) . "</span>"; $result .= '<h2><a href="http://disclosurelo.gs/view.php?id=' . $row->value->_id . '"> <span itemprop="datePublished">' . $row->value->date . "</span>: <span itemprop='name headline'>" . truncate($row->value->title, 120) . "</span>";
$result .= ' (<span itemprop="author publisher creator">' . $idtoname[$row->value->agencyID] . '</span>)</a></h2>'; $result .= ' (<span itemprop="author publisher creator">' . $idtoname[$row->value->agencyID] . '</span>)</a></h2>';
$result .= "<p itemprop='description articleBody text'> Title: " . $row->value->title . "<br/>"; $result .= "<p itemprop='description articleBody text'> Title: " . $row->value->title . "<br/>";
if (isset($row->value->description)) { if (isset($row->value->description)) {
$result .= str_replace("\n", "<br>", preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "", trim($row->value->description))); $result .= str_replace("\n", "<br>", preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "", trim($row->value->description)));
} }
if (isset($row->value->notes)) { if (isset($row->value->notes)) {
$result .= " <br>Note: " . $row->value->notes; $result .= " <br>Note: " . $row->value->notes;
} }
$result .= "</p>"; $result .= "</p>";
   
if (isset($row->value->links)) { if (isset($row->value->links)) {
$result .= '<h3>Links/Documents</h3><ul itemprop="associatedMedia">'; $result .= '<h3>Links/Documents</h3><ul itemprop="associatedMedia">';
foreach ($row->value->links as $link) { foreach ($row->value->links as $link) {
$result .= '<li itemscope itemtype="http://schema.org/MediaObject"><a href="' . htmlspecialchars($link) . '" itemprop="url contentURL">' . htmlspecialchars($link) . "</a></li>"; $result .= '<li itemscope itemtype="http://schema.org/MediaObject"><a href="' . htmlspecialchars($link) . '" itemprop="url contentURL">' . htmlspecialchars($link) . "</a></li>";
} }
   
$result .= "</ul>"; $result .= "</ul>";
} }
$result .= "<small><A itemprop='url' href='" . $row->value->url . "'>View original source...</a> ID: " . strip_tags($row->value->docID) . "</small>"; $result .= "<small><A itemprop='url' href='" . $row->value->url . "'>View original source...</a> ID: " . strip_tags($row->value->docID) . "</small>";
$result .= "</div>\n"; $result .= "</div>\n";
return $result; return $result;
} }
   
  <?php
  include_once('include/common.inc.php');
  include_header('Charts');
  $db = $server->get_db('disclosr-agencies');
  ?>
  <div class="foundation-header">
  <h1><a href="about.php">Charts</a></h1>
  <h4 class="subheader">Lorem ipsum.</h4>
  </div>
  <div id="scores" style="width:900px;height:500px;"></div>
  <script id="source">
  window.onload = function() {
  $(document).ready(function() {
  var d1 = [];
  var scorelabels = [];
  <?php
  try {
  $rows = $db->get_view("app", "scoreHas?group=true", null, true)->rows;
 
 
  $dataValues = Array();
  foreach ($rows as $row) {
  $dataValues[$row->value] = $row->key;
  }
  $i = 0;
  ksort($dataValues);
  foreach ($dataValues as $value => $key) {
 
  echo " d1.push([$i, $value]);" . PHP_EOL;
  echo " scorelabels.push('$key');" . PHP_EOL;
  $i++;
  }
  } catch (SetteeRestClientException $e) {
  setteErrorHandler($e);
  }
  ?>
  function scoretrackformatter(obj) {
  if (scorelabels[Math.floor(obj.x)]) {
  return (scorelabels[Math.floor(obj.x)])+"="+obj.y;
 
  } else {
  return "";
  }
  }
  function scoretickformatter(val, axis) {
  if (scorelabels[Math.floor(val)]) {
  return '<p style="margin-top:8em;-webkit-transform:rotate(-90deg);">'+(scorelabels[Math.floor(val)])+"</b>";
 
  } else {
  return "";
  }
  }
  Flotr.draw(document.getElementById("scores"), [ {data: d1}], {
  HtmlText: true,
  bars : {
  show : true
  },
  mouse : {
  track : true,
  relative : true,
  trackFormatter: scoretrackformatter
  },yaxis: {
  autoscaling: true
  },
  xaxis: {
  autoscaling: true,
  minorTickFreq: 0.6,
  noTicks : scorelabels.length,
  tickFormatter: scoretickformatter
  }
  });
 
 
 
 
 
 
 
 
  <div id="employees" style="width:1000px;height:900px;"></div>
  var emplabels = [];
  function emptrackformatter(obj) {
 
  return (obj.series.label)+" = "+obj.y+" in "+emplabels[Math.floor(obj.x)];
 
  }
  function emptickformatter(val, axis) {
  if (emplabels[Math.floor(val)]) {
  return '<p style="margin-top:8em;-webkit-transform:rotate(-90deg);">'+(emplabels[Math.floor(val)])+"</b>";
 
  } else {
  return "";
  }
  }
  function onDataReceived(series) {
  emplabels = series.labels;
  Flotr.draw(document.getElementById("employees"), series.data, {
  mouse : {
  track : true,
  relative : true,
  trackFormatter: emptrackformatter
  },yaxis: {
  max: 10000,
  scaling: 'logarithmic'
  },
  xaxis: {
  minorTickFreq: 1,
  noTicks: emplabels.length,
  showMinorLabels: true,
  tickFormatter: emptickformatter
  },
  legend: {
  show: false
  }
  });
  }
 
  $.ajax({
  url: "admin/exportEmployees.csv.php?format=json",
  method: 'GET',
  dataType: 'json',
  success: onDataReceived
  });
 
 
  });
  };
 
  </script>
 
  <?php
  include_footer();
  ?>
 
<?php <?php
   
include_once('include/common.inc.php'); include_once('include/common.inc.php');
   
function displayValue($key, $value, $mode) { function displayValue($key, $value, $mode)
  {
global $db, $schemas; global $db, $schemas;
$ignoreKeys = Array("metadata" ,"metaTags", "statistics","rtkURLs","rtkDescriptions"); $ignoreKeys = Array("metadata", "metaTags", "statistics", "rtkURLs", "rtkDescriptions");
if ($mode == "view") { if ($mode == "view") {
if (strpos($key, "_") === 0 || in_array($key,$ignoreKeys)) if (strpos($key, "_") === 0 || in_array($key, $ignoreKeys))
return; return;
echo "<tr>"; echo "<tr>";
   
echo "<td class='$key'>"; echo "<td class='$key'>";
if (isset($schemas['agency']["properties"][$key])) { if (isset($schemas['agency']["properties"][$key])) {
echo $schemas['agency']["properties"][$key]['x-title'] . "<br><small>" . $schemas['agency']["properties"][$key]['description'] . "</small>"; echo $schemas['agency']["properties"][$key]['x-title'] . "<br><small>" . $schemas['agency']["properties"][$key]['description'] . "</small>";
} }
echo "</td><td>"; echo "</td><td>";
if (is_array($value)) { if (is_array($value)) {
echo "<ol>"; echo "<ol>";
foreach ($value as $subkey => $subvalue) { foreach ($value as $subkey => $subvalue) {
   
echo "<li "; echo "<li ";
if (isset($schemas['agency']["properties"][$key]['x-property'])) { if (isset($schemas['agency']["properties"][$key]['x-property'])) {
echo ' property="' . $schemas['agency']["properties"][$key]['x-property'] . '" '; echo ' property="' . $schemas['agency']["properties"][$key]['x-property'] . '" ';
} if (isset($schemas['agency']["properties"][$key]['x-itemprop'])) { }
  if (isset($schemas['agency']["properties"][$key]['x-itemprop'])) {
echo ' itemprop="' . $schemas['agency']["properties"][$key]['x-itemprop'] . '" '; echo ' itemprop="' . $schemas['agency']["properties"][$key]['x-itemprop'] . '" ';
} }
echo " >"; echo " >";
   
echo "$subvalue</li>"; echo "$subvalue</li>";
} }
echo "</ol></td></tr>"; echo "</ol></td></tr>";
} else { } else {
if (isset($schemas['agency']["properties"][$key]['x-property'])) { if (isset($schemas['agency']["properties"][$key]['x-property'])) {
echo '<span property="' . $schemas['agency']["properties"][$key]['x-property'] . '">'; echo '<span property="' . $schemas['agency']["properties"][$key]['x-property'] . '">';
} else { } else {
echo "<span>"; echo "<span>";
} }
   
if ((strpos($key, "URL") > 0 || $key == 'website') && $value != "") { if ((strpos($key, "URL") > 0 || $key == 'website') && $value != "") {
echo "<a " . ($key == 'website' ? 'itemprop="url"' : '') . " href='$value'>$value</a>"; echo "<a " . ($key == 'website' ? 'itemprop="url"' : '') . " href='$value'>$value</a>";
} else if ($key == 'abn') { } else if ($key == 'abn') {
echo "<a href='http://www.abr.business.gov.au/SearchByAbn.aspx?SearchText=$value'>$value</a>"; echo "<a href='http://www.abr.business.gov.au/SearchByAbn.aspx?SearchText=$value'>$value</a>";
} else { } else {
echo "$value"; echo "$value";
} }
echo "</span>"; echo "</span>";
} }
echo "</td></tr>"; echo "</td></tr>";
} }
if ($mode == "edit") { if ($mode == "edit") {
if (is_array($value)) { if (is_array($value)) {
echo '<div class="row"> echo '<div class="row">
<div class="seven columns"> <div class="seven columns">
<fieldset> <fieldset>
<h5>' . $key . '</h5>'; <h5>' . $key . '</h5>';
foreach ($value as $subkey => $subvalue) { foreach ($value as $subkey => $subvalue) {
echo "<label>$subkey</label><input class='input-text' type='text' id='$key$subkey' name='$key" . '[' . $subkey . "]' value='$subvalue'/></tr>"; echo "<label>$subkey</label><input class='input-text' type='text' id='$key$subkey' name='$key" . '[' . $subkey . "]' value='$subvalue'/></tr>";
} }
echo "</fieldset> echo "</fieldset>
</div> </div>
</div>"; </div>";
} else { } else {
if (strpos($key, "_") === 0) { if (strpos($key, "_") === 0) {
echo"<input type='hidden' id='$key' name='$key' value='$value'/>"; echo "<input type='hidden' id='$key' name='$key' value='$value'/>";
} else if ($key == "parentOrg") { } else if ($key == "parentOrg") {
echo "<label for='$key'>$key</label><select id='$key' name='$key'><option value=''> Select... </option>"; echo "<label for='$key'>$key</label><select id='$key' name='$key'><option value=''> Select... </option>";
$rows = $db->get_view("app", "byDeptStateName")->rows; $rows = $db->get_view("app", "byDeptStateName")->rows;
//print_r($rows); //print_r($rows);
foreach ($rows as $row) { foreach ($rows as $row) {
echo "<option value='{$row->value}'" . (($row->value == $value) ? "SELECTED" : "") . " >" . str_replace("Department of ", "", $row->key) . "</option>"; echo "<option value='{$row->value}'" . (($row->value == $value) ? "SELECTED" : "") . " >" . str_replace("Department of ", "", $row->key) . "</option>";
} }
echo" </select>"; echo " </select>";
} else { } else {
echo "<label>$key</label><input class='input-text' type='text' id='$key' name='$key' value='$value'/>"; echo "<label>$key</label><input class='input-text' type='text' id='$key' name='$key' value='$value'/>";
if ((strpos($key, "URL") > 0 || $key == 'website') && $value != "") { if ((strpos($key, "URL") > 0 || $key == 'website') && $value != "") {
echo "<a " . ($key == 'website' ? 'itemprop="url"' : '') . " href='$value'>view</a>"; echo "<a " . ($key == 'website' ? 'itemprop="url"' : '') . " href='$value'>view</a>";
} }
if ($key == 'abn') { if ($key == 'abn') {
echo "<a href='http://www.abr.business.gov.au/SearchByAbn.aspx?SearchText=$value'>view abn</a>"; echo "<a href='http://www.abr.business.gov.au/SearchByAbn.aspx?SearchText=$value'>view abn</a>";
} }
} }
} }
} }
// //
} }
   
function addDefaultFields($row) { function addDefaultFields($row)
  {
global $schemas; global $schemas;
$defaultFields = array_keys($schemas['agency']['properties']); $defaultFields = array_keys($schemas['agency']['properties']);
foreach ($defaultFields as $defaultField) { foreach ($defaultFields as $defaultField) {
if (!isset($row[$defaultField])) { if (!isset($row[$defaultField])) {
if ($schemas['agency']['properties'][$defaultField]['type'] == "string") { if ($schemas['agency']['properties'][$defaultField]['type'] == "string") {
$row[$defaultField] = ""; $row[$defaultField] = "";
} }
if ($schemas['agency']['properties'][$defaultField]['type'] == "array") { if ($schemas['agency']['properties'][$defaultField]['type'] == "array") {
$row[$defaultField] = Array(""); $row[$defaultField] = Array("");
} }
} else if ($schemas['agency']['properties'][$defaultField]['type'] == "array") { } else if ($schemas['agency']['properties'][$defaultField]['type'] == "array") {
if (is_array($row[$defaultField])) { if (is_array($row[$defaultField])) {
$row[$defaultField][] = ""; $row[$defaultField][] = "";
$row[$defaultField][] = ""; $row[$defaultField][] = "";
$row[$defaultField][] = ""; $row[$defaultField][] = "";
} else { } else {
$value = $row[$defaultField]; $value = $row[$defaultField];
$row[$defaultField] = Array($value); $row[$defaultField] = Array($value);
$row[$defaultField][] = ""; $row[$defaultField][] = "";
$row[$defaultField][] = ""; $row[$defaultField][] = "";
} }
} }
} }
return $row; return $row;
} }
   
$db = $server->get_db('disclosr-agencies'); $db = $server->get_db('disclosr-agencies');
   
if (isset($_REQUEST['id'])) { if (isset($_REQUEST['id'])) {
//get an agency record as json/html, search by name/abn/id //get an agency record as json/html, search by name/abn/id
// by name = startkey="Ham"&endkey="Ham\ufff0" // by name = startkey="Ham"&endkey="Ham\ufff0"
// edit? // edit?
   
$obj = $db->get($_REQUEST['id']); $obj = $db->get($_REQUEST['id']);
include_header(isset($obj->name) ? $obj->name : ""); include_header(isset($obj->name) ? $obj->name : "");
//print_r($row); //print_r($row);
if (sizeof($_POST) > 0) { if (sizeof($_POST) > 0) {
//print_r($_POST); //print_r($_POST);
foreach ($_POST as $postkey => $postvalue) { foreach ($_POST as $postkey => $postvalue) {
if ($postvalue == "") { if ($postvalue == "") {
  unset($_POST[$postkey]);
  }
  if (is_array($postvalue)) {
  if (count($postvalue) == 1 && $postvalue[0] == "") {
unset($_POST[$postkey]); unset($_POST[$postkey]);
} } else {
if (is_array($postvalue)) { foreach ($_POST[$postkey] as $key => &$value) {
if (count($postvalue) == 1 && $postvalue[0] == "") { if ($value == "") {
unset($_POST[$postkey]); unset($_POST[$postkey][$key]);
} else {  
foreach ($_POST[$postkey] as $key => &$value) {  
if ($value == "") {  
unset($_POST[$postkey][$key]);  
}  
} }
} }
} }
} }
if (isset($_POST['_id']) && $db->get_rev($_POST['_id']) == $_POST['_rev']) { }
echo "Edited version was latest version, continue saving"; if (isset($_POST['_id']) && $db->get_rev($_POST['_id']) == $_POST['_rev']) {
$newdoc = $_POST; echo "Edited version was latest version, continue saving";
$newdoc['metadata']['lastModified'] = time(); $newdoc = $_POST;
$obj = $db->save($newdoc); $newdoc['metadata']['lastModified'] = time();
} else { $obj = $db->save($newdoc);
echo "ALERT doc revised by someone else while editing. Document not saved.";  
}  
}  
   
$mode = "view";  
$rowArray = object_to_array($obj);  
ksort($rowArray);  
if ($mode == "edit") {  
$row = addDefaultFields($rowArray);  
} else { } else {
$row = $rowArray; echo "ALERT doc revised by someone else while editing. Document not saved.";
} }
  }
if ($mode == "view") {  
echo ' <div class="container-fluid"> $mode = "view";
  $rowArray = object_to_array($obj);
  ksort($rowArray);
  if ($mode == "edit") {
  $row = addDefaultFields($rowArray);
  } else {
  $row = $rowArray;
  }
   
  if ($mode == "view") {
  echo ' <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
<div class="span3"> <div class="span3">
<div class="well sidebar-nav"> <div class="well sidebar-nav">
<ul class="nav nav-list"> <ul class="nav nav-list">
<li class="nav-header">Statistics</li>'; <li class="nav-header">Statistics</li>';
   
if (isset($row['statistics']['employees'])) { if (isset($row['statistics']['employees'])) {
echo '<div><i class="icon-user" style="float:left"></i><p style="margin-left:16px;">'; echo '<div><i class="icon-user" style="float:left"></i><p style="margin-left:16px;">';
$keys = array_keys($row['statistics']['employees']); $keys = array_keys($row['statistics']['employees']);
$lastkey = $keys[count($keys)-1]; $lastkey = $keys[count($keys) - 1];
echo $row['statistics']['employees'][$lastkey]['value'].' employees <small>('.$lastkey.')</small>'; echo $row['statistics']['employees'][$lastkey]['value'] . ' employees <small>(' . $lastkey . ')</small>';
echo '</div>'; echo '</div>';
} }
if (isset($row['statistics']['budget'])) { if (isset($row['statistics']['budget'])) {
echo '<div><i class="icon-shopping-cart" style="float:left"></i><p style="margin-left:16px;">'; echo '<div><i class="icon-shopping-cart" style="float:left"></i><p style="margin-left:16px;">';
$keys = array_keys($row['statistics']['budget']); $keys = array_keys($row['statistics']['budget']);
$lastkey = $keys[count($keys)-1]; $lastkey = $keys[count($keys) - 1];
echo "$".number_format(floatval($row['statistics']['budget'][$lastkey]['value'])).' <small>('.$lastkey.' budget)</small>'; echo "$" . number_format(floatval($row['statistics']['budget'][$lastkey]['value'])) . ' <small>(' . $lastkey . ' budget)</small>';
echo '</div>'; echo '</div>';
} }
echo ' </ul> echo ' </ul>
</div><!--/.well --> </div><!--/.well -->
</div><!--/span--> </div><!--/span-->
<div class="span9">'; <div class="span9">';
echo '<div itemscope itemtype="http://schema.org/GovernmentOrganization" typeof="schema:GovernmentOrganization" about="#' . $row['_id'] . '">'; echo '<div itemscope itemtype="http://schema.org/GovernmentOrganization" typeof="schema:GovernmentOrganization" about="#' . $row['_id'] . '">';
echo '<div class="hero-unit"> echo '<div class="hero-unit">
<h1 itemprop="name">' . $row['name'] . '</h1>'; <h1 itemprop="name">' . $row['name'] . '</h1>';
if (isset($row['description'])) { if (isset($row['description'])) {
echo '<p>'.$row['description'].'</p>'; echo '<p>' . $row['description'] . '</p>';
} }
echo '</div><table width="100%">'; echo '</div><table width="100%">';
echo "<tr><th>Field Name</th><th>Field Value</th></tr>"; echo "<tr><th>Field Name</th><th>Field Value</th></tr>";
} }
if ($mode == "edit") { if ($mode == "edit") {
?> ?>
<input id="addfield" type="button" value="Add Field"/> <input id="addfield" type="button" value="Add Field"/>
<script> <script>
window.onload = function() { window.onload = function () {
$(document).ready(function() { $(document).ready(function () {
// put all your jQuery goodness in here. // put all your jQuery goodness in here.
// http://charlie.griefer.com/blog/2009/09/17/jquery-dynamically-adding-form-elements/ // http://charlie.griefer.com/blog/2009/09/17/jquery-dynamically-adding-form-elements/
$('#addfield').click(function() { $('#addfield').click(function () {
var field_name=window.prompt("fieldname?",""); var field_name = window.prompt("fieldname?", "");
if (field_name !="") { if (field_name != "") {
$('#submitbutton').before($('<span></span>') $('#submitbutton').before($('<span></span>')
.append("<label>"+field_name+"</label>") .append("<label>" + field_name + "</label>")
.append("<input class='input-text' type='text' id='"+field_name+"' name='"+field_name+"'/>") .append("<input class='input-text' type='text' id='" + field_name + "' name='" + field_name + "'/>")
); );
} }
}); });
}); });
}; };
</script> </script>
<form id="editform" class="nice" method="post"> <form id="editform" class="nice" method="post">
<?php <?php
   
} }
foreach ($row as $key => $value) { foreach ($row as $key => $value) {
echo displayValue($key, $value, $mode); echo displayValue($key, $value, $mode);
} }
if ($mode == "view") { if ($mode == "view") {
echo "</table></div>"; echo "</table></div>";
echo ' </div><!--/span--> echo ' </div><!--/span-->
</div><!--/row--> </div><!--/row-->
</div><!--/span--> </div><!--/span-->
</div><!--/row-->'; </div><!--/row-->';
} }
if ($mode == "edit") { if ($mode == "edit") {
echo '<input id="submitbutton" type="submit"/></form>'; echo '<input id="submitbutton" type="submit"/></form>';
} }
} else { } else {
// show all list // show all list
include_header('Agencies'); include_header('Agencies');
echo ' <div class="container-fluid"> echo ' <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
<div class="span3"> <div class="span3">
<div class="well sidebar-nav"> <div class="well sidebar-nav">
<ul class="nav nav-list"> <ul class="nav nav-list">
<li class="nav-header">Sidebar</li>'; <li class="nav-header">Sidebar</li>';
echo ' </ul> echo ' </ul>
</div><!--/.well --> </div><!--/.well -->
</div><!--/span--> </div><!--/span-->
<div class="span9"> <div class="span9">
<div class="hero-unit"> <div class="hero-unit">
<h1>Australian Government Agencies</h1> <h1>Australian Government Agencies</h1>
<p>Explore collected information about Australian Government Agencies below.</p> <p>Explore collected information about Australian Government Agencies below.</p>
   
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span4">'; <div class="span4">';
try { try {
$rows = $db->get_view("app", "byCanonicalName")->rows; $rows = $db->get_view("app", "byCanonicalName")->rows;
//print_r($rows); //print_r($rows);
$rowCount = count($rows); $rowCount = count($rows);
foreach ($rows as $i => $row) { foreach ($rows as $i => $row) {
if ($i % ($rowCount/3) == 0 && $i != 0 && $i != $rowCount -2 ) echo '</div><div class="span4">'; if ($i % ($rowCount / 3) == 0 && $i != 0 && $i != $rowCount - 2) echo '</div><div class="span4">';
// print_r($row); // print_r($row);
echo '<span itemscope itemtype="http://schema.org/GovernmentOrganization" typeof="schema:GovernmentOrganization foaf:Organization" about="getAgency.php?id=' . $row->value->_id . '"> echo '<span itemscope itemtype="http://schema.org/GovernmentOrganization" typeof="schema:GovernmentOrganization foaf:Organization" about="getAgency.php?id=' . $row->value->_id . '">
<a href="getAgency.php?id=' . $row->value->_id . '" rel="schema:url foaf:page" property="schema:name foaf:name" itemprop="url"><span itemprop="name">' . <a href="getAgency.php?id=' . $row->value->_id . '" rel="schema:url foaf:page" property="schema:name foaf:name" itemprop="url"><span itemprop="name">' .
(isset($row->value->name) ? $row->value->name : "ERROR NAME MISSING") (isset($row->value->name) ? $row->value->name : "ERROR NAME MISSING")
. '</span></a></span><br><br>'; . '</span></a></span><br><br>';
} }
   
} catch (SetteeRestClientException $e) { } catch (SetteeRestClientException $e) {
setteErrorHandler($e); setteErrorHandler($e);
} }
echo ' </div><!--/span--> echo ' </div><!--/span-->
</div><!--/row--> </div><!--/row-->
</div><!--/span--> </div><!--/span-->
</div><!--/row-->'; </div><!--/row-->';
} }
   
include_footer(); include_footer();
?> ?>
   
<?php <?php
   
date_default_timezone_set("Australia/Sydney"); date_default_timezone_set("Australia/Sydney");
   
$basePath = ""; $basePath = "";
if (strstr($_SERVER['PHP_SELF'], "alaveteli/") if (strstr($_SERVER['PHP_SELF'], "alaveteli/")
|| strstr($_SERVER['PHP_SELF'], "admin/") || strstr($_SERVER['PHP_SELF'], "admin/")
|| strstr($_SERVER['PHP_SELF'], "lib/") || strstr($_SERVER['PHP_SELF'], "lib/")
|| strstr($_SERVER['PHP_SELF'], "include/") || strstr($_SERVER['PHP_SELF'], "include/")
|| strstr($_SERVER['PHP_SELF'], "documents/") || strstr($_SERVER['PHP_SELF'], "documents/")
|| $_SERVER['SERVER_NAME'] == "disclosurelo.gs" || $_SERVER['SERVER_NAME'] == "disclosurelo.gs"
|| $_SERVER['SERVER_NAME'] == "www.disclosurelo.gs" || $_SERVER['SERVER_NAME'] == "www.disclosurelo.gs"
) )
$basePath = "../"; $basePath = "../";
   
include_once ('couchdb.inc.php'); include_once ('couchdb.inc.php');
include_once ('template.inc.php'); include_once ('template.inc.php');
require_once $basePath.'lib/Requests/library/Requests.php'; require_once $basePath.'lib/Requests/library/Requests.php';
   
Requests::register_autoloader(); Requests::register_autoloader();
$ENV = "DEV"; $ENV = "DEV";
if (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] != 'localhost') { if (false && isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] != 'localhost') {
   
require $basePath."lib/amon-php/amon.php"; require $basePath."lib/amon-php/amon.php";
Amon::config(array('address'=> 'http://127.0.0.1:2464', Amon::config(array('address'=> 'http://127.0.0.1:2464',
'protocol' => 'http', 'protocol' => 'http',
'secret_key' => "I2LJ6dOMmlnXgVAkTPFXd5M3ejkga8Gd2FbBt6iqZdw")); 'secret_key' => "I2LJ6dOMmlnXgVAkTPFXd5M3ejkga8Gd2FbBt6iqZdw"));
Amon::setup_exception_handler(); Amon::setup_exception_handler();
$ENV = "PROD"; $ENV = "PROD";
} }
   
# Convert a stdClass to an Array. http://www.php.net/manual/en/language.types.object.php#102735 # Convert a stdClass to an Array. http://www.php.net/manual/en/language.types.object.php#102735
   
function object_to_array(stdClass $Class) { function object_to_array(stdClass $Class) {
# Typecast to (array) automatically converts stdClass -> array. # Typecast to (array) automatically converts stdClass -> array.
$Class = (array) $Class; $Class = (array) $Class;
   
# Iterate through the former properties looking for any stdClass properties. # Iterate through the former properties looking for any stdClass properties.
# Recursively apply (array). # Recursively apply (array).
foreach ($Class as $key => $value) { foreach ($Class as $key => $value) {
if (is_object($value) && get_class($value) === 'stdClass') { if (is_object($value) && get_class($value) === 'stdClass') {
$Class[$key] = object_to_array($value); $Class[$key] = object_to_array($value);
} }
} }
return $Class; return $Class;
} }
   
# Convert an Array to stdClass. http://www.php.net/manual/en/language.types.object.php#102735 # Convert an Array to stdClass. http://www.php.net/manual/en/language.types.object.php#102735
   
function array_to_object(array $array) { function array_to_object(array $array) {
# Iterate through our array looking for array values. # Iterate through our array looking for array values.
# If found recurvisely call itself. # If found recurvisely call itself.
foreach ($array as $key => $value) { foreach ($array as $key => $value) {
if (is_array($value)) { if (is_array($value)) {
$array[$key] = array_to_object($value); $array[$key] = array_to_object($value);
} }
} }
   
# Typecast to (object) will automatically convert array -> stdClass # Typecast to (object) will automatically convert array -> stdClass
return (object) $array; return (object) $array;
} }
   
function dept_to_portfolio($deptName) { function dept_to_portfolio($deptName) {
return trim(str_replace("Department of", "", str_replace("Department of the", "Department of", $deptName))); return trim(str_replace("Department of", "", str_replace("Department of the", "Department of", $deptName)));
} }
function phrase_to_tag ($phrase) { function phrase_to_tag ($phrase) {
return str_replace(" ","_",str_replace("'","",str_replace(",","",strtolower($phrase)))); return str_replace(" ","_",str_replace("'","",str_replace(",","",strtolower($phrase))));
} }
function local_url() { function local_url() {
return "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/"; return "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/";
} }
function GetDomain($url) function GetDomain($url)
{ {
$nowww = ereg_replace('www\.','',$url); $nowww = ereg_replace('www\.','',$url);
$domain = parse_url($nowww); $domain = parse_url($nowww);
if(!empty($domain["host"])) if(!empty($domain["host"]))
{ {
return $domain["host"]; return $domain["host"];
} else } else
{ {
return $domain["path"]; return $domain["path"];
} }
} }
   
<?php <?php
   
include $basePath . "schemas/schemas.inc.php"; include $basePath . "schemas/schemas.inc.php";
   
require ($basePath . 'couchdb/settee/src/settee.php'); require ($basePath . 'couchdb/settee/src/settee.php');
   
if (php_uname('n') == "vanille") { if (php_uname('n') == "vanille") {
$serverAddr = 'http://192.168.178.21:5984/'; $serverAddr = 'http://192.168.178.21:5984/';
} else } else
if (php_uname('n') == "KYUUBEY") { if (php_uname('n') == "KYUUBEY") {
   
$serverAddr = 'http://192.168.1.148:5984/'; $serverAddr = 'http://192.168.1.148:5984/';
$serverAddr = 'http://127.0.0.1:5984/'; $serverAddr = 'http://127.0.0.1:5984/';
} else } else
if (php_uname('n') == "ikurt-20") { if (php_uname('n') == "ikurt-20") {
   
$serverAddr = 'http://192.168.1.113:5984/'; //$serverAddr = 'http://192.168.1.113:5984/';
//$serverAddr = 'http://127.0.0.1:5984/'; $serverAddr = 'http://127.0.0.1:5984/';
} else { } else {
$serverAddr = 'http://127.0.0.1:5984/'; $serverAddr = 'http://127.0.0.1:5984/';
} }
$server = new SetteeServer($serverAddr); $server = new SetteeServer($serverAddr);
   
function setteErrorHandler($e) function setteErrorHandler($e)
{ {
if (class_exists('Amon')) { if (class_exists('Amon')) {
Amon::log($e->getMessage() . " " . print_r($_SERVER, true), array('error')); Amon::log($e->getMessage() . " " . print_r($_SERVER, true), array('error'));
} }
echo $e->getMessage() . "<br>" . PHP_EOL; echo $e->getMessage() . "<br>" . PHP_EOL;
} }
   
<?php <?php
   
function include_header($title) { function include_header($title) {
global $basePath; global $basePath;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
   
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
   
<!-- Set the viewport width to device width for mobile --> <!-- Set the viewport width to device width for mobile -->
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
   
<title><?php echo $title; ?> - Disclosr</title> <title><?php echo $title; ?> - Disclosr</title>
   
<!-- Included CSS Files --> <!-- Included CSS Files -->
<link href="<?php echo $basePath ?>css/bootstrap.min.css" rel="stylesheet"> <link href="<?php echo $basePath ?>css/bootstrap.min.css" rel="stylesheet">
<style type="text/css"> <style type="text/css">
body { body {
padding-top: 60px; padding-top: 60px;
padding-bottom: 40px; padding-bottom: 40px;
} }
.sidebar-nav { .sidebar-nav {
padding: 9px 0; padding: 9px 0;
} }
  .flotr-dummy-div {
  margin-left: -999px;
  }
</style> </style>
<link href="<?php echo $basePath ?>css/bootstrap-responsive.min.css" rel="stylesheet"> <link href="<?php echo $basePath ?>css/bootstrap-responsive.min.css" rel="stylesheet">
<!--[if lt IE 9]> <!--[if lt IE 9]>
<link rel="stylesheet" href="<?php echo $basePath ?>stylesheets/ie.css"> <link rel="stylesheet" href="<?php echo $basePath ?>stylesheets/ie.css">
<![endif]--> <![endif]-->
   
   
<!-- IE Fix for HTML5 Tags --> <!-- IE Fix for HTML5 Tags -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
   
</head> </head>
<body xmlns:schema="http://schema.org/" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <body xmlns:schema="http://schema.org/" xmlns:foaf="http://xmlns.com/foaf/0.1/">
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</a> </a>
<a class="brand" href="#">Disclosr</a> <a class="brand" href="#">Disclosr</a>
<div class="nav-collapse collapse"> <div class="nav-collapse collapse">
<ul class="nav"> <ul class="nav">
<li><a href="getAgency.php">Agencies</a></li> <li><a href="getAgency.php">Agencies</a></li>
  <li><a href="ranking.php">Open Gov Ranking</a></li>
<li><a href="headcount.php">Employee Headcount Graph</a></li> <li><a href="headcount.php">Employee Headcount Graph</a></li>
<li><a href="budget.php">Budget Graph</a></li> <li><a href="budget.php">Budget Graph</a></li>
<li><a href="about.php">About/FAQ</a></li> <li><a href="about.php">About/FAQ</a></li>
</ul> </ul>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div> </div>
</div> </div>
</div> </div>
   
<div class="container-fluid"> <div class="container-fluid">
<?php } <?php }
   
function include_footer() { function include_footer() {
global $basePath; global $basePath;
?> ?>
</div> <!-- /container --> </div> <!-- /container -->
<hr> <hr>
   
<footer> <footer>
<p>Not affiliated with or endorsed by any government agency.</p> <p>Not affiliated with or endorsed by any government agency.</p>
</footer> </footer>
   
   
<!-- Included JS Files --> <!-- Included JS Files -->
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<?php echo $basePath ?>js/flotr2/flotr2.js"></script> <script type="text/javascript" src="<?php echo $basePath ?>js/flotr2/flotr2.js"></script>
<?php <?php
if (strpos($_SERVER['SERVER_NAME'], ".gs")) { if (strpos($_SERVER['SERVER_NAME'], ".gs")) {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
   
var _gaq = _gaq || []; var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12341040-2']); _gaq.push(['_setAccount', 'UA-12341040-2']);
_gaq.push(['_trackPageview']); _gaq.push(['_trackPageview']);
   
(function() { (function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(); })();
   
</script> </script>
   
</body> </body>
</html> </html>
   
<?php } <?php }
} }
   
<?php  
 
/*  
* Copyright (C) 2012 Michael Bemmerl <mail@mx-server.de>  
*  
* This file is part of the "Universal Feed Writer" project.  
*  
* This program is free software: you can redistribute it and/or modify  
* it under the terms of the GNU General Public License as published by  
* the Free Software Foundation, either version 3 of the License, or  
* (at your option) any later version.  
*  
* This program is distributed in the hope that it will be useful,  
* but WITHOUT ANY WARRANTY; without even the implied warranty of  
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
* GNU General Public License for more details.  
*  
* You should have received a copy of the GNU General Public License  
* along with this program. If not, see <http://www.gnu.org/licenses/>.  
*/  
 
if (!class_exists('FeedWriter'))  
require dirname(__FILE__) . '/FeedWriter.php';  
 
/**  
* Wrapper for creating RSS1 feeds  
*  
* @package UniversalFeedWriter  
*/  
class RSS1FeedWriter extends FeedWriter  
{  
function __construct()  
{  
parent::__construct(RSS1);  
}  
}  
 
/**  
* Wrapper for creating RSS2 feeds  
*  
* @package UniversalFeedWriter  
*/  
class RSS2FeedWriter extends FeedWriter  
{  
function __construct()  
{  
parent::__construct(RSS2);  
}  
}  
 
/**  
* Wrapper for creating ATOM feeds  
*  
* @package UniversalFeedWriter  
*/  
class ATOMFeedWriter extends FeedWriter  
{  
function __construct()  
{  
parent::__construct(ATOM);  
}  
}  
 
This package can be used to generate feeds in either RSS 1.0, RSS 2.0 or ATOM This package can be used to generate feeds in either RSS 1.0, RSS 2.0 or ATOM
formats. formats.
There are three main classes that abstracts the feed information and another to There are three main classes that abstract the feed information and another to
encapsulate the feed items information. encapsulate the feed items information.
Applications can create feed writer object, several feed item objects, set Applications can create feed writer object, several feed item objects, set
several types of properties of either feeds and feed items, and add items to several types of properties of either feeds and feed items, and add items to
the feed. the feed.
Once a feed is fully composed with its items, the feed writer class can generate Once a feed is fully composed with its items, the feed writer class can generate
the necessary XML structure to describe the feed in the RSS or ATOM formats. the necessary XML structure to describe the feed in the RSS or ATOM formats.
The feed is generated as part of the current feed output. The feed is generated as part of the current feed output.
Requirements Requirements
============ ============
PHP >= 5.0 PHP >= 5.3
   
  If you don't have 5.3 available on your system, there's a version supporting
  PHP >= 5.0 in the "legacy-php-5.0" branch.
   
   
  Documentation
  =============
   
  The documentation can be found in the "gh-pages" branch or on GitHub Pages:
  http://mibe.github.io/FeedWriter/
   
   
  Authors
  =======
  (in chronological order)
   
  Anis uddin Ahmad
  Michael Bemmerl
  Phil Freo
  Paul Ferrett
  Brennen Bearnes
  Michael Robinson
   
  <<<<<<< HEAD
<?php <?php
   
/* /*
* Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com> * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
* *
* This file is part of the "Universal Feed Writer" project. * This file is part of the "Universal Feed Writer" project.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
   
   
include("../FeedTypes.php"); include("../FeedTypes.php");
// IMPORTANT : No need to add id for feed or channel. It will be automatically created from link. // IMPORTANT : No need to add id for feed or channel. It will be automatically created from link.
   
//Creating an instance of ATOMFeedWriter class. //Creating an instance of ATOMFeedWriter class.
//The constant ATOM is passed to mention the version //The constant ATOM is passed to mention the version
$TestFeed = new ATOMFeedWriter(); $TestFeed = new ATOMFeedWriter();
   
//Setting the channel elements //Setting the channel elements
//Use wrapper functions for common elements //Use wrapper functions for common elements
$TestFeed->setTitle('Testing the RSS writer class'); $TestFeed->setTitle('Testing the RSS writer class');
$TestFeed->setLink('http://www.ajaxray.com/rss2/channel/about'); $TestFeed->setLink('http://www.ajaxray.com/rss2/channel/about');
//For other channel elements, use setChannelElement() function //For other channel elements, use setChannelElement() function
$TestFeed->setChannelElement('updated', date(DATE_ATOM , time())); $TestFeed->setChannelElement('updated', date(DATE_ATOM , time()));
$TestFeed->setChannelElement('author', array('name'=>'Anis uddin Ahmad')); $TestFeed->setChannelElement('author', array('name'=>'Anis uddin Ahmad'));
   
//Adding a feed. Genarally this protion will be in a loop and add all feeds. //Adding a feed. Genarally this protion will be in a loop and add all feeds.
   
//Create an empty FeedItem //Create an empty FeedItem
$newItem = $TestFeed->createNewItem(); $newItem = $TestFeed->createNewItem();
//Add elements to the feed item //Add elements to the feed item
//Use wrapper functions to add common feed elements //Use wrapper functions to add common feed elements
$newItem->setTitle('The first feed'); $newItem->setTitle('The first feed');
$newItem->setLink('http://www.yahoo.com'); $newItem->setLink('http://www.yahoo.com');
$newItem->setDate(time()); $newItem->setDate(time());
//Internally changed to "summary" tag for ATOM feed //Internally changed to "summary" tag for ATOM feed
$newItem->setDescription('This is a test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class'); $newItem->setDescription('This is a test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class');
   
//Now add the feed item //Now add the feed item
$TestFeed->addItem($newItem); $TestFeed->addItem($newItem);
//OK. Everything is done. Now genarate the feed. //OK. Everything is done. Now genarate the feed.
$TestFeed->generateFeed(); $TestFeed->generateFeed();
?> ?>
  =======
  <?php
   
  // You should use an autoloader instead of including the files directly.
  // This is done here only to make the examples work out of the box.
  include('../Item.php');
  include('../Feed.php');
  include('../ATOM.php');
   
  date_default_timezone_set('UTC');
   
  use \FeedWriter\ATOM;
   
  /*
  * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
  *
  * This file is part of the "Universal Feed Writer" project.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
   
  // IMPORTANT : No need to add id for feed or channel. It will be automatically created from link.
   
  //Creating an instance of ATOM class.
  $TestFeed = new ATOM;
   
  //Setting the channel elements
  //Use wrapper functions for common elements
  $TestFeed->setTitle('Testing the RSS writer class');
  $TestFeed->setLink('http://www.ajaxray.com/rss2/channel/about');
  $TestFeed->setDate(new DateTime());
   
  //For other channel elements, use setChannelElement() function
  $TestFeed->setChannelElement('author', array('name'=>'Anis uddin Ahmad'));
   
  //You can add additional link elements, e.g. to a PubSubHubbub server with custom relations.
  $TestFeed->setSelfLink('http://example.com/myfeed');
  $TestFeed->setAtomLink('http://pubsubhubbub.appspot.com', 'hub');
   
  //Adding a feed. Generally this portion will be in a loop and add all feeds.
   
  //Create an empty Item
  $newItem = $TestFeed->createNewItem();
   
  //Add elements to the feed item
  //Use wrapper functions to add common feed elements
  $newItem->setTitle('The first feed');
  $newItem->setLink('http://www.yahoo.com');
  $newItem->setDate(time());
  $newItem->setAuthor('Anis uddin Ahmad', 'anis@example.invalid');
  $newItem->setEnclosure('http://upload.wikimedia.org/wikipedia/commons/4/49/En-us-hello-1.ogg', 11779, 'audio/ogg');
   
  //Internally changed to "summary" tag for ATOM feed
  $newItem->setDescription('This is a test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class');
  $newItem->setContent('<h1>hi.</h1> <p>This is the content for the entry.</p>');
   
  //Now add the feed item
  $TestFeed->addItem($newItem);
   
  //OK. Everything is done. Now generate the feed.
  $TestFeed->printFeed();
  >>>>>>> origin/master
   
  <<<<<<< HEAD
<?php <?php
   
/* /*
* Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com> * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
* *
* This file is part of the "Universal Feed Writer" project. * This file is part of the "Universal Feed Writer" project.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
   
// This is a minimum example of using the class // This is a minimum example of using the class
include("../FeedTypes.php"); include("../FeedTypes.php");
//Creating an instance of RSS2FeedWriter class. //Creating an instance of RSS2FeedWriter class.
$TestFeed = new RSS2FeedWriter(); $TestFeed = new RSS2FeedWriter();
//Setting the channel elements //Setting the channel elements
//Use wrapper functions for common channel elements //Use wrapper functions for common channel elements
$TestFeed->setTitle('Testing & Checking the RSS writer class'); $TestFeed->setTitle('Testing & Checking the RSS writer class');
$TestFeed->setLink('http://www.ajaxray.com/projects/rss'); $TestFeed->setLink('http://www.ajaxray.com/projects/rss');
$TestFeed->setDescription('This is a test of creating a RSS 2.0 feed Universal Feed Writer'); $TestFeed->setDescription('This is a test of creating a RSS 2.0 feed Universal Feed Writer');
//Image title and link must match with the 'title' and 'link' channel elements for valid RSS 2.0 //Image title and link must match with the 'title' and 'link' channel elements for valid RSS 2.0
$TestFeed->setImage('Testing the RSS writer class','http://www.ajaxray.com/projects/rss','http://www.rightbrainsolution.com/_resources/img/logo.png'); $TestFeed->setImage('Testing the RSS writer class','http://www.ajaxray.com/projects/rss','http://www.rightbrainsolution.com/_resources/img/logo.png');
//Let's add some feed items: Create two empty FeedItem instances //Let's add some feed items: Create two empty FeedItem instances
$itemOne = $TestFeed->createNewItem(); $itemOne = $TestFeed->createNewItem();
$itemTwo = $TestFeed->createNewItem(); $itemTwo = $TestFeed->createNewItem();
//Add item details //Add item details
$itemOne->setTitle('The title of the first entry.'); $itemOne->setTitle('The title of the first entry.');
$itemOne->setLink('http://www.google.de'); $itemOne->setLink('http://www.google.de');
$itemOne->setDate(time()); $itemOne->setDate(time());
$itemOne->setDescription('And here\'s the description of the entry.'); $itemOne->setDescription('And here\'s the description of the entry.');
$itemTwo->setTitle('Lorem ipsum'); $itemTwo->setTitle('Lorem ipsum');
$itemTwo->setLink('http://www.example.com'); $itemTwo->setLink('http://www.example.com');
$itemTwo->setDate(1234567890); $itemTwo->setDate(1234567890);
$itemTwo->setDescription('Lorem ipsum dolor sit amet, consectetur, adipisci velit'); $itemTwo->setDescription('Lorem ipsum dolor sit amet, consectetur, adipisci velit');
//Now add the feed item //Now add the feed item
$TestFeed->addItem($itemOne); $TestFeed->addItem($itemOne);
$TestFeed->addItem($itemTwo); $TestFeed->addItem($itemTwo);
//OK. Everything is done. Now genarate the feed. //OK. Everything is done. Now genarate the feed.
$TestFeed->generateFeed(); $TestFeed->generateFeed();
?> ?>
  =======
  <?php
   
  // You should use an autoloader instead of including the files directly.
  // This is done here only to make the examples work out of the box.
  include('../Item.php');
  include('../Feed.php');
  include('../RSS2.php');
   
  date_default_timezone_set('UTC');
   
  use \FeedWriter\RSS2;
   
  /*
  * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
  *
  * This file is part of the "Universal Feed Writer" project.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
   
  //Creating an instance of RSS2 class.
  $TestFeed = new RSS2;
   
  //Setting the channel elements
  //Use wrapper functions for common channel elements
  $TestFeed->setTitle('Testing & Checking the RSS writer class');
  $TestFeed->setLink('http://www.ajaxray.com/projects/rss');
  $TestFeed->setDescription('This is a test of creating a RSS 2.0 feed Universal Feed Writer');
   
  //Image title and link must match with the 'title' and 'link' channel elements for valid RSS 2.0
  $TestFeed->setImage('Testing & Checking the RSS writer class','http://www.ajaxray.com/projects/rss','http://www.rightbrainsolution.com/_resources/img/logo.png');
   
  //Let's add some feed items: Create two empty Item instances
  $itemOne = $TestFeed->createNewItem();
  $itemTwo = $TestFeed->createNewItem();
   
  //Add item details
  $itemOne->setTitle('The title of the first entry.');
  $itemOne->setLink('http://www.google.de');
  $itemOne->setDate(time());
  $itemOne->setDescription('And here\'s the description of the entry.');
   
  $itemTwo->setTitle('Lorem ipsum');
  $itemTwo->setLink('http://www.example.com');
  $itemTwo->setDate(1234567890);
  $itemTwo->setDescription('Lorem ipsum dolor sit amet, consectetur, adipisci velit');
   
  //Now add the feed item
  $TestFeed->addItem($itemOne);
  $TestFeed->addItem($itemTwo);
   
  //OK. Everything is done. Now generate the feed.
  $TestFeed->printFeed();
  >>>>>>> origin/master
   
  <<<<<<< HEAD
<?php <?php
   
/* /*
* Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com> * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
* *
* This file is part of the "Universal Feed Writer" project. * This file is part of the "Universal Feed Writer" project.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
   
include("../FeedTypes.php"); include("../FeedTypes.php");
//Creating an instance of RSS1FeedWriter class. //Creating an instance of RSS1FeedWriter class.
//The constant RSS1 is passed to mention the version //The constant RSS1 is passed to mention the version
$TestFeed = new RSS1FeedWriter(); $TestFeed = new RSS1FeedWriter();
//Setting the channel elements //Setting the channel elements
//Use wrapper functions for common elements //Use wrapper functions for common elements
//For other optional channel elements, use setChannelElement() function //For other optional channel elements, use setChannelElement() function
$TestFeed->setTitle('Testing the RSS writer class'); $TestFeed->setTitle('Testing the RSS writer class');
$TestFeed->setLink('http://www.ajaxray.com/rss2/channel/about'); $TestFeed->setLink('http://www.ajaxray.com/rss2/channel/about');
$TestFeed->setDescription('This is test of creating a RSS 1.0 feed by Universal Feed Writer'); $TestFeed->setDescription('This is test of creating a RSS 1.0 feed by Universal Feed Writer');
//It's important for RSS 1.0 //It's important for RSS 1.0
$TestFeed->setChannelAbout('http://www.ajaxray.com/rss2/channel/about'); $TestFeed->setChannelAbout('http://www.ajaxray.com/rss2/channel/about');
//Adding a feed. Genarally this protion will be in a loop and add all feeds. //Adding a feed. Genarally this protion will be in a loop and add all feeds.
//Create an empty FeedItem //Create an empty FeedItem
$newItem = $TestFeed->createNewItem(); $newItem = $TestFeed->createNewItem();
//Add elements to the feed item //Add elements to the feed item
//Use wrapper functions to add common feed elements //Use wrapper functions to add common feed elements
$newItem->setTitle('The first feed'); $newItem->setTitle('The first feed');
$newItem->setLink('http://www.yahoo.com'); $newItem->setLink('http://www.yahoo.com');
//The parameter is a timestamp for setDate() function //The parameter is a timestamp for setDate() function
$newItem->setDate(time()); $newItem->setDate(time());
$newItem->setDescription('This is test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class'); $newItem->setDescription('This is test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class');
//Use core addElement() function for other supported optional elements //Use core addElement() function for other supported optional elements
$newItem->addElement('dc:subject', 'Nothing but test'); $newItem->addElement('dc:subject', 'Nothing but test');
//Now add the feed item //Now add the feed item
$TestFeed->addItem($newItem); $TestFeed->addItem($newItem);
//Adding multiple elements from array //Adding multiple elements from array
//Elements which have an attribute cannot be added by this way //Elements which have an attribute cannot be added by this way
$newItem = $TestFeed->createNewItem(); $newItem = $TestFeed->createNewItem();
$newItem->addElementArray(array('title'=>'The 2nd feed', 'link'=>'http://www.google.com', 'description'=>'This is a test of the FeedWriter class')); $newItem->addElementArray(array('title'=>'The 2nd feed', 'link'=>'http://www.google.com', 'description'=>'This is a test of the FeedWriter class'));
$TestFeed->addItem($newItem); $TestFeed->addItem($newItem);
//OK. Everything is done. Now genarate the feed. //OK. Everything is done. Now genarate the feed.
$TestFeed->generateFeed(); $TestFeed->generateFeed();
?> ?>
  =======
  <?php
   
  // You should use an autoloader instead of including the files directly.
  // This is done here only to make the examples work out of the box.
  include('../Item.php');
  include('../Feed.php');
  include('../RSS1.php');
   
  date_default_timezone_set('UTC');
   
  use \FeedWriter\RSS1;
   
  /*
  * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
  *
  * This file is part of the "Universal Feed Writer" project.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
   
  //Creating an instance of RSS1 class.
  $TestFeed = new RSS1;
   
  //Setting the channel elements
  //Use wrapper functions for common elements
  //For other optional channel elements, use setChannelElement() function
  $TestFeed->setTitle('Testing the RSS writer class');
  $TestFeed->setLink('http://www.ajaxray.com/rss2/channel/about');
  $TestFeed->setDescription('This is test of creating a RSS 1.0 feed by Universal Feed Writer');
   
  //It's important for RSS 1.0
  $TestFeed->setChannelAbout('http://www.ajaxray.com/rss2/channel/about');
   
  //Adding a feed. Generally this portion will be in a loop and add all feeds.
   
  //Create an empty FeedItem
  $newItem = $TestFeed->createNewItem();
   
  //Add elements to the feed item
  //Use wrapper functions to add common feed elements
  $newItem->setTitle('The first feed');
  $newItem->setLink('http://www.yahoo.com');
  //The parameter is a timestamp for setDate() function
  $newItem->setDate(time());
  $newItem->setDescription('This is test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class');
  //Use core addElement() function for other supported optional elements
  $newItem->addElement('dc:subject', 'Nothing but test');
   
  //Now add the feed item
  $TestFeed->addItem($newItem);
   
  //Adding multiple elements from array
  //Elements which have an attribute cannot be added by this way
  $newItem = $TestFeed->createNewItem();
  $newItem->addElementArray(array('title'=>'The 2nd feed', 'link'=>'http://www.google.com', 'description'=>'This is a test of the FeedWriter class'));
  $TestFeed->addItem($newItem);
   
  //OK. Everything is done. Now generate the feed.
  $TestFeed->printFeed();
  >>>>>>> origin/master
   
  <<<<<<< HEAD
<?php <?php
   
/* /*
* Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com> * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
* *
* This file is part of the "Universal Feed Writer" project. * This file is part of the "Universal Feed Writer" project.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
   
include("../FeedTypes.php"); include("../FeedTypes.php");
//Creating an instance of RSS2FeedWriter class. //Creating an instance of RSS2FeedWriter class.
//The constant RSS2 is passed to mention the version //The constant RSS2 is passed to mention the version
$TestFeed = new RSS2FeedWriter(); $TestFeed = new RSS2FeedWriter();
//Setting the channel elements //Setting the channel elements
//Use wrapper functions for common channel elements //Use wrapper functions for common channel elements
$TestFeed->setTitle('Testing & Checking the RSS writer class'); $TestFeed->setTitle('Testing & Checking the RSS writer class');
$TestFeed->setLink('http://www.ajaxray.com/projects/rss'); $TestFeed->setLink('http://www.ajaxray.com/projects/rss');
$TestFeed->setDescription('This is a test of creating a RSS 2.0 feed with Universal Feed Writer'); $TestFeed->setDescription('This is a test of creating a RSS 2.0 feed with Universal Feed Writer');
//Image title and link must match with the 'title' and 'link' channel elements for RSS 2.0 //Image title and link must match with the 'title' and 'link' channel elements for RSS 2.0
$TestFeed->setImage('Testing the RSS writer class','http://www.ajaxray.com/projects/rss','http://www.rightbrainsolution.com/_resources/img/logo.png'); $TestFeed->setImage('Testing the RSS writer class','http://www.ajaxray.com/projects/rss','http://www.rightbrainsolution.com/_resources/img/logo.png');
//Use core setChannelElement() function for other optional channels //Use core setChannelElement() function for other optional channels
$TestFeed->setChannelElement('language', 'en-us'); $TestFeed->setChannelElement('language', 'en-us');
$TestFeed->setChannelElement('pubDate', date(DATE_RSS, time())); $TestFeed->setChannelElement('pubDate', date(DATE_RSS, time()));
//Adding a feed. Genarally this portion will be in a loop and add all feeds. //Adding a feed. Genarally this portion will be in a loop and add all feeds.
//Create an empty FeedItem //Create an empty FeedItem
$newItem = $TestFeed->createNewItem(); $newItem = $TestFeed->createNewItem();
//Add elements to the feed item //Add elements to the feed item
//Use wrapper functions to add common feed elements //Use wrapper functions to add common feed elements
$newItem->setTitle('The first feed'); $newItem->setTitle('The first feed');
$newItem->setLink('http://www.yahoo.com'); $newItem->setLink('http://www.yahoo.com');
//The parameter is a timestamp for setDate() function //The parameter is a timestamp for setDate() function
$newItem->setDate(time()); $newItem->setDate(time());
$newItem->setDescription('This is a test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class'); $newItem->setDescription('This is a test of adding CDATA encoded description by the php <b>Universal Feed Writer</b> class');
$newItem->setEncloser('http://www.attrtest.com', '1283629', 'audio/mpeg'); $newItem->setEncloser('http://www.attrtest.com', '1283629', 'audio/mpeg');
//Use core addElement() function for other supported optional elements //Use core addElement() function for other supported optional elements
$newItem->addElement('author', 'admin@ajaxray.com (Anis uddin Ahmad)'); $newItem->addElement('author', 'admin@ajaxray.com (Anis uddin Ahmad)');
//Attributes have to passed as array in 3rd parameter //Attributes have to passed as array in 3rd parameter
$newItem->addElement('guid', 'http://www.ajaxray.com',array('isPermaLink'=>'true')); $newItem->addElement('guid', 'http://www.ajaxray.com',array('isPermaLink'=>'true'));
//Now add the feed item //Now add the feed item
$TestFeed->addItem($newItem); $TestFeed->addItem($newItem);
//Another method to add feeds from array() //Another method to add feeds from array()
//Elements which have attribute cannot be added by this way //Elements which have attribute cannot be added by this way
$newItem = $TestFeed->createNewItem(); $newItem = $TestFeed->createNewItem();
$newItem->addElementArray(array('title'=>'The 2nd feed', 'link'=>'http://www.google.com', 'description'=>'This is a test of the FeedWriter class')); $newItem->addElementArray(array('title'=>'The 2nd feed', 'link'=>'http://www.google.com', 'description'=>'This is a test of the FeedWriter class'));
$TestFeed->addItem($newItem); $TestFeed->addItem($newItem);
//OK. Everything is done. Now genarate the feed. //OK. Everything is done. Now genarate the feed.
$TestFeed->generateFeed(); $TestFeed->generateFeed();
?> ?>
  =======
  <?php
   
  // You should use an autoloader instead of including the files directly.
  // This is done here only to make the examples work out of the box.
  include('../Item.php');
  include('../Feed.php');
  include('../RSS2.php');
   
  date_default_timezone_set('UTC');
   
  use \FeedWriter\RSS2;
   
  /**
  * Copyright (C) 2008 Anis uddin Ahmad <anisniit@gmail.com>
  * Copyright (C) 2013 Michael Bemmerl <mail@mx-server.de>
  *
  * This file is part of the "Universal Feed Writer" project.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
   
  // Creating an instance of RSS2 class.
  $TestFeed = new RSS2;
   
  // Setting some basic channel elements. These three elements are mandatory.
  $TestFeed->setTitle('Testing & Checking the Feed Writer project');
  $TestFeed->setLink('https://github.com/mibe/FeedWriter');
  $TestFeed->setDescription('This is just an example how to use the Feed Writer project in your code.');
   
  // Image title and link must match with the 'title' and 'link' channel elements for RSS 2.0,
  // which were set above.
  $TestFeed->setImage('Testing & Checking the Feed Writer project', 'https://github.com/mibe/FeedWriter', 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Rss-feed.svg/256px-Rss-feed.svg.png');
   
  // Use core setChannelElement() function for other optional channel elements.
  // See http://www.rssboard.org/rss-specification#optionalChannelElements
  // for other optional channel elements. Here the language code for American English and
  $TestFeed->setChannelElement('language', 'en-US');
   
  // The date when this feed was lastly updated. The publication date is also set.
  $TestFeed->setDate(date(DATE_RSS, time()));
  $TestFeed->setChannelElement('pubDate', date(\DATE_RSS, strtotime('2013-04-06')));
   
  // You can add additional link elements, e.g. to a PubSubHubbub server with custom relations.
  // It's recommended to provide a backlink to the feed URL.
  $TestFeed->setSelfLink('http://example.com/myfeed');
  $TestFeed->setAtomLink('http://pubsubhubbub.appspot.com', 'hub');
   
  // You can add more XML namespaces for more custom channel elements which are not defined
  // in the RSS 2 specification. Here the 'creativeCommons' element is used. There are much more
  // available. Have a look at this list: http://feedvalidator.org/docs/howto/declare_namespaces.html
  $TestFeed->addNamespace('creativeCommons', 'http://backend.userland.com/creativeCommonsRssModule');
  $TestFeed->setChannelElement('creativeCommons:license', 'http://www.creativecommons.org/licenses/by/1.0');
   
  // If you want you can also add a line to publicly announce that you used
  // this fine piece of software to generate the feed. ;-)
  $TestFeed->addGenerator();
   
  // Here we are done setting up the feed. What's next is adding some feed items.
   
  // Create a new feed item.
  $newItem = $TestFeed->createNewItem();
   
  // Add basic elements to the feed item
  // These are again mandatory for a valid feed.
  $newItem->setTitle('Hello World!');
  $newItem->setLink('http://www.example.com');
  $newItem->setDescription('This is a test of adding a description by the <b>Feed Writer</b> classes. It\'s automatically CDATA encoded.');
   
  // The following method calls add some optional elements to the feed item.
   
  // Let's set the publication date of this item. You could also use a UNIX timestamp or
  // an instance of PHP's DateTime class.
  $newItem->setDate('2013-04-07 00:50:30');
   
  // You can also attach a media object to a feed item. You just need the URL, the byte length
  // and the MIME type of the media. Here's a quirk: The RSS2 spec says "The url must be an http url.".
  // Other schemes like ftp, https, etc. produce an error in feed validators.
  $newItem->setEnclosure('http://upload.wikimedia.org/wikipedia/commons/4/49/En-us-hello-1.ogg', 11779, 'audio/ogg');
   
  // If you want you can set the name (and email address) of the author of this feed item.
  $newItem->setAuthor('Anis uddin Ahmad', 'admin@ajaxray.com');
   
  // You can set a globally unique identifier. This can be a URL or any other string.
  // If you set permaLink to true, the identifier must be an URL. The default of the
  // permaLink parameter is false.
  $newItem->setId('http://example.com/URL/to/article', true);
   
  // Use the addElement() method for other optional elements.
  // This here will add the 'source' element. The second parameter is the value of the element
  // and the third is an array containing the element attributes.
  $newItem->addElement('source', 'Mike\'s page', array('url' => 'http://www.example.com'));
   
  // Now add the feed item to the main feed.
  $TestFeed->addItem($newItem);
   
  // Another method to add feeds items is by using an array which contains key-value pairs
  // of every item element. Elements which have attributes cannot be added by this way.
  $newItem = $TestFeed->createNewItem();
  $newItem->addElementArray(array('title'=> 'The 2nd item', 'link' => 'http://www.google.com', 'description' => 'Just another test.'));
  $TestFeed->addItem($newItem);
   
  // OK. Everything is done. Now generate the feed.
  // If you want to send the feed directly to the browser, use the printFeed() method.
  $myFeed = $TestFeed->generateFeed();
   
  // Do anything you want with the feed in $myFeed. Why not send it to the browser? ;-)
  // You could also save it to a file if you don't want to invoke your script every time.
  echo $myFeed;
  >>>>>>> origin/master
   
file:b/ranking.php (new)
  <?php
  include_once('include/common.inc.php');
  include_header('Open Gov Rankings');
  $db = $server->get_db('disclosr-agencies');
  ?>
  <div class="foundation-header">
  <h1><a href="about.php">Open Government Rankings</a></h1>
  <h4 class="subheader"></h4>
  </div>
  <table>
  <?php
  $agenciesdb = $server->get_db('disclosr-agencies');
  //$docsdb = $server->get_db('disclosr-documents');
  $scoredagencies = Array();
  $scores = Array();
  $columnKeys = Array();
 
  try {
  $rows = $agenciesdb->get_view("app", "all", null, true)->rows;
 
 
  if ($rows) {
  foreach ($rows as $row) {
  $columns = Array();
  foreach ($row->value as $key => $value) {
  if ((strstr($key, "has") || strstr($key, "URL")) && $key != "rtkURLs") {
  //echo "$key<br>";
  $columns[$key] = $value;
  }
  }
  //print_r(array_keys($columns));
  $columnKeys = array_unique(array_merge($columnKeys, array_keys($columns)));
  //print_r($columnKeys);
  $score = count($columns);
  $scores[$score]++;
  $scoredagencies[] = Array("id"=> $row->key, "website"=> $row->value->website, "name" => $row->value->name, "columns" => $columns, "score" => $score);
  }
  }
 
  } catch (SetteeRestClientException $e) {
  setteErrorHandler($e);
  }
  function cmp($a, $b)
  {
  if ($a['score'] == $b['score']) {
  return strcmp($a['name'], $b['name']);
  }
  return ($a['score'] > $b['score']) ? -1 : 1;
  }
 
  usort($scoredagencies, "cmp");
  echo "<tr>";
  echo "<th>Agency Name</th>";
  echo "<th>Score</th>";
  foreach ($columnKeys as $columnID) {
  echo "<th>" . (isset($schemas['agency']["properties"][$columnID]['x-title']) ? $schemas['agency']["properties"][$columnID]['x-title'] : "<i>$columnID</i>") . "</th>";
  }
  echo "</tr>";
  foreach ($scoredagencies as $scoredagency) {
  echo "<tr>";
  echo "<td><b><a href='getAgency.php?id=" . $scoredagency['id'] . "'>". $scoredagency['name'] . "</a></b></td>";
  echo "<td><b>" . $scoredagency['score'] . "</b></td>";
  foreach ($columnKeys as $key) {
  echo "<td style='text-align: center;'>";
  if (isset($scoredagency['columns'][$key])) {
  $value = $scoredagency['columns'][$key];
  if (is_array($value)) {
  if (count($value) == 1) {
  $href = $value[0];
  } else {
  $href = $value[0];
  }
 
  } else {
  $href = $value;
  }
  if ($href[0] == "@") {
  $href = str_replace("@","https://twitter.com/",$href);
  }
  //$href= urlencode($href);
 
  echo "<font color='lightgreen'>";
 
  if (strstr($href, "http")) {
  echo "<a title='Yes' href='$href' style='color:lightgreen;'>&check;</a>";
  } else {
  echo "&check;";
  }
 
  echo "</font>";
  } else {
  echo "<font color='orange'><abbr title='No'>✘</abbr></font>";
  }
  echo "</td>";
  }
  echo "</tr>\n";
  }
  ?>
  </table><br>
  <div id="criteria" style="width:500px;height:900px;"></div>
  <div id="scores" style="width:900px;height:500px;"></div>
  <script id="source">
  window.onload = function () {
  $(document).ready(function () {
  var d1 = [];
  var scorelabels = [];
  <?php
  try {
  $rows = $db->get_view("app", "scoreHas?group=true", null, true)->rows;
 
 
  $dataValues = Array();
  foreach ($rows as $row) {
  $dataValues[$row->value] = $row->key;
  }
  $i = 0;
  ksort($dataValues);
  foreach ($dataValues as $value => $key) {
 
  echo " d1.push([$value, $i]);" . PHP_EOL;
  echo " scorelabels.push('$key');" . PHP_EOL;
  $i++;
  }
  } catch (SetteeRestClientException $e) {
  setteErrorHandler($e);
  }
  ?>
  function scoretrackformatter(obj) {
  if (scorelabels[Math.floor(obj.y)]) {
  return (scorelabels[Math.floor(obj.y)]) + "=" + obj.x;
 
  } else {
  return "";
  }
  }
 
  function scoretickformatter(val, axis) {
  if (scorelabels[Math.floor(val)]) {
  return (scorelabels[Math.floor(val)]) ;
 
  } else {
  return "";
  }
  }
 
  Flotr.draw(document.getElementById("criteria"), [
  {data: d1}
  ], {
  title: 'Total count of agencies with criteria',
  HtmlText: true,
  bars: {
  show: true,
  horizontal: true
  },
  mouse: {
  track: true,
  relative: true,
  trackFormatter: scoretrackformatter
  }, yaxis: {
  autoscaling: true,
  minorTickFreq: 0.6,
  noTicks: scorelabels.length,
  tickFormatter: scoretickformatter
  },
  xaxis: {
  autoscaling: true
 
  }
  });
 
  var d2 = [];
  <?php
  try {
 
  ksort($scores);
  foreach ($scores as $key => $value) {
 
  echo " d2.push([$key,$value]);" . PHP_EOL;
  $i++;
  }
  } catch (SetteeRestClientException $e) {
  setteErrorHandler($e);
  }
  ?>
 
 
  Flotr.draw(document.getElementById("scores"), [
  {data: d2}
  ], {
  title: 'Frequency distribution of Scores',
  HtmlText: true,
  bars: {
  show: true
  },
  mouse: {
  track: true,
  relative: true
  }, yaxis: {
  autoscaling: true
  },
  xaxis: {
  autoscaling: true
 
  }
  });
 
  });
  };
  </script>
  <?php
  include_footer();
  ?>