Index: /branches/eam_branches/ipp-20120905/dvodist/ippdata/docs.mkd
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/ippdata/docs.mkd	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/ippdata/docs.mkd	(revision 34574)
@@ -0,0 +1,125 @@
+<?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
+
+# DVO Documentation
+
+## Release Notes on 3pi.20120525
+
+This database contains PS1 3pi observations through 2012/01/21.  The
+ubercal zero points have been applied to all exposures included in
+that analysis.  The remaining exposures have been tied to the ubercal
+system via relative photometry.  The ubercal measurements are given
+10x their poisson weight to ensure they drive the photometric
+solution.
+
+The database has been merged with the PS1 Synthetic photometry
+database (based on 2MASS and USNO-B).  For objects brighter than the
+saturation limit, the Synthetic photometry has been used for the mean
+magnitudes (these can be identified by having bit 0x04 raised in the
+mean filter flags).  Objects which used ubercal photometry have the
+bit 0x08 raised in the mean filter flags.  
+
+This database has also been merged with the 2MASS, WISE, and
+SuperCOSMOS databases.  The following photcodes are used for those
+external photometric sources:
+
+<table class="page">
+<tr><th> Source </th><th> Photcode </th></tr>
+<tr><td> 2MASS_J </td><td> 2011 </td></tr>   
+<tr><td> 2MASS_H </td><td> 2012 </td></tr>   
+<tr><td> 2MASS_K </td><td> 2013 </td></tr>   
+<tr><td> WISE_W1 </td><td> 2014 </td></tr>   
+<tr><td> WISE_W2 </td><td> 2015 </td></tr>   
+<tr><td> WISE_W3 </td><td> 2016 </td></tr>   
+<tr><td> WISE_W4 </td><td> 2017 </td></tr>   
+<tr><td> SYNTH.g </td><td> 3001 </td></tr>   
+<tr><td> SYNTH.r </td><td> 3002 </td></tr>   
+<tr><td> SYNTH.i </td><td> 3003 </td></tr>   
+<tr><td> SYNTH.z </td><td> 3004 </td></tr>   
+<tr><td> SYNTH.y </td><td> 3005 </td></tr>
+<tr><td> SCOS.103a.E       </td><td>      1150  </td></tr>
+<tr><td> SCOS.4414.OG590   </td><td>      1151  </td></tr>
+<tr><td> SCOS.4415.OG590   </td><td>      1152  </td></tr>
+<tr><td> SCOS.IIIaF.OG590  </td><td>      1153  </td></tr>
+<tr><td> SCOS.IIIaF.RG610  </td><td>      1154  </td></tr>
+<tr><td> SCOS.IIIaF.RG630  </td><td>      1155  </td></tr>
+<tr><td> SCOS.IIIaJ.GG385  </td><td>      1156  </td></tr>
+<tr><td> SCOS.IIIaJ.GG395  </td><td>      1157  </td></tr>
+<tr><td> SCOS.IVN.RG715    </td><td>      1158  </td></tr>
+<tr><td> SCOS.IVN.RG9      </td><td>      1159  </td></tr>
+</table>
+
+<img width=1000px src="relphot.20120528/sigma.i.ubercal.20120528.v0.png"><br>
+Map of the mean per-star residual (inst mag brighter than -10) for
+i-band (ubercal data only).
+<br>
+
+<img width=1000px src="relphot.20120528/sigma.g.ubercal.20120528.v0.png"><br>
+Map of the mean per-star residual (inst mag brighter than -10) for
+g-band (ubercal data only).
+<br>
+
+<h3>Comparison with 2MASS</h3>
+
+The plots below compare the PS1 grizy photometry with 2MASS photometry
+by examining the location of the color-color locus for early (&lt; K0)
+main sequence stars.
+
+For each pixel (0.5 degree on a side), I select all objects with PS1 r
+&lt; 20 and detected JHK magnitudes, keeping only those with S/N in
+the mean &gt; 50 and standard deviations less than 0.05 magnitudes.  I
+then fit the stellar locus in g-r,r-i for the g-r range 0.2 to 1.0,
+and keep only objects that fall within 0.05 of that (linear) stellar
+locus fit.<br>
+
+I then fit the stellar locus with a line in each of the color-color diagrams
+g-i,i-J; g-i,i-H; g-i,i-K.  I measure the mean i-J color expected from
+the fit for stars with g-i = 0.5.  The figures below show the maps of
+the i-J, i-H, and i-K offsets as well as the J-H and H-K offsets at
+g-i = 0.5.  The center of these maps is RA,DEC = 0,0, (east is left,
+north is up).  The pixels are 0.5 degrees on a side.<br> 
+
+These maps show three main features.  The Galactic Plane is quite
+clear, and not surprising: this test is particularly sensitive to
+reddening. <br>
+
+Several large scale patches are also visible (eg, the black patch near
+RA ~ 150 deg).  Disappointingly, these correspond to areas without
+good ubercal ties -- in other words, these are regions in which the
+data were obtained in non-photometric conditions.  This shows the
+limitation of using relative photometry to tie across individual
+exposures.  If the exposures have an extinction gradient, the
+correction far from the photometrically tied region can drift from the
+correct value.  The largest region at RA ~ 150 matches a section with
+poor i-band photometry and has a depth of roughly 0.1 magnitudes in
+i-J.  Assuming this is completely due to i-band errors, this
+corresponds to about 0.06 magnitudes of drift to the center of this
+region. <br>
+
+The third pattern is at a lower level of intensity: N-S strips with
+roughly E-W bands.  They are most noticable in K and H-K.  These
+appear to correspond well to the 2MASS scanning pattern, and have an
+amplitude corresponding to about 0.02 - 0.04 magnitudes of offset in
+K.  <br>
+
+<img width=1000px src="relphot.20120528/dJ.allsky.20120528.v3.png"><br>
+Map of the i-J color at g-i = 0.5. 
+<br>
+
+<img width=1000px src="relphot.20120528/dH.allsky.20120528.v3.png"><br>
+Map of the i-H color at g-i = 0.5. 
+<br>
+
+<img width=1000px src="relphot.20120528/dK.allsky.20120528.v3.png"><br>
+Map of the i-K color at g-i = 0.5. 
+<br>
+
+Combinations of the above maps can highlight any problems in 2MASS
+which are driven by the color rather than the mean magnitudes.
+
+<img width=1000px src="relphot.20120528/dJH.allsky.20120528.v3.png"><br>
+Map of the J-H color at g-i = 0.5. 
+<br>
+
+<img width=1000px src="relphot.20120528/dHK.allsky.20120528.v3.png"><br>
+Map of the H-K color at g-i = 0.5. 
+<br>
Index: /branches/eam_branches/ipp-20120905/dvodist/ippdata/help.mkd
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/ippdata/help.mkd	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/ippdata/help.mkd	(revision 34574)
@@ -0,0 +1,14 @@
+<?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
+
+# DVO Distribution Help
+
+These web pages contain the PS1 DVO databases, making it easy to
+download entire databases with the 'wget' command.  It is necessary to
+include an authorized user and the password.
+
+Use a wget command on the directory of interest, eg:
+
+<tt> wget --user=ps1sc --password=(PASS) -r -np -nH http://dvodist.ipp.ifa.hawaii.edu/3pi.20120509 </tt>
+
+Ask your DRAVG representative if you need the password.
+
Index: /branches/eam_branches/ipp-20120905/dvodist/ippdata/index.mkd
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/ippdata/index.mkd	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/ippdata/index.mkd	(revision 34574)
@@ -0,0 +1,11 @@
+<?php include "@HTDOCS@/www-util/ippdata.page.php"; ?>
+
+# PS1 Public Data Distribution
+
+This is the PS1 public data distribution server.  
+
+Data is distributed in several forms
+
+@ Data Product             : none                       : plain : title : Comment
+@ PS1 Photometry Ladder v0 : photladder.20120604.subset : dir   : dir1  : Photometry Ladder released 2012.06.07 (EAM UPDATE)
+@ Synthetic Photometry DVO : catdir.syn.test            : dir   : dir1  : Demonstration DVO Database
Index: /branches/eam_branches/ipp-20120905/dvodist/ippdata/ipp.css
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/ippdata/ipp.css	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/ippdata/ipp.css	(revision 34574)
@@ -0,0 +1,421 @@
+
+/* internal link line: c0d0d0 : d8d0f0
+   external link line: 303070 
+   border:             0080c0
+ */
+
+body  { 
+    background-color: #a0d0e0; 
+    padding: 5px; 
+    margin: 5px
+}
+
+h1 {
+    margin-top: 0.05em;
+    margin-bottom: 0.05em;
+}
+
+h2 {
+    margin-top: 0.05em;
+    margin-bottom: 0.05em;
+}
+
+h3 {
+    margin-top: 0.05em;
+    margin-bottom: 0.05em;
+}
+
+h4 {
+    margin-top: 0.05em;
+    margin-bottom: 0.05em;
+}
+
+div.debug {
+    height: 15%;
+    background-color: #ffffaa;
+    overflow: auto;
+}
+
+a:link, a:visited, a:active { 
+    text-decoration: underline; 
+    font-weight: bold; 
+    color: #ff0000
+}
+
+a.button      { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #000000; 
+    background: #0080c0
+}
+a.menutop     { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #ffffff
+}
+a.menutops    { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #80f0ff
+}
+a.menuext     { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #ffffff
+}
+a.menulink    { 
+    text-decoration: none; 
+    font-weight: normal; 
+    color: #000000
+}
+a.menuselect  { 
+    text-decoration: none; 
+    font-weight: normal; 
+    color: #0000ff
+}
+a.piclink     { 
+    text-decoration: none; 
+    font-weight: normal; 
+    color: #0080c0
+}
+
+table.dirlist { text-align: left; 
+             font-size: small; 
+	     font-weight: normal; 
+	     background: #303030; 
+	     border: 1px solid #000000; 
+	     padding: 1px; 
+}
+
+a.dir1     { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #800080
+}
+a.dir2     { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #800080
+}
+a.file1     { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #800080
+}
+a.file2     { 
+    text-decoration: none; 
+    font-weight: bold;   
+    color: #800080
+}
+tr.dir1    { 
+    text-align: left; 
+    background: #d0d0d0; 
+    font-size: small; 
+    color: #000000; 
+    padding: 1px; 
+}
+tr.dir2    { 
+    text-align: left; 
+    background: #d0d0ff; 
+    font-size: small; 
+    color: #000000; 
+    padding: 1px; 
+}
+tr.file1    { 
+    text-align: left; 
+    background: #d0d0d0; 
+    font-size: small; 
+    color: #000000; 
+    padding: 2px; 
+}
+tr.file2    { 
+    text-align: left; 
+    background: #d0d0ff; 
+    font-size: small; 
+    color: #000000; 
+    padding: 2px; 
+}
+tr.break    { 
+    text-align: left; 
+    background: #0080c0; 
+    font-size: small; 
+    color: #ffffff; 
+    padding-top: 4px; 
+}
+tr.title    { 
+    text-align: left; 
+    background: #d0d0ff; 
+    font-size: medium; 
+    color: #000000; 
+    padding: 2px; 
+    padding-top: 4px; 
+    padding-bottom: 4px; 
+}
+
+td.menutop    { 
+    text-align: left; 
+    background: #0080c0; 
+    font-size: small; 
+    color: #ffffff; 
+    padding: 2px; 
+}
+td.menutops   { 
+    text-align: left; 
+    background: #0080c0; 
+    font-size: small; 
+    color: #000000; 
+    padding: 2px; 
+}
+td.menuext    { 
+    text-align: left; 
+    background: #303070; 
+    font-size: small; 
+    color: #ffffff; 
+    padding: 2px; 
+}
+td.menulink   { 
+    text-align: left; 
+    background: #d0d0ff; 
+    font-size: small; 
+    color: #000000; 
+    padding: 2px; 
+    font-weight: normal; 
+    text-indent: 0px; 
+}
+td.menuselect { 
+    text-align: left; 
+    background: #d0d0ff; 
+    font-size: small; 
+    color: #ff0000; 
+    padding: 2px; 
+    font-weight: normal; 
+    text-indent: 0px; 
+}
+td.menuline   { 
+    text-align: left; 
+    background: #d0d0ff; 
+    font-size: small; 
+    color: #000000; 
+    padding: 2px; 
+    font-weight: normal; 
+    text-indent: 0px; 
+}
+
+td.picture    { 
+    text-align: left; 
+    background: #00ffff; 
+    font-size: small; 
+    color: #ff0000; 
+    padding: 0px; 
+    text-indent: 2px; 
+    font-weight: normal; 
+}
+td.piclink    { 
+    text-align: left; 
+    background: #0080c0; 
+    font-size: small; 
+    color: #ff0000; 
+    padding: 0px; 
+    text-indent: 0px; 
+    font-weight: normal; 
+}
+
+table.page { 
+    border: 0px solid #0080c0; 
+    background: #a0d0e0; 
+    padding: 0px
+}
+
+td.title { 
+    background-color: #ff0000; 
+    padding: 5px; 
+    font-size: x-large; 
+    text-align: left; 
+    vertical-align: top
+}
+
+td.body  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #d0d0ff; 
+	   background-color: #d0d0ff; 
+	   border: 3px solid #0080c0; 
+	   padding: 5px; 
+}
+
+table.menu { 
+    text-align: left; 
+    font-size: small; 
+    font-weight: normal; 
+    background: #ff0000; 
+    border: 3px solid #0080c0; 
+    padding: 0px; 
+}
+
+table.select { 
+    text-align: left; 
+    font-size: small; 
+    font-weight: normal; 
+    background: #0080c0; 
+    border: 1px solid #0080c0; 
+    padding: 0px; 
+}
+
+td.select  { 
+    text-align: left; 
+    font-size: small;  
+    font-weight: bold;  
+    vertical-align: top;
+    color: #ffffff; 
+    background: #0080c0; 
+    background-color: #0080c0; 
+    border: 2px solid #0080c0; 
+    padding: 2px; 
+}
+
+th.select  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: bold;  
+           vertical-align: top;
+	   color: #000000; 
+	   background: #d0d0ff; 
+	   background-color: #d0d0ff; 
+	   border: 0px solid #0080c0; 
+	   padding: 2px; 
+}
+
+table.list { text-align: left; 
+             font-size: small; 
+	     font-weight: normal; 
+	     background: #d0d0ff; 
+	     border: 2px solid #ffffff; 
+	     padding: 0px; 
+}
+
+td.list  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #d0d0ff; 
+	   background-color: #d0d0ff; 
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.list_off  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #a0a0a0; 
+	   background-color: #a0a0a0;
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.list_drop  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #a0a0a0; 
+	   background-color: #a0a0a0;
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.list_run  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #ffa0a0; 
+	   background-color: #ffa0a0;
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.det_off  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #a0a0a0; 
+	   background-color: #a0a0a0;
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.det_drop  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #a0a0a0; 
+	   background-color: #ffa0a0;
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.det_add  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: normal;  
+           vertical-align: top;
+	   background: #ffa0a0; 
+	   background-color: #a0a0ff;
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+th.list  { 
+           text-align: left; 
+           font-size: small;  
+           font-weight: bold;  
+           vertical-align: top;
+	   background: #d0d0ff; 
+	   background-color: #d0d0ff; 
+	   border: 2px solid #000000; 
+	   padding: 2px; 
+}
+
+td.ul3x2    { 
+    text-align: right; 
+    vertical-align: bottom;
+    padding: 0px; 
+    text-indent: 0px; 
+}
+td.uc3x2    { 
+    text-align: center; 
+    vertical-align: bottom;
+    padding: 0px; 
+    text-indent: 0px; 
+}
+td.ur3x2    { 
+    text-align: left; 
+    vertical-align: bottom;
+    padding: 0px; 
+    text-indent: 0px; 
+}
+td.ll3x2    { 
+    text-align: right; 
+    vertical-align: top;
+    padding: 0px; 
+    text-indent: 0px; 
+}
+td.lc3x2    { 
+    text-align: center; 
+    vertical-align: top;
+    padding: 0px; 
+    text-indent: 0px; 
+}
+td.lr3x2    { 
+    text-align: left; 
+    vertical-align: top;
+    padding: 0px; 
+    text-indent: 0px; 
+}
Index: /branches/eam_branches/ipp-20120905/dvodist/ippdata/test.mkd
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/ippdata/test.mkd	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/ippdata/test.mkd	(revision 34574)
@@ -0,0 +1,106 @@
+<?php include "@HTDOCS@/www-util/ipp.page.php"; ?>
+
+# DVO Distribution Help
+
+These web pages contain the PS1 DVO databases, making it easy to
+download entire databases with the 'wget' command.  It is necessary to
+include an authorized user and the password.
+
+@ DVO Database           : plain : title : Comment
+@ 3pi.20120525 	         : dir   : dir1  : DVO Database Released 2012.05.25, ubercal + relphot + relastro (pm + par)
+@ allsky.tables.20120602 : dir   : dir2  : Summary Tables for allsky (FITS & CSV formats)
+@ catdir.syn.test        : dir   : dir1  : Test DVO Database
+
+### Header 3
+
+> This is a blockquote Lorem ipsum dolor sit amet,
+  consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
+  Vestibulum enim wisi, viverra nec, fringilla in, laoreet
+
+> more blockquote
+
+# Download
+
+* files
+    * indent list
+    * more indent
+    - indent 3
+    - indent 4
+      * indent 5
+        code block
+* more indent 2
+* three indent
+* other things
+
+* This is a blockquote Lorem ipsum dolor sit amet,
+  consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
+  Vestibulum enim wisi, viverra nec, fringilla in, laoreet
+
+    This is a blockquote Lorem ipsum dolor sit amet,
+  consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
+  Vestibulum enim wisi, viverra nec, fringilla in, laoreet
+
+* more blockquote
+
+
+
+[Markdown 1.0.1][dl] (18 KB) -- 17 Dec 2004
+
+[dl]: http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip
+
+
+Introduction
+------------
+
+Markdown is a text-to-HTML conversion tool for web writers. Markdown
+allows you to write using an easy-to-read, easy-to-write plain text
+format, then convert it to structurally valid XHTML (or HTML).
+
+Thus, "Markdown" is two things: (1) a plain text formatting syntax;
+and (2) a software tool, written in Perl, that converts the plain text
+formatting to HTML. See the [Syntax][] page for details pertaining to
+Markdown's formatting syntax. You can try it out, right now, using the
+online [Dingus][].
+
+  [syntax]: /projects/markdown/syntax
+  [dingus]: /projects/markdown/dingus
+
+The overriding design goal for Markdown's formatting syntax is to make
+it as readable as possible. The idea is that a Markdown-formatted
+document should be publishable as-is, as plain text, without looking
+like it's been marked up with tags or formatting instructions. While
+Markdown's syntax has been influenced by several existing text-to-HTML
+filters, the single biggest source of inspiration for Markdown's
+syntax is the format of plain text email.
+
+The best way to get a feel for Markdown's formatting syntax is simply
+to look at a Markdown-formatted document. For example, you can view
+the Markdown source for the article text on this page here:
+<http://daringfireball.net/projects/markdown/index.text>
+
+(You can use this '.text' suffix trick to view the Markdown source for
+the content of each of the pages in this section, e.g. the
+[Syntax][s_src] and [License][l_src] pages.)
+
+  [s_src]: /projects/markdown/syntax.text
+  [l_src]: /projects/markdown/license.text
+
+Markdown is free software, available under a BSD-style open source
+license. See the [License] [pl] page for more information.
+
+  [pl]: /projects/markdown/license
+
+
+Discussion List <a id="discussion-list" />
+---------------
+
+I've set up a public [mailing list for discussion about Markdown] [ml].
+Any topic related to Markdown -- both its formatting syntax and
+its software -- is fair game for discussion. Anyone who is interested
+is welcome to join.
+
+It's my hope that the mailing list will lead to good ideas for future
+improvements to Markdown.
+
+  [ml]: http://six.pairlist.net/mailman/listinfo/markdown-discuss
+
Index: /branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.menu.dat
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.menu.dat	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.menu.dat	(revision 34574)
@@ -0,0 +1,19 @@
+# style   | select-style | type    | menu line                    | link page       
+
+piclink   | piclink      | piclink | /PScolorlogo2.jpg            | http://panstarrs.ifa.hawaii.edu
+menuext   | menuext      | link    | Pan-STARRS public            | http://panstarrs.ifa.hawaii.edu
+menuext   | menuext      | link    | Pan-STARRS project           | http://panstarrs.ifa.hawaii.edu/project
+menuext   | menuext      | link    | Pan-STARRS IPP Wiki          | http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki
+menuext   | menuext      | link    | PS1SC Wiki                   | http://ps1sc.ifa.hawaii.edu/PS1wiki/index.php/Main_Page
+
+menutop   | menutop      | plain   | &nbsp;                       | 
+menutop   | menuselect   | link    | DVO Releases                 | /index.php
+menutop   | menuselect   | link    | Documentation                | /docs.php
+menutop   | menuselect   | link    | Help                         | /help.php
+
+
+# we have four valid menu types: picture, piclink, link, plain
+# picture   | picture    | picture | PScolorlogo2.jpg             | none
+# piclink   | piclink    | piclink | PScolorlogo2.jpg             | http://panstarrs.ifa.hawaii.edu
+# menulink  | menuselect | link    | other page                   | notest.php     
+# menutop   | menutop    | plain   | foo bar                      | none            
Index: /branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.page.mkd
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.page.mkd	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/www-util/dvodist.page.mkd	(revision 34574)
@@ -0,0 +1,50 @@
+<?php 
+
+$utils = "@HTDOCS@/www-util"; 
+include "$utils/ipp.php";
+include_once "$utils/markdown.php";
+
+// if we come in directly, the top-level directory should be /dvodist
+// if we come in from the ippops1 proxy, we need to set the root to /
+$ifaProxy = "128.171.227.208";
+
+// is the request coming from our proxY?
+$fromProxy = $_SERVER['HTTP_X_FORWARDED_FOR'] && ($_SERVER['REMOTE_ADDR'] == $ifaProxy);
+if ($fromProxy) {
+  $rootdir = "";
+ } else {
+  $rootdir = "/dvodist/dvodist";
+ }
+
+menu("$utils/dvodist.menu.dat", 'DVO Distribution Server', $rootdir, "$rootdir/ipp.css", '', '');
+
+$script = basename($_SERVER[SCRIPT_NAME]);
+do_markdown ($script);
+
+menu_end();
+?>
+
+// generic proxy detection
+// if ( $_SERVER['HTTP_X_FORWARDED_FOR']
+//      || $_SERVER['HTTP_X_FORWARDED']
+//      || $_SERVER['HTTP_FORWARDED_FOR']
+//      || $_SERVER['HTTP_CLIENT_IP']
+//      || $_SERVER['HTTP_VIA']
+//      || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
+//      || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30))
+//   {
+//     exit('Proxy detected');
+//   }
+
+// list server info:
+// $varlist = array ('SCRIPT_NAME', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_VIA', 'REMOTE_ADDR');
+// 
+// foreach ($varlist as $name) {
+//   echo "$name : $_SERVER[$name]<br>\n";
+// }
+// 
+// echo "get list<br>\n";
+// foreach ($_GET as $key => $value) {
+//   echo "$key : $value<br>\n";
+// }
+
Index: /branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.menu.dat
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.menu.dat	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.menu.dat	(revision 34574)
@@ -0,0 +1,19 @@
+# style   | select-style | type    | menu line                    | link page       
+
+piclink   | piclink      | piclink | /PScolorlogo2.jpg            | http://panstarrs.ifa.hawaii.edu
+menuext   | menuext      | link    | Pan-STARRS public            | http://panstarrs.ifa.hawaii.edu
+menuext   | menuext      | link    | Pan-STARRS project           | http://panstarrs.ifa.hawaii.edu/project
+menuext   | menuext      | link    | Pan-STARRS IPP Wiki          | http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki
+menuext   | menuext      | link    | PS1SC Wiki                   | http://ps1sc.ifa.hawaii.edu/PS1wiki/index.php/Main_Page
+
+menutop   | menutop      | plain   | &nbsp;                       | 
+menutop   | menuselect   | link    | DVO Releases                 | /index.php
+menutop   | menuselect   | link    | Documentation                | /docs.php
+menutop   | menuselect   | link    | Help                         | /help.php
+
+
+# we have four valid menu types: picture, piclink, link, plain
+# picture   | picture    | picture | PScolorlogo2.jpg             | none
+# piclink   | piclink    | piclink | PScolorlogo2.jpg             | http://panstarrs.ifa.hawaii.edu
+# menulink  | menuselect | link    | other page                   | notest.php     
+# menutop   | menutop    | plain   | foo bar                      | none            
Index: /branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.page.mkd
===================================================================
--- /branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.page.mkd	(revision 34574)
+++ /branches/eam_branches/ipp-20120905/dvodist/www-util/ippdata.page.mkd	(revision 34574)
@@ -0,0 +1,50 @@
+<?php 
+
+$utils = "@HTDOCS@/www-util"; 
+include "$utils/ipp.php";
+include_once "$utils/markdown.php";
+
+// if we come in directly, the top-level directory should be /dvodist
+// if we come in from the ippops1 proxy, we need to set the root to /
+$ifaProxy = "128.171.227.208";
+
+// is the request coming from our proxY?
+$fromProxy = $_SERVER['HTTP_X_FORWARDED_FOR'] && ($_SERVER['REMOTE_ADDR'] == $ifaProxy);
+if ($fromProxy) {
+  $rootdir = "";
+ } else {
+  $rootdir = "/dvodist/ippdata";
+ }
+
+menu("$utils/ippdata.menu.dat", 'Pan-STARRS 1 Data Distribution Server', $rootdir, "$rootdir/ipp.css", '', '');
+
+$script = basename($_SERVER[SCRIPT_NAME]);
+do_markdown ($script);
+
+menu_end();
+?>
+
+// generic proxy detection
+// if ( $_SERVER['HTTP_X_FORWARDED_FOR']
+//      || $_SERVER['HTTP_X_FORWARDED']
+//      || $_SERVER['HTTP_FORWARDED_FOR']
+//      || $_SERVER['HTTP_CLIENT_IP']
+//      || $_SERVER['HTTP_VIA']
+//      || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
+//      || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30))
+//   {
+//     exit('Proxy detected');
+//   }
+
+// list server info:
+// $varlist = array ('SCRIPT_NAME', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_VIA', 'REMOTE_ADDR');
+// 
+// foreach ($varlist as $name) {
+//   echo "$name : $_SERVER[$name]<br>\n";
+// }
+// 
+// echo "get list<br>\n";
+// foreach ($_GET as $key => $value) {
+//   echo "$key : $value<br>\n";
+// }
+
