And add the other new files from Anoop's patch, too
authordbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sat, 9 Apr 2011 11:11:56 +0000 (11:11 +0000)
committerdbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sat, 9 Apr 2011 11:11:56 +0000 (11:11 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/evergreen-ils.org@1321 6d9bc8c9-1ec2-4278-b937-99fde70a366f

17 files changed:
css/cssmenu.css [new file with mode: 0644]
css/news_box.css [new file with mode: 0644]
css/purecssmenu.css [new file with mode: 0644]
eg_changelog.php [new file with mode: 0644]
incl/about_sidebar.php [new file with mode: 0644]
incl/com_sidebar.php [new file with mode: 0644]
incl/doc_sidebar.php [new file with mode: 0644]
incl/downloads_sidebar.php [new file with mode: 0644]
incl/header.php.orig [new file with mode: 0644]
incl/news_box.php [new file with mode: 0644]
incl/opensrf_sidebar.php [new file with mode: 0644]
incl/right_sidebar.php [new file with mode: 0644]
incl/search_box.php [new file with mode: 0644]
incl/search_sidebar.php [new file with mode: 0644]
opensrf.php [new file with mode: 0644]
opensrf_changelog.php [new file with mode: 0644]
staff_clients.php [new file with mode: 0644]

diff --git a/css/cssmenu.css b/css/cssmenu.css
new file mode 100644 (file)
index 0000000..ceef60a
--- /dev/null
@@ -0,0 +1,77 @@
+/*------------------------------------*\
+       NAV
+\*------------------------------------*/</span>
+#nav{
+       float:left;
+       width:100%;
+       list-style:none;
+       font-weight:bold;
+       margin-bottom:10px;
+}
+#nav li{
+       float:left;
+       margin-right:10px;
+       position:relative;
+       display:block;
+}
+#nav li a{
+       display:block;
+       padding:5px;
+       color:#fff;
+       background:#333;
+       text-decoration:none;
+
+       text-shadow:1px 1px 1px rgba(0,0,0,0.75); <span class="code-comment">/* Text shadow to lift it a little */</span>
+       -moz-border-radius:2px;
+       -webkit-border-radius:2px;
+       border-radius:2px;
+}
+#nav li a:hover{
+       color:#fff;
+       background:#6b0c36; <span class="code-comment">/* Solid colour fall-back */</span>
+       background:rgba(107,12,54,0.75); <span class="code-comment">/* It'll look nice semi-transparent */</span>
+
+       text-decoration:underline;
+}
+
+<span class="code-comment">/*--- DROPDOWN ---*/</span>
+#nav ul{
+       list-style:none;
+       position:absolute;
+       left:-9999px; <span class="code-comment">/* Hide off-screen when not needed (this is more accessible than display:none;) */</span>
+       opacity:0; <span class="code-comment">/* Set initial state to transparent */</span>
+       -webkit-transition:0.25s linear opacity; <span class="code-comment">/* Make the dropdown fade-in in Webkit */</span>
+}
+#nav ul li{
+       padding-top:1px; <span class="code-comment">/* Introducing a padding between the li and the a give the illusion spaced items */</span>
+
+       float:none;
+}
+#nav ul a{
+       white-space:nowrap; <span class="code-comment">/* Stop text wrapping and creating multi-line dropdown items */</span>
+       display:block;
+}
+#nav li:hover ul{ <span class="code-comment">/* Display the dropdown on hover */</span>
+       left:0; <span class="code-comment">/* Bring back on-screen when needed */</span>
+       opacity:1; <span class="code-comment">/* Fade to opaque */</span>
+
+}
+#nav li:hover a{ <span class="code-comment">/* Set styles for top level when dropdown is hovered */</span>
+
+       background:#6b0c36; <span class="code-comment">/* Solid colour fall-back */</span>
+       background:rgba(107,12,54,0.75); <span class="code-comment">/* It'll look nice semi-transparent */</span>
+       text-decoration:underline;
+}
+#nav li:hover ul a{ <span class="code-comment">/* Override some top level styles when dropdown is hovered */</span>
+       text-decoration:none;
+       -webkit-transition:-webkit-transform 0.075s linear;
+}
+#nav li:hover ul li a:hover{ <span class="code-comment">/* Set styles for dropdown when items are hovered */</span>
+
+       background:#333; <span class="code-comment">/* Solid colour fall-back */</span>
+
+       background:rgba(51,51,51,0.75); <span class="code-comment">/* It'll look nice semi-transparent */</span>
+       text-decoration:underline;
+       -moz-transform:scale(1.05);
+       -webkit-transform:scale(1.05);
+}
diff --git a/css/news_box.css b/css/news_box.css
new file mode 100644 (file)
index 0000000..8639965
--- /dev/null
@@ -0,0 +1,61 @@
+/* http://spiffybox.com/ */
+/* set the image to use and establish the lower-right position */
+.cssbox, .cssbox_body, .cssbox_head, .cssbox_head h4 {
+background: transparent url(/img/news_box.png) no-repeat bottom right}
+
+.cssbox{
+/* intended total box width - padding-right(next) */
+width:500px !important; /* IE Win = width - padding */
+width:500px; 
+/* the gap on the right edge of the image (not content padding) */
+padding-right:15px; /* use to position the box */
+margin:20px auto}
+
+/* set the top-right image */
+.cssbox_head{background-position:top right;
+/* pull the right image over on top of border */
+margin-right:-15px; 
+/* right-image-gap + right-inside padding */
+padding-right:40px}
+
+/* set the top-left image */
+.cssbox_head h4 {
+background-position:top left;
+margin:0; /* reset main site styles*/ 
+border:0; /* ditto */
+/* padding-left = image gap + interior padding ... no padding-right */
+padding:25px 0 5px 30px; 
+height:auto !important;
+height:1%} /* IE Holly Hack */
+
+/* set the lower-left corner image */
+.cssbox_body {
+font:90%/140% Verdana, Arial, Helvetica, sans-serif;
+background-position:bottom left;
+margin-right:25px; /* interior-padding right */ 
+padding:5px 0 15px 30px} /* mirror .cssbox_head right/left */}
+
+#news_box p {
+/* 
+Flush left, ragged right
+1.25em basic leading (line height), one lead boundary (vertical margins)
+*/
+display:block;
+width:75%;
+font-size: 1em;
+line-height: 1.25em;
+margin: 1.25em 0;
+text-align: justify;
+background-color: #e9e9e9;
+padding: 4px 4px 4px 8px;
+}
+
+#news_box h3 {
+font-size: 100%;
+margin: 10px 0 7px 0;
+padding: 4px;
+color: #CE4F09;
+font-weight: bold;
+background: #FFD900;
+}
+
diff --git a/css/purecssmenu.css b/css/purecssmenu.css
new file mode 100644 (file)
index 0000000..8103a78
--- /dev/null
@@ -0,0 +1,134 @@
+/* 
+Based on PureCSSMenu
+<!-- Start PureCSSMenu.com MENU -->
+*/
+
+#pcm{ display:none;}
+ul.pureCssMenu ul{ display:none}
+ul.pureCssMenu li:hover>ul{ display:block}
+ul.pureCssMenu ul{position: absolute;left:-1px;top:98%;}
+ul.pureCssMenu ul ul{position: absolute;left:98%;top:-2px;}
+ul.pureCssMenu,ul.pureCssMenu ul {
+    margin:0px;
+    list-style:none;
+    background-color:#F5AE61;
+    background-repeat:repeat;
+}
+ul.pureCssMenu table {border-collapse:collapse}ul.pureCssMenu {
+    display:block;
+    zoom:1;
+    float: left;
+}
+ul.pureCssMenu ul{
+    width:150px;
+}
+ul.pureCssMenu li{
+    display:block;
+    margin:2px 0px 0px 2px;
+    font-size:0px;
+}
+ul.pureCssMenu a:active, ul.pureCssMenu a:focus {
+    outline-style:none;
+}
+ul.pureCssMenu a, ul.pureCssMenu li.dis a:hover, ul.pureCssMenu li.sep a:hover {
+    display:block;
+    vertical-align:middle;
+    background-color:#F5AE61;
+    text-align:left;
+    text-decoration:none;
+    padding: 0px 14px;
+    _padding-left:0;
+    font:bold 12px Verdana;
+    color: #333;
+    text-decoration:none;
+    cursor:pointer;
+}
+ul.pureCssMenu span{
+    overflow:hidden;
+}
+ul.pureCssMenu li {
+    float:left;
+    text-shadow: 0px 0px 1px #FFFFFF;
+    background: #F5AE61;
+    padding: 4px 2px;
+}
+ul.pureCssMenu ul li {
+    float:none;
+}
+ul.pureCssMenu ul a {
+    text-align:left;
+    white-space:pre-line;
+}
+ul.pureCssMenu li.sep{
+    text-align:left;
+    padding:0px;
+    line-height:0;
+    height:100%;
+}
+ul.pureCssMenu li.sep span{
+    float:none; padding-right:0;
+    width:3px;
+    height:100%;
+    display:inline-block;
+    background-color:#cccccc #111111 #111111 #cccccc;   background-image:none;}
+ul.pureCssMenu ul li.sep span{
+    width:100%;
+    height:3px;
+}
+ul.pureCssMenu li:hover {
+    position:relative;
+}
+ul.pureCssMenu li:hover>a {
+    background-color:#E9E9E9;
+}
+ul.pureCssMenu li a:hover{
+    background-color:#E9E9E9;
+}
+ul.pureCssMenu li.dis a {
+    color: #666 !important;
+}
+ul.pureCssMenu img {
+     border: none;
+     float:left;_float:none;
+     margin-right:2px;
+     width:16px;
+     height:16px;
+}
+ul.pureCssMenu ul img {
+     width:16px;
+     height:16px;
+}
+ul.pureCssMenu img.over{ display:none }
+ul.pureCssMenu li.dis a:hover img.over{ display:none !important }
+ul.pureCssMenu li.dis a:hover img.def { display:inline !important }
+ul.pureCssMenu li:hover > a img.def  { display:none }
+ul.pureCssMenu li:hover > a img.over { display:inline }
+ul.pureCssMenu a:hover img.over,ul.pureCssMenu a:hover ul img.def,ul.pureCssMenu a:hover a:hover ul img.def,ul.pureCssMenu a:hover a:hover img.over,ul.pureCssMenu a:hover a:hover a:hover img.over{
+    display:inline
+}
+ul.pureCssMenu a:hover img.def,ul.pureCssMenu a:hover ul img.over,ul.pureCssMenu a:hover a:hover ul img.over,ul.pureCssMenu a:hover a:hover img.def,ul.pureCssMenu a:hover a:hover a:hover img.def{
+    display:none
+}
+ul.pureCssMenu a:hover ul,ul.pureCssMenu a:hover a:hover ul{ display:block }
+ul.pureCssMenu a:hover ul ul{ display:none }
+ul.pureCssMenu span{
+    display:block;
+    background-image:url(/img/arr_white.gif);
+    background-position:right center;
+    background-repeat: no-repeat;
+    padding-right:12px;}
+ul.pureCssMenu li:hover>a>span{
+    background-image:url(/img/arrv_white.gif);
+}
+ul.pureCssMenu a:hover span{
+    _background-image:url(/img/arrv_white.gif)
+}
+ul.pureCssMenu ul span,ul.pureCssMenu a:hover table span{
+     background-image:url(/img/arr_white.gif)
+}
+
+/* 
+<!-- End PureCSSMenu.com MENU -->
+<!-- (c) 2009, PureCSSMenu.com -->
+<!--end header-->
+*/
diff --git a/eg_changelog.php b/eg_changelog.php
new file mode 100644 (file)
index 0000000..aef9309
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+   <title>Documentation: Evergreen open source library system</title>
+   <link href="/css/style.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="wrap">
+<?php include "/var/www/open-ils.org/incl/header.php" ;?>
+<?php include "/var/www/open-ils.org/incl/news_box.php" ;?>
+<?php include "/var/www/open-ils.org/incl/sidebar.php" ;?>
+<?php include "/var/www/open-ils.org/incl/right_sidebar.php" ;?>
+<!--end side-->
+<div id="pagebody">
+<h1>ChangeLogs</h1>
+<a name="200"></a>
+<h2>2.0.0</h2>
+
+<?php
+$fdir = "downloads/";
+$globarray = glob($fdir . "ChangeLog-2.0*");
+usort($globarray, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
+echo "<ul class='bullet'>";
+foreach($globarray as $filename) {
+   $info = pathinfo($filename);
+      $target = htmlspecialchars($info['basename']);
+   printf(
+      "<li><a href='%s'>%s</a></li>\n",
+      htmlspecialchars($filename),
+      $target
+   );
+}
+echo "</ul>";
+?>
+
+<a name="161"></a>
+<h2>1.6.1</h2>
+
+<?php
+$fdir = "downloads/";
+$globarray = glob($fdir . "ChangeLog-1.6.1*");
+usort($globarray, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
+echo "<ul class='bullet'>";
+foreach($globarray as $filename) {
+   $info = pathinfo($filename);
+      $target = htmlspecialchars($info['basename']);
+   printf(
+      "<li><a href='%s'>%s</a></li>\n",
+      htmlspecialchars($filename),
+      $target
+   );
+}
+echo "</ul>";
+?>
+
+</div>
+<!--end pagebody-->
+<?php include "/var/www/open-ils.org/incl/footer.php"; ?>
+</div><!--end wrapper-->
+</body>
+</html>
diff --git a/incl/about_sidebar.php b/incl/about_sidebar.php
new file mode 100644 (file)
index 0000000..61213ba
--- /dev/null
@@ -0,0 +1,29 @@
+<!--begin sidebar-->
+
+<link href="/css/style.css" rel="stylesheet" type="text/css" />
+<div id="rightside">
+
+  <div id="rightsidebox">
+    <?php include "/var/www/open-ils.org/incl/search_box.php" ;?>
+    <br />
+    <h3>Table of Contents</h3>
+    <p><a href="/about.php#getting_to_know">&#187;&nbsp;Getting to know Evergreen</a></p>
+    <p><a href="/about.php#getting_involved">&#187;&nbsp;Getting Involved</a></p>
+    <?
+    ///////////////////////////
+    //Setup the different feeds.
+    ///////////////////////////
+
+    $planet_feed = new Feed('http://planet.evergreen-ils.org/atom.xml');
+
+    //Get multiple items in single call
+    echo "<h3>Community Blog Posts</h3> ";
+        foreach ($planet_feed->find(7) as $item) {
+                echo "<p><a href='".$item->link."'>&#187;&nbsp;".$item->image.$item->title."</a>".$item->description."</p>";
+        }
+
+     ?>
+
+  </div>
+
+</div>
diff --git a/incl/com_sidebar.php b/incl/com_sidebar.php
new file mode 100644 (file)
index 0000000..f55e43a
--- /dev/null
@@ -0,0 +1,31 @@
+<!--begin sidebar-->
+
+<link href="/css/style.css" rel="stylesheet" type="text/css" />
+<div id="rightside">
+
+  <div id="rightsidebox">
+    <?php include "/var/www/open-ils.org/incl/search_box.php" ;?>
+    <br />
+    <h3>Table of Contents</h3>
+    <p><a href="/communicate.php#listserv">&#187;&nbsp;Mailing lists</a></p>
+    <p><a href="/communicate.php#irc">&#187;&nbsp;Internet Relay Chat</a></p>
+    <p><a href="/communicate.php#calendar">&#187;&nbsp;Event Calendar</a></p>
+    <p><a href="/communicate.php#blog">&#187;&nbsp;Official blog</a></p>
+    <p><a href="/communicate.php#planet">&#187;&nbsp;Community blogs</a></p>
+    <?
+    ///////////////////////////
+    //Setup the different feeds.
+    ///////////////////////////
+
+    $planet_feed = new Feed('http://planet.evergreen-ils.org/atom.xml');
+
+    //Get multiple items in single call
+    echo "<h3>Community Blog Posts</h3> ";
+        foreach ($planet_feed->find(4) as $item) {
+                echo "<p><a href='".$item->link."'>&#187;&nbsp;".$item->image.$item->title."</a>".$item->description."</p>";
+        }
+     ?>
+
+  </div>
+
+</div>
diff --git a/incl/doc_sidebar.php b/incl/doc_sidebar.php
new file mode 100644 (file)
index 0000000..b710121
--- /dev/null
@@ -0,0 +1,29 @@
+<!--begin sidebar-->
+
+<link href="/css/style.css" rel="stylesheet" type="text/css" />
+<div id="rightside">
+
+  <div id="rightsidebox">
+    <?php include "/var/www/open-ils.org/incl/search_box.php" ;?>
+    <br />
+    <h3>Table of Contents</h3>
+    <p><a href="/documentation.php#official">&#187;&nbsp;Official Documentation</a></p>
+    <p><a href="/documentation.php#process">&#187;&nbsp;Process Documentation</a></p>
+    <p><a href="/documentation.php#dokuwiki">&#187;&nbsp;Evergreen Wiki</a></p>
+    <?
+    ///////////////////////////
+    //Setup the different feeds.
+    ///////////////////////////
+
+    $planet_feed = new Feed('http://planet.evergreen-ils.org/atom.xml');
+
+    //Get multiple items in single call
+    echo "<h3>Community Blog Posts</h3> ";
+        foreach ($planet_feed->find(5) as $item) {
+                echo "<p><a href='".$item->link."'>&#187;&nbsp;".$item->image.$item->title."</a>".$item->description."</p>";
+        }
+     ?>
+
+  </div>
+
+</div>
diff --git a/incl/downloads_sidebar.php b/incl/downloads_sidebar.php
new file mode 100644 (file)
index 0000000..85eeb64
--- /dev/null
@@ -0,0 +1,15 @@
+<!--begin sidebar-->
+<div id="rightside">
+  <div id="rightsidebox">
+    <?php include "/var/www/open-ils.org/incl/search_box.php" ;?>
+    <br />
+    <h3>Table of Contents</h3>
+    <p><a href="/downloads.php#evergreen">&#187;&nbsp;Server &amp; client downloads</a></p>
+    <p><a href="/downloads.php#mac_linux_clients">&#187;&nbsp;Staff clients for Mac & Linux</a></p>
+    <p><a href="/downloads.php#evergreen_demos">&#187;&nbsp;Evergreen in action</a></p>
+    <p><a href="/downloads.php#evergreen_vm">&#187;&nbsp;Evergreen Virtual Images</a></p>
+    <p><a href="/downloads.php#bugs">&#187;&nbsp;Bug Reports/Wish List</a></p>
+    <p><a href="/downloads.php#code_museum">&#187;&nbsp;Evergreen Code Museum</a></p>
+    <p><a href="/downloads.php#repos">&#187;&nbsp;Source Code Repository</a></p>
+   </div>
+</div>
diff --git a/incl/header.php.orig b/incl/header.php.orig
new file mode 100644 (file)
index 0000000..93ed45b
--- /dev/null
@@ -0,0 +1,27 @@
+<!--start header-->
+<div id="mainhead">
+<a href="/"><img src="/img/evergreen_logo.gif" border="0" alt="Open Source Integrated Library System" /></a>
+</div>
+<ul id="subhead">
+    <li><a href="/about.php" class="first">About Us</a></li>
+    <li><a href="/dokuwiki/doku.php?id=faqs:evergreen_faq_1">FAQs</a></li>
+    <li><a href="/documentation.php">Documentation</a></li>
+    <li class="dropdown"><a href="/communicate.php">Communicate</a>
+        <ul class="dropmenu">
+            <li><a href="/listserv.php">Mailing Lists</a></li>
+            <li><a href="/irc.php">Chat</a></li>
+            <li><a href="http://evergreen-ils.org/dokuwiki/doku.php?id=calendar:start">Calendar</a></li>
+            <li><a href="/blog">Official blog</a></li>
+            <li><a href="http://planet.evergreen-ils.org">Community blogs</a></li>
+        </ul>
+    </li>
+    <li class="dropdown"><a href="http://www.evergreen-ils.org/dokuwiki/doku.php?id=contributing">Contribute</a>
+        <ul class="dropmenu">
+            <li><a href="http://www.open-ils.org/dokuwiki/doku.php?id=faqs:evergreen_committees">Join committees and working groups</a></li>
+            <li><a href="http://bugs.launchpad.net/evergreen">Report bugs</a></li>
+            <li><a href="http://evergreen-ils.org/dokuwiki/doku.php?id=dev:contributing_code">Develop code</a></li>
+        </ul>
+    </li>
+    <li><a href="/downloads.php">Download</a></li>
+</ul>
+<!--end header-->
diff --git a/incl/news_box.php b/incl/news_box.php
new file mode 100644 (file)
index 0000000..16469a1
--- /dev/null
@@ -0,0 +1,359 @@
+<?php
+/**
+ * Simple reader for RSS and Atom feeds. 
+ * Requires: SimpleXML, fopen_wrappers
+ * BSD License - http://joshduck.com/blog/2010/02/08/simple-atom-rss-reader-for-php/
+ * Limitations: Not content encoding support. 
+ * 
+ * Usage:
+ *     $feed = new Feed('http://www.example.com/feed.rss');
+ *
+ *     //Get items with next() or current()
+ *     echo $feed->next()->title;           // "Blog post 1"
+ *     echo $feed->next()->title;           // "Blog post 1"
+ *     echo $feed->next()->title;           // "Blog post 2"
+ *     echo $feed->current()->title;        // "Blog post 2"
+ *
+ *     //Feed data returned
+ *     echo $feed->current()->title;        // "Blog post 2"
+ *     echo $feed->current()->date;         // int(1265569159)
+ *     echo $feed->current()->description;  // "Lorem ipsum dolar..."
+ *     echo $feed->current()->link;         // "http://www.example.com/blog/2"
+ *     echo $feed->current()->image;        // "http://www.example.com/blog/images/2.jpg"
+ *
+ *     //Get multiple items in single call
+ *     foreach ($feed->find(3) as $item) {
+ *         echo $item->title;               // "Blog post 3" "Blog post 4" "Blog post 5"
+ *     }
+ *
+ *     //Reset internal counter
+ *     echo $feed->reset();
+ *     echo $feed->next()->title;           // "Blog post 1"
+ *
+ *     //Get random items, without repeating
+ *     echo $feed->random()->title;         // "Blog post 4"
+ *     echo $feed->random()->title;         // "Blog post 3"
+ *
+ *     //Total number of items
+ *     echo $feed->count();                 // int(10)
+ *
+ * Changed 'url' => (string)$node->link to 'link' => (string)$node->link in function item. [Anoop Atre]
+ */
+class Feed {
+       private $url;
+       private $reader;
+       private $current;
+       private $remaining;
+       public $cacheTime = 3600;
+       /**
+        * Create Atom reader object.
+        *
+        * @param string $url
+        */
+       public function __construct($url) {
+               $this->url = $url;
+               $this->reset();
+       }
+       /**
+        * Reset current item to first RSS item.
+        */
+       public function reset() {
+               $this->current = -1;
+               $this->remaining = null;
+       }
+       /**
+        * Get the next item in the feed.
+        *
+        * @return stdClass Object representing the item. Will return null when the list is exhausted.
+        */
+       public function next() {
+               if ($this->current < $this->count()) {
+                       $this->current++;
+                       $next = $this->getReader()->item($this->current);
+                       return $next;
+               }
+       }
+       /**
+        * Get the current item in the feed.
+        *
+        * @return stdClass Object representing the item. Will return null when the list is exhausted.
+        */
+       public function current() {
+               return $this->getReader()->item(max(0, $this->current));
+       }
+       /**
+        * Get random item from the feed. Will not return an item more than once.
+        *
+        * @return stdClass Object representing the item. Will return null when the list is exhausted.
+        */
+       public function random() {
+               if ($this->remaining === null) {
+                       $this->remaining = array();
+                       for ($i = 0; $i < $this->count(); $i++) {
+                               $this->remaining[] = $i;
+                       }
+               }
+               if (count($this->remaining)) {
+                       $picked = array_rand($this->remaining);
+                       $index = $this->remaining[$picked];
+                       unset($this->remaining[$picked]);
+                       return $this->getReader()->item($index);
+               }
+       }
+       /**
+        * Get X items from feed. Will advance pointer.
+        *
+        * @param int $count
+        * @return array of stdClass
+        */
+       public function find($count) {
+               $items = array();
+               while ($item = $this->next()) {
+                       $items[] = $item;
+                       if (count($items) >= $count) {
+                               break;
+                       }
+               }
+               return $items;
+       }
+       /**
+        * Get the number of items in the feed.
+        *
+        * @return int
+        */
+       public function count() {
+               return $this->getReader()->count();
+       }
+       /**
+        * Get FeedReader object for the feed.
+        *
+        * @return FeedReader
+        */
+       private function getReader() {
+               if (!$this->reader) {
+                       $xml = $this->getXML();
+                       if (RSSReader::canRead($xml)) {
+                               $this->reader = new RSSReader($xml);
+                       } else if (AtomReader::canRead($xml)) {
+                               $this->reader = new AtomReader($xml);
+                       } else {
+                               $this->reader = new NullReader($xml);
+                       }
+               }
+               return $this->reader;
+       }
+       /**
+        * Get XML element for the feed.
+        *
+        * @return SimpleXMLElement
+        */
+       private function getXML() {
+               if ($xml = $this->getCacheXML()) {
+                       return $xml;
+               } else if ($xml = $this->getURLXML()) {
+                       return $xml;
+               } else {
+                       return new SimpleXMLElement("");
+               }
+       }
+       /**
+        * Get XML element for the feed from cache.
+        *
+        * @return SimpleXMLElement or null if cache doesn't exist.
+        */
+       private function getCacheXML() {
+               //Store URL data in local cache.
+               $cacheFilename = $this->getCacheFilename();
+               if (file_exists($cacheFilename) && (time() - filemtime($cacheFilename)) < $this->cacheTime) {
+                       if ($data = file_get_contents($cacheFilename)) {
+                               return new SimpleXMLElement($data);
+                       }
+               }
+       }
+       /**
+        * Get XML element from the feed from the live URL.
+        * Will cache XML data to disk.
+        *
+        * @return SimpleXMLElement or null if URL is unreachable.
+        */
+       private function getURLXML() {
+               if ($data = @file_get_contents($this->url)) {
+                       try {
+                               $xml = new SimpleXMLElement($data);
+                               file_put_contents($this->getCacheFilename(), $data);
+                               return $xml;
+                       } catch (Exception $e) {
+                               return null;
+                       }
+               }
+       }
+       /**
+        * Name of the cache file for current URL.
+        *
+        * @return string
+        */
+       private function getCacheFilename() {
+               return sys_get_temp_dir() . '/' . md5($this->url) . '.feed.cache';
+       }
+}
+/**
+ * Interface for reading items from feed.
+ */
+interface FeedReader {
+       /**
+        * Create reader from SimpleXMLElement.
+        *
+        * @param SimpleXMLElement $root
+        */
+       public function __construct(SimpleXMLElement $root);
+       /**
+        * Get single node.
+        *
+        * @return array or null.
+        */
+       public function item($index);
+       /**
+        * Get number of items.
+        *
+        * @return int.
+        */
+       public function count();
+       /**
+        * Can this reader understand the XML file?
+        *
+        * @param SimpleXMLElement $root
+        * @return bool
+        */
+       public static function canRead(SimpleXMLElement $root);
+}
+/**
+ * Concrete implementation of FeedReader that will never return an item.
+ */
+class NullReader implements FeedReader {
+       public function __construct(SimpleXMLElement $root) {
+               //Nothing
+       }
+       public function count() {
+               return null;
+       }
+       public function item($index) {
+               return null;
+       }
+       public static function canRead(SimpleXMLElement $root) {
+               return true;
+       }
+}
+/**
+ * Concrete implementation of FeedReader that will read an Atom feed.
+ */
+class AtomReader implements FeedReader {
+       private $root;
+       public function __construct(SimpleXMLElement $root) {
+               $this->root = $root;
+       }
+       public function count() {
+               return count($this->root->entry);
+       }
+       public function item($index) {
+               $node = $this->root->entry[$index];
+               if (!$node) {
+                       return null;
+               }
+               $item = array(
+                       'title' => (string)$node->title,
+                       'description' => (string)$node->description,
+                       'image' => null,
+                       'link' => null,
+                       'date' => strtotime($node->published),
+               );
+               //Iterate through link nodes getting content URL and images.
+               foreach ($node->link as $link) {
+                       if (strpos($link['type'], 'text') === 0 || $item['link'] === null) {
+                               $item['link'] = (string)$link['href'];
+                       }
+                       if (strpos($link['type'], 'image') === 0) {
+                               $item['image'] = (string)$link['href'];
+                       }
+               }
+               return (object)$item;
+       }
+       public static function canRead(SimpleXMLElement $root) {
+               //Check for Atom namespace.
+               return in_array('http://www.w3.org/2005/Atom', $root->getNamespaces());
+       }
+}
+/**
+ * Concrete implementation of FeedReader that will read an RSS feed.
+ */
+class RSSReader implements FeedReader {
+       private $root;
+       public function __construct(SimpleXMLElement $root) {
+               $this->root = $root;
+       }
+       public function count() {
+               return count($this->root->channel->item);
+       }
+       public function item($index) {
+               $node = $this->root->channel->item[$index];
+               if (!$node) {
+                       return null;
+               }
+               return (object)array(
+                       'title' => (string)$node->title,
+                       'description' => (string)$node->description,
+                       'link' => (string)$node->link,
+                       'image' => null,
+                       'date' => strtotime($node->pubDate),
+               );
+       }
+       public static function canRead(SimpleXMLElement $root) {
+               //RSS feeds name their root node 'rss'.
+               return $root->getName() == 'rss';
+       }
+}
+?>
diff --git a/incl/opensrf_sidebar.php b/incl/opensrf_sidebar.php
new file mode 100644 (file)
index 0000000..d321cf7
--- /dev/null
@@ -0,0 +1,12 @@
+<!--begin sidebar-->
+<div id="rightside">
+  <div id="rightsidebox">
+    <?php include "/var/www/open-ils.org/incl/search_box.php" ;?>
+    <br />
+    <h3>Table of Contents</h3>
+    <p><a href="/opensrf.php#opensrf">&#187;&nbsp;OpenSRF Downloads</a></p>
+    <p><a href="/opensrf.php#opensrf_development">&#187;&nbsp;Developing on OpenSRF</a></p>
+    <p><a href="/opensrf.php#bugs">&#187;&nbsp;OpenSRF Bug Reports</a></p>
+    <p><a href="/opensrf.php#repos">&#187;&nbsp;Source Code Repository</a></p>
+   </div>
+</div>
diff --git a/incl/right_sidebar.php b/incl/right_sidebar.php
new file mode 100644 (file)
index 0000000..b20abb8
--- /dev/null
@@ -0,0 +1,25 @@
+<!--begin sidebar-->
+
+<link href="/css/style.css" rel="stylesheet" type="text/css" />
+<div id="rightside">
+
+  <div id="rightsidebox">
+    <?php include "/var/www/open-ils.org/incl/search_box.php" ;?>
+    <br />
+    <?
+    ///////////////////////////
+    //Setup the different feeds.
+    ///////////////////////////
+
+    $planet_feed = new Feed('http://planet.evergreen-ils.org/atom.xml');
+
+    //Get multiple items in single call
+    echo "<h3>Community Blog Posts</h3> ";
+        foreach ($planet_feed->find(8) as $item) {
+                echo "<p><a href='".$item->link."'>&#187;&nbsp;".$item->image.$item->title."</a>".$item->description."</p>";
+        }
+     ?>
+
+  </div>
+
+</div>
diff --git a/incl/search_box.php b/incl/search_box.php
new file mode 100644 (file)
index 0000000..ba91018
--- /dev/null
@@ -0,0 +1,26 @@
+    <h3>Search</h3>
+    <br />
+   <div id = "search">
+    <!-- Google CSE Search Box Begins  -->
+      <script type="text/javascript" src="//www.google.com/jsapi"></script>
+      <script type="text/javascript">
+        google.load('search', '1');
+        google.setOnLoadCallback(function() {
+          google.search.CustomSearchControl.attachAutoCompletion(
+            '010560097571033607994:41nggnnkkwg',
+            document.getElementById('q'),
+            'cse-search-box');
+        });
+      </script>
+      <form action="/search.php" id="cse-search-box">
+        <div>
+          <input type="hidden" name="cx" value="010560097571033607994:41nggnnkkwg" />
+          <input type="hidden" name="cof" value="FORID:10" />
+          <input type="hidden" name="ie" value="UTF-8" />
+          <input type="text" name="q" id="q" autocomplete="off" size="20" />
+          <input type="submit" name="sa" value="Go" />
+        </div>
+      </form>
+      <script type="text/javascript" src="//www.google.com/cse/brand?form=cse-search-box&lang=en"></script>
+    <!-- Google CSE Search Box Ends -->
+   </div>
diff --git a/incl/search_sidebar.php b/incl/search_sidebar.php
new file mode 100644 (file)
index 0000000..a13f705
--- /dev/null
@@ -0,0 +1,23 @@
+<!--begin sidebar-->
+
+<link href="/css/style.css" rel="stylesheet" type="text/css" />
+<div id="rightside">
+
+  <div id="rightsidebox">
+    <?
+    ///////////////////////////
+    //Setup the different feeds.
+    ///////////////////////////
+
+    $planet_feed = new Feed('http://planet.evergreen-ils.org/atom.xml');
+
+    //Get multiple items in single call
+    echo "<h3>Community Blog Posts</h3> ";
+        foreach ($planet_feed->find(8) as $item) {
+                echo "<p><a href='".$item->link."'>&#187;&nbsp;".$item->image.$item->title."</a>".$item->description."</p>";
+        }
+     ?>
+
+  </div>
+
+</div>
diff --git a/opensrf.php b/opensrf.php
new file mode 100644 (file)
index 0000000..fd497c2
--- /dev/null
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+   <title>Downloads: Evergreen open source library system</title>
+   <link href="/css/style.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="wrap">
+<?php include "/var/www/open-ils.org/incl/header.php" ;?>
+<?php include "/var/www/open-ils.org/incl/news_box.php" ;?>
+<?php include "/var/www/open-ils.org/incl/sidebar.php" ;?>
+<?php include "/var/www/open-ils.org/incl/opensrf_sidebar.php" ;?>
+<!--end side-->
+<div id="pagebody">
+<h1>OpenSRF</h1>
+<p class="content">Open Scalable Request Framework (OpenSRF), pronounced “open surf” is a message routing network that offers scalability and failover support for individual services and entire servers with minimal development and deployment overhead. You can use OpenSRF to build loosely-coupled applications that can be deployed on a single server or on clusters of geographically distributed servers using the same code and minimal configuration changes.<br />
+</p>
+<div id="limit_stretch">
+<h3><a name="opensrf">Downloads</a></h3>
+</div>
+<!-- Table design/CSS from typo3.org -->
+<!--  Table: [begin] -->
+<table class="contenttable contenttable-1 contenttable1">
+  <thead> <tr class="tr-even tr-0">
+    <th class="td-0" scope="col" id="col5706-0">&nbsp;</th>
+    <th class="td-3" scope="col" id="col5706-3">1.6 Series</th>
+    <th class="td-last td-4" scope="col" id="col5706-4">2.0 Series<br />
+    </th>
+  </tr>
+  </thead><tbody>
+    <tr class="tr-odd tr-1">
+      <td class="td-s" headers="col5706-0">Status</td>
+      <td class="td-s" headers="col5706-3">stable</td>
+      <td class="td-last td-u" headers="col5706-4">unstable<br />
+      </td>
+    </tr>
+    <tr class="tr-even tr-2">
+      <td class="td-0" headers="col5706-0">Latest Release</td>
+      <td class="td-3" headers="col5706-3">1.6.3</td>
+      <td class="td-last td-4" headers="col5706-4">2.0.0 RC</td>
+    </tr>
+    <tr class="tr-odd tr-3">
+      <td class="td-0" headers="col5706-0">Release Date</td>
+      <td class="td-3" headers="col5706-3">2010-03-18<br /></td>
+      <td class="td-last td-4" headers="col5706-4">2011-03-02</td>
+    </tr>
+    <tr class="tr-even tr-4">
+      <td class="td-0" headers="col5706-0">ChangeLog<br />
+      </td>
+      <td class="td-3" headers="col5706-3"><a href="/opensrf_changelog.php">ChangeLog</a></td>
+      <td class="td-last td-4" headers="col5706-4"><a href="/opensrf_changelog.php">ChangeLog</a></td>
+    </tr>
+    <tr class="tr-odd tr-5">
+      <td class="td-0" headers="col5706-0">Release Notes<br />
+      </td>
+      <td class="td-3" headers="col5706-3"><a href="/dokuwiki/doku.php?id=opensrf:release_notes:1.6">Release Notes</a></td>
+      <td class="td-last td-4" headers="col5706-4">Release Notes</td>
+    </tr>
+    <tr class="tr-even tr-8">
+      <td class="td-0" headers="col5706-0">Clean Install</td>
+      <td class="td-3" headers="col5706-3"><a href="/dokuwiki/doku.php?id=opensrf:1.6:install" target="_blank">Instructions</a></td>
+      <td class="td-last td-4" headers="col5706-4">Instructions</td>
+    </tr>
+    <tr class="tr-odd tr-9">
+      <td class="td-0" headers="col5706-0">SVN repository</td>
+      <td class="td-3" headers="col5706-3"><a href="http://svn.open-ils.org/trac/OpenSRF/browser/branches/rel_1_6" target="_blank">SVN location</a></td>
+      <td class="td-last td-4" headers="col5706-4"><a href="http://svn.open-ils.org/trac/OpenSRF/browser/branches/rel_2_0" target="_blank">SVN location</a></td>
+    </tr>
+    <tr class="tr-even tr-10">
+      <td class="td-0" headers="col5706-0">Download</td>
+      <td class="td-3" headers="col5706-3">Source [<a href="/downloads/opensrf-1.6.3.tar.gz">tar.gz</a>] <a href="/downloads/opensrf-1.6.3.tar.gz.md5" target="_blank">[md5]</a><br />
+      </td>
+      <td class="td-last td-4" headers="col5706-4">Source [<a href="/downloads/opensrf-2.0.0-rc2.tar.gz">tar.gz</a>] <a href="/downloads/opensrf-2.0.0-rc2.tar.gz.md5" target="_blank">[md5]</a><br />
+      </td>
+    </tr>
+    <tr class="tr-odd tr-last">
+      <td class="td-0" headers="col5706-0">&nbsp;</td>
+      <td class="td-3" headers="col5706-3">&nbsp;</td>
+      <td class="td-last td-4" headers="col5706-4">&nbsp;</td>
+    </tr>
+  </tbody>
+</table>
+<!--  Table: [end] --><h3><a name="opensrf_development">Developing on OpenSRF<br />
+</a></h3>
+<p class="content"><a name="opensrf_development">Dan Scott has written a two part article which is a detailed introduction to OpenSRF.&nbsp; "This article introduces OpenSRF, how to build OpenSRF services through code examples, explains the technical foundations on which OpenSRF is built, and evaluates OpenSRF’s value in the context of Evergreen" - "</a><a href="http://journal.code4lib.org/articles/3365">Easing gently into OpenSRF, Part 1</a>" and "<a href="http://journal.code4lib.org/articles/3284">Easing gently into OpenSRF, Part 2</a>".</p>
+<p class="content"><a name="opensrf_development">He also has an introductory workshop available along with some Perl/JavaScript examples - "</a><a href="/%7Edenials/workshop.html">Evergreen development</a>".</p>
+<h3><a name="pos">OpenSRF Bug Reports</a></h3>
+<p><a name="bugs">Please report any OpenSRF bugs on <a href="https://bugs.launchpad.net/opensrf">Launchpad</a>.</p>
+<p class="content">To report a vulnerability please email your report to <a href="mailto:open-ils-security@esilibrary.com">open-ils-security@esilibrary.com</a>.</p>
+<a name="repos" /><h3><a name="repos">Source Code Repository</a></h3>
+<p class="content"><a name="repos">A Trac instance sits atop the Subversion repository for OpenSRF and is available at </a><a href="http://svn.open-ils.org/trac/OpenSRF">svn.open-ils.org/trac/OpenSRF</a>. Here is the running change log for the OpenSRF code repository: <a href="http://svn.open-ils.org/trac/OpenSRF/timeline">watch us work</a>.</p>
+<p>Trac sends code commits to public OpenSRF commits mailing lists:</p>
+<ul class="bullet"><li> For OpenSRF commits, subscribe to  <a href="http://list.georgialibraries.org/mailman/listinfo/opensrf-commits">opensrf-commits</a></li></ul>
+</div>
+<!--end pagebody-->
+<?php include "/var/www/open-ils.org/incl/footer.php"; ?>
+</div>
+<!--end wrapper-->
+</body></html>
diff --git a/opensrf_changelog.php b/opensrf_changelog.php
new file mode 100644 (file)
index 0000000..859cc5f
--- /dev/null
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+   <title>Documentation: Evergreen open source library system</title>
+   <link href="/css/style.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="wrap">
+<?php include "/var/www/open-ils.org/incl/header.php" ;?>
+<?php include "/var/www/open-ils.org/incl/news_box.php" ;?>
+<?php include "/var/www/open-ils.org/incl/sidebar.php" ;?>
+<?php include "/var/www/open-ils.org/incl/right_sidebar.php" ;?>
+<!--end side-->
+<div id="pagebody">
+<h1>OpenSRF ChangeLogs</h1>
+<a name="200"></a>
+<h2>2.0.0</h2>
+
+<?php
+$fdir = "downloads/";
+$globarray = glob($fdir . "OpenSRF-ChangeLog-2.0*");
+usort($globarray, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
+echo "<ul class='bullet'>";
+foreach($globarray as $filename) {
+   $info = pathinfo($filename);
+      $target = htmlspecialchars($info['basename']);
+   printf(
+      "<li><a href='%s'>%s</a></li>\n",
+      htmlspecialchars($filename),
+      $target
+   );
+}
+echo "</ul>";
+?>
+
+<a name="161"></a>
+<h2>1.6.3</h2>
+
+<?php
+$fdir = "downloads/";
+$globarray = glob($fdir . "OpenSRF-ChangeLog-1.6*");
+usort($globarray, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
+echo "<ul class='bullet'>";
+foreach($globarray as $filename) {
+   $info = pathinfo($filename);
+      $target = htmlspecialchars($info['basename']);
+   printf(
+      "<li><a href='%s'>%s</a></li>\n",
+      htmlspecialchars($filename),
+      $target
+   );
+}
+echo "</ul>";
+?>
+
+</div>
+<!--end pagebody-->
+<?php include "/var/www/open-ils.org/incl/footer.php"; ?>
+</div><!--end wrapper-->
+</body>
+</html>
diff --git a/staff_clients.php b/staff_clients.php
new file mode 100644 (file)
index 0000000..3b43324
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+   <title>Documentation: Evergreen open source library system</title>
+   <link href="/css/style.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="wrap">
+<?php include "/var/www/open-ils.org/incl/header.php" ;?>
+<?php include "/var/www/open-ils.org/incl/news_box.php" ;?>
+<?php include "/var/www/open-ils.org/incl/sidebar.php" ;?>
+<?php include "/var/www/open-ils.org/incl/right_sidebar.php" ;?>
+<!--end side-->
+<div id="pagebody">
+<h1>Staff Client Archive</h1>
+<a name="200"></a>
+<h2>2.0.0</h2>
+
+<?php
+$fdir = "downloads/";
+$globarray = glob($fdir . "evergreen-setup-rel_2_0_*.exe");
+usort($globarray, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
+echo "<ul class='bullet'>";
+foreach($globarray as $filename) {
+   $info = pathinfo($filename);
+      $target = htmlspecialchars($info['basename']);
+    echo '<li><a target="_blank" href="'.htmlspecialchars($filename).'">'.$target.'</a> (<a target="_blank" href="'.htmlspecialchars($filename).'.md5">md5</a>)</li>'."\n";
+  }
+echo "</ul>";
+?>
+
+<a name="161"></a>
+<h2>1.6.1</h2>
+<?
+$fdir = "downloads/";
+$globarray = glob($fdir . "evergreen-setup-rel_1_6_1_*.exe");
+usort($globarray, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
+echo "<ul class='bullet'>";
+foreach($globarray as $filename) {
+   $info = pathinfo($filename);
+      $target = htmlspecialchars($info['basename']);
+    echo '<li><a target="_blank" href="'.htmlspecialchars($filename).'">'.$target.'</a> (<a target="_blank" href="'.htmlspecialchars($filename).'.md5">md5</a>)</li>'."\n";
+  }
+echo "</ul>";
+?>
+
+</div>
+<!--end pagebody-->
+<?php include "/var/www/open-ils.org/incl/footer.php"; ?>
+</div><!--end wrapper-->
+</body>
+</html>