[ PHPXref.com ] [ Generated: Sun Jul 20 19:39:24 2008 ] [ PhpGedView 4.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> changelog.php (source)

   1  <?php
   2  /**
   3   * Display changelog file with clickable bugs and RFEs
   4   *
   5   * phpGedView: Genealogy Viewer
   6   * Copyright (C) 2002 to 2003  John Finlay and Others
   7   *
   8   * This program is free software; you can redistribute it and/or modify
   9   * it under the terms of the GNU General Public License as published by
  10   * the Free Software Foundation; either version 2 of the License, or
  11   * (at your option) any later version.
  12   *
  13   * This program is distributed in the hope that it will be useful,
  14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16   * GNU General Public License for more details.
  17   *
  18   * You should have received a copy of the GNU General Public License
  19   * along with this program; if not, write to the Free Software
  20   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  21   *
  22   * @package PhpGedView
  23   * @subpackage Admin
  24   * @version $Id: changelog.php,v 1.2.2.3 2006/05/22 12:02:50 opus27 Exp $
  25   */
  26  
  27  $search = @$HTTP_GET_VARS["search"];
  28  print "<title>PhpGedView : changelog ($search)</title>\n";
  29  
  30  $text = file_get_contents("changelog.txt");
  31  $wait = @file_get_contents("changelog.local.txt");
  32  $text = $wait.$text;
  33  
  34  // disable HTML tags
  35  $text = preg_replace("/</", "&lt;", $text);
  36  $text = preg_replace("/>/", "&gt;", $text);
  37  
  38  // highlight search text (caseless)
  39  if (!empty($search)) {
  40      $text = preg_replace("/(.*)(?i)($search)(.*)\\n/", "<span style=\"background-color:#DADADA\">\\0</span>", $text);
  41      $text = preg_replace("/(?i)$search/", "<span style=\"background-color:Yellow\">\\0</span>", $text);
  42  }
  43  
  44  // add link to tracker
  45  $text = preg_replace("/RFE(\d{6,7})/", "RFE \\1", $text);    // RFE1234567 ==> RFE 1234567
  46  $text = preg_replace("/#(\d{6,7})/", "# \\1", $text);        // #1234567 ==> # 1234567
  47  $text = preg_replace("/\[(\d{6,7})/", "[ \\1", $text);        // [1234567 ==> [ 1234567
  48  $text = preg_replace("/(\d{6,7})\]/", "\\1 ]", $text);        // 1234567] ==> 1234567 ]
  49  $text = preg_replace("/\((\d{6,7})/", "( \\1", $text);        // (1234567 ==> ( 1234567
  50  $text = preg_replace("/(\d{6,7})\)/", "\\1 )", $text);        // 1234567) ==> 1234567 )
  51  $text = preg_replace("/(\d{6,7})\,/", "\\1 ,", $text);        // 1234567, ==> 1234567 ,
  52  $text = preg_replace("/ (\d{6,7}) /", " <a name=\\1 href=http://sourceforge.net/support/tracker.php?aid=\\1>\\1</a> ", $text);
  53  
  54  $text = preg_replace("/ \(([-\w]{4,13})\)\r\n/", " (<a name=\\1 href=?search=\\1>\\1</a>)\r\n", $text);
  55  $text = preg_replace("/  /", " ", $text);
  56  
  57  print "<pre>\n$text\n</pre>\n";
  58  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]