[GRASSweb-list] markus: web main.inc,1.79,1.80

grass at intevation.de grass at intevation.de
Wed Nov 8 11:21:02 EST 2006


Author: markus

Update of /grassrepository/web
In directory doto:/tmp/cvs-serv27673

Modified Files:
	main.inc 
Log Message:
conditionalized new section upon PHP version (for Canadian mirror)

Index: main.inc
===================================================================
RCS file: /grassrepository/web/main.inc,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- main.inc	31 Oct 2006 22:25:18 -0000	1.79
+++ main.inc	8 Nov 2006 16:21:00 -0000	1.80
@@ -54,17 +54,23 @@
    <a href="http://grass.itc.it/rss.xml"><img src="rss-icon.gif" alt="RSS Feed" border=0></a></h4>
     </center>
 
-  <ul>
+   <ul>
    <?php
-   include("rss.php");
-   $r1 =& new XML_RSS('rss.xml');
-   $r1->parse();
-   foreach ($r1->getItems() as $value) {
-        $format = '%d %b %Y';
-        echo "<li>".strftime($format,strtotime($value['pubdate'])).": <a href=\"".$value['link']."\"><strong>".$value["title"]."</strong></a> - ".$value["description"]."</li>\n";
-}
+   if (version_compare(phpversion(), "4.0.2" , ">=")) {
+     include("rss.php");
+     $r1 =& new XML_RSS('rss.xml');
+     $r1->parse();
+     foreach ($r1->getItems() as $value) {
+       $format = '%d %b %Y';
+       echo "<li>".strftime($format,strtotime($value['pubdate'])).": <a href=\"".$value['link']."\"><strong>
+".$value["title"]."</strong></a> - ".$value["description"]."</li>\n";
+     }
+   } else {
+     echo "The display of the news section requires PHP >=4.0.2 to be installed. Sorry.\n";
+     require('manually_written_news.html');
+   }
    ?>
-  </ul>
+   </ul>
 
  <center>         
   <h4>Upcoming Conferences/Short Courses:</h4>





More information about the grass-web mailing list