Index: trunk/www/admin/add.php
===================================================================
--- trunk/www/admin/add.php	(revision 28303)
+++ trunk/www/admin/add.php	(revision 28303)
@@ -0,0 +1,20 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/macports/includes/news.inc");
+    print_header('MacPorts | Add news', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Add news</h2>
+
+      <?php
+	print_add_headline();
+      ?>
+
+      </div>
+    </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/admin/edit.php
===================================================================
--- trunk/www/admin/edit.php	(revision 28303)
+++ trunk/www/admin/edit.php	(revision 28303)
@@ -0,0 +1,20 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/macports/includes/news.inc");
+    print_header('MacPorts | Edit news', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Edit news</h2>
+
+      <?php
+	print_edit_headline($_GET['id']);
+      ?>
+
+      </div>
+    </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/admin/index.php
===================================================================
--- trunk/www/admin/index.php	(revision 19376)
+++ trunk/www/admin/index.php	(revision 28303)
@@ -1,7 +1,6 @@
   <?php
     $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
-    include_once("$DOCUMENT_ROOT/includes/common.inc");
-    include_once("$DOCUMENT_ROOT/includes/functions.inc");
-    print_header('DarwinPorts Site Administration', 'iso-8859-1');
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    print_header('MacPorts Site Administration', 'utf-8');
   ?>
 
@@ -13,11 +12,11 @@
 
       <ul>
-	<li><a href="/admin/headlines/add.php">Add headline</a></li>
-	<li><a href="/admin/headlines/list.php">List all headlines</a></li>
-	<li><a href="/admin/headlines/rss.php">Regenerate RSS feed</a></li>
+	<li><a href="/macports/admin/add.php">Add headline</a></li>
+	<li><a href="/macports/admin/list.php">List all headlines</a></li>
+	<li><a href="/macports/admin/rss.php">Regenerate RSS feed</a></li>
       </ul>
 
       <p>If you need to edit an already-posted headline, find it in the <a
-	href="/admin/headlines/list.php">list</a>, and choose edit.</p>
+	href="/macports/admin/list.php">list</a>, and choose edit.</p>
     </div>
   </div>
Index: trunk/www/admin/list.php
===================================================================
--- trunk/www/admin/list.php	(revision 28303)
+++ trunk/www/admin/list.php	(revision 28303)
@@ -0,0 +1,20 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/macports/includes/news.inc");
+    print_header('MacPorts | List all news', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">List all news</h2>
+
+      <?php
+	print_all_headlines();
+      ?>
+
+      </div>
+    </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/admin/rss.php
===================================================================
--- trunk/www/admin/rss.php	(revision 28303)
+++ trunk/www/admin/rss.php	(revision 28303)
@@ -0,0 +1,5 @@
+<?php
+  $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+  include_once("$DOCUMENT_ROOT/macports/includes/news.inc");
+  create_rss();
+?>
Index: trunk/www/archives.php
===================================================================
--- trunk/www/archives.php	(revision 19376)
+++ trunk/www/archives.php	(revision 28303)
@@ -1,7 +1,7 @@
   <?php
     $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
-    include_once("$DOCUMENT_ROOT/includes/common.inc");
-    include_once("$DOCUMENT_ROOT/includes/functions.inc");
-    print_header('DarwinPorts Home', 'iso-8859-1');
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/macports/includes/news.inc");
+    print_header('MacPorts Home', 'utf-8');
   ?>
 
Index: trunk/www/downloads.php
===================================================================
--- trunk/www/downloads.php	(revision 28303)
+++ trunk/www/downloads.php	(revision 28303)
@@ -0,0 +1,45 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    print_header('MacPorts Downloads', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Available Downloads</h2>
+		<table>
+<?php
+$dir=".";
+
+// Read files from the dirctory
+$files = array();
+$rep=opendir($dir);
+while ($file = readdir($rep)) {
+	if (   preg_match('/^(\..*)|(.*\.php)|(.*\.css)|(.*\.html)$/', $file)
+		|| is_dir($file)
+	   ) {
+		continue;
+	}
+	
+	// Add file to array, as key, with modtime as value
+	$files[$file] = filemtime($file);
+}
+closedir($rep);
+
+// Sort the array in reverse order by value (modtime)
+arsort($files);
+
+// Emit the files, with dates
+foreach ($files as $f => $t) {
+	echo "<tr>";
+	echo "<td>".date("d-M-Y G:i", $t)."</td><td><a href=\"/macports/downloads/$f\">$f</a></td>\n";
+	echo "</tr>";
+}
+?>
+		</table>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/dp.css
===================================================================
--- trunk/www/dp.css	(revision 19376)
+++ 	(revision )
@@ -1,234 +1,0 @@
-/*
-  $Id$
-*/
-
-* {
-	font-family: Georgia, "New Century Schoolbook", "Times New Roman", Times, serif;
-}
-
-body {
-	background: #e3f1c7;
-	width: 720px;
-	margin: 15px auto 15px auto;
-	font-size: 12px;
-}
-
-a:link {
-	color: #669;
-	text-decoration: none;
-	font-weight: bold;
-	border-bottom: 1px dotted #c63;
-}
-
-a:visited {
-	color: #888;
-	text-decoration: none;
-	font-weight: bold;
-	border-bottom: 1px dotted #669;
-}
-
-a:hover {
-	color: #c63;
-	text-decoration: none;
-	font-weight: bold;
-	border-bottom: 1px dotted #369;
-}
-
-img, a img {
-	border: none;
-	text-decoration: none;
-}
-
-h1 {
-	font-size: 22px;
-}
-
-h2 {
-	font-size: 20px;
-}
-
-h3 {
-	font-size: 18px;
-}
-
-h4 {
-	font-size: 16px;
-}
-
-h5 {
-	font-size: 14px;
-}
-
-h6 {
-	font-size: 13px;
-}
-
-br {
-	clear: both;
-}
-
-p {
-	margin: 10px 0 1em 0;
-	line-height: 16px;
-}
-
-input, textarea {
-	font-family: Courier, "Courier New", monospace;
-}
-
-kbd {
-	color: #c63;
-	font-family: Courier, "Courier New", monospace;
-}
-
-pre {
-	color: #369;
-	font-family: Sans, "Sans serif";
-	font-size: 14px;
-	margin-left: 20px;
-}
-
-#nav {
-	height: 76px;
-	padding: 0;
-	font-size: 10px;
-}
-
-#logo {
-	background: #fff;
-	float: left;
-	display: inline;
-	width: 400px;
-	height: 75px;
-	border-top: 1px solid #bbb;
-	border-bottom: 1px solid #bbb;
-}
-
-#logo a {
-	border: none;
-}
-
-#nav #l {
-	width: 150px;
-	height: 75px;
-	float: left;
-	border: 1px solid #bbb;
-}
-
-#nav #r {
-	width: 150px;
-	height: 75px;
-	float: left;
-	border-top: 1px solid #bbb;
-	border-bottom: 1px solid #bbb;
-}
-
-#nav ul {
-	list-style-type: none;
-	margin: 0;
-	padding: 0;
-	text-align: center;
-}
-
-#nav li a {
-	background: #fff;
-	display: block;
-	text-decoration: none;
-	line-height: 20px;
-	padding: 2px;
-	border-bottom: 1px solid #bbb;
-}
-
-#nav li a:visited {
-	color: #999;
-	text-decoration: none;
-}
-
-#nav li a:hover {
-	background: #d8e6e7;
-	color: #888;
-}
-
-#nav li.last a {
-	border: none;
-	display: block;
-	line-height: 21px;
-}
-
-#nav li.selected a {
-	background: #f3f3f3;
-	color: #c63;
-}
-
-#nav li.sellast a {
-	background: #f3f3f3;
-	color: #c63;
-	border: none;
-	display: block;
-	line-height: 21px;
-}
-
-#main {
-	background: #fff;
-	width: 702px;
-	border-right: 1px solid #bbb;
-	border-left: 1px solid #bbb;
-	padding-bottom: 100px;
-}
-
-#content {
-	width: 80%; 
-	margin: 10px 0 0 0;
-	padding: 5px 20px;
-}
-
-#news {
-	margin: 10px 0 0 0;
-	padding: 5px 0 0 0;
-}
-
-#footer {
-	width: 692px;
-	background: #fff;
-	border: 1px solid #bbb;
-	font-size: 10px;
-	padding: 5px;
-	text-align: right;
-}
-
-.languages {
-	float: left;
-}
-
-.hdr {
-	color: #669;
-	margin: 0;
-	padding: 10px 0 0 0;
-	border-bottom: 1px solid #bbb;
-}
-
-.subhdr {
-	color: #879880;
-	margin: 5px 0 0 0;
-	padding: 0;
-}
-
-.date {
-	color: #999;
-	margin: 0 auto;
-	padding: 0;
-}
-
-.referer_box {
-	margin: auto;
-	margin-bottom: 1em;
-	width: 90%;
-	border: 1px solid #CC6633;
-	background-color: #D37F54;
-	color: black;
-	padding: 1em;
-}
-.referer_box a {
-	color: white;
-}
-
Index: trunk/www/emit_portfile.php
===================================================================
--- trunk/www/emit_portfile.php	(revision 19376)
+++ trunk/www/emit_portfile.php	(revision 28303)
@@ -2,5 +2,5 @@
 
 $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
-include_once("$DOCUMENT_ROOT/includes/email.inc");
+include_once("$DOCUMENT_ROOT/macports/includes/email.inc");
 
 $portname = basename(dirname($_SERVER['PATH_INFO']));
Index: trunk/www/getmp.php
===================================================================
--- trunk/www/getmp.php	(revision 28303)
+++ trunk/www/getmp.php	(revision 28303)
@@ -0,0 +1,123 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    print_header('Get MacPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Get MacPorts</h2>
+
+	 <p>MacPorts version <? print "$mp_version_dmg"; ?> is available in binary form as a
+	 dmg disk image for <a href="/macports/downloads/MacPorts-<? print "$mp_version_dmg"; ?>-10.4.dmg">
+         Tiger (Universal)</a> or <a href="/macports/downloads/MacPorts-<? print "$mp_version_dmg"; ?>-10.3.dmg">
+         Panther</a>, both containing a pkg installer, or version <? print "$mp_version"; ?>
+         in source form as either a <a href="/macports/downloads/MacPorts-<? print "$mp_version"; ?>.tar.bz2">tar.bz2</a>
+         package or a <a href="/macports/downloads/MacPorts-<? print "$mp_version"; ?>.tar.gz">tar.gz</a> one.
+	 Checksums for all these are contained in the <a href="/macports/downloads/MacPorts-<? print "$mp_version_dmg"; ?>.chk.txt">
+         checksums file</a>.</p>
+
+	 <p>To get a files listing of all our available downloads checkout the
+	 <a href="/macports/downloads.php">downloads section</a> of the site.</p>
+
+      <p>Please note that in order to install and run MacPorts on Mac OS X you must
+	have Apple's Developer Tools package installed, found at the <a href="http://developer.apple.com/tools/xcode/">Apple Developer site</a>
+	or on your Mac OS X installation CDs/DVD.</p>
+
+	  <p>If you want to use MacPorts on a platform other than Mac OS X, please be
+	  aware of the following requirements (we assume that you have basics such as
+	  gcc):</p>
+	  <ul>
+	  	<li>TCL (8.3 or 8.4)</li>
+		<li>curl</li>
+		<li>OpenSSL or libmd</li>
+	  </ul>
+
+	<h5 class="subhdr">Mac OS X Package (.pkg) Installer</h5>
+
+	<p>The easiest way to install MacPorts on a Mac OS X system is by downloading
+	the <a href="/macports/downloads/MacPorts-<? print "$mp_version_dmg"; ?>-10.4.dmg">dmg for Tiger</a>
+	or the <a href="/macports/downloads/MacPorts-<? print "$mp_version_dmg"; ?>-10.3.dmg">one for Panther</a>
+	and running Installer.app on the pkg contained therein by double clicking on them,
+	following the on-screen instructions until completion. This procedure will place a
+	fully functional and default MacPorts installation on your host system,
+	ready for usage. If needed, your shell configuration files will be adapted by the installer
+	to include the necessary settings to run MacPorts. You may need to open a new shell for
+	these changes to take effect.</p>
+
+	<p>Although not strictly necessary, it is still recommended that you synchronize your
+	recent installation with our rsync server to ensure you have the latest release
+	available of the MacPorts infrastructure and of the &ldquo;Portfiles&rdquo; containing the instructions
+	employed in the building and installation of ports. To accomplish this simply execute:</p>
+
+	<pre>sudo port -d selfupdate</pre>
+
+	<p>It is also recommended to run the above command on a regular basis to keep your
+	installation always current. At this point you should be ready to enjoy	MacPorts!</p>
+
+	<h5 class="subhdr">Source Installation</h5>
+
+	<p>If on the other hand you decide to install from source, there are still a couple of
+	things you will need to do once you've downloaded the tarball before you can
+	install a port with the MacPorts system, namely compiling and installing MacPorts itself.
+	&ldquo;<kbd>cd</kbd>&rdquo; into the directory where you downloaded the package
+	and run &ldquo;<kbd>tar xjvf <a href="/macpports/downloads/MacPorts-<? print "$mp_version"; ?>.tar.bz2">
+        MacPorts-<? print "$mp_version"; ?>.tar.bz2</a></kbd>&rdquo; or &ldquo;<kbd>tar xzvf
+        <a href="/macports/downloads/MacPorts-<? print "$mp_version"; ?>.tar.gz">MacPorts-<? print "$mp_version"; ?>.tar.gz</a></kbd>&rdquo;,
+	depending on whether you downloaded the bz2 tarball or the gz one, respectively.
+	This will unpack the MacPorts sources that you will proceed to build and install. To do
+	so, execute the following:</p>
+
+      <pre>cd MacPorts-<? print "$mp_version"; ?>
+
+./configure &amp;&amp; make &amp;&amp; sudo make install</pre>
+
+	<p>Optionally:</p>
+
+<pre>cd ../
+rm -rf MacPorts-<? print "$mp_version"; ?>*</pre>
+
+      <p>These steps need to be perfomed from an administrator account, for which &ldquo;<kbd>sudo</kbd>&rdquo;
+      will ask the password upon installation. This procedure will install a pristine MacPorts
+      system and, if the optional steps are taken, remove the as of now unnecessary MacPorts-<? print "$mp_version"; ?>
+      source directory and corresponding tarball. To customize your installation you should read the output
+      of &ldquo;<kbd>./configure --help | more</kbd>&rdquo; and pass the appropriate options for the settings you wish
+      to tweak to the configuration script in the steps detailed above.</p>
+	
+	<p>You will need to adapt your shell's configuration files to find the binaries installed by
+	MacPorts. Lastly, you need to synchronize your recent installation with the MacPorts rsync server:</p>
+
+	<pre>sudo port -d selfupdate</pre>
+
+	<p>Upon completion MacPorts will be ready to install ports. Again, it is recommended to run
+	the above command on a regular basis to keep your installation current.</p>
+
+
+	<h5 class="subhdr">Help</h5>
+
+      <p><a href="/macports/help.php">Help</a> is also available should you need it.</p>
+
+	<h5 class="subhdr">SVN Sources</h5>
+
+     <p>If you are developer or a user with a taste for the bleeding edge and wish for the latest changes
+     and feature additions, you may acquire the MacPorts sources through SVN.</p>
+
+      <p>Use the following command to check the project out of the MacPorts anonymous subversion
+	repository:</p>
+
+        <pre>svn co http://svn.macports.org/repository/macports/trunk</pre>
+
+	<p>If you do not want to bother with fetching from SVN, you can download
+	a nightly updated <a href="/macports/downloads/macports-nightly-svn-snapshot.tar.gz">
+	SVN-snapshot</a>. Once extracted, you can keep it up to date with the usual
+	&ldquo;<kbd>svn update</kbd>&rdquo; commands.</p>
+
+      <p>If you'd simply like to view the SVN repository without checking it
+	out, you can do so via the <a href="http://trac.macports.org/projects/macports/browser">
+        Trac browser</a>.</p>
+
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/help.php
===================================================================
--- trunk/www/help.php	(revision 28303)
+++ trunk/www/help.php	(revision 28303)
@@ -0,0 +1,59 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    print_header('Get Help', 'utf-8');
+  ?>
+
+	<div id="content">
+		<h2 class="hdr">Get Help</h2>
+
+		<p>If you get stuck while using MacPorts and have a problem you 
+	        can't figure out, we have a lot of resources to help you.</p>
+	  
+		<h5 class="subhdr">Documentation</h5>
+
+		<p>The <a href="http://geeklair.net/new_macports_guide/">MacPorts Guide</a> has a section dedicated to MacPorts
+                installation issues, <a href="http://geeklair.net/new_macports_guide/#installing">Chapter 2. Installing MacPorts</a>
+                and another one for general usage, <a href="http://geeklair.net/new_macports_guide/#using">Chapter 3: Using MacPorts</a>.</p>
+
+		<p>The <a href="http://trac.macports.org/projects/macports/wiki/FAQ">MacPorts FAQ</a>
+		is now an ongoing, user driven effort part of our <a href="http://trac.macports.org/projects/macports/wiki">Wiki</a>,
+		where anyone with a <a href="http://www.macports.org/wp-register.php">Trac account</a>
+		and MacPorts knowledge can contribute with information to help others.</p>
+
+		<p>All of our documentation is a work in progress, so if you spot an error or have a quesiton about some part of the document, 
+                let us know!  This will help us </p>
+	
+		<h5 class="subhdr">Mailing Lists</h5>
+
+		<p>The <a href="http://lists.macosforge.org/mailman/listinfo/macports-users">General MacPorts mailing list</a> is open to all
+                for supscription. It is the best place for existing and new users alike to ask questions about MacPorts and MacPorts
+                installed software. Please note that due to spam problems the mailing list will reject posts from non-subscribers.</p>
+
+                <p>It is recommended to check the <a href="http://lists.macosforge.org/pipermail/macports-users/">list archive</a> before posting
+                a question, as some issues are aired fairly regularly and dealt with many times in a row. We try to be as helpful as possible,
+                but if it's a common question our answers may be fairly short.</p>
+
+		<p>When posting a question to the mailing list, please included	any information you think might be relevent to the problem, 
+		such as  operating system and version you're using, Mac OS X 10.4.10 for example, whether you have any other third party 
+		software installed, in <kbd>/usr/local</kbd> for instance, and any error messages that MacPorts might give you (use the
+                <kbd>-v</kbd> or <kbd>-d port(1)</kbd>'s flags to turn on verbose or debugging information, it's a lot easier for us to
+                help you once these are used).</p>
+
+                <p>If you are a developer and need help with any part of the MacPorts internals, the <a href="http://lists.macosforge.org/mailman/listinfo/macports-dev">
+                development list</a> is where you should direct your posts to, as this is where all discussion about MacPorts itself takes place.
+                <a href="http://lists.macosforge.org/pipermail/macports-dev/">Archives</a> for this mailing list are also available.</p>
+
+		<h5 class="subhdr">IRC</h5>
+
+		<p>For more real-time discussion, the #MacPorts channel on the <a href="http://freenode.net/">Freenode IRC network</a> is generally
+		where we hang out. Though it is generally helpful, please keep in mind that no one is obligated to help or even answer your question
+                if you join IRC. Do not take it personally, simply ask your question on the <a href="http://lists.macosforge.org/mailman/listinfo/macports-users">
+                users</a> or <a href="http://lists.macosforge.org/mailman/listinfo/macports-dev">development</a> mailing lists instead.</p>
+
+	</div>
+</div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc	(revision 19376)
+++ trunk/www/includes/common.inc	(revision 28303)
@@ -6,7 +6,7 @@
 ######################################################################
 
-# print the current darwinports version
-$dp_version = "1.3.2";
-$dp_version_dmg = "1.3.1";
+# print the current MacPorts version
+$mp_version = "1.5.2";
+$mp_version_dmg = "1.5.0";
 
 ######################################################################
@@ -22,9 +22,11 @@
     <title><?php echo("$title"); ?></title>
     <meta http-equiv="Content-type" content="text/html; charset=<?php echo("$encoding"); ?>" />
-    <meta name="author" content="Jim Mock (mij@opendarwin.org)" />
+    <meta name="author" content="Jim Mock (mij@macports.org)" />
     <meta name="copyright" content="2003, OpenDarwin" />
+    <meta name="author" content="Juan Manuel Palacios (jmpp@macports.org)" />
+    <meta name="copyright" content="2007, MacPorts Team" />
     <meta name="robots" content="all" />
-    <link rel="stylesheet" type="text/css" href="/dp.css" />
-    <link rel="alternate" type="application/rss+xml" href="http://www.darwinports.org/dp_news.xml" />
+    <link rel="stylesheet" type="text/css" href="/macports/mp.css" />
+    <link rel="alternate" type="application/rss+xml" href="/macports/mp_news.xml" />
   </head>
 
@@ -36,5 +38,5 @@
 
 <?php
-  include("$DOCUMENT_ROOT/includes/header.inc");
+  include("$DOCUMENT_ROOT/macports/includes/header.inc");
 }
 
@@ -45,5 +47,5 @@
   global $DOCUMENT_ROOT;
 
-  include("$DOCUMENT_ROOT/includes/footer.inc");
+  include("$DOCUMENT_ROOT/macports/includes/footer.inc");
 
   echo "  </body>\n";
@@ -51,5 +53,21 @@
 }
 
+######################################################################
+
+# Print a total count of currently available ports:
+function ports_count() {
+         $result = mysql_query("SELECT count(*) FROM macports.portfiles");
+         if ($result) {
+           $row = mysql_fetch_array($result);
+           $count = $row[0];
+         } else {
+           $count = 0;
+         }
+         return $count;
+}
+
 ###################################################################### 
+
+# Warn against darwinports.com leach!
 function check_referer() {
 	global $_SERVER;
@@ -57,11 +75,15 @@
 ?>
 	<div class="referer_box">
-		<h1>The Official DarwinPorts Web Site</h1>
+		<h1>The Official MacPorts Web Site, home of the project previously known as DarwinPorts</h1>
 		
-		<p>You have arrived at the <b>Official DarwinPorts Web Site</b> from <i>darwinports.com</i>.</p>
+		<p>You have arrived at the <b>Official MacPorts Web Site</b> from <i>darwinports.com</i>.</p>
 	  
-		<p><i>darwinports.com</i> <b>is not the official DarwinPorts Web Site</b>, nor is it a mirror of the <i>Official DarwinPorts Web Site</i>.  There is <b>no relationship</b> between the <i>DarwinPorts Project</i> and <i>darwinports.com</i>.</p>
+		<p><i>darwinports.com</i> <b>is not the official MacPorts Web Site</b>, nor is it a mirror of
+                the <i>Official MacPorts Web Site</i>.  There is <b>no relationship</b> between the <i>MacPorts
+                Project</i> and <i>darwinports.com</i>.</p>
 
-		<p>The information you may have been presented with on <i>darwinports.com</i> may be incorrect or outdated and is not maintained by the <i>DarwinPorts Project</i>.  For the most accurate information about DarwinPorts, please bookmark this site, <a href="http://www.darwinports.org">http://www.darwinports.org</a>.</p>
+		<p>The information you may have been presented with on <i>darwinports.com</i> may be incorrect
+                or outdated and is not endorsed in any way by the <i>MacPorts Project</i>. For the most accurate
+                information about MacPorts, please bookmark this site, <a href="http://www.macports.org">http://www.macports.org</a>.</p>
 	</div>
 
Index: trunk/www/includes/email.inc
===================================================================
--- trunk/www/includes/email.inc	(revision 19376)
+++ trunk/www/includes/email.inc	(revision 28303)
@@ -6,5 +6,5 @@
 function obfuscate_email($email)
 {
-	return "<span class='email'>".str_replace('@', "<img src='/img/at.gif' alt='at' style='width: 1em; height: 1em;' border='0' />", $email)."</span>";
+	return "<span class='email'>".str_replace('@', "<img src='/macports/img/at.gif' alt='at' style='width: 1em; height: 1em;' border='0' />", $email)."</span>";
 }
 
Index: trunk/www/includes/footer.inc
===================================================================
--- trunk/www/includes/footer.inc	(revision 19376)
+++ trunk/www/includes/footer.inc	(revision 28303)
@@ -1,4 +1,6 @@
-      <div id="footer">
-		<span class="languages">English, <a href="/fr/">Fran&ccedil;ais</a>, <a href="/es/">Espa&ntilde;ol</a>, <a href="/ru/">Russian</a>, <a href="/it/">Italiano</a></span>
-      	Copyright &copy; 2002-<? print date("Y"); ?>, <a href="http://www.darwinports.org/">DarwinPorts</a>.  All rights reserved. | <a href="http://www.darwinports.org/dp_news.xml">RSS feed</a>
-      </div>
+    <div id="footer">
+        <span class="languages">English, <a href="/macports/fr/">Fran&ccedil;ais</a>, <a href="/macports/es/">Espa&ntilde;ol</a>,
+            <a href="/macports/ru/">Russian</a>, <a href="/macports/it/">Italiano</a></span>
+        Copyright &copy; 2002-<? print date("Y"); ?>, <a href="http://www.macports.org/">MacPorts</a>. All rights reserved. | 
+            <a href="/macports/mp_news.xml">RSS feed</a>
+    </div>
Index: trunk/www/includes/functions.inc
===================================================================
--- trunk/www/includes/functions.inc	(revision 19376)
+++ 	(revision )
@@ -1,282 +1,0 @@
-<?php
-
-# $Id$
-# Copyright (c) 2003, OpenDarwin
-
-######################################################################
-
-# variables and includes
-$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
-$PHP_SELF = $_SERVER['PHP_SELF'];
-include_once("$DOCUMENT_ROOT/includes/db.inc");
-$connect = mysql_pconnect($host, $user, $pass) or die("Can't connect to db!");
-mysql_select_db($db);
-
-
-
-######################################################################
-
-# create an RSS feed of the project news
-function create_rss() {
-  global $DOCUMENT_ROOT, $connect;
-
-  $query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10";
-  $result = mysql_query($query) or die("Error: $query.");
-  if(!$result) {
-    die("Error: $result.");
-  }
-
-  $open = fopen("$DOCUMENT_ROOT/dp_news.xml", "w+");
-  $rssdate = substr_replace(date("Y-m-d\TH:i:sO", time()),':', -2, 0);
-
-  $rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
-  $rss .= "<rss version=\"2.0\"\n";
-  $rss .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
-  $rss .= "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
-  $rss .= "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
-  $rss .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
-  $rss .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n\n";
-
-  $rss .= "  <channel>\n";
-  $rss .= "    <title>DarwinPorts Project News</title>\n";
-  $rss .= "    <link>http://www.darwinports.org/</link>\n";
-  $rss .= "    <description>DarwinPorts Project News</description>\n";
-  $rss .= "    <dc:language>en-us</dc:language>\n";
-  $rss .= "    <dc:creator>Jim Mock (mij@opendarwin.org)</dc:creator>\n";
-  $rss .= "    <dc:rights>Copyright 2002-2003</dc:rights>\n";
-  $rss .= "    <dc:date>$rssdate</dc:date>\n";
-  $rss .= "    <admin:errorReportsTo rdf:resource=\"mailto:mij@opendarwin.org\" />\n";
-
-  if(mysql_num_rows($result) > 0) {
-    while($row = mysql_fetch_object($result)) {
-      $rss .= "    <item>\n";
-      $rss .= "      <title>$row->title</title>\n";
-      $rss .= "      <link>http://www.darwinports.org/archives.php?id=$row->id</link>\n";
-
-      $desc_query = "SELECT SUBSTRING_INDEX(news, ' ', 26) FROM headlines WHERE id=$row->id";
-      $desc_result = mysql_query($desc_query);
-      $desc_row = mysql_fetch_row($desc_result);
-
-      $description = $desc_row[0];
-
-      $rss .= "      <description><![CDATA[$description...</p>]]></description>\n";
-      $rss .= "      <guid isPermaLink=\"true\">http://www.darwinports.org/archives.php?id=$row->id</guid>\n";
-      $rss .= "      <content:encoded><![CDATA[$row->news]]></content:encoded>\n";
-      $rss .= "    </item>\n";
-    }
-  }
-  $rss .= "  </channel>\n";
-  $rss .= "</rss>\n";
-
-  $write = fwrite($open, $rss);
-  $close = fclose($open);
-}
-
-######################################################################
-
-# print the project news
-function print_headlines() {
-  global $connect;
-
-  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5";
-  $result = mysql_query($query) or die("Error: $query.");
-  if(!$result) {
-    die("Error: $result.");
-  }
-
-  if(mysql_num_rows($result) > 0) {
-    while($row = mysql_fetch_object($result)) {
-      echo "<h5 class=\"subhdr\">$row->title</h5>\n";
-      echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
-      echo "$row->news\n\n";
-    }
-  }
-  else {
-    echo "<p>No headlines are available at this time.</p>\n";
-  }
-}
-
-######################################################################
-
-# display a single headline
-function print_headline() {
-  global $connect;
-
-  $id = $_GET['id'];
-  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines WHERE id='$id'";
-  $result = mysql_query($query) or die("Error: $query.");
-  if(!$result) {
-    die("Error: $result.");
-  }
-
-  $row = mysql_fetch_object($result);
-  if($row) {
-    echo "<h5 class=\"subhdr\">$row->title</h5>\n";
-    echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
-    echo "$row->news\n\n";
-  }
-  else {
-    echo "<h2 class=\"hdr\">Error!</h2>\n";
-    echo "<p>The requested headline could not be found.  It is either not in the database, or an error has occurred.</p>\n";
-  }
-}
-
-######################################################################
-
-# print the form used to add project news
-function print_add_headline() {
-  global $PHP_SELF, $connect;
-
-  if(!$_POST['submit']) {
-    echo "<p>Use the form below to add project news.</p>\n\n";
-    echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
-    echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" /></p>\n";
-    echo "<p>News:</p>\n";
-    echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\"></textarea></p>\n";
-    echo "<p><input type=\"submit\" name=\"submit\" value=\"Submit\" /></p>\n";
-    echo "</form>\n\n";
-  }
-  else {
-    $title = $_POST['title'];
-    $news = $_POST['news'];
-    $errorList = array();
-    $count = 0;
-    if(!$title) {
-      $errorList[$count] = 'Invalid entry: Title';
-      $count++;
-    }
-    if(!$news) {
-      $errorList[$count] = 'Invalid entry: News';
-      $count++;
-    }
-    if(sizeof($errorList) == 0) {
-      $query = "INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')";
-      $result = mysql_query($query) or die("Error: $query.");
-      if(!$result) {
-	die("Error: $result.");
-      }
-      echo "<p>The addition was successful.  You can either <a href=\"list.php\">list all existing headlines, <a href=\"add.php\">add another headline</a>, or <a href=\"/\">return to the DarwinPorts site</a>.</p>\n\n";
-      create_rss();
-    }
-    else {
-      echo "<p>The following errors have occurred:</p>\n\n";
-      echo "<ul>\n";
-      for($x=0; $x<sizeof($errorList); $x++) {
-	echo "<li>$errorList[$x]</li>\n";
-      }
-      echo "</ul>\n\n";
-    }
-  }
-}
-
-######################################################################
-
-# print the form used to edit project news
-function print_edit_headline($id) {
-  global $PHP_SELF, $connect;
-
-  if(!$_POST['submit']) {
-    $id = $_GET['id'];
-    $query = "SELECT title, news FROM headlines WHERE id='$id'";
-    $result = mysql_query($query) or die("Error: $query.");
-    if(!$result) {
-      die("Error: $result.");
-    }
-    if(mysql_num_rows($result) > 0) {
-      $row = mysql_fetch_object($result);
-      echo "<p>Use the form below to edit project news.</p>\n\n";
-      echo "<form action=\"$PHP_SELF?id=$id\" method=\"post\">\n";
-      echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" value=\"$row->title\" /></p>\n";
-      echo "<p>News:</p>\n";
-      echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\">";
-      echo htmlentities($row->news);
-      echo "</textarea></p>\n";
-      echo "<p><input type=\"submit\" name=\"submit\" value=\"Edit\" /></p>\n";
-      echo "</form>\n\n";
-    }
-    else {
-      echo "<p>The requested news headline could not be found.  It is either not in the database, or an error has occurred.  Please try again.</p>\n\n";
-    }
-  }
-  else {
-    $title = $_POST['title'];
-    $news = $_POST['news'];
-    $errorList = array();
-    $count = 0;
-    if(!$title) {
-      $errorList[$count] = 'Invalid entry: Title';
-      $count++;
-    }
-    if(!$news) {
-      $errorList[$count] = 'Invalid entry: News';
-      $count++;
-    }
-    if(sizeof($errorList) == 0) {
-      $query = "UPDATE headlines SET title='$title', news='$news' WHERE id='$id'";
-      $result = mysql_query($query) or die("Error: $query.");
-
-      if(!$result) {
-	die("Error: $result.");
-      }
-      echo "<p>The update was successful.  You can either <a href=\"list.php\">list all existing headlines, <a href=\"add.php\">add another headline</a>, or <a href=\"/\">return to the DarwinPorts site</a>.</p>\n\n";
-      create_rss();
-    }
-    else {
-      echo "<p>The following errors have occurred:</p>\n\n";
-      echo "<ul>\n";
-      for($x=0; $x<sizeof($errorList); $x++) {
-	echo "<li>$errorList[$x]</li>\n";
-      }
-      echo "</ul>\n\n";
-    }
-  }
-}
-
-######################################################################
-
-# print a list of all existing headlines
-function print_all_headlines() {
-  global $connect;
-
-  echo "<p>Below is a list of all existing news headlines.  They can be viewed, edited, or deleted from this interface.  Alternatively, you can also <a href=\"add.php\">add news</a>.</p>\n\n";
-
-  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
-  $result = mysql_query($query) or die("Error: $query.");
-  if(!$result) {
-    die("Error: $result.");
-  }
-  if(mysql_num_rows($result) > 0) {
-    while($row = mysql_fetch_object($result)) {
-      echo "<p><a href=\"/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">edit</a></p>\n\n";
-    }
-  }
-  else {
-    echo "<p>No headlines are available.</p>\n\n";
-  }
-}
-
-######################################################################
-
-# print a list of all existing headlines without the admin foobage
-# (this is cheap and could be better)
-function print_all_headlines_nonadmin() {
-  global $connect;
-
-  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
-  $result = mysql_query($query) or die("Error: $query.");
-  if(!$result) {
-    die("Error: $result.");
-  }
-  if(mysql_num_rows($result) > 0) {
-    while($row = mysql_fetch_object($result)) {
-      echo "<p><a href=\"/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp</p>\n\n";
-    }
-  }
-  else {
-    echo "<p>No headlines are available.</p>\n\n";
-  }
-}
-
-######################################################################
-
-?>
Index: trunk/www/includes/header.inc
===================================================================
--- trunk/www/includes/header.inc	(revision 19376)
+++ trunk/www/includes/header.inc	(revision 28303)
@@ -1,6 +1,6 @@
       <div id="nav">
 	<div id="logo">
-	  <a href="/" title="DarwinPorts"><img src="/img/dp.jpg"
-	    alt="DarwinPorts" /></a>
+	  <a href="/macports/" title="MacPorts"><img src="/macports/img/dp.jpg"
+	    alt="MacPorts" /></a>
 	</div>
 	<div id="l">
@@ -8,40 +8,40 @@
 	  <?php
 	    $PHP_SELF = $_SERVER['PHP_SELF'];
-	    $home = '/index.php';
-	    $getdp = '/getdp/index.php';
-	    $ports = '/ports/index.php';
-	    $help = '/help/index.php';
+	    $home = '/macports/index.php';
+	    $getdp = '/macports/getmp.php';
+	    $ports = '/macports/ports.php';
+	    $help = '/macports/help.php';
 
 	    if($PHP_SELF == $home) {
-	      echo "<li class=\"selected\"><a href=\"/\" title=\"DarwinPorts Home\">DarwinPorts Home</a></li>\n";
+	      echo "<li class=\"selected\"><a href=\"/macports/index.php\" title=\"MacPorts Home\">MacPorts Home</a></li>\n";
 	    }
 	    else {
-	      echo "<li><a href=\"/\" title=\"DarwinPorts Home\">DarwinPorts Home</a></li>\n";
+	      echo "<li><a href=\"/macports/index.php\" title=\"MacPorts Home\">MacPorts Home</a></li>\n";
 	    }
-	    if($PHP_SELF == $getdp) {
-	      echo "<li class=\"selected\"><a href=\"/getdp/\" title=\"Get DarwinPorts\">Get DarwinPorts</a></li>\n";
+	    if($PHP_SELF == $getmp) {
+	      echo "<li class=\"selected\"><a href=\"/macports/getmp.php\" title=\"Get MacPorts\">Get MacPorts</a></li>\n";
 	    }
 	    else {
-	      echo "<li><a href=\"/getdp/\" title=\"Get DarwinPorts\">Get DarwinPorts</a></li>\n";
+	      echo "<li><a href=\"/macports/getmp.php\" title=\"Get MacPorts\">Get MacPorts</a></li>\n";
 	    }
 	  ?>
-	    <li class="last"><a href="http://www.opendarwin.org/bugzilla/" title="Bugzilla">Bugzilla</a></li>
+	    <li class="last"><a href="http://trac.macports.org/" title="Bugzilla">Support & Development</a></li>
 	  </ul>
 	</div>
 	<div id="r">
 	  <ul>
-	    <li><a href="/docs/" title="Documentation">Documentation</a></li>
+	    <li><a href="/macports/docs/" title="Documentation">Documentation</a></li>
 	    <?php
 	      if($PHP_SELF == $ports) {
-		echo "<li class=\"selected\"><a href=\"/ports/\" title=\"Available Ports\">Available Ports</a></li>\n";
+		echo "<li class=\"selected\"><a href=\"/macports/ports.php\" title=\"Available Ports\">Available Ports</a></li>\n";
 	      }
 	      else {
-		echo "<li><a href=\"/ports/\" title=\"Available Ports\">Available Ports</a></li>\n";
+		echo "<li><a href=\"/macports/ports.php\" title=\"Available Ports\">Available Ports</a></li>\n";
 	      }
 	      if($PHP_SELF == $help) {
-		echo "<li class=\"sellast\"><a href=\"/help/\" title=\"Get Help\">Get Help</a></li>\n";
+		echo "<li class=\"sellast\"><a href=\"/macports/help.php\" title=\"Get Help\">Get Help</a></li>\n";
 	      }
 	      else {
-		echo "<li class=\"last\"><a href=\"/help/\" title=\"Get Help\">Get Help</a></li>\n";
+		echo "<li class=\"last\"><a href=\"/macports/help.php\" title=\"Get Help\">Get Help</a></li>\n";
 	      }
 	    ?>
Index: trunk/www/includes/lang.inc
===================================================================
--- trunk/www/includes/lang.inc	(revision 19376)
+++ trunk/www/includes/lang.inc	(revision 28303)
@@ -1,3 +1,3 @@
-      <p id="lang">[ <a href="/">English</a>, <a
-	href="/ja/">Japanese</a>, <a href="/fr/">Fran&ccedil;ais</a>, <a
-	href="/es/">Espa&ntilde;ol</a> ]</p>
+      <p id="lang">[ <a href="/macports/">English</a>, <a
+	href="/macports/ja/">Japanese</a>, <a href="/macports/fr/">Fran&ccedil;ais</a>, <a
+	href="/macports/es/">Espa&ntilde;ol</a> ]</p>
Index: trunk/www/includes/news.inc
===================================================================
--- trunk/www/includes/news.inc	(revision 28303)
+++ trunk/www/includes/news.inc	(revision 28303)
@@ -0,0 +1,286 @@
+<?php
+
+# $Id$
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# variables and includes
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+$PHP_SELF = $_SERVER['PHP_SELF'];
+/* include_once("$DOCUMENT_ROOT/macports/includes/db.inc"); */
+$connect = mysql_pconnect($host, $user, $pass) or die("Can't connect to db!");
+mysql_select_db($db);
+
+
+
+######################################################################
+
+# create an RSS feed of the project news
+function create_rss() {
+  global $DOCUMENT_ROOT, $connect;
+
+  $query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $open = fopen("$DOCUMENT_ROOT/mp_news.xml", "w+");
+  $rssdate = substr_replace(date("Y-m-d\TH:i:sO", time()),':', -2, 0);
+
+  $rss = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+  $rss .= "<rss version=\"2.0\"\n";
+  $rss .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
+  $rss .= "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
+  $rss .= "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
+  $rss .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
+  $rss .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n\n";
+
+  $rss .= "  <channel>\n";
+  $rss .= "    <title>MacPorts Project News</title>\n";
+  $rss .= "    <link>http://www.macports.org/</link>\n";
+  $rss .= "    <description>MacPorts Project News</description>\n";
+  $rss .= "    <dc:language>en-us</dc:language>\n";
+  $rss .= "    <dc:creator>Jim Mock (mij@macports.org)</dc:creator>\n";
+  $rss .= "    <dc:rights>Copyright 2002-2007</dc:rights>\n";
+  $rss .= "    <dc:date>$rssdate</dc:date>\n";
+  $rss .= "    <admin:errorReportsTo rdf:resource=\"mailto:mij@macports.org\" />\n";
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      $rss .= "    <item>\n";
+      $rss .= "      <title>$row->title</title>\n";
+      $rss .= "      <link>http://www.macports.org/archives.php?id=$row->id</link>\n";
+
+      $desc_query = "SELECT SUBSTRING_INDEX(news, ' ', 26) FROM headlines WHERE id=$row->id";
+      $desc_result = mysql_query($desc_query);
+      $desc_row = mysql_fetch_row($desc_result);
+
+      $description = $desc_row[0];
+
+      $rss .= "      <description><![CDATA[$description...</p>]]></description>\n";
+      $rss .= "      <guid isPermaLink=\"true\">http://www.macports.org/archives.php?id=$row->id</guid>\n";
+      $rss .= "      <content:encoded><![CDATA[$row->news]]></content:encoded>\n";
+      $rss .= "    </item>\n";
+    }
+  }
+  $rss .= "  </channel>\n";
+  $rss .= "</rss>\n";
+
+  $write = fwrite($open, $rss);
+  $close = fclose($open);
+}
+
+######################################################################
+
+# print the project news
+function print_headlines() {
+  global $connect;
+
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+      echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+      echo "$row->news\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available at this time.</p>\n";
+  }
+}
+
+######################################################################
+
+# display a single headline
+function print_headline() {
+  global $connect;
+
+  $id = $_GET['id'];
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines WHERE id='$id'";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $row = mysql_fetch_object($result);
+  if($row) {
+    echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+    echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+    echo "$row->news\n\n";
+  }
+  else {
+    echo "<h2 class=\"hdr\">Error!</h2>\n";
+    echo "<p>The requested headline could not be found.  It is either not in the database, or an error has occurred.</p>\n";
+  }
+}
+
+######################################################################
+
+# print the form used to add project news
+function print_add_headline() {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    echo "<p>Use the form below to add project news.</p>\n\n";
+    echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+    echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" /></p>\n";
+    echo "<p>News:</p>\n";
+    echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\"></textarea></p>\n";
+    echo "<p><input type=\"submit\" name=\"submit\" value=\"Submit\" /></p>\n";
+    echo "</form>\n\n";
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')";
+      $result = mysql_query($query) or die("Error: $query.");
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>The addition was successful.  You can either <a href=\"/macports/admin/list.php\">list all existing headlines,
+      <a href=\"/macports/admin/add.php\">add another headline</a>, or <a href=\"/macports/index.php\">return to the MacPorts site</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>The following errors have occurred:</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print the form used to edit project news
+function print_edit_headline($id) {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    $id = $_GET['id'];
+    $query = "SELECT title, news FROM headlines WHERE id='$id'";
+    $result = mysql_query($query) or die("Error: $query.");
+    if(!$result) {
+      die("Error: $result.");
+    }
+    if(mysql_num_rows($result) > 0) {
+      $row = mysql_fetch_object($result);
+      echo "<p>Use the form below to edit project news.</p>\n\n";
+      echo "<form action=\"$PHP_SELF?id=$id\" method=\"post\">\n";
+      echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" value=\"$row->title\" /></p>\n";
+      echo "<p>News:</p>\n";
+      echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\">";
+      echo htmlentities($row->news);
+      echo "</textarea></p>\n";
+      echo "<p><input type=\"submit\" name=\"submit\" value=\"Edit\" /></p>\n";
+      echo "</form>\n\n";
+    }
+    else {
+      echo "<p>The requested news headline could not be found.  It is either not in the database, or an error has occurred.  Please try again.</p>\n\n";
+    }
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "UPDATE headlines SET title='$title', news='$news' WHERE id='$id'";
+      $result = mysql_query($query) or die("Error: $query.");
+
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>The update was successful.  You can either <a href=\"/macports/admin/list.php\">list all existing headlines,
+      <a href=\"/macports/admin/add.php\">add another headline</a>, or <a href=\"/macports/index.php\">return to the MacPorts site</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>The following errors have occurred:</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines
+function print_all_headlines() {
+  global $connect;
+
+  echo "<p>Below is a list of all existing news headlines.  They can be viewed, edited, or deleted from this interface.
+  Alternatively, you can also <a href=\"/macports/admin/add.php\">add news</a>.</p>\n\n";
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/macports/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;
+           <a href=\"/macports/admin/edit.php?id=$row->id\">edit</a></p>\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available.</p>\n\n";
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines without the admin foobage
+# (this is cheap and could be better)
+function print_all_headlines_nonadmin() {
+  global $connect;
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/macports/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp</p>\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available.</p>\n\n";
+  }
+}
+
+######################################################################
+
+?>
Index: trunk/www/index.php
===================================================================
--- trunk/www/index.php	(revision 19376)
+++ trunk/www/index.php	(revision 28303)
@@ -1,52 +1,42 @@
   <?php
     $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
-    include_once("$DOCUMENT_ROOT/includes/common.inc");
-    include_once("$DOCUMENT_ROOT/includes/functions.inc");
-    include_once("$DOCUMENT_ROOT/includes/db.inc");
-    print_header('DarwinPorts Home', 'iso-8859-1');
+    include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/macports/includes/news.inc");
+    print_header('MacPorts Home', 'utf-8');
   ?>
 
     <div id="content">
-      <h2 class="hdr">Introduction to DarwinPorts</h2>
+      <h2 class="hdr">Introduction to MacPorts</h2>
 
-      <p>The DarwinPorts Project's main goal is to provide an easy way to
-	install various open-source software products on the Darwin OS 
-	family (<a href="http://www.opendarwin.org/">OpenDarwin</a>,
-	<a href="http://www.apple.com/macosx/">Mac OS X</a> and
-	<a href="http://developer.apple.com/darwin/projects/darwin/">Darwin</a>)</p>
-<?
-                $result = mysql_query("SELECT count(*) from darwinports.portfiles");
-                if ($result) {
-                        $row = mysql_fetch_array($result);
-                        $count = $row[0];
-                } else {
-                        $count = 0;
-                }
-?>
-      <p>There are currently about <?= $count; ?> completed and usable
-	<a href="/ports/">ports</a>, with more being added on a regular basis.
+      <p>The MacPorts Project's main goal is to provide an easy way to
+	install various open-source software products on the <a
+        href="http://www.apple.com/macosx/">Mac OS X</a> operating system.</p>
+
+      <p>There are currently about <?= ports_count(); ?> completed and usable
+	<a href="/macports/ports.php">ports</a>, with more being added on a regular basis.
 	You can track recently added ports by subscribing to the <a
-	href="http://www.opendarwin.org/mailman/listinfo/cvs-darwinports-all">cvs-darwinports-all</a>
+	href="http://lists.macosforge.org/mailman/listinfo/macports-changes">macports-changes</a>
 	mailing list.</p>
 	
-      <p>For more information on obtaining and installing DarwinPorts,
-	please see the <a href="/getdp/">Get DarwinPorts</a> section of the
-	site.  Also be sure to check out the <a href="/docs/">documentation</a>,
+      <p>For more information on obtaining and installing MacPorts,
+	please see the <a href="/macports/getmp.php">Get MacPorts</a> section of this
+	site.  Also be sure to check out the <a href="http://geeklair.net/new_macports_guide/">documentation</a>,
 	and if you have questions or run into problems, you can get help at our <a
-	href="/help/">help section</a>. The <a href="http://wiki.opendarwin.org/index.php/DarwinPorts">DarwinPorts Wiki</a>
+	href="/macports/help.php">help section</a>. The <a href="http://trac.macports.org/projects/macports/wiki">MacPorts Wiki</a>
 	is also a good resource for general and miscellaneous help, specially the 
-	ongoing <a href="http://wiki.opendarwin.org/index.php/DarwinPorts:FAQ">FAQ</a> effort.</p>
+	ongoing <a href="http://trac.macports.org/projects/macports/wiki/FAQ">FAQ</a> effort.</p>
 
-      <p>Bug reports, feature requests, and new ports should be submitted to
-	<a href="http://www.opendarwin.org/bugzilla/">Bugzilla</a>. Please consult
-    the <a href="docs/ch01s05.html#user_bugs">Bug report documentation</a>
-    to improve the processing of your bug report(s).</p>
+      <p>Bug reports, feature requests, and new ports should be submitted as
+	<a href="http://trac.macports.org/projects/macports/newticket">new tickets</a> into our Trac system. Please consult
+    the <a href="http://geeklair.net/new_macports_guide/#project.tickets"> documentation</a>
+    to improve the processing of your ticket(s).</p>
 
-    <p>For information on becoming an official member of the DarwinPorts project
-    with write access to our CVS repository, please consult the <a href="/docs/ch16.html">relevant documentation</a>
+    <p>For information on becoming an official member of the MacPorts project
+    with write access to our subversion repository, please consult the
+    <a href="http://geeklair.net/new_macports_guide/#project.membership">relevant documentation</a>
     detailing our membership requirements and resulting duties &amp; benefits
-    from holding an OpenDarwin account.</p>
+    from holding a MacPorts account.</p>
 
-    <p><b>Current DarwinPorts <a href="/getdp/">release</a>: <? print "$dp_version"; ?></b></p>
+    <p><b>Current MacPorts <a href="/macports/getmp.php">release</a>: <? print "$mp_version"; ?></b></p>
 
       <div id="news">
@@ -57,5 +47,5 @@
 	?>
 
-		<p>You can also browse our <a href="archives.php">news archives</a>.</p>
+		<p>You can also browse our <a href="/macports/archives.php">news archives</a>.</p>
 	
       </div>
Index: trunk/www/localized/es/archives.php
===================================================================
--- trunk/www/localized/es/archives.php	(revision 28303)
+++ trunk/www/localized/es/archives.php	(revision 28303)
@@ -0,0 +1,26 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/es/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/es/includes/functions.inc");
+    print_header('Archivo de Noticias de DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Archivo de Noticias</h2>
+     <?php
+		if (isset($_GET['id'])) {
+			print_headline();
+		} else {
+			print_all_headlines_nonadmin();
+		}
+      ?>
+
+
+      </div>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/es/downloads/index.php
===================================================================
--- trunk/www/localized/es/downloads/index.php	(revision 28303)
+++ trunk/www/localized/es/downloads/index.php	(revision 28303)
@@ -0,0 +1,32 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/es/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/es/includes/functions.inc");
+    print_header('Downloads de DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Downloads disponibles</h2>
+		<p>
+<?php
+$chemin="$DOCUMENT_ROOT/downloads";
+$rep=opendir($chemin);
+chdir($chemin);
+while($file = readdir($rep)) {
+	if($file != '..' && $file !='.' && (!eregi('php$', $file))) {
+		if(!is_dir($file)) {
+			echo "<a href=\"/downloads/$file\">$file</a>";
+			echo "<br>";
+		}
+	}
+}
+closedir($rep);
+?>
+		</p>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/es/emit_portfile.php
===================================================================
--- trunk/www/localized/es/emit_portfile.php	(revision 28303)
+++ trunk/www/localized/es/emit_portfile.php	(revision 28303)
@@ -0,0 +1,75 @@
+<?php
+
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+include_once("$DOCUMENT_ROOT/includes/email.inc");
+
+$portname = basename(dirname($_SERVER['PATH_INFO']));
+?>
+
+<html>
+	<head>
+		<title><?=$portname?> Portfile</title>
+	</head>
+	<body>
+
+<?php
+
+//	Read the file as an array of lines
+$target	= "${DOCUMENT_ROOT}${_SERVER['PATH_INFO']}";
+$lines = @file($target);
+if ($lines)
+{
+	print "<pre>";
+	foreach ($lines as $line)
+	{
+		$out = $line;
+
+		//	Replace tabs with spaces to maintain proper spacing
+		$tabs = 4;
+		$pos = 0;
+		$out = '';
+		for ($i = 0; $i < strlen($line); ++$i)
+		{
+			$char = $line{$i};
+			switch ($char)
+			{
+			case "\t":
+				$cnt = $tabs - ($pos % $tabs);
+				$out .= str_repeat(" ", $cnt);
+				$pos += $cnt;
+				break;
+			default:
+				$out .= $char;
+				++$pos;
+				break;
+			}
+		}
+
+		//	Clean up any html-unfriendly characters
+		$out = htmlspecialchars($out);
+
+		//	Special handling for email addresses
+		if (preg_match('/\s*(maintainers\s+)(.*)/i', $out, $matches))
+		{
+			$func = $matches[1];
+			$params = $matches[2];
+			
+			$addresses = preg_split('/\s+/', $params);
+			
+			foreach ($addresses as $addr)
+				$emails[] = obfuscate_email($addr);
+			
+			$out = $func.(count($emails) ? join(' ', $emails) : '')."\n";
+		}
+		
+		//	Output line
+		print $out;
+	}
+	print "</pre>";
+}
+else
+	print "No se pudo abrir el documento $target";
+?>
+
+	</body>
+</html>
Index: trunk/www/localized/es/getdp/index.php
===================================================================
--- trunk/www/localized/es/getdp/index.php	(revision 28303)
+++ trunk/www/localized/es/getdp/index.php	(revision 28303)
@@ -0,0 +1,124 @@
+	<?php
+		$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+		include_once("$DOCUMENT_ROOT/es/includes/common.inc");
+		/* include_once("$DOCUMENT_ROOT/es/includes/functions.inc"); */
+		print_header('Obtención de DarwinPorts', 'utf-8');
+	?>
+	
+	<div id="content">
+		<h2 class="hdr">Obtención de DarwinPorts</h2>
+
+		<p>La versión <? print "$dp_version_dmg"; ?> de DarwinPorts está disponible en forma
+		binaria como una imagen de disco dmg <a href="/downloads/DarwinPorts-<? print "$dp_version_dmg"; ?>-10.4.dmg">para Tiger (PowerPC)</a>
+		o <a href="/downloads/DarwinPorts-<? print "$dp_version_dmg"; ?>-10.3.dmg">para Panther</a>,
+		ambas conteniendo un instalador pkg, o la version <? print "$dp_version"; ?> en forma de código fuente bien sea como un paquete
+		<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.bz2">tar.bz2</a>
+		o uno <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.gz">tar.gz</a>.
+		Checksums para todos estos están disponibles <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.chk.txt">aquí</a>.</p>
+
+		<p>Para obtener un listado de todas nuestras descargas disponibles puede revisar la
+		<a href="/es/downloads/">sección de downloads</a>.</p>
+		
+		<p>Por favor note que para instalar y usar DarwinPorts en Mac OS X debe tener instalado el paquete
+		Xcode de Apple, que puede encontrar en la <a href="http://developer.apple.com/">Página de Progamadores de Apple</a>
+		(en Inglés) o en sus CDs/DVD de instalación del sistema.</p>
+		
+		<p>Si desea usar DarwinPorts en alguna otra plataforma además de Mac OS X, por favor note
+		los siguientes requisitos (se asume que ya posee lo básico como gcc):</p>
+		<ul>
+			<li>TCL (8.3 u 8.4)</il>
+			<li>curl</li>
+			<li>OpenSSL o libmd</li>
+		</ul>
+		
+		<h5 class="subhdr">Paquete de instalación para Mac OS X (.pkg)</h5>
+
+		<p>La forma más fácil de instalar DarwinPorts en un sistema Mac OS X es bajando el
+		<a href="/downloads/DarwinPorts-<? print "$dp_version_dmg"; ?>-10.4.dmg">dmg para Tiger</a>
+		o el <a href="/downloads/DarwinPorts-<? print "$dp_version_dmg"; ?>-10.3.dmg">dmg para Panther</a>
+		y correr Installer.app en el pkg ahí contenido al hacer doble click sobre ellos, siguendo
+		las instrucciones del instalador hasta el final. Este procedimiento colocará una instalación
+		de DarwinPorts completamente funcional y configurada con las opciones por defecto en su sistema,
+		lista para su uso. De ser necesario, los documentos de configuración de su shell serán adaptados
+		por el instalador para incluir los settings necesarios para usar DarwinPorts. Es posible que
+		tenga que abrir un nuevo shell para que estos cambios se hagan efectivos.</p>
+
+		<p>Aunque no es estrictamente necesario, se recomienda de todas formas sincronizar la reciente
+		instalación de DarwinPorts con nuestro servidor de rsync para asegurar la disponibilidad de
+		la última versión de la infraestructura de DarwinPorts y de los &ldquo;Portfiles&rdquo; que
+		que contienen las instrucciones empleadas en la compilación e instalación de portes.
+		Para lograr esto, simplemente ejecute:</p>
+
+		<pre>sudo port selfupdate</pre>
+
+		<p>También se recomienda ejecutar el comando antenrior de manera regular para mantener su instalación
+		siempre al día. De aquí en adelante debería estar listo para disfrutar DarwinPorts!</p>
+
+		<h5 class="subhdr">Instalación a Partir de las Fuentes</h5>
+
+		<p>Si en cambio Ud. desea instalar DarwinPorts a partir de su código fuente, hay todavía un par de
+		cosas que deberá hacer después de bajar el paquete tar antes de poder instalar un porte a través de DarwinPorts,
+		compilar e instalar DarwinPorts en sí. &ldquo;<kbd>cd</kbd>&rdquo; al directorio al cual bajó el tar y corra
+		&ldquo;<kbd>tar xjvf <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.bz2">DarwinPorts-<? print "$dp_version"; ?>.tar.bz2</a></kbd>&rdquo;
+		o &ldquo;<kbd>tar xzvf <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.gz">DarwinPorts-<? print "$dp_version"; ?>.tar.gz</a></kbd>&rdquo;,
+		dependiendo de si bajó el tar bz2 o el gz, respectivamente. Esto desempaquetará las fuentes de DarwinPorts
+		que procederá a compilar e instalar. Para esto, ejecute lo siguiente:</p>
+
+<pre>cd DarwinPorts-<? print "$dp_version"; ?>
+
+./configure && make && sudo make install</pre>
+
+		<p>Opcionalmente:</p>
+
+		<pre>cd ../
+rm -rf DarwinPorts-<? print "$dp_version"; ?>*</pre>
+
+		<p>Estos pasos deben ser ejecutados desde una cuenta administradora, de la cual &ldquo;<kbd>sudo</kbd>&rdquo;
+		pedirá el password al momento de instalar. Este procedimiento creará una instalación standard de DarwinPorts
+		en su sistema y, si los pasos opcionales son ejecutados también, removerá las ahora innecesarias fuentes de
+		DarwinPorts y el correspondiente paquete tar. Para personalizar su instalación debe leer el output de
+		&ldquo;<kbd>./configure --help | more</kbd>&rdquo; y pasar las opciones apropiadas al script de configuración
+		en los pasos arriba detallados.</p>
+
+		<p>Deberá adaptar los documentos de configuración de su shell para encontrar los programas instalados por
+		DarwinPorts. Finalmente, debe sincronizar su instalación reciente con los servidores de OpenDarwin:</p>
+
+		<pre>sudo port -d selfupdate</pre>
+
+		<p>Al completar, DarwinPorts estará listo para instalar portes. Nuevamente, es recomendado ejecutar el comando
+		anterior regularmente para mantener su instalación siempre al día.</p>
+
+		<p>También puede referirse al documento &ldquo;<tt>README_RELEASE1.es</tt>&rdquo; contenido en los paquetes tar de las fuentes
+		<? print "$dp_version"; ?> de DarwinPorts para instrucciones básicas de instalación y uso.</p>
+
+		<h5 class="subhdr">Ayuda</h5>
+
+		<p><a href="/es/help">Ayuda</a> también se encuentra disponible en caso que la necesite.</p>
+
+		<h5 class="subhdr">Fuentes de CVS</h5>
+
+		<p>Si Ud. es un programador o un usuario que desea mantenerse siempre al día con los últimos cambios y adiciones
+		a DarwinPorts, puede adquirir las fuentes del proyecto a través de CVS.</p>
+
+		<p>Use los siguientes comandos para realizar el &ldquo;checkout&rdquo; del proyecto del
+		repositorio anónimo CVS de OpenDarwin:</p>
+		
+		<pre>cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
+cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -P darwinports</pre>
+
+		<p>Cuando el servidor le pregunte por el password, simplemente pulse <kbd>return</kbd>
+		en su teclado&mdash; el campo se encuentra vacío.</p>
+		
+		<p>Si no se quiere molestar con CVS para obtener las fuentes en primera instancia, puede bajar el <a href="/downloads/darwinports-nightly-cvs-snapshot.tar.gz">
+		snapshot nocturno</a> de éstas y, una vez extraído, mantenerlo actualizado con los comandos de CVS de costumbre,
+		&ldquo;<kbd>cvs update</kbd>&rdquo;.</p>
+		
+		<p>Si desea simplemente ver el repositorio CVS sin realizar un &ldquo;checkout&rdquo;,
+		lo puede hacer vía <a href="http://www.opendarwin.org/cgi-bin/cvsweb.cgi/proj/darwinports/">CVSweb</a>.</p>
+	
+	</div>
+</div>
+
+<?php
+	print_footer();
+?>
Index: trunk/www/localized/es/help/index.php
===================================================================
--- trunk/www/localized/es/help/index.php	(revision 28303)
+++ trunk/www/localized/es/help/index.php	(revision 28303)
@@ -0,0 +1,70 @@
+	<?php
+		$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+		include_once("$DOCUMENT_ROOT/es/includes/common.inc");
+		/* include_once("$DOCUMENT_ROOT/es/includes/functions.inc"); */
+		print_header('Ayuda', 'utf-8');
+	?>
+	
+	<div id="content">
+		<h2 class="hdr">Obtención de Ayuda</h2>
+		
+		<p>Si experimenta algún problema usando DarwinPorts que no puede resolver,
+		tenemos varios recursos para ayudarle.</p>
+		
+		<h5 class="subhdr">Documentación</h5>
+		
+		<p>La <a href="/docs/">Guía de DarwinPorts</a> tiene una sección para usuarios,
+		<a href="/docs/pt01.html">Parte 1: Usando DarwinPorts</a> (en Inglés).</p>
+
+		<p>Las <a href="http://wiki.opendarwin.org/index.php/DarwinPorts:FAQ">Preguntas Frecuentes y Respuestas (FAQ)</a>
+		(en Inglés) son un esfuerzo vivo y conducido por los usuarios, parte
+		de nuestro <a href="http://wiki.opendarwin.org/index.php/DarwinPorts">Wiki</a>,
+		donde cualquiera con una <a href="http://wiki.opendarwin.org/index.php?title=Special:Userlogin&returnto=DarwinPorts">cuenta de Wiki</a> y conocimiento sobre DarwinPorts puede contribuir
+		con información para ayudar a otros.</p>
+				
+		<p>Toda nuestra documentación es un trabajo en progreso, por lo que si ubica
+		algún error o tiene alguna pregunta sobre cualquier parte de ésta en específico, por favor infórmenos
+		al respecto! Así nos estará ayudando.</p>
+		
+		<h5 class="subhdr">Listas de Correo</h5>
+		
+		<p>La <a href="http://www.opendarwin.org/mailman/listinfo/darwinports">lista
+		general de correo de DarwinPorts</a> está abierta al público. Es el mejor lugar para
+		hacer preguntas sobre DarwinPorts, para nuevos usuarios, programadores, todos
+		por igual! Es también el lugar donde se lleva a cabo toda la discusión sobre
+		DarwinPorts en sí. Por favor note que debido a problemas de spam, la lista de correos
+		requiere que todos los mensajes de personas no suscritas a la lista sean aprobados.
+		Es mejor suscribirse.</p>
+		
+		<p>Aunque no es necesariamente un requisito, puede revisar los
+		<a href="http://www.opendarwin.org/pipermail/darwinports/"> archivos de la lista</a>
+		antes de publicar algúna pregunta. Intentamos ayudar en lo posible, pero si la
+		pregunta es algo común puede que nuestras respuestas sean relativamente cortas.</p>
+
+		<p>Por otro lado, archivos indexados de esta lista se pueden explorar en
+		<a href="http://gmane.org/">Gmane.org</a> o a través de <a href="nntp://news.gmane.org/">NNTP</a>.</p>
+		
+		<p>Cuando publique alguna pregunta en la lista, por favor incluya cualquier información
+		que crea es relevante al problema, tal como el sistema operativo y versión
+		que usa, Mac OS X 10.3.2 por ejemplo, si tiene algún otro software de terceros
+		instalado, como en /usr/local, y cualquier mensaje de error que DarwinPorts
+		ofrezca (el uso de las opciones -v y -d del programa  port(1) es recomendado para
+		activar la información de depuración, es mucho más fácil para nosotros ayudar una vez
+		estas son usadas).</p>
+
+		<h5 class="subhdr">IRC</h5>
+		
+		<p>Para una discusión más en tiempo real, el canal #darwinports en la <a href="http://freenode">
+		red Freenode de IRC</a> es generalmente donde compartimos.</p>
+		
+		<p>Aunque generalemte es de ayuda, por favor mantenga en mente que si entra al
+		canal de IRC nadie está obligado a ayudar o hasta a responder sus preguntas. No lo
+		tome personal, simplemente hágalas en la <a href="http://www.opendarwin.org/mialman/listinfo/darwinports">lista de correo</a>
+		en vez.</p>
+		
+	</div>
+</div>
+
+	<?php
+		print_footer();
+	?>
Index: trunk/www/localized/es/includes/common.inc
===================================================================
--- trunk/www/localized/es/includes/common.inc	(revision 28303)
+++ trunk/www/localized/es/includes/common.inc	(revision 28303)
@@ -0,0 +1,82 @@
+	<?php
+
+# $Id$
+# Copyright (c) 2004, OpenDarwin
+
+######################################################################
+
+# print the current darwinports version
+$dp_version = "1.3.2";
+$dp_version_dmg = "1.3.1";
+
+######################################################################
+	  
+# print the page header
+
+		function print_header($title, $encoding) {
+			global $DOCUMENT_ROOT;
+	?>
+			<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+			"http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd">
+			<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
+			<head>
+				<title><?php echo ("$title"); ?></title>
+				<meta http-equiv="Content-type" content="text/html; charset=<?php echo("$encoding"); ?>" />
+				<meta name="author" content="Jim Mock (mij@opendarwin.org)" />
+				<meta name="copyright" content="2003, OpenDarwin" />
+				<meta name="robots" content="all" />
+				<link rel="stylesheet" type="text/css" href="/dp.css" />
+				<link rel="alternate" type="application/rss+xml" href="http://www.darwinports.org/dp_news.xml" />
+			</head>
+			
+			<body>
+
+			<?php check_referer(); ?>
+
+			<div id="main">
+			
+			<?php
+				include("$DOCUMENT_ROOT/es/includes/header.inc");
+		}
+	
+#########################################################################
+	
+# print the page footer
+	function print_footer() {
+
+		global $DOCUMENT_ROOT;
+		include("$DOCUMENT_ROOT/es/includes/footer.inc");
+
+		echo " </body>\n";
+		echo " </html>\n";
+	}
+######################################################################
+function check_referer() {
+
+	 global $_SERVER;
+
+	 if (preg_match("/darwinports.com/", $_SERVER['HTTP_REFERER'])) {
+?>
+	<div class="referer_box">
+	     <h1>El sitio oficial de DarwinPorts</h1>
+
+	     <p>Ud. ha llegado al <b>Sitio Oficial de DarwinPorts</b> desde <i>darwinports.com</i>.</p>
+
+	     <p><i>darwinports.com</i> <b>no es el sitio oficial del proyecto DarwinPorts</b>,
+	     ni es un espejo del sitio oficial. <b>No existe relacion alguna</b> entre el
+	     <i>proyecto DarwinPorts</i> y <i>darwinports.com</i>.</p>
+
+	     <p>La información que puede haber obtenido en <i>darwinports.com</i> puede ser
+	     incorrecta o vieja y no es mantenida por el <i>proyecto DarwinPorts</i>. Para la
+	     información más acertada sobre DarwinPorts, por favor marque esta página,
+	     <a href="http://www.darwinports.org>www.darwinports.org</a>.</p>
+	
+	</div>
+
+<?php
+
+
+	 }
+}
+
+?>
Index: trunk/www/localized/es/includes/footer.inc
===================================================================
--- trunk/www/localized/es/includes/footer.inc	(revision 28303)
+++ trunk/www/localized/es/includes/footer.inc	(revision 28303)
@@ -0,0 +1,4 @@
+	<div id="footer">
+		<span class="languages"><a href="/">English</a>, <a href="/fr/">Français</a>, Español, <a href="/ru/">Russian</a>, <a href="/it/">Italiano</a></span>
+		Copyright © 2002-<? print date("Y"); ?>, <a href="http://www.darwinports.org/">DarwinPorts</a>. Todos los derechos reservados. | <a href="http://www.darwinports.org/dp_news.xml">Feed de RSS</a>
+	</div>
Index: trunk/www/localized/es/includes/functions.inc
===================================================================
--- trunk/www/localized/es/includes/functions.inc	(revision 28303)
+++ trunk/www/localized/es/includes/functions.inc	(revision 28303)
@@ -0,0 +1,276 @@
+<?php
+
+# $Id$
+# Copyright (c) 2004, OpenDarwin
+
+###############################################################################
+
+# variables and includes
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+$PHP_SELF = $_SERVER['PHP_SELF'];
+include_once("$DOCUMENT_ROOT/includes/db.inc");
+$connect = mysql_pconnect($host, $user, $pass) or die("Can't connect to db!");
+mysql_select_db($db);
+
+###############################################################################
+
+# create an RSS feed of the project news:
+
+		function create_rss() {
+			global $DOCUMENT_ROOT, $connect;
+			
+			$query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10";
+			$result = mysql_query($query) or die("Error: $query.");
+			if (!$result) {
+				die ("Error: $result.");
+			}
+			
+			$open = fopen("$DOCUMENT_ROOT/dp_news.xml", "w+");
+			$rssdate = substr_replace(date("Y-m-d\TH:i:sO", time()),':', -2, 0);
+			
+			$rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+			$rss .= "<rss version=\"2.0\"\n";
+			$rss .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
+			$rss .= "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
+			$rss .= "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
+			$rss .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
+			$rss .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n\n";
+			
+			$rss .= "  <channel>\n";
+			$rss .= "	<title>DarwinPorts Project News</title>\n";
+			$rss .= "	<link>http://www.darwinports.org/</link>\n";
+			$rss .= "	<description>DarwinPorts Project News</description>\n";
+			$rss .= "	<dc:language>en-us</dc:language>\n";
+			$rss .= "	<dc:creator>Jim Mock (mij@opendarwin.org)</dc:creator>\n";
+			$rss .= "	<dc:rights>Copyright 2002-2003</dc:rights>\n";
+			$rss .= "	<dc:date>$rssdate</dc:date>\n";
+			$rss .= "	<admin:errorReportsTo rdf:resource=\"mailto:mij@opendarwin.org\" />\n";
+			
+			if (mysql_num_rows($result) > 0) {
+				while ($row = mysql_fetch_objects($result)) {
+					$rss .= "	<item>\n";
+					$rss .= "		<title>$row->title</title>\n";
+					$rss .= "		<link>http://www.darwinports.org/es/archives.php?id=$row->id</link>\n";
+					
+					$desc_query = "SELECT SUBSTRING_INDEX(news, ' ',26) FROM headlines WHERE id=$row->id";
+					$desc_result = mysql_query($desc_query);
+					$desc_row = mysql_fetch_row($desc_result);
+					
+					$description = $desc_row[0];
+					
+					$rss .= "		<description><![CDATA[$description...</p>]]></description>\n";
+					$rss .= "		<guid isPermaLink=\"true\">http://www.darwinports.org/es/archives.php?id=$row->id</guid>\n";
+					$rss .= "		<content:encoded><![CDATA[$row->news]]></content:encoded>\n";
+					$rss .= "	</item>\n";
+				}
+			}
+			$rss .= "	</channel>\n";
+			$rss .= "</rss>\n";
+			
+			$write = fwrite($open, $rss);
+			$close = fclose($open);
+		}
+		
+########################################################################
+
+# print the project news:
+
+		function print_headlines() {
+			global $connect;
+			
+			$query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5";
+			$result = mysql_query($query) or die("Error: $query.");
+			if (!$result) {
+				die("Error: $result.");
+			}
+			
+			if (mysql_num_rows($result) > 0) {
+				while ($row = mysql_fetch_object($result)) {
+					echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+					echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+					echo "$row->news\n\n";
+				}
+			} else {
+				echo "<p>No hay titulares disponibles en este momento.</p>\n";
+			}
+		}
+
+########################################################################
+
+# display a single headline:
+
+		function print_headline() {
+			global $connect;
+			
+			$id = $_GET['id'];
+			$query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines WHERE id='$id'";
+			$result = mysql_query($query) or die("Error: $query.");
+			if (!result) {
+				die("Error: $result.");
+			}
+			
+			$row = mysql_fetch_object($result);
+			if ($row) {
+				echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+				echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+				echo "$row->news\n\n";
+			} else {
+				echo "<h2 class=\"hdr\">Error!</h2>\n";
+				echo "<p>El titular seleccionado no se pudo encontrar. Puede ser que no se encuentre en la base de datos o que un error ha ocurrido.</p>\n";
+			}
+		}
+
+########################################################################
+
+# print the form used to add project news
+
+		function print_add_headline() {
+			global $PHP_SELF, $connect;
+			
+			if (!$_POST['submit']) {
+				echo "<p>Utilice el formulario que se presenta abajo para agregar noticias del proyecto.</p>\n\n";
+				echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+				echo "<p>Título:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" /></p>\n";
+				echo "<p>Noticias:</p>\n";
+				echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\"></textarea></p>\n";
+				echo "<p><input type=\"submit\" name=\"submit\" value=\"Remitir\" /></p>\n";
+				echo "</form>\n\n";
+			} else {
+				$title = $_POST['title'];
+				$news = $_POST['news'];
+				$errorList = array();
+				$count = 0;
+				if (!$title) {
+					$errorList[$count] = 'Invalid entry: Title';
+					$count++;
+				}
+				if (!$news) {
+					$errorList[$count] = 'Invalid entry: News';
+					$count++;
+				}
+				if (sizeof($errorList) == 0) {
+					$query = "INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')";
+					$result = mysql_query($query) or die("Error: $query.");
+					if (!$result) {
+						die("Error: $result.");
+					}
+					echo "<p>La entrada fue agregada exitosamente. Puede bien sea <a href=\"list.php\">ver todos los titulares, <a href=\"add.php\">agregar otro titular</a> o <a href=\"/\">volver a la página principal de DarwinPorts</a>.</p>\n\n";
+					create_rss();
+				} else {
+					echo "<p>Han ocurrido los siguientes errores:</p>\n\n";
+					echo "<ul>\n";
+					for ($x = 0; $x < sizeof($errorList); $x++) {
+						echo "<li>$errorList[$x]</li>\n";
+					}
+					echo "</ul>\n\n";
+				}
+			}
+		}
+
+########################################################################
+
+# print the form used to edit project news:
+
+		function print_edit_headline($id) {
+			global $PHP_SELF, $connect;
+			
+			if (!$_POST['submit']) {
+				$id = $_GET['id'];
+				$query = "SELECT title, news FROM headlines WHERE id='$id'";
+				$result = mysql_query($query) or die("Error: $query.");
+				if (!$result) {
+					die("Error: $result.");
+				}
+				if (mysql_num_rows($result) > 0) {
+					$row = mysql_fetch_object($result);
+					echo "<p>Use el formulario abajo mostrado para editar las noticias del proyecto.</p>\n\n";
+					echo "<form action=\"$PHP_SELF?id=$id\" method=\"post\">\n";
+					echo "<p>Título:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" value=\"$row->title\" /></p>\n";
+					echo "<p>Noticias:</p>\n";
+					echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\">";
+					echo htmlentities($row->news);
+					echo "</textarea></p>\n";
+					echo "<p><input type=\"submit\" name=\"submit\" value=\"Editar\" /></p>\n";
+					echo "</form>\n\n";
+				} else {
+					echo "<p>El tilular buscado no se pudo encontrar. Puede ser que no se encuentre en la base de datos o que un error ha ocurrido. Por vafor intente de nuevo.</p>\n\n";
+				}
+			} else {
+				$title = $_POST['title'];
+				$news = $_POST['news'];
+				$errorList = array();
+				$count = 0;
+				if (!$title) {
+					$errorList[$count] = 'Invalid entry: Title';
+					$count++;
+				}
+				if (!$news) {
+					$errorList[$count] = 'Invalid entry: News';
+					$count++;
+				}
+				if (sizeof($errorList) == 0) {
+					$query = "UPDATE headlines SET title='$title', news='$news' WHERE id='$id'";
+					$result = mysql_query($query) or die("Error: $query.");
+					if (!$result) {
+						die("Error: $result.");
+					}
+					echo "<p>El update fue exitoso. Puede bien sea <a href=\"list.php\">ver todos los titulares, <a href=\"add.php\">agregar otro titular</a> o <a href=\"/\">volver a la página principal de DarwinPorts</a>.</p>\n\n";
+					create_rss();
+				} else {
+					echo "<p>Han ocurrido los siguientes errores:</p>\n\n";
+					echo "<ul>\n";
+					for ($x = 0; $x < sizeof($errorList); $x++) {
+						echo "<li>$errorList[$x]</li>\n";
+					}
+					echo "</ul>\n\n";
+				}
+			}	
+		}
+
+########################################################################
+
+# print a list of all existing headlines:
+
+		function print_all_headlines() {
+			global $connect;
+			
+			echo "<p>Abajo se muestra una lista de todos los titulares existentes. Pueden ser leidos, editados o borrados desde esta interface. Además, también puede <a href=\"add.php\">agregar noticias al proyecto</a>.</p>\n\n";
+			$query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+			$result = mysql_query($query) or die("Error: $query.");
+			if (!$result) {
+				die("Error: $result.");
+			}
+			if (mysql_num_rows($result) > 0) {
+				while ($row = mysql_fetch_object($result)) {
+					echo "<p><a href=\"/es/archives.php?id=$row->id.php\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">editar</a></p>\n\n";
+				}
+			} else {
+				echo "<p>No hay titulares disponibles.</p>\n\n";
+			}
+		}
+
+######################################################################
+
+# print a list of all existing headlines wihtout the admin foobage
+# (this is cheap and could be better)
+function print_all_headlines_nonadmin() {
+
+	 global $connect;
+
+	 $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+	 $result = mysql_query($query) or die("Error: $query.");
+	 if (!$result) {
+	    die("Error: $result.");
+	 }
+	 if (mysql_num_rows($result)>0) {
+	    while ($row = mysql_fetch_object($result)) {
+		  echo "<p><a href=\"/es/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp</p>\n\n";
+		}
+	} else {
+		  echo "<p>No hay titulares disponibles.</p>\n\n";
+	}
+}
+
+######################################################################
+
+?>
Index: trunk/www/localized/es/includes/header.inc
===================================================================
--- trunk/www/localized/es/includes/header.inc	(revision 28303)
+++ trunk/www/localized/es/includes/header.inc	(revision 28303)
@@ -0,0 +1,51 @@
+	<div id="nav">
+	
+		<div id="logo">
+			<a href="/es/" title="DarwinPorts"><img src="/img/dp.jpg"
+				alt="DarwinPorts" /></a>
+		</div>
+		
+		<div id="l">
+			<ul>
+				<?php
+					$PHP_SELF = $_SERVER['PHP_SELF'];
+					$home = '/es/index.php';
+					$getdp = '/es/getdp/index.php';
+					$ports = '/es/ports/index.php';
+					$help = '/es/help/index.php';
+				
+					if ($PHP_SELF == $home) {
+						echo "<li class=\"selected\"><a href=\"/es/\" title=\"Home de DarwinPorts\">Home de DarwinPorts</a></li>\n";
+					} else {
+						echo "<li><a href=\"/es/\" title=\"Home de DarwinPorts\">Home de DarwinPorts</a></li>\n";
+					}
+					if ($PHP_SELF == $getdp) {
+						echo "<li class=\"selected\"><a href=\"/es/getdp/\" title=\"Obtención de DarwinPorts\">Obtención de DarwinPorts</a></li>\n";
+					} else {
+						echo "<li><a href=\"/es/getdp/\" title=\"Obtención de DarwinPorts\">Obtención de DarwinPorts</a></li>\n";
+					}
+				?>
+				<li class="last"><a href="http://www.opendarwin.org/bugzilla/" title="Bugzilla">Bugzilla</a></li>
+			</ul>
+		</div>
+		
+		<div id="r">
+			<ul>
+				<li><a href="/docs/" title="Documentación">Documentación</a></li>
+				<?php
+					if ($PHP_SELF == $ports) {
+						echo "<li class=\"selected\"><a href=\"/es/ports/\" title=\"Portes Disponibles\">Portes Disponibles</a></li>\n";
+					} else {
+						echo "<li><a href=\"/es/ports/\" title=\"Portes Disponibles\">Portes Disponibles</a></li>\n";
+					}
+					if ($PHP_SELF == $help) {
+						echo "<li class=\"selected\"><a href=\"/es/help/\" title=\"Ayuda\">Ayuda</a></li>\n";
+					} else {
+						echo "<li class=\"last\"><a href=\"/es/help/\" title=\"Ayuda\"> Ayuda</a></li>\n";
+					}
+				?>
+			</ul>
+		</div>
+		
+	</div>
+		
Index: trunk/www/localized/es/includes/lang.inc
===================================================================
--- trunk/www/localized/es/includes/lang.inc	(revision 28303)
+++ trunk/www/localized/es/includes/lang.inc	(revision 28303)
@@ -0,0 +1,2 @@
+      <p id="lang">[ <a href="/">English</a>, <a href="/ja/">Japanese</a>,
+      	<a href="/fr/">Français</a>, <a href="/es/">Español</a> ]</p>
Index: trunk/www/localized/es/index.php
===================================================================
--- trunk/www/localized/es/index.php	(revision 28303)
+++ trunk/www/localized/es/index.php	(revision 28303)
@@ -0,0 +1,63 @@
+	<?php
+		$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+		include_once("$DOCUMENT_ROOT/es/includes/common.inc");
+		include_once("$DOCUMENT_ROOT/es/includes/functions.inc");
+		include_once("$DOCUMENT_ROOT/includes/db.inc");
+		print_header('Home de DarwinPorts', 'utf-8');
+	?>
+
+		<div id="content">
+			<h2 class="hdr">Introducción a DarwinPorts</h2>
+
+			<p>El objetivo principal del proyecto DarwinPorts es proveer una forma
+			sencilla de instalar varios programas de código abierto en la familia
+			de sistemas operativos Darwin (<a href="http://www.opendarwin.org/">OpenDarwin</a>,
+			<a href="http://www.apple.com/macosx/">Mac OS X</a> y
+			<a href="http://developer.apple.com/darwin/projects/darwin/">Darwin</a>).</p>
+
+<?
+                $result = mysql_query("SELECT count(*) from darwinports.portfiles");
+                if ($result) {
+                        $row = mysql_fetch_array($result);
+                        $count = $row[0];
+                } else {
+                        $count = 0;
+                }
+?>
+
+			<p>En la actualidad hay alrededor de <?= $count; ?> <a href="/es/ports/">portes</a>
+			completados y funcionales, mientras que más son agregados regularmente a la colección.
+			Para estar al día con las últimas adiciones, puede susbcribirse a la
+			lista de correo <a href="http://www.opendarwin.org/mailman/listinfo/cvs-darwinports-all">cvs-darwinports-all</a>.</p>
+
+			<p>Para más información sobre la obtención e instalación de DarwinPorts, por
+			favor refiérase la sección <a href="/es/getdp/">Obtención de DarwinPorts</a>
+			de nuestra página. También asegúrese de revisar la <a href="/docs/">documentación</a>
+			(en Inglés) y si tiene preguntas o experimenta algún problema, puede buscar ayuda en nuestra
+			<a href="/es/help/">sección de ayuda</a>. Nuestro
+			<a href="http://wiki.opendarwin.org/index.php/DarwinPorts">Wiki</a> también es un
+			buen recurso para ayuda general y variada, especialmente el proyecto vivo de
+			<a href="http://wiki.opendarwin.org/index.php/DarwinPorts:FAQ">Preguntas Frecuentes y Respuestas (FAQ)</a>
+            (en Inglés).</p>
+
+			<p>Reportes de "bugs", peticiones de funcionalidad y nuevos portes deben ser
+			introducidos en <a href="http://www.opendarwin.org/bugzilla/">Bugzilla</a>. Por
+			favor consulte nuestra <a href="docs/ch01s05.html#user_bugs">documentación sobre reportes de bugs</a>
+			(en Inglés) para mejorar el procesamiento de su(s) reporte(s).</p>
+
+		<div id="news">
+			<h2 class="hdr">Noticias del Proyecto</h2>
+			
+		<?php
+			print_headlines();
+		?>
+
+		<p>También puede buscar noticias viejas en nuestro <a href="/es/archives.php">archivo de noticias</a>.</p>
+
+       </div>
+      </div>
+     </div>
+
+<?php
+	print_footer();
+?>
Index: trunk/www/localized/es/ports.php
===================================================================
--- trunk/www/localized/es/ports.php	(revision 28303)
+++ trunk/www/localized/es/ports.php	(revision 28303)
@@ -0,0 +1,219 @@
+<?
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/es/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    include_once("$DOCUMENT_ROOT/includes/email.inc");
+    print_header('Portes Disponibles', 'utf-8');
+    $by = isset($_GET['by']) ? $_GET['by'] : '';
+    $substr = isset($_GET['substr']) ? $_GET['substr'] : '';
+?>
+	<center>
+	<h1>Portfiles de DarwinPorts</h1>
+	</center>
+
+	<p>
+	Este formulario le permite buscar en el índice actualizado del software de DarwinPorts. <br />
+	<i> Ultima actualización del índice: </i>
+	<?
+		$sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM darwinports.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
+		$result = mysql_query($sql);
+		if($result && $row = mysql_fetch_row($result)) {
+				echo date("d-M-Y H:i:s", $row[0]);
+		}
+	?>
+	</p>
+	
+	<form action="<?= $PHP_SELF; ?>">
+	<table>
+		<tr>
+			<th>Buscar por:</th>
+			<td>
+				<select name="by">
+				<option value="name"<? if ($by == "name") { echo " selected=\"selected\""; } ?>>Título del Software</option>
+				<option value="desc"<? if ($by == "desc") { echo " selected=\"selected\""; } ?>>Descripción</option>
+				<option value="cat"<? if ($by == "cat") { echo " selected=\"selected\""; } ?>>Categoría</option>
+				<option value="maintainer"<? if ($by == "maintainer") { echo " selected=\"selected\""; } ?>>"Maintainer"</option>
+				</select>
+			</td>
+			<td><input type="text" name="substr" size="40" /></td>
+			<td><input type="submit" name="Search" value="Buscar" /></td>
+		</tr>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr>
+<?
+		$result = mysql_query("SELECT count(*) from darwinports.portfiles");
+		if ($result) {
+			$row = mysql_fetch_array($result);
+			$count = $row[0];
+		} else {
+			$count = 0;
+		}
+?>
+			<td colspan="4" align="left"><a href="<?= $PHP_SELF; ?>?by=all">Ver todos los Títulos (<?= $count; ?>)</a></td>
+		</tr>
+		<?
+			if (!$by || (!$substr && $by != "all")) {
+		?>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr><th colspan="4" align="left">Ver por Categoría:</th></tr>
+		<?
+				$query = "SELECT DISTINCT category FROM darwinports.categories ORDER BY category";
+				$result = mysql_query($query);
+				if($result) {
+					while( $row = mysql_fetch_assoc($result) ) {
+		?>
+		<tr><td colspan="4"><a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $row['category']; ?>"><?= $row['category']; ?></a></td></tr>
+		<?
+					}
+				}
+			}
+		?>
+	</table>
+	</form>
+
+<?
+	if ($by && ($substr || $by == "all")) {
+		$fields = "name, path, version, description";
+		$query = "1";
+		$tables = "darwinports.portfiles p";
+		if ($by == "name") {
+			$query = $query . " AND p.name LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "library") {
+			$query = $query . " AND p.name='" . addslashes($substr) . "'";
+		}
+		if ($by == "desc") {
+			$query = $query . " AND p.description LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "cat") {
+			$tables = $tables . ", darwinports.categories c";
+			$query = $query . " AND c.portfile=p.name AND c.category='" . addslashes($substr) . "'";
+		}
+		if ($by == "variant") {
+			$tables = $tables . ", darwinports.variants v";
+			$query = $query . " AND v.portfile=p.name AND v.variant='" . addslashes($substr) . "'";
+		}
+		if ($by == "platform") {
+			$tables = $tables . ", darwinports.platforms pl";
+			$query = $query . " AND pl.portfile=p.name AND pl.platform ='" . addslashes($substr) . "'";
+		}
+		if ($by == "maintainer") {
+			$tables = $tables . ", darwinports.maintainers m";
+			$query = $query . " AND m.portfile=p.name AND m.maintainer LIKE '%" . addslashes($substr) . "%'";
+		}
+		$query = "SELECT DISTINCT $fields FROM $tables WHERE $query ORDER BY name";
+		$result = mysql_query($query);
+		if($result) {
+?>
+	<p>
+	<i><?= mysql_num_rows($result); ?> Portfile<? if (mysql_num_rows($result) != 1) { echo "s"; } ?> Seleccionado</i>
+	</p>
+	<dl>
+<?		
+			while( $row = mysql_fetch_assoc($result) ) {
+?>
+	<dt><b><a href="http://www.darwinports.org/darwinports/dports/<?= $row['path']; ?>/Portfile"><?= $row['name']; ?></a></b> <?= $row['version']; ?></dt>
+	<dd>
+	<?= $row['description']; ?><br />
+	<?
+// MAINTAINERS
+				$nquery = "SELECT maintainer FROM darwinports.maintainers WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, maintainer";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<i>Mantenido por:</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						if ($primary) { echo "<b>"; }
+						$addr = obfuscate_email($nrow[0]);
+						print $addr;
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// CATEGORIES
+				$nquery = "SELECT category FROM darwinports.categories WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, category";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<br />
+	<i>Categorías:</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_assoc($nresult) ) {
+						if ($primary) { echo "<b>"; }
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $nrow['category']; ?>"><?= $nrow['category']; ?></a>
+					<?
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// PLATFORMS
+				$nquery = "SELECT platform FROM darwinports.platforms WHERE portfile='" . $row['name'] . "' ORDER BY platform";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Plataformas:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$platform = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=platform&substr=<?= $platform; ?>"><?= $platform; ?></a>
+					<?
+					}
+				}
+
+// DEPENDENCIES
+				$nquery = "SELECT library FROM darwinports.dependencies WHERE portfile='" . $row['name'] . "' ORDER BY library";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Dependencias:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						// lib:libpng.3:libpng -> libpng
+						$library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
+					<?
+					}
+				}
+/*
+// VARIANTS
+				$nquery = "SELECT variant FROM darwinports.variants WHERE portfile='" . $row['name'] . "' ORDER BY variant";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Variantes:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$variant = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=variant&substr=<?= $variant; ?>"><?= $variant; ?></a>
+					<?
+					}
+				}
+*/
+	?>
+	<br />
+	</dd>
+	<br />
+<?	
+			} 
+		} else {
+			echo "Ocurrió un error. (501)";
+		}
+	}
+?>
+	</dl>
+	</div>
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/fr/archives.php
===================================================================
--- trunk/www/localized/fr/archives.php	(revision 28303)
+++ trunk/www/localized/fr/archives.php	(revision 28303)
@@ -0,0 +1,26 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/fr/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/fr/includes/functions.inc");
+    print_header('Dépêches DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Dépêches archivées</h2>
+     <?php
+		if (isset($_GET['id'])) {
+			print_headline();
+		} else {
+			print_all_headlines_nonadmin();
+		}
+      ?>
+
+
+      </div>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/fr/downloads/index.php
===================================================================
--- trunk/www/localized/fr/downloads/index.php	(revision 28303)
+++ trunk/www/localized/fr/downloads/index.php	(revision 28303)
@@ -0,0 +1,32 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/fr/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/fr/includes/functions.inc");
+    print_header('Distributions de DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Téléchargements disponibles</h2>
+		<p>
+<?php
+$chemin="$DOCUMENT_ROOT/downloads";
+$rep=opendir($chemin);
+chdir($chemin);
+while($file = readdir($rep)) {
+	if($file != '..' && $file !='.' && (!eregi('php$', $file))) {
+		if(!is_dir($file)) {
+			echo "<a href=\"/downloads/$file\">$file</a>";
+			echo "<br>";
+		}
+	}
+}
+closedir($rep);
+?>
+		</p>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/fr/emit_portfile.php
===================================================================
--- trunk/www/localized/fr/emit_portfile.php	(revision 28303)
+++ trunk/www/localized/fr/emit_portfile.php	(revision 28303)
@@ -0,0 +1,75 @@
+<?php
+
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+include_once("$DOCUMENT_ROOT/includes/email.inc");
+
+$portname = basename(dirname($_SERVER['PATH_INFO']));
+?>
+
+<html>
+	<head>
+		<title><?=$portname?> Portfile</title>
+	</head>
+	<body>
+
+<?php
+
+//	Read the file as an array of lines
+$target	= "${DOCUMENT_ROOT}/..${_SERVER['PATH_INFO']}";
+$lines = @file($target);
+if ($lines)
+{
+	print "<pre>";
+	foreach ($lines as $line)
+	{
+		$out = $line;
+
+		//	Replace tabs with spaces to maintain proper spacing
+		$tabs = 4;
+		$pos = 0;
+		$out = '';
+		for ($i = 0; $i < strlen($line); ++$i)
+		{
+			$char = $line{$i};
+			switch ($char)
+			{
+			case "\t":
+				$cnt = $tabs - ($pos % $tabs);
+				$out .= str_repeat(" ", $cnt);
+				$pos += $cnt;
+				break;
+			default:
+				$out .= $char;
+				++$pos;
+				break;
+			}
+		}
+
+		//	Clean up any html-unfriendly characters
+		$out = htmlspecialchars($out);
+
+		//	Special handling for email addresses
+		if (preg_match('/\s*(maintainers\s+)(.*)/i', $out, $matches))
+		{
+			$func = $matches[1];
+			$params = $matches[2];
+			
+			$addresses = preg_split('/\s+/', $params);
+			
+			foreach ($addresses as $addr)
+				$emails[] = obfuscate_email($addr);
+			
+			$out = $func.(count($emails) ? join(' ', $emails) : '')."\n";
+		}
+		
+		//	Output line
+		print $out;
+	}
+	print "</pre>";
+}
+else
+	print "Couldn't open file $target";
+?>
+
+	</body>
+</html>
Index: trunk/www/localized/fr/getdp/index.php
===================================================================
--- trunk/www/localized/fr/getdp/index.php	(revision 28303)
+++ trunk/www/localized/fr/getdp/index.php	(revision 28303)
@@ -0,0 +1,121 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/fr/includes/common.inc");
+    /* include_once("$DOCUMENT_ROOT/fr/includes/functions.inc"); */
+    print_header('Obtenir DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Obtenir DarwinPorts</h2>
+
+	<p>La version <? print "$dp_version"; ?> de DarwinPorts est disponible sous forme d'image disque pour
+	<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>-10.4.dmg">Mac OS X 10.4 (PowerPC)</a> ou pour
+	<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>-10.3.dmg">Mac OS X 10.3</a> contenant un installateur (.pkg)
+	ou sous forme d'archive	<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.bz2">tar.bz2</a> ou
+	<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.gz">tar.gz</a>. Les sommes de contrôle pour ces fichiers
+	sont disponibles <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.chk.txt">ici</a>.</p>
+
+	<p>Pour voir la liste de tous les fichiers disponibles, regardez la 
+	<a href="/fr/downloads/">liste</a> des téléchargements.</p>
+
+	<p>Veuillez noter que pour installer et utiliser DarwinPorts sur Mac OS X, vous devez avoir 
+	installé Xcode, dont vous pouvez vous procurez une copie sur le <a href="http://developer.apple.com/">
+	site d'Apple</a> ou sur vos disques d'installation de Mac OS X.</p>
+
+	<p>Si vous souhaitez utiliser DarwinPorts sur un système autre que Mac OS X,
+	voici les dépendances nécessaires (un minimum de connaissance sur les outils
+	de compilation comme gcc est requis) :
+	<ul>
+		<li>TCL (8.3 ou 8.4)</li>
+		<li>curl</li>
+		<li>OpenSSL ou libmd</li>
+	</ul>
+	</p>
+
+	<h5 class="subhdr">L'installateur pour Mac OS X (.pkg)</h5>
+
+	<p>Le moyen le plus simple pour installer DarwinPorts sur Mac OS X est de télécharger une image disque pour
+	<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>-10.4.dmg">Mac OS X 10.4</a> ou
+	<a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>-10.3.dmg">Mac OS X 10.3</a> et
+	de lancer "Installer.app" en double-cliquant sur le paquet (.pkg) et de suivre les instructions jusqu'à ce que 
+	l'installation soit terminée. Cette procédure installera une copie entièrement fonctionnelle 
+	de DarwinPorts sur votre système, immédiatement utilisable. Si besoin est, les fichiers de configuration
+	de votre shell seront modifiés par l'installateur pour permettre l'utilisation de DarwinPorts.
+	Après installation, ces changements seront valides pour les shells nouvellement ouverts.</p>
+
+	<p>Bien que facultatif, il est recommandé de synchroniser votre toute nouvelle installation 
+	avec les serveurs d'OpenDarwin afin de s'assurer d'avoir DarwinPorts bien à jour ainsi que 
+	les Portfiles contenant les instructions nécessaires à l'installation des ports. Pour cette 
+	opération, exécutez ces commandes :</p>
+
+	<pre>sudo port -d selfupdate</pre>
+
+	<p>Il est également recommandé d'exécuter régulièrement la commande précédente afin de 
+	s'assurer d'être bien à jour. À présent vous devriez être prêt pour utiliser DarwinPorts !</p>
+
+	<h5 class="subhdr">Installation depuis les sources</h5>
+	
+	<p>Si pour une raison ou une autre vous souhaitez installer DarwinPorts grâce aux sources, 
+	toutefois avant de pouvoir installer un port avec DarwinPorts il y a quelques points que vous 
+	devrez accomplir une fois les sources téléchargées. "<kbd>cd</kbd>" dans le répertoire où les sources 
+	ont été téléchargées puis décompressez-les avec "<kbd>tar xjvf <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.bz2">
+	DarwinPorts-<? print "$dp_version"; ?>.tar.bz2</a></kbd>" ou "<kbd>tar xzvf <a href="/downloads/DarwinPorts-<? print "$dp_version"; ?>.tar.gz">DarwinPorts
+	-<? print "$dp_version"; ?>.tar.gz</a></kbd>" suivant le format de l'archive que vous avez choisi. 
+	Une fois les sources décompressées, exécutez les commandes suivantes :</p>
+
+      <pre>cd DarwinPorts-<? print "$dp_version"; ?> 
+./configure && make && sudo make install</pre>
+
+	<p>Puis optionnellement :</p>
+
+	<pre>cd ../
+rm -rf DarwinPorts-<? print "$dp_version"; ?>.*</pre>
+	
+	<p>Ces commandes doivent être exécutées par un administrateur, dont "<kbd>sudo</kbd>" demandera son 
+	mot de passe pour l'installation. Cette procédure installera DarwinPorts, ainsi les sources et le 
+	répertoire DarwinPorts-<? print "$dp_version"; ?> pourront être effacés. Pour personnaliser votre installation vous devrez 
+	consulter le résultat de la commande "<kbd>./configure --help | more</kbd>" puis utiliser les 
+	options appropriées.</p>
+
+	<p>Vous devrez adapter vos fichiers de configuration du shell pour trouver les binaires installés par 
+	DarwinPorts. Puis finalement synchroniser votre installation avec les serveurs d'OpenDarwin :
+
+	<pre>sudo port -d selfupdate</pre>
+
+	<p>Une fois l'installation terminée, DarwinPorts est prêt à être utilisé. Il est également 
+	recommandé d'exécuter régulièrement la commande précédente afin de s'assurer d'être bien à jour.</p>
+
+	<p>De plus, vous pouvez lire le fichier <tt>README_RELEASE1.fr</tt> disponible dans l'archive de 
+	la version <? print "$dp_version"; ?> concernant une installation basique et des instructions d'utilisation.</p>
+
+	<h5 class="subhdr">Aide</h5>
+
+	<p>De l'<a href="/fr/help/">aide</a> est également disponible au besoin.</p>
+
+	<h5 class="subhdr">Sources CVS</h5>
+
+	<p>Si vous êtes un développeur ou un utilisateur désireux de goûter aux joies des versions de développement 
+	et souhaiter obtenir les dernières fonctions, vous pouvez récupérer les sources de DarwinPorts via CVS.</p>
+
+	<p>Utilisez les commandes suivantes pour récupérer le projet depuis le dépôt CVS d'OpenDarwin :</p>
+
+      <pre>cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
+cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -P darwinports</pre>
+
+	<p>Lorsque le serveur vous demande un mot de passe, tapez seulement sur la touche <kbd>entrée</kbd> car 
+	il n'y a pas de mot de passe.</p>
+
+	<p>Si vous ne voulez pas télécharger les sources depuis le CVS, vous pouvez télécharger une 
+	<a href="/downloads/darwinports-nightly-cvs-snapshot.tar.gz">archive</a> 
+	créée quotidiennement. Une fois décompressée, vous pouvez maintenir cette installation avec les 
+	commandes "<kbd>cvs update</kbd>" usuelles.</p>
+
+	<p>Si vous souhaitez juste voir le dépôt CVS sans nécessairement le récupérer, vous pouvez regarder le 
+	<a href="http://www.opendarwin.org/cgi-bin/cvsweb.cgi/proj/darwinports/">CVSweb</a>.</p>
+
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/fr/help/index.php
===================================================================
--- trunk/www/localized/fr/help/index.php	(revision 28303)
+++ trunk/www/localized/fr/help/index.php	(revision 28303)
@@ -0,0 +1,73 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/fr/includes/common.inc");
+    /* include_once("$DOCUMENT_ROOT/fr/includes/functions.inc"); */
+    print_header("Demander de l'aide", 'utf-8');
+  ?>
+
+    <div id="content">
+		<h2 class="hdr">Demander de l'aide</h2>
+	
+	<p>Si vous êtes perdus, différents moyens pour trouver de l'aide s'offrent à vous.</p>
+
+		<h5 class="subhdr">Documentation</h5>
+
+	<p>Le <a href="http://www.darwinports.org/docs">Guide DarwinPorts</a> contient une 
+	section dédiée pour les utilisateurs de DarwinPorts,
+	<a href="http://www.darwinports.org/docs/pt01.html">Part 1: Using DarwinPorts</a>.</p>
+
+	<p>La <a href="http://wiki.opendarwin.org/index.php/DarwinPorts:FAQ">FAQ</a> de DarwinPorts est maintenant 
+	en ligne, grâce à l'effort procuré par les utilisateurs du <a href="http://wiki.opendarwin.org/index.php/
+	DarwinPorts">Wiki</a>. Tout le monde ayant un compte Wiki et la connaissance nécessaire peut contribuer à 
+	informer les autres utilisateurs.</p>
+
+	<p>La documentation du projet évolue constament, donc si vous apercevez une erreur
+	quelconque, ou bien si vous avez des questions à propos de celle-ci, informez-nous !
+	Cela nous aidera grandement.</p>
+
+		<h5 class="subhdr">Listes de discussions</h5>
+
+	<p>La <a href="http://www.opendarwin.org/mailman/listinfo/darwinports">liste de discussion
+	darwinports</a> est accessible à toutes et à tous; c'est dans celle-ci que la plupart
+	des discussions sur l'évolution du projet se passent. C'est également l'endroit
+	idéal pour poser vos questions. Concernant cette liste, veuillez noter qu'à cause 
+	du spam les messages envoyés par des personnes non abonnées à cette liste devront être 
+	approuvés avant d'être diffusés. Pour éviter cela, il est préférable de s'abonner à la 
+	liste.</p>
+
+	<p>Avant de poser votre question vous pouvez vérifier dans les 
+	<a href="http://www.opendarwin.org/pipermail/darwinports/">archives de la liste</a> 
+	si une solution n'a pas déjà été proposée; bien que cela ne soit pas obligatoire, cela 
+	peut vous aider à trouver plus rapidement une solution à votre problème. Nous essayons 
+	d'aider du mieux que nous pouvons mais si la question a déjà été posée, nos réponses 
+	peuvent être très succinctes.</p>
+
+	<p>Sinon le site <a href="http://gmane.org/">Gmane.org</a> permet de naviguer très aisément 
+	dans les archives et permet d'y accéder via le protocole <a href="nntp://news.gmane.org/">
+	NNTP</a>.</p>
+
+	<p>Lorsque vous posez une question dans la liste de discussions, incluez toute information 
+	qui pourrait aider à trouver une solution, comme le système utilisé, ainsi que sa version 
+	(Mac OS X 10.3.2 par exemple), l'existence de logiciels tierce partie installés (dans 
+	/usr/local par exemple) et tout message d'erreurs de DarwinPorts (utilisez les options -d 
+	et -v de port(1) pour afficher les informations de déboguage). Il est plus facile de vous 
+	aider une fois ces options utilisées.</p>
+
+      <h5 class="subhdr">IRC</h5>
+	
+	<p>Pour les discussions en temps réel, le canal #darwinports sur le
+	réseau IRC <a href="http://freenode.net/">Freenode</a> est généralement
+	utilisé.</p>
+
+	<p>Bien que dans ce canal vous y trouverez certainement l'aide recherchée, gardez s'il 
+	vous plaît à l'esprit que les personnes y étant ne sont pas obligées de vous aider, n'y
+	de répondre à vos questions. N'en faites pas une histoire personnelle, posez alors
+	votre question dans la <a href="http://www.opendarwin.org/mailman/listinfo/darwinports">
+	liste de discussions</a>.</p>
+
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/fr/includes/common.inc
===================================================================
--- trunk/www/localized/fr/includes/common.inc	(revision 28303)
+++ trunk/www/localized/fr/includes/common.inc	(revision 28303)
@@ -0,0 +1,49 @@
+<?php
+
+# $Id$
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# print the current darwinports version
+$dp_version = "1.3.1";
+
+######################################################################
+
+# print the page header
+function print_header($title, $encoding) {
+  global $DOCUMENT_ROOT;
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+  <head>
+    <title><?php echo("$title"); ?></title>
+    <meta http-equiv="Content-type" content="text/html; charset=<?php echo("$encoding"); ?>" />
+    <meta name="author" content="Jim Mock (mij@opendarwin.org)" />
+    <meta name="copyright" content="2003, OpenDarwin" />
+    <meta name="robots" content="all" />
+    <link rel="stylesheet" type="text/css" href="/dp.css" />
+    <link rel="alternate" type="application/rss+xml" href="http://www.darwinports.org/dp.xml" />
+  </head>
+
+  <body>
+
+  <div id="main">
+
+<?php
+  include("$DOCUMENT_ROOT/fr/includes/header.inc");
+}
+
+###################################################################### 
+
+# print the page footer
+function print_footer() {
+  global $DOCUMENT_ROOT;
+
+  include("$DOCUMENT_ROOT/fr/includes/footer.inc");
+
+  echo "  </body>\n";
+  echo "</html>\n";
+}
+?>
Index: trunk/www/localized/fr/includes/db.inc
===================================================================
--- trunk/www/localized/fr/includes/db.inc	(revision 28303)
+++ trunk/www/localized/fr/includes/db.inc	(revision 28303)
@@ -0,0 +1,6 @@
+<?php
+  $host = 'localhost';
+  $user = 'dp_www';
+  $pass = 'dp_secret';
+  $db = 'dp_www';
+?>
Index: trunk/www/localized/fr/includes/footer.inc
===================================================================
--- trunk/www/localized/fr/includes/footer.inc	(revision 28303)
+++ trunk/www/localized/fr/includes/footer.inc	(revision 28303)
@@ -0,0 +1,4 @@
+      <div id="footer">
+		<span class="languages"><a href="/">English</a>, Français, <a href="/es/">Español</a>, <a href="/ru/">Russian</a>, <a href="/it/">Italiano</a></span>
+      	Copyright © 2002-<? print date("Y"); ?>, <a href="http://www.opendarwin.org/fr/">OpenDarwin</a>.  Tous Droits réservés. | <a href="http://www.darwinports.org/dp_news.xml">Feed RSS</a>
+      </div>
Index: trunk/www/localized/fr/includes/functions.inc
===================================================================
--- trunk/www/localized/fr/includes/functions.inc	(revision 28303)
+++ trunk/www/localized/fr/includes/functions.inc	(revision 28303)
@@ -0,0 +1,278 @@
+<?php
+
+# $Id$
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# variables and includes
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+$PHP_SELF = $_SERVER['PHP_SELF'];
+include_once("$DOCUMENT_ROOT/includes/db.inc");
+$connect = mysql_pconnect($host, $user, $pass) or die("Can't connect to db!");
+mysql_select_db($db);
+
+######################################################################
+
+# create an RSS feed of the project news
+function create_rss() {
+  global $DOCUMENT_ROOT, $connect;
+
+  $query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $open = fopen("$DOCUMENT_ROOT/dp_news.xml", "w+");
+  $rssdate = substr_replace(date("Y-m-d\TH:i:s0", time()),':', -2, 0);
+
+  $rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+  $rss .= "<rss version=\"2.0\"\n";
+  $rss .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
+  $rss .= "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
+  $rss .= "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
+  $rss .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
+  $rss .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n\n";
+
+  $rss .= "  <channel>\n";
+  $rss .= "    <title>DarwinPorts Project News</title>\n";
+  $rss .= "    <link>http://www.darwinports.org/</link>\n";
+  $rss .= "    <description>DarwinPorts Project News</description>\n";
+  $rss .= "    <dc:language>en-us</dc:language>\n";
+  $rss .= "    <dc:creator>Jim Mock (mij@opendarwin.org)</dc:creator>\n";
+  $rss .= "    <dc:rights>Copyright 2002-2003</dc:rights>\n";
+  $rss .= "    <dc:date>$rssdate</dc:date>\n";
+  $rss .= "    <admin:errorReportsTo rdf:resource\"mailto:mij@opendarwin.org\" />\n";
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      $rss .= "    <item>\n";
+      $rss .= "      <title>$row->title</title>\n";
+      $rss .= "      <link>http://www.darwinports.org/archives.php?id=$row->id</link>\n";
+
+      $desc_query = "SELECT SUBSTRING_INDEX(news, ' ', 26) FROM headlines WHERE id=$row->id";
+      $desc_result = mysql_query($desc_query);
+      $desc_row = mysql_fetch_row($desc_result);
+
+      $description = $desc_row[0];
+
+      $rss .= "      <description><![CDATA[$description...</p>]]></description>\n";
+      $rss .= "      <guid isPermaLink=\"true\">http://www.darwinports.org/archives.php?id=$row->id</guid>\n";
+      $rss .= "      <content:encoded><![CDATA[$row->news]]></content:encoded>\n";
+      $rss .= "    </item>\n";
+    }
+  }
+  $rss .= "  </channel>\n";
+  $rss .= "</rss>\n";
+
+  $write = fwrite($open, $rss);
+  $close = fclose($open);
+}
+
+######################################################################
+
+# print the project news
+function print_headlines() {
+  global $connect;
+
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+      echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+      echo "$row->news\n\n";
+    }
+  }
+  else {
+    echo "<p>Aucunes dépêches à ce jour.</p>\n";
+  }
+}
+
+######################################################################
+
+# display a single headline
+function print_headline() {
+  global $connect;
+
+  $id = $_GET['id'];
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines WHERE id='$id'";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $row = mysql_fetch_object($result);
+  if($row) {
+    echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+    echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+    echo "$row->news\n\n";
+  }
+  else {
+    echo "<h2 class=\"hdr\">Erreur !</h2>\n";
+	echo "<p>La dépêche désirée n'a put être trouvée. Soit elle ne figure pas dans la base de données, soit une erreur est survenue.</p>\n";
+  }
+}
+
+######################################################################
+
+# print the form used to add project news
+function print_add_headline() {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    echo "<p>Utilisez le formulaire ci-dessous pour ajouter une dépêche liée au projet.</p>\n\n";
+    echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+    echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" /></p>\n";
+    echo "<p>Dépêche :</p>\n";
+    echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\"></textarea></p>\n";
+    echo "<p><input type=\"submit\" name=\"submit\" value=\"Soumettre\" /></p>\n";
+    echo "</form>\n\n";
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')";
+      $result = mysql_query($query) or die("Error: $query.");
+      if(!$result) {
+	die("Error: $result.");
+      }
+	  echo "<p>La dépêche a été ajoutée. Vous pouvez <a href=\"list.php\">lister</a> toutes les dépêches, <a href=\"add.php\">ajouter une autre dépêche</a>, ou <a href=\"/fr/\">retourner sur le site de DarwinPorts</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>Les erreurs suivantes sont survenues :</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print the form used to edit project news
+function print_edit_headline($id) {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    $id = $_GET['id'];
+    $query = "SELECT title, news FROM headlines WHERE id='$id'";
+    $result = mysql_query($query) or die("Error: $query.");
+    if(!$result) {
+      die("Error: $result.");
+    }
+    if(mysql_num_rows($result) > 0) {
+      $row = mysql_fetch_object($result);
+      echo "<p>Utilisez le formulaire ci-dessous pour éditer les dépêches du projet.</p>\n\n";
+      echo "<form action=\"$PHP_SELF?id=$id\" method=\"post\">\n";
+      echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" value=\"$row->title\" /></p>\n";
+      echo "<p>Dépêche :</p>\n";
+      echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\">";
+      echo htmlentities($row->news);
+      echo "</textarea></p>\n";
+      echo "<p><input type=\"submit\" name=\"submit\" value=\"éditer\" /></p>\n";
+      echo "</form>\n\n";
+    }
+    else {
+      echo "<p>La dépêche désirée n'a put être trouvée. Soit elle ne figure pas dans la base de données, soit une erreur est survenue. Réessayez.</p>\n\n";
+    }
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "UPDATE headlines SET title='$title', news='$news' WHERE id='$id'";
+      $result = mysql_query($query) or die("Error: $query.");
+
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>La dépêche a été mise à jour. Vous pouvez <a href=\"list.php\">lister</a> toutes les dépêches, <a href=\"add.php\">ajouter une autre dépêche</a>, ou <a href=\"/fr/\">retourner sur le site de DarwinPorts</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>Les erreurs suivantes sont survenues :</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines
+function print_all_headlines() {
+  global $connect;
+
+  echo "<p>Voici ci-dessous la liste de toutes les dépêches existantes. Elles peuvent être visualisées, éditées, ou effacées depuis cette interface. Vous pouvez également <a href=\"add.php\">ajouter une dépêche</a>.</p>\n\n";
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/fr/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">éditer</a></p>\n\n";
+    }
+  }
+  else {
+    echo "<p>Aucunes dépêches disponibles.</p>\n\n";
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines without the admin foobage
+# (this is cheap and could be better)
+function print_all_headlines_nonadmin() {
+  global $connect;
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/fr/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp</p>\n\n";
+    }
+  }
+  else {
+    echo "<p>Aucunes dépêches disponibles.</p>\n\n";
+  }
+}
+
+?>
Index: trunk/www/localized/fr/includes/header.inc
===================================================================
--- trunk/www/localized/fr/includes/header.inc	(revision 28303)
+++ trunk/www/localized/fr/includes/header.inc	(revision 28303)
@@ -0,0 +1,50 @@
+      <div id="nav">
+	<div id="logo">
+	  <a href="/fr/" title="DarwinPorts"><img src="/img/dp.jpg"
+	    alt="DarwinPorts" /></a>
+	</div>
+	<div id="l">
+	  <ul>
+	  <?php
+	    $PHP_SELF = $_SERVER['PHP_SELF'];
+	    $home = '/fr/index.php';
+	    $getdp = '/fr/getdp/index.php';
+	    $ports = '/fr/ports/index.php';
+	    $help = '/fr/help/index.php';
+
+	    if($PHP_SELF == $home) {
+	      echo "<li class=\"selected\"><a href=\"/fr/\" title=\"Accueil DarwinPorts\">Accueil DarwinPorts</a></li>\n";
+	    }
+	    else {
+	      echo "<li><a href=\"/fr/\" title=\"Accueil DarwinPorts\">Accueil DarwinPorts</a></li>\n";
+	    }
+	    if($PHP_SELF == $getdp) {
+	      echo "<li class=\"selected\"><a href=\"/fr/getdp/\" title=\"Obtenir DarwinPorts\">Obtenir DarwinPorts</a></li>\n";
+	    }
+	    else {
+	      echo "<li><a href=\"/fr/getdp/\" title=\"Obtenir DarwinPorts\">Obtenir DarwinPorts</a></li>\n";
+	    }
+	  ?>
+	    <li class="last"><a href="http://www.opendarwin.org/bugzilla/" title="Bugzilla">Bugzilla</a></li>
+	  </ul>
+	</div>
+	<div id="r">
+	  <ul>
+	    <li><a href="/docs/" title="Documentation">Documentation</a></li>
+	    <?php
+	      if($PHP_SELF == $ports) {
+		echo "<li class=\"selected\"><a href=\"/fr/ports/\" title=\"Ports disponibles\">Ports disponibles</a></li>\n";
+	      }
+	      else {
+		echo "<li><a href=\"/fr/ports/\" title=\"Ports disponibles\">Ports disponibles</a></li>\n";
+	      }
+	      if($PHP_SELF == $help) {
+		echo "<li class=\"sellast\"><a href=\"/fr/help/\" title=\"Demander de l'aide\">Demander de l'aide</a></li>\n";
+	      }
+	      else {
+		echo "<li class=\"last\"><a href=\"/fr/help/\" title=\"Demander de l'aide\">Demander de l'aide</a></li>\n";
+	      }
+	    ?>
+	  </ul>
+	</div>
+      </div>
Index: trunk/www/localized/fr/includes/lang.inc
===================================================================
--- trunk/www/localized/fr/includes/lang.inc	(revision 28303)
+++ trunk/www/localized/fr/includes/lang.inc	(revision 28303)
@@ -0,0 +1,3 @@
+      <p id="lang">[ <a href="/">English</a>, <a
+	href="/ja/">Japanese</a>, <a href="/fr/">Français</a>, <a
+	href="/es/">Español</a> ]</p>
Index: trunk/www/localized/fr/index.php
===================================================================
--- trunk/www/localized/fr/index.php	(revision 28303)
+++ trunk/www/localized/fr/index.php	(revision 28303)
@@ -0,0 +1,67 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/fr/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/fr/includes/functions.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    print_header('Accueil DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Introduction à DarwinPorts</h2>
+<?
+                $result = mysql_query("SELECT count(*) from darwinports.portfiles");
+                if ($result) {
+                        $row = mysql_fetch_array($result);
+                        $count = $row[0];
+                } else {
+                        $count = 0;
+                }
+?>
+	<p>
+	Le principal objectif du projet DarwinPorts est de fournir un moyen
+	simple pour l'installation de divers logiciels open-source sur les systèmes
+	basés sur <a href="http://developer.apple.com/darwin/projects/darwin/">Darwin</a>
+	(<a href="http://www.apple.com/fr/macosx/">Mac OS X</a>, <a href="http://opendarwin
+	.org/fr/">OpenDarwin</a>).
+	</p>
+	
+	<p>
+	Il y a actuellement <?= $count; ?> <a href="/fr/ports/">ports</a> opérationnels
+	et disponibles, mais d'autres seront bientôt ajoutés régulièrement. Vous pouvez
+	prendre connaissance des ports récemment ajoutés en souscrivant à la liste de
+	discussion <a href="http://www.opendarwin.org/mailman/listinfo/cvs-darwinports-all">
+	cvs-darwinports-all</a>.
+	</p>
+
+	<p>
+	Pour plus d'information sur l'obtention et l'installation de DarwinPorts,
+	lisez s'il vous plaît la section <a href="/fr/getdp/">Obtenir DarwinPorts</a>
+	de ce site. Assurez-vous au préalable d'avoir consulté la <a href="/docs/">
+	documentation</a>; si vous avez des questions ou bien des problèmes	liés à
+	l'installation/utilisation, vous pouvez <a href="/fr/help/">demander de l'aide</a>.
+	Le <a href="http://wiki.opendarwin.org/index.php/DarwinPorts">wiki de DarwinPorts</a> 
+	est généralement d'une bonne aide ainsi que la <a href="http://wiki.opendarwin.org/index.php/
+	DarwinPorts:FAQ">FAQ</a>.
+	</p>
+
+    <p>
+	Le signalement d'un bug, les suggestions et les nouveaux ports devront être
+	soumis à <a href="http://www.opendarwin.org/bugzilla/">Bugzilla</a>. Avant toute
+	chose, consultez cette <a href="/docs/ch01s05.html#user_bugs">documentation</a>
+	pour vous aider à rédiger au mieux votre requête.
+	</p>
+
+      <div id="news">
+	<h2 class="hdr">Nouvelles concernant le projet</h2>
+
+	<?php
+	  print_headlines();
+	?>
+    <p>Vous pouvez également lire les <a href="archives.php">archives</a>.</p>
+      </div>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/fr/ports.php
===================================================================
--- trunk/www/localized/fr/ports.php	(revision 28303)
+++ trunk/www/localized/fr/ports.php	(revision 28303)
@@ -0,0 +1,219 @@
+<?
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/fr/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    include_once("$DOCUMENT_ROOT/includes/email.inc");
+	print_header('Ports Disponibles', 'utf-8');
+    $by = isset($_GET['by']) ? $_GET['by'] : '';
+    $substr = isset($_GET['substr']) ? $_GET['substr'] : '';
+?>
+	<center>
+	<h1>Portfiles DarwinPorts</h1>
+	</center>
+
+	<p>
+	Ce formulaire vous permet de rechercher un logiciel particulier dans l'index de DarwinPorts.<br />
+	<i>Dernière mise à jour de l'index : </i>
+	<?
+		$sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM darwinports.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
+		$result = mysql_query($sql);
+		if($result && $row = mysql_fetch_row($result)) {
+				echo date("d-M-Y H:i:s", $row[0]);
+		}
+	?>
+	</p>
+	
+	<form action="<?= $PHP_SELF; ?>">
+	<table>
+		<tr>
+			<th>Rechercher par :</th>
+			<td>
+				<select name="by">
+				<option value="name"<? if ($by == "name") { echo " selected=\"selected\""; } ?>>Nom du logiciel</option>
+				<option value="desc"<? if ($by == "desc") { echo " selected=\"selected\""; } ?>>Description</option>
+				<option value="cat"<? if ($by == "cat") { echo " selected=\"selected\""; } ?>>Catégorie</option>
+				<option value="maintainer"<? if ($by == "maintainer") { echo " selected=\"selected\""; } ?>>Mainteneur</option>
+				</select>
+			</td>
+			<td><input type="text" name="substr" size="40" /></td>
+			<td><input type="submit" name="Search" value="Rechercher" /></td>
+		</tr>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr>
+<?
+		$result = mysql_query("SELECT count(*) from darwinports.portfiles");
+		if ($result) {
+			$row = mysql_fetch_array($result);
+			$count = $row[0];
+		} else {
+			$count = 0;
+		}
+?>
+			<td colspan="4" align="left"><a href="<?= $PHP_SELF; ?>?by=all">Afficher tous les logiciels (<?= $count; ?>)</a></td>
+		</tr>
+		<?
+			if (!$by || (!$substr && $by != "all")) {
+		?>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr><th colspan="4" align="left">Afficher par catégorie :</th></tr>
+		<?
+				$query = "SELECT DISTINCT category FROM darwinports.categories ORDER BY category";
+				$result = mysql_query($query);
+				if($result) {
+					while( $row = mysql_fetch_assoc($result) ) {
+		?>
+		<tr><td colspan="4"><a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $row['category']; ?>"><?= $row['category']; ?></a></td></tr>
+		<?
+					}
+				}
+			}
+		?>
+	</table>
+	</form>
+
+<?
+	if ($by && ($substr || $by == "all")) {
+		$fields = "name, path, version, description";
+		$query = "1";
+		$tables = "darwinports.portfiles p";
+		if ($by == "name") {
+			$query = $query . " AND p.name LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "library") {
+			$query = $query . " AND p.name='" . addslashes($substr) . "'";
+		}
+		if ($by == "desc") {
+			$query = $query . " AND p.description LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "cat") {
+			$tables = $tables . ", darwinports.categories c";
+			$query = $query . " AND c.portfile=p.name AND c.category='" . addslashes($substr) . "'";
+		}
+		if ($by == "variant") {
+			$tables = $tables . ", darwinports.variants v";
+			$query = $query . " AND v.portfile=p.name AND v.variant='" . addslashes($substr) . "'";
+		}
+		if ($by == "platform") {
+			$tables = $tables . ", darwinports.platforms pl";
+			$query = $query . " AND pl.portfile=p.name AND pl.platform ='" . addslashes($substr) . "'";
+		}
+		if ($by == "maintainer") {
+			$tables = $tables . ", darwinports.maintainers m";
+			$query = $query . " AND m.portfile=p.name AND m.maintainer LIKE '%" . addslashes($substr) . "%'";
+		}
+		$query = "SELECT DISTINCT $fields FROM $tables WHERE $query ORDER BY name";
+		$result = mysql_query($query);
+		if($result) {
+?>
+	<p>
+	<i><?= mysql_num_rows($result); ?> Portfile<? if (mysql_num_rows($result) != 1) { echo "s"; } ?> sélectionné<? if (mysql_num_rows($result) != 1) { echo "s"; } ?></i>
+	</p>
+	<dl>
+<?		
+			while( $row = mysql_fetch_assoc($result) ) {
+?>
+	<dt><b><a href="http://www.darwinports.org/darwinports/dports/<?= $row['path']; ?>/Portfile"><?= $row['name']; ?></a></b> <?= $row['version']; ?></dt>
+	<dd>
+	<?= $row['description']; ?><br />
+	<?
+// MAINTAINERS
+				$nquery = "SELECT maintainer FROM darwinports.maintainers WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, maintainer";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<i>Maintenu par :</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						if ($primary) { echo "<b>"; }
+						$addr = obfuscate_email($nrow[0]);
+						print $addr;
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// CATEGORIES
+				$nquery = "SELECT category FROM darwinports.categories WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, category";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<br />
+	<i>Catégorie(s) :</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_assoc($nresult) ) {
+						if ($primary) { echo "<b>"; }
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $nrow['category']; ?>"><?= $nrow['category']; ?></a>
+					<?
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// PLATFORMS
+				$nquery = "SELECT platform FROM darwinports.platforms WHERE portfile='" . $row['name'] . "' ORDER BY platform";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Plateforme(s) :</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$platform = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=platform&substr=<?= $platform; ?>"><?= $platform; ?></a>
+					<?
+					}
+				}
+
+// DEPENDENCIES
+				$nquery = "SELECT library FROM darwinports.dependencies WHERE portfile='" . $row['name'] . "' ORDER BY library";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Dépendance(s) :</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						// lib:libpng.3:libpng -> libpng
+						$library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
+					<?
+					}
+				}
+/*
+// VARIANTS
+				$nquery = "SELECT variant FROM darwinports.variants WHERE portfile='" . $row['name'] . "' ORDER BY variant";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Variantes :</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$variant = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=variant&substr=<?= $variant; ?>"><?= $variant; ?></a>
+					<?
+					}
+				}
+*/
+	?>
+	<br />
+	</dd>
+	<br />
+<?	
+			} 
+		} else {
+			echo "Une erreur est survenue. (501)";
+		}
+	}
+?>
+	</dl>
+	</div>
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/it/archives.php
===================================================================
--- trunk/www/localized/it/archives.php	(revision 28303)
+++ trunk/www/localized/it/archives.php	(revision 28303)
@@ -0,0 +1,26 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/it/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/it/includes/functions.inc");
+    print_header('Archivio delle notizie', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Archivio delle notizie</h2>
+     <?php
+		if (isset($_GET['id'])) {
+			print_headline();
+		} else {
+			print_all_headlines_nonadmin();
+		}
+      ?>
+
+
+      </div>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/it/downloads/index.php
===================================================================
--- trunk/www/localized/it/downloads/index.php	(revision 28303)
+++ trunk/www/localized/it/downloads/index.php	(revision 28303)
@@ -0,0 +1,32 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/it/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/it/includes/functions.inc");
+    print_header('Distribuzioni di DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+	
+		<h2 class="hdr">Downloads disponibili</h2>
+		<p>
+<?php
+$chemin="$DOCUMENT_ROOT/downloads";
+$rep=opendir($chemin);
+chdir($chemin);
+while($file = readdir($rep)) {
+	if($file != '..' && $file !='.' && (!eregi('php$', $file))) {
+		if(!is_dir($file)) {
+			echo "<a href=\"/downloads/$file\">$file</a>";
+			echo "<br>";
+		}
+	}
+}
+closedir($rep);
+?>
+		</p>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/it/emit_portfile.php
===================================================================
--- trunk/www/localized/it/emit_portfile.php	(revision 28303)
+++ trunk/www/localized/it/emit_portfile.php	(revision 28303)
@@ -0,0 +1,75 @@
+<?php
+
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+include_once("$DOCUMENT_ROOT/includes/email.inc");
+
+$portname = basename(dirname($_SERVER['PATH_INFO']));
+?>
+
+<html>
+	<head>
+		<title><?=$portname?> Portfile</title>
+	</head>
+	<body>
+
+<?php
+
+//	Read the file as an array of lines
+$target	= "${DOCUMENT_ROOT}/..${_SERVER['PATH_INFO']}";
+$lines = @file($target);
+if ($lines)
+{
+	print "<pre>";
+	foreach ($lines as $line)
+	{
+		$out = $line;
+
+		//	Replace tabs with spaces to maintain proper spacing
+		$tabs = 4;
+		$pos = 0;
+		$out = '';
+		for ($i = 0; $i < strlen($line); ++$i)
+		{
+			$char = $line{$i};
+			switch ($char)
+			{
+			case "\t":
+				$cnt = $tabs - ($pos % $tabs);
+				$out .= str_repeat(" ", $cnt);
+				$pos += $cnt;
+				break;
+			default:
+				$out .= $char;
+				++$pos;
+				break;
+			}
+		}
+
+		//	Clean up any html-unfriendly characters
+		$out = htmlspecialchars($out);
+
+		//	Special handling for email addresses
+		if (preg_match('/\s*(maintainers\s+)(.*)/i', $out, $matches))
+		{
+			$func = $matches[1];
+			$params = $matches[2];
+			
+			$addresses = preg_split('/\s+/', $params);
+			
+			foreach ($addresses as $addr)
+				$emails[] = obfuscate_email($addr);
+			
+			$out = $func.(count($emails) ? join(' ', $emails) : '')."\n";
+		}
+		
+		//	Output line
+		print $out;
+	}
+	print "</pre>";
+}
+else
+	print "Couldn't open file $target";
+?>
+
+	</body>
+</html>
Index: trunk/www/localized/it/getdp/index.php
===================================================================
--- trunk/www/localized/it/getdp/index.php	(revision 28303)
+++ trunk/www/localized/it/getdp/index.php	(revision 28303)
@@ -0,0 +1,148 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/it/includes/common.inc");
+    /* include_once("$DOCUMENT_ROOT/includes/functions.inc"); */
+    print_header('Ottenere DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Ottenere DarwinPorts</h2>
+
+      <p>DarwinPorts 1.2 è disponibile sia in codice sorgente, attraverso
+	il pacchetto <a href="/downloads/DarwinPorts-1.2.tar.bz2">tar.bz2</a>
+	o <a href="/downloads/DarwinPorts-1.2.tar.gz">tar.gz</a>,
+	sia in formato binario dmg (Disk Image), tramite i pacchetti
+	<a href="/downloads/DarwinPorts-1.2-10.4.dmg">dmg per Tiger</a> e
+	<a href="/downloads/DarwinPorts-1.2-10.3.dmg">dmg per Panther</a>,
+	contenenti entrambi un installer pkg grafico. I checksums di tutti i
+	files sopra elencati sono contenuti in 
+	<a href="/downloads/DarwinPorts-1.2.chk.txt">questo file</a>.</p>
+
+      <p>Nella <a href="/it/downloads/">sezione downloads</a> puoi trovare la
+	lista completa di tutti i nostri files scaricabili.</p>
+
+      <p>Ti ricordiamo che per installare ed eseguire DarwinPorts su Mac OS X
+	è necessario aver già installato Apple XCode nel proprio sistema; XCode
+	è disponibile sul sito <a href="http://developer.apple.com/">Apple
+	Developer</a> oppure nei CD/DVD di installazione di Mac OS X.</p>
+
+      <p>Se invece vuoi utilizzare DarwinPorts su una piattaforma differente
+	da Mac OS X, assicurati di avere i seguenti requisiti software:
+	  <ul>
+		<li>TCL (8.3 o 8.4)</li>
+		<li>curl</li>
+		<li>OpenSSL o libmd</li>
+	  </ul>
+
+      <h5 class="subhdr">Installazione da Package Installer (.pkg)</h5>
+
+      <p>Il modo più semplice per installare DarwinPorts su piattaforma Mac OS
+	X è scaricare e montare il file
+	<a href="/downloads/DarwinPorts-1.2-10.4.dmg">dmg per Tiger</a> o il
+	<a href="/downloads/DarwinPorts-1.2-10.4.dmg">dmg per Panther</a> e
+	successivamente lanciare l'applicazione Installer.app contenuta
+	nell'immagine, seguendo le istruzioni che appariranno sullo schermo.
+	Al termine di questa procedura DarwinPorts sarà perfettamente 
+	installato nel sistema e pronto all'uso. Se sarà necessario, il file
+	personale di configurazione della shell verrà modificato in modo tale
+	da aggiungere tutte le impostazioni indispensabili al corretto
+	funzionamento di DarwinPorts. Dovrai solamente aprire una nuova shell
+	per far sì che queste modifiche abbiano effetto.</p>
+
+      <p>Anche se non strettamente necessario, è sempre buona regola
+	sincronizzare la recente installazione con i server di OpenDarwin, così
+	da essere certi di avere l'ultima versione disponibile, sia
+	dell'infrastruttura DarwinPorts, sia di tutti i Portfiles, che
+	contengono tutte le istruzioni necessarie per l'installazione dei
+	ports. Per eseguire tale operazione basta eseguire:</p>
+
+      <pre>sudo port -d selfupdate</pre>
+
+      <p>È caldamente consigliato lanciare questo comando periodicamente
+	in modo da mantenere l'infrastruttura sempre aggiornata. A questo
+	punto dovresti essere pronto ad utilizzare DarwinPorts!</p>
+
+      <h5 class="subhdr">Installazione da sorgenti</h5>
+
+      <p>Anche l'installazione da sorgenti richiede pochi e piccoli passi.
+	Una volta scaricato il tarball, da shell, posizionati nella directory
+	contentente il pacchetto ed esegui
+	“<kbd>tar xjvf <a href="/downloads/DarwinPorts-1.2.tar.bz2">
+	DarwinPorts-1.2.tar.bz2</a></kbd>” se hai scelto il tarball bz2, oppure
+	“<kbd>tar xzvf <a href="/downloads/DarwinPorts-1.2.tar.gz">
+	DarwinPorts-1.2.tar.gz</a></kbd>” se invece hai scelto il tarball gz.
+	Quest'ultimo comando estrarrà i sorgenti di DarwinPorts in una nuova
+	subdirectory. Per compilare ed installare DarwinPorts basta eseguire i
+	seguenti comandi:</p>
+
+<pre>cd DarwinPorts-1.2
+./configure && make && sudo make install</pre>
+
+      <p>Comandi opzionali:</p>
+
+<pre>cd ../
+rm -rf DarwinPorts-1.2.*</pre>
+
+      <p>Per effettuare l'installazione sono necessari i privilegi di
+	amministratore, infatti “<kbd>sudo</kbd>” ti chiederà la password
+	per completare il processo. Questa procedura installerà il sistema
+	DarwinPorts e, eseguendo anche i comandi opzionali, rimuoverà tutti
+	gli elementi non più necessari, ossia la directory DarwinPorts-1.2 ed
+	il tarball corrispondente. Leggendo l'output di
+	“<kbd>./configure --help | more</kbd>” puoi personalizzare
+	l'installazione e passare le opzioni appropriate allo script di
+	configurazione durante la procedura appena descritta.</p>
+	
+      <p>Dovrai inoltre modificare il file personale di configurazione della
+	shell per trovare i binari installati da DarwinPorts. Infine, dovrai
+	sincronizzare la tua recente installazione con i i server di
+	OpenDarwin:</p>
+	
+
+<pre>sudo port -d selfupdate</pre>
+
+      <p>Appena terminato il processo DarwinPorts sarà pronto ad installare i
+	ports. Come già detto, è vivamente consigliato lanciare quest'ultimo
+	comando periodicamente per tenere sempre aggiornata la propria
+	installazione.</p>
+
+      <p>Alternativamente puoi fare riferimento al file
+	<tt>README_RELEASE1.it</tt> presente nel tarball di release 1.2 per
+	tutto ciò che riguarda l'installazione base e le istruzioni all'uso.</p>
+
+      <h5 class="subhdr">Aiuto</h5>
+      <p>Siamo sempre disponibili ad offrirti <a href="/it/help/">aiuto</a>
+	qualora ne avessi bisogno.</p>
+
+      <h5 class="subhdr">Ottenere i sorgenti dal CVS</h5>
+      <p>Se sei un developer o un utente esperto che vuole provare le
+	ultimissime funzionalità introdotte, puoi acquisire i sorgenti tramite
+	CVS.</p>
+
+      <p>I seguenti comandi effettuano il checkout del progetto dall'
+	anonymous CVS repository di OpenDarwin:</p>
+
+<pre>cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
+cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -P darwinports</pre>
+
+      <p>Quando il server ti chiederà la password, premi semplicemente
+	il tasto <kbd>return</kbd> della tastiera - la password è vuota.</p>
+
+      <p>Se non vuoi prelevare i files dal CVS puoi procedere con il download
+	di una
+	<a href="/downloads/darwinports-nightly-cvs-snapshot.tar.gz">
+	CVS-snapshot</a> (istantanea del CVS di questa notte). Una volta
+	estratto il tutto puoi mantenerlo aggiornato tramite l'usuale
+	comando “<kbd>cvs update</kbd>”.</p>
+
+      <p>Se vuoi semplicemente visualizzare il repository CVS senza fare il
+	checkout puoi utilizzare 
+	<a href="http://www.opendarwin.org/cgi-bin/cvsweb.cgi/proj/darwinports/">
+	CVSweb</a>.</p>
+
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/it/help/index.php
===================================================================
--- trunk/www/localized/it/help/index.php	(revision 28303)
+++ trunk/www/localized/it/help/index.php	(revision 28303)
@@ -0,0 +1,82 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/it/includes/common.inc");
+    /* include_once("$DOCUMENT_ROOT/includes/functions.inc"); */
+    print_header('Richiedere Aiuto', 'utf-8');
+  ?>
+
+  <div id="content">
+
+	<h2 class="hdr">Richiedere Aiuto</h2>
+
+	<p>Per risolvere gli eventuali problemi che potresti incontrare
+	durante l'utilizzo di DarwinPorts ti abbiamo messo a disposizione
+	diverse risorse.</p>
+	
+	<h5 class="subhdr">Documentazione</h5>
+
+	<p>Nella <a href="http://www.darwinports.org/docs">Guida a
+	DarwinPorts</a> è presente un'intera sezione per l'utente:
+	<a href="http://www.darwinports.org/docs/pt01.html">
+	Parte 1: Utilizzo di DarwinPorts</a>.</p>
+
+	<p>Le <a href="http://wiki.opendarwin.org/index.php/DarwinPorts:FAQ">
+	DarwinPorts FAQ</a> sono tornate online e sono in continuo sviluppo,
+	infatti ora sono parte integrante del nostro
+	<a href="http://wiki.opendarwin.org/index.php/DarwinPorts">Wiki</a>,
+	dove chiunque può registrarsi liberamente e contribuire alla stesura
+	di articoli.</p>
+
+	<p>Tutta la nostra documentazione è in continua evoluzione, di
+	conseguenza se leggendo trovi un errore o hai dei dubbi circa alcune
+	parti di un documento, ti preghiamo di farcelo sapere. Anche le più
+	piccole segnalazioni ci saranno sicuramente utili.</p>
+
+	<h5 class="subhdr">Mailing Lists</h5>
+
+	<p>La mailing list (lista di discussione)
+	<a href="http://www.opendarwin.org/mailman/listinfo/darwinports">
+	darwinports</a> è aperta a tutti. È il miglior luogo per ricevere
+	supporto e porre domande su DarwinPorts per tutti, sia per i nuovi
+	utenti, sia per gli sviluppatori. È anche il posto dove si discute
+	dell'evoluzione del progetto. A causa dello spam, se vuoi inviare un
+	messaggio, ti preghiamo gentilmente di iscriverti alla lista.</p>
+
+	<p>Prima di inviare una richiesta ti consigliamo di consultare l'
+	<a href="http://www.opendarwin.org/pipermail/darwinports/">
+	archivio della mailing list</a>, anche se ciò non è necessariamente
+	un dovere. Cercheremo il più possibile di aiutarti, ma se le domande
+	sono comuni le nostre risposte potrebbero essere abbastanza brevi.</p>
+
+	<p>Ad ogni modo gli archivi della mailing list sono facilmente
+	accessibili tramite <a href="http://gmane.org/">Gmane.org</a> e anche
+	attraverso <a href="nntp://news.gmane.org/">NNTP</a>.</p>
+
+	<p>Quando invii un messaggio alla mailing list ti invitiamo ad
+	includere ogni informazione che pensi potrebbe essere rilevante ai fini
+	risolutivi del problema, come quale sistema operativo stai usando
+	(OS X 10.3.2, per esempio), se hai installato altro software di terze
+	parti nella directory /usr/local e qualsiasi messaggio di errore hai
+	ricevuto da DarwinPorts (specificando le flag -d e -v al comando
+	port(1) attiverai le informazioni per il debugging). Ricordati che più
+	informazioni darai e più sarà semplice per noi aiutarti.</p>
+
+	<h5 class="subhdr">IRC</h5>
+
+	<p>Generalmente per le discussioni in tempo reale siamo in ascolto sul
+	canale #darwinports della <a href="http://freenode.net/">rete IRC
+	freenode</a>.</p>
+	
+	<p>Anche se puoi richiedere aiuto, ricorda sempre che nessuno è
+	obbligato a risponderti. Quindi, nel caso non ricevessi risposta, non
+	c'è niente di personale; potrai semplicemente porre le tue domande
+	scrivendo alla mailing list
+	<a href="http://www.opendarwin.org/mailman/listinfo/darwinports">
+	darwinports</a>.</p>
+
+	</div>
+</div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/it/includes/common.inc
===================================================================
--- trunk/www/localized/it/includes/common.inc	(revision 28303)
+++ trunk/www/localized/it/includes/common.inc	(revision 28303)
@@ -0,0 +1,44 @@
+<?php
+
+# $Id$
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# print the page header
+function print_header($title, $encoding) {
+  global $DOCUMENT_ROOT;
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
+  <head>
+    <title><?php echo("$title"); ?></title>
+    <meta http-equiv="Content-type" content="text/html; charset=<?php echo("$encoding"); ?>" />
+    <meta name="author" content="Jim Mock (mij@opendarwin.org)" />
+    <meta name="copyright" content="2003, OpenDarwin" />
+    <meta name="robots" content="all" />
+    <link rel="stylesheet" type="text/css" href="/dp.css" />
+    <link rel="alternate" type="application/rss+xml" href="http://www.darwinports.org/dp_news.xml" />
+  </head>
+
+  <body>
+
+  <div id="main">
+
+<?php
+  include("$DOCUMENT_ROOT/it/includes/header.inc");
+}
+
+###################################################################### 
+
+# print the page footer
+function print_footer() {
+  global $DOCUMENT_ROOT;
+
+  include("$DOCUMENT_ROOT/it/includes/footer.inc");
+
+  echo "  </body>\n";
+  echo "</html>\n";
+}
+?>
Index: trunk/www/localized/it/includes/db.inc
===================================================================
--- trunk/www/localized/it/includes/db.inc	(revision 28303)
+++ trunk/www/localized/it/includes/db.inc	(revision 28303)
@@ -0,0 +1,6 @@
+<?php
+  $host = 'localhost';
+  $user = 'dp_www';
+  $pass = 'dp_secret';
+  $db = 'dp_www';
+?>
Index: trunk/www/localized/it/includes/footer.inc
===================================================================
--- trunk/www/localized/it/includes/footer.inc	(revision 28303)
+++ trunk/www/localized/it/includes/footer.inc	(revision 28303)
@@ -0,0 +1,4 @@
+      <div id="footer">
+		<span class="languages"><a href="/">English</a>, <a href="/fr/">Français</a>, <a href="/es/">Español</a>, <a href="/ru/">Russian</a>, Italiano</span>
+      	Copyright © 2002-<? print date("Y"); ?>, <a href="http://www.opendarwin.org/">OpenDarwin</a>.  Tutti i diritti riservati. | <a href="http://www.darwinports.org/dp_news.xml">RSS feed</a>
+      </div>
Index: trunk/www/localized/it/includes/functions.inc
===================================================================
--- trunk/www/localized/it/includes/functions.inc	(revision 28303)
+++ trunk/www/localized/it/includes/functions.inc	(revision 28303)
@@ -0,0 +1,278 @@
+<?php
+
+# $Id$
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# variables and includes
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+$PHP_SELF = $_SERVER['PHP_SELF'];
+include_once("$DOCUMENT_ROOT/includes/db.inc");
+$connect = mysql_pconnect($host, $user, $pass) or die("Can't connect to db!");
+mysql_select_db($db);
+
+######################################################################
+
+# create an RSS feed of the project news
+function create_rss() {
+  global $DOCUMENT_ROOT, $connect;
+
+  $query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $open = fopen("$DOCUMENT_ROOT/dp_news.xml", "w+");
+  $rssdate = substr_replace(date("Y-m-d\TH:i:sO", time()),':', -2, 0);
+
+  $rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+  $rss .= "<rss version=\"2.0\"\n";
+  $rss .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
+  $rss .= "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
+  $rss .= "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
+  $rss .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
+  $rss .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n\n";
+
+  $rss .= "  <channel>\n";
+  $rss .= "    <title>DarwinPorts Project News</title>\n";
+  $rss .= "    <link>http://www.darwinports.org/</link>\n";
+  $rss .= "    <description>DarwinPorts Project News</description>\n";
+  $rss .= "    <dc:language>en-us</dc:language>\n";
+  $rss .= "    <dc:creator>Jim Mock (mij@opendarwin.org)</dc:creator>\n";
+  $rss .= "    <dc:rights>Copyright 2002-2003</dc:rights>\n";
+  $rss .= "    <dc:date>$rssdate</dc:date>\n";
+  $rss .= "    <admin:errorReportsTo rdf:resource=\"mailto:mij@opendarwin.org\" />\n";
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      $rss .= "    <item>\n";
+      $rss .= "      <title>$row->title</title>\n";
+      $rss .= "      <link>http://www.darwinports.org/archives.php?id=$row->id</link>\n";
+
+      $desc_query = "SELECT SUBSTRING_INDEX(news, ' ', 26) FROM headlines WHERE id=$row->id";
+      $desc_result = mysql_query($desc_query);
+      $desc_row = mysql_fetch_row($desc_result);
+
+      $description = $desc_row[0];
+
+      $rss .= "      <description><![CDATA[$description...</p>]]></description>\n";
+      $rss .= "      <guid isPermaLink=\"true\">http://www.darwinports.org/archives.php?id=$row->id</guid>\n";
+      $rss .= "      <content:encoded><![CDATA[$row->news]]></content:encoded>\n";
+      $rss .= "    </item>\n";
+    }
+  }
+  $rss .= "  </channel>\n";
+  $rss .= "</rss>\n";
+
+  $write = fwrite($open, $rss);
+  $close = fclose($open);
+}
+
+######################################################################
+
+# print the project news
+function print_headlines() {
+  global $connect;
+
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+      echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+      echo "$row->news\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available at this time.</p>\n";
+  }
+}
+
+######################################################################
+
+# display a single headline
+function print_headline() {
+  global $connect;
+
+  $id = $_GET['id'];
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines WHERE id='$id'";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $row = mysql_fetch_object($result);
+  if($row) {
+    echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+    echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+    echo "$row->news\n\n";
+  }
+  else {
+    echo "<h2 class=\"hdr\">Error!</h2>\n";
+    echo "<p>The requested headline could not be found.  It is either not in the database, or an error has occurred.</p>\n";
+  }
+}
+
+######################################################################
+
+# print the form used to add project news
+function print_add_headline() {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    echo "<p>Use the form below to add project news.</p>\n\n";
+    echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+    echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" /></p>\n";
+    echo "<p>News:</p>\n";
+    echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\"></textarea></p>\n";
+    echo "<p><input type=\"submit\" name=\"submit\" value=\"Submit\" /></p>\n";
+    echo "</form>\n\n";
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')";
+      $result = mysql_query($query) or die("Error: $query.");
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>The addition was successful.  You can either <a href=\"list.php\">list all existing headlines, <a href=\"add.php\">add another headline</a>, or <a href=\"/\">return to the DarwinPorts site</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>The following errors have occurred:</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print the form used to edit project news
+function print_edit_headline($id) {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    $id = $_GET['id'];
+    $query = "SELECT title, news FROM headlines WHERE id='$id'";
+    $result = mysql_query($query) or die("Error: $query.");
+    if(!$result) {
+      die("Error: $result.");
+    }
+    if(mysql_num_rows($result) > 0) {
+      $row = mysql_fetch_object($result);
+      echo "<p>Use the form below to edit project news.</p>\n\n";
+      echo "<form action=\"$PHP_SELF?id=$id\" method=\"post\">\n";
+      echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" value=\"$row->title\" /></p>\n";
+      echo "<p>News:</p>\n";
+      echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\">";
+      echo htmlentities($row->news);
+      echo "</textarea></p>\n";
+      echo "<p><input type=\"submit\" name=\"submit\" value=\"Edit\" /></p>\n";
+      echo "</form>\n\n";
+    }
+    else {
+      echo "<p>The requested news headline could not be found.  It is either not in the database, or an error has occurred.  Please try again.</p>\n\n";
+    }
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "UPDATE headlines SET title='$title', news='$news' WHERE id='$id'";
+      $result = mysql_query($query) or die("Error: $query.");
+
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>The update was successful.  You can either <a href=\"list.php\">list all existing headlines, <a href=\"add.php\">add another headline</a>, or <a href=\"/\">return to the DarwinPorts site</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>The following errors have occurred:</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines
+function print_all_headlines() {
+  global $connect;
+
+  echo "<p>Below is a list of all existing news headlines.  They can be viewed, edited, or deleted from this interface.  Alternatively, you can also <a href=\"add.php\">add news</a>.</p>\n\n";
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/it/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">edit</a></p>\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available.</p>\n\n";
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines without the admin foobage
+# (this is cheap and could be better)
+function print_all_headlines_nonadmin() {
+  global $connect;
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/it/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp</p>\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available.</p>\n\n";
+  }
+}
+
+?>
Index: trunk/www/localized/it/includes/header.inc
===================================================================
--- trunk/www/localized/it/includes/header.inc	(revision 28303)
+++ trunk/www/localized/it/includes/header.inc	(revision 28303)
@@ -0,0 +1,50 @@
+      <div id="nav">
+	<div id="logo">
+	  <a href="/it/" title="DarwinPorts"><img src="/img/dp.jpg"
+	    alt="DarwinPorts" /></a>
+	</div>
+	<div id="l">
+	  <ul>
+	  <?php
+	    $PHP_SELF = $_SERVER['PHP_SELF'];
+	    $home = '/it/index.php';
+	    $getdp = '/it/getdp/index.php';
+	    $ports = '/it/ports/index.php';
+	    $help = '/it/help/index.php';
+
+	    if($PHP_SELF == $home) {
+	      echo "<li class=\"selected\"><a href=\"/it/\" title=\"Home di DarwinPorts\">Home di DarwinPorts</a></li>\n";
+	    }
+	    else {
+	      echo "<li><a href=\"/it/\" title=\"Home di DarwinPorts\">Home di DarwinPorts</a></li>\n";
+	    }
+	    if($PHP_SELF == $getdp) {
+	      echo "<li class=\"selected\"><a href=\"/it/getdp/\" title=\"Ottenere DarwinPorts\">Ottenere DarwinPorts</a></li>\n";
+	    }
+	    else {
+	      echo "<li><a href=\"/it/getdp/\" title=\"Ottenere DarwinPorts\">Ottenere DarwinPorts</a></li>\n";
+	    }
+	  ?>
+	    <li class="last"><a href="http://www.opendarwin.org/bugzilla/" title="Bugzilla">Bugzilla</a></li>
+	  </ul>
+	</div>
+	<div id="r">
+	  <ul>
+	    <li><a href="/docs/" title="Documentazione">Documentazione</a></li>
+	    <?php
+	      if($PHP_SELF == $ports) {
+		echo "<li class=\"selected\"><a href=\"/it/ports/\" title=\"Ports Disponibili\">Ports Disponibili</a></li>\n";
+	      }
+	      else {
+		echo "<li><a href=\"/it/ports/\" title=\"Ports Disponibili\">Ports Disponibili</a></li>\n";
+	      }
+	      if($PHP_SELF == $help) {
+		echo "<li class=\"sellast\"><a href=\"/it/help/\" title=\"Richiedere Aiuto\">Richiedere Aiuto</a></li>\n";
+	      }
+	      else {
+		echo "<li class=\"last\"><a href=\"/it/help/\" title=\"Richiedere Aiuto\">Richiedere Aiuto</a></li>\n";
+	      }
+	    ?>
+	  </ul>
+	</div>
+      </div>
Index: trunk/www/localized/it/includes/lang.inc
===================================================================
--- trunk/www/localized/it/includes/lang.inc	(revision 28303)
+++ trunk/www/localized/it/includes/lang.inc	(revision 28303)
@@ -0,0 +1,3 @@
+      <p id="lang">[ <a href="/">English</a>, <a
+	href="/ja/">Japanese</a>, <a href="/fr/">Français</a>, <a
+	href="/es/">Español</a> ]</p>
Index: trunk/www/localized/it/index.php
===================================================================
--- trunk/www/localized/it/index.php	(revision 28303)
+++ trunk/www/localized/it/index.php	(revision 28303)
@@ -0,0 +1,69 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/it/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/it/includes/functions.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    print_header('Home di DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Introduzione a DarwinPorts</h2>
+<?
+		$result = mysql_query("SELECT count(*) from darwinports.portfiles");
+		if ($result) {
+			$row = mysql_fetch_array($result);
+			$count = $row[0];
+		} else {
+			$count = 0;
+		}
+?>
+      <p>L'obiettivo principale del progetto DarwinPorts è fornire un metodo
+	per semplificare l'installazione di vario software open-source
+	sui sistemi operativi della famiglia Darwin (
+	<a href="http://www.opendarwin.org/"> OpenDarwin</a>,
+	<a href="http://www.apple.com/macosx/">Mac OS X</a> e
+	<a href="http://developer.apple.com/darwin/projects/darwin/">
+	Darwin</a>).</p>
+
+      <p>Attualmente sono disponibili <?= $count; ?> 
+	<a href="/it/ports/">ports</a> funzionanti ed il numero è in costante
+	crescita. Inscrivendoti alla mailing list <a 
+	href="http://www.opendarwin.org/mailman/listinfo/cvs-darwinports-all">
+	cvs-darwinports-all</a> potrai tenere traccia dei ports recentemente
+	aggiunti.</p>
+
+      <p>Maggiori informazioni su come ottenere e su come installare
+	DarwinPorts sono presenti alla sezione <a href="/it/getdp/">Ottenere
+	DarwinPorts</a> di questo sito. Inoltre ti invitiamo a consultare la
+	<a href="/docs/">documentazione</a> (attualmente disponibile solo in
+	inglese). Per eventuali problemi puoi sempre <a href="/it/help/">
+	richiedere aiuto</a>. Il nuovo
+	<a href="http://wiki.opendarwin.org/index.php/DarwinPorts">DarwinPorts
+	Wiki</a> è un'ottima risorsa di aiuto per trovare risposta alle
+	domande a carattere generale e non solo, in particolar modo grazie alle
+	<a href="http://wiki.opendarwin.org/index.php/DarwinPorts:FAQ">FAQ</a>
+	in fase di sviluppo.</p>
+
+      <p>Ti ricordiamo che tutte le segnalazioni di bug, le richieste di nuove
+	funzionalità e di nuovi ports devono essere inviate tramite
+	<a href="http://www.opendarwin.org/bugzilla/">Bugzilla</a>. Leggi
+	il paragrafo <a href="docs/ch01s05.html#user_bugs">Bug reports</a>
+	della documentazione per facilitare e migliorare il processo di un
+	bug report.</p>
+
+      <div id="news">
+	<h2 class="hdr">Ultime notizie</h2>
+
+	<?php
+	  print_headlines();
+	?>
+
+		<p><a href="archives.php">Archivio delle notizie</a>.</p>
+	
+      </div>
+    </div>
+  </div>
+
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/it/ports.php
===================================================================
--- trunk/www/localized/it/ports.php	(revision 28303)
+++ trunk/www/localized/it/ports.php	(revision 28303)
@@ -0,0 +1,220 @@
+<?
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/it/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    include_once("$DOCUMENT_ROOT/includes/email.inc");
+    print_header('Ports Disponibili', 'utf-8');
+    $by = isset($_GET['by']) ? $_GET['by'] : '';
+    $substr = isset($_GET['substr']) ? $_GET['substr'] : '';
+?>
+	<center>
+	<h1>Portfiles di DarwinPorts</h1>
+	</center>
+
+	<p>
+	Questo form permette di cercare il software nel corrente indice dei
+	ports di DarwinPorts.<br />
+	<i>Indice aggiornato al: </i>
+	<?
+		$sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM darwinports.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
+		$result = mysql_query($sql);
+		if($result && $row = mysql_fetch_row($result)) {
+				echo date("d-M-Y H:i:s", $row[0]);
+		}
+	?>
+	</p>
+	
+	<form action="<?= $PHP_SELF; ?>">
+	<table>
+		<tr>
+			<th>Cerca per:</th>
+			<td>
+				<select name="by">
+				<option value="name"<? if ($by == "name") { echo " selected=\"selected\""; } ?>>Nome Software</option>
+				<option value="desc"<? if ($by == "desc") { echo " selected=\"selected\""; } ?>>Descrizione</option>
+				<option value="cat"<? if ($by == "cat") { echo " selected=\"selected\""; } ?>>Categoria</option>
+				<option value="maintainer"<? if ($by == "maintainer") { echo " selected=\"selected\""; } ?>>Maintainer</option>
+				</select>
+			</td>
+			<td><input type="text" name="substr" size="40" /></td>
+			<td><input type="submit" name="Search" value="Cerca" /></td>
+		</tr>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr>
+<?
+		$result = mysql_query("SELECT count(*) from darwinports.portfiles");
+		if ($result) {
+			$row = mysql_fetch_array($result);
+			$count = $row[0];
+		} else {
+			$count = 0;
+		}
+?>
+			<td colspan="4" align="left"><a href="<?= $PHP_SELF; ?>?by=all">Visualizza tutti i ports (<?= $count; ?>)</a></td>
+		</tr>
+		<?
+			if (!$by || (!$substr && $by != "all")) {
+		?>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr><th colspan="4" align="left">Visualizza per Categoria:</th></tr>
+		<?
+				$query = "SELECT DISTINCT category FROM darwinports.categories ORDER BY category";
+				$result = mysql_query($query);
+				if($result) {
+					while( $row = mysql_fetch_assoc($result) ) {
+		?>
+		<tr><td colspan="4"><a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $row['category']; ?>"><?= $row['category']; ?></a></td></tr>
+		<?
+					}
+				}
+			}
+		?>
+	</table>
+	</form>
+
+<?
+	if ($by && ($substr || $by == "all")) {
+		$fields = "name, path, version, description";
+		$query = "1";
+		$tables = "darwinports.portfiles p";
+		if ($by == "name") {
+			$query = $query . " AND p.name LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "library") {
+			$query = $query . " AND p.name='" . addslashes($substr) . "'";
+		}
+		if ($by == "desc") {
+			$query = $query . " AND p.description LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "cat") {
+			$tables = $tables . ", darwinports.categories c";
+			$query = $query . " AND c.portfile=p.name AND c.category='" . addslashes($substr) . "'";
+		}
+		if ($by == "variant") {
+			$tables = $tables . ", darwinports.variants v";
+			$query = $query . " AND v.portfile=p.name AND v.variant='" . addslashes($substr) . "'";
+		}
+		if ($by == "platform") {
+			$tables = $tables . ", darwinports.platforms pl";
+			$query = $query . " AND pl.portfile=p.name AND pl.platform ='" . addslashes($substr) . "'";
+		}
+		if ($by == "maintainer") {
+			$tables = $tables . ", darwinports.maintainers m";
+			$query = $query . " AND m.portfile=p.name AND m.maintainer LIKE '%" . addslashes($substr) . "%'";
+		}
+		$query = "SELECT DISTINCT $fields FROM $tables WHERE $query ORDER BY name";
+		$result = mysql_query($query);
+		if($result) {
+?>
+	<p>
+	<i><?= mysql_num_rows($result); ?> Portfile<? if (mysql_num_rows($result) != 1) { echo "s"; } ?> </i>
+	</p>
+	<dl>
+<?		
+			while( $row = mysql_fetch_assoc($result) ) {
+?>
+	<dt><b><a href="http://www.darwinports.org/darwinports/dports/<?= $row['path']; ?>/Portfile"><?= $row['name']; ?></a></b> <?= $row['version']; ?></dt>
+	<dd>
+	<?= $row['description']; ?><br />
+	<?
+// MAINTAINERS
+				$nquery = "SELECT maintainer FROM darwinports.maintainers WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, maintainer";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<i>Maintainer:</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						if ($primary) { echo "<b>"; }
+						$addr = obfuscate_email($nrow[0]);
+						print $addr;
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// CATEGORIES
+				$nquery = "SELECT category FROM darwinports.categories WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, category";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<br />
+	<i>Categorie:</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_assoc($nresult) ) {
+						if ($primary) { echo "<b>"; }
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $nrow['category']; ?>"><?= $nrow['category']; ?></a>
+					<?
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// PLATFORMS
+				$nquery = "SELECT platform FROM darwinports.platforms WHERE portfile='" . $row['name'] . "' ORDER BY platform";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Sistemi:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$platform = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=platform&substr=<?= $platform; ?>"><?= $platform; ?></a>
+					<?
+					}
+				}
+
+// DEPENDENCIES
+				$nquery = "SELECT library FROM darwinports.dependencies WHERE portfile='" . $row['name'] . "' ORDER BY library";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Dipendenze:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						// lib:libpng.3:libpng -> libpng
+						$library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
+					<?
+					}
+				}
+/*
+// VARIANTS
+				$nquery = "SELECT variant FROM darwinports.variants WHERE portfile='" . $row['name'] . "' ORDER BY variant";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Variants:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$variant = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=variant&substr=<?= $variant; ?>"><?= $variant; ?></a>
+					<?
+					}
+				}
+*/
+	?>
+	<br />
+	</dd>
+	<br />
+<?	
+			} 
+		} else {
+			echo "C'e' stato un errore. (501)";
+		}
+	}
+?>
+	</dl>
+	</div>
+<?php
+  print_footer();
+?>
Index: trunk/www/localized/ru/emit_portfile.php
===================================================================
--- trunk/www/localized/ru/emit_portfile.php	(revision 28303)
+++ trunk/www/localized/ru/emit_portfile.php	(revision 28303)
@@ -0,0 +1,75 @@
+<?php
+
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+include_once("$DOCUMENT_ROOT/includes/email.inc");
+
+$portname = basename(dirname($_SERVER['PATH_INFO']));
+?>
+
+<html>
+	<head>
+		<title><?=$portname?> Portfile</title>
+	</head>
+	<body>
+
+<?php
+
+//	Read the file as an array of lines
+$target	= "${DOCUMENT_ROOT}/..${_SERVER['PATH_INFO']}";
+$lines = @file($target);
+if ($lines)
+{
+	print "<pre>";
+	foreach ($lines as $line)
+	{
+		$out = $line;
+
+		//	Replace tabs with spaces to maintain proper spacing
+		$tabs = 4;
+		$pos = 0;
+		$out = '';
+		for ($i = 0; $i < strlen($line); ++$i)
+		{
+			$char = $line{$i};
+			switch ($char)
+			{
+			case "\t":
+				$cnt = $tabs - ($pos % $tabs);
+				$out .= str_repeat(" ", $cnt);
+				$pos += $cnt;
+				break;
+			default:
+				$out .= $char;
+				++$pos;
+				break;
+			}
+		}
+
+		//	Clean up any html-unfriendly characters
+		$out = htmlspecialchars($out);
+
+		//	Special handling for email addresses
+		if (preg_match('/\s*(maintainers\s+)(.*)/i', $out, $matches))
+		{
+			$func = $matches[1];
+			$params = $matches[2];
+			
+			$addresses = preg_split('/\s+/', $params);
+			
+			foreach ($addresses as $addr)
+				$emails[] = obfuscate_email($addr);
+			
+			$out = $func.(count($emails) ? join(' ', $emails) : '')."\n";
+		}
+		
+		//	Output line
+		print $out;
+	}
+	print "</pre>";
+}
+else
+	print "Couldn't open file $target";
+?>
+
+	</body>
+</html>
Index: trunk/www/localized/ru/getdp/index.php
===================================================================
--- trunk/www/localized/ru/getdp/index.php	(revision 28303)
+++ trunk/www/localized/ru/getdp/index.php	(revision 28303)
@@ -0,0 +1,60 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/ru/includes/common.inc");
+    print_header('Get DarwinPorts', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Получить DarwinPorts</h2>
+
+      <p>Для того, что-бы получить дистрибутив DarwinPorts, сначала необходимо
+      сделать &ldquo;checked out&rdquo; из CVS репозитария проекта OpenDarwin.</p>
+
+      <p>Пожалуйста, имейте ввиду, что для получения и установки DarwinPorts на
+      систему Mac OS X, у Вас должны быть установлены Mac OS X Developer Tools (
+      для систем, версий 10.2.x), или XCode (для систем 10.3.x).</p>
+
+	  <p>Если Вы желаете установить и использовать DarwinPorts на системах,
+	  отличных от Mac OS X, пожалуйста установите следующее необходимое
+	  програмное обеспечение (мы подразумеваем, что базовое ПО, такое как gcc
+	  уже имеется):</p>
+	  <ul>
+	  	<li>TCL (8.3 или 8.4)</li>
+		<li>curl</li>
+		<li>OpenSSL или libmd</li>
+	  </ul>
+
+      <p>Используйте следующие команды, что-бы получить файлы проекта из CVS репозитария:</p>
+
+<pre>
+cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
+cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -P darwinports
+</pre>
+
+      <p>Когда сервер спросит у Вас пароль - просто нажмите <kbd>return</kbd> &mdash; пароль не используется.</p>
+
+      <p>Если Вы не хотите использовать CVS, Вы можете скачать обновляемый каждую ночь
+      <a href="http://darwinports.opendarwin.org/darwinports-nightly-cvs-snapshot.tar.gz">CVS-snapshot</a>.
+      И, получив его один раз, Вы можете получать изменения из CVS с помощью 
+      специальных команд.</p>
+
+      <p>Если Вы желаете лишь посмотреть данные из CVS репозитария - пожалуйста,
+      воспользуйтесь интерфейсом <a href="http://www.opendarwin.org/cgi-bin/cvsweb.cgi/proj/darwinports/">CVSweb</a>.</p>
+
+      <h5 class="subhdr">Установка</h5>
+
+      <p>После того, как Вы получили DarwinPorts, необходимо дополнительно
+      проделать несколько операций, прежде чем Вы сможете устанавливать порты.</p>
+	
+      <p>Инструкцию по установке пожалуйста смотрите в файле <tt>README_ru</tt>
+      в той директории, где Вы делали CVS checkout. Так же есть 
+      <a href="http://darwinports.opendarwin.org/docs/ch01s03.html">глава</a>
+      в <a href="http://darwinports.opendarwin.org/docs/">Описании DarwinPorts</a> в
+      которой описаны установка и правила по использованию системы DarwinPorts. (возможно на англ. языке)</p> 
+
+      <p><a href="/ru/help/">Помощь</a> так же доступна в случае необходимости.</p>
+    </div>
+  </div>
+
+<?php print_footer(); ?>
+
Index: trunk/www/localized/ru/help/index.php
===================================================================
--- trunk/www/localized/ru/help/index.php	(revision 28303)
+++ trunk/www/localized/ru/help/index.php	(revision 28303)
@@ -0,0 +1,63 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/ru/includes/common.inc");
+    print_header('Get Help', 'utf-8');
+  ?>
+
+  <div id="content">
+  	<h2 class="hdr">Получение помощи</h2>
+
+	<p>Если в процессе использования DarwinPorts у Вас возникли проблемы,
+	которые Вы не можете решить самостоятельно - пожалуйста обратитесь к следующим 
+	ресурсам.</p>
+	  
+	<h5 class="subhdr">Документация</h5>
+
+	<p>В <a href="http://darwinports.opendarwin.org/docs">Описании DarwinPorts</a>
+	есть раздел для пользователей,
+	<a href="http://darwinports.opendarwin.org/docs/pt01.html">Часть 1: использование DarwinPorts</a>.</p>
+
+	<p>Часто задаваемые вопросы по DarwinPorts обновляются регулярно.</p>
+
+	<p>Вся документация проекта находится в состоянии постоянной разработки
+	и дополнения. Если Вы обнаружили ошибку, неточность или имеете вопросы
+	касаемые какой либо ее части - пожалуйста дайте нам знать. Это очень
+	важно для нас.</p>
+	
+	<h5 class="subhdr">Списки рассылки (на англ. языке)</h5>
+
+	<p>Список рассылки <a href="http://www.opendarwin.org/mailman/listinfo/darwinports">darwinports mailing list</a>
+	открыт для всех желающих (но только на англ. языке!) и является наилучшим
+	местом для Ваших вопросов о проекте DarwinPorts. Все обсуждения, касаемые
+	проекта DarwinPorts, происходят здесь же.  Пожалуйста, имейте ввиду, что
+	в связи с проблемой спама (spam) сообщения от незарегистрированных пользователей
+	в список рассылки DarwinPorts нуждаются в проверке. Наилучшее решение в данном
+	случае - подписаться в список рассылки.</p>
+
+	<p>Вы можете просмотреть <a href="http://www.opendarwin.org/pipermail/darwinports/">архивы списка рассылки darwinports</a>
+	перед тем как задать вопрос, хотя, конечно, это не обязательное требование.
+	Мы пытаемся оказать максимально возможную помощь, однако если Ваш вопрос
+	из разряда часто задаваемых, ответы могут быть очень краткими.</p>
+
+	<p>Когда Вы посылаете вопрос в список рассылки, пожалуйста указывайте
+	всю информацию, которая может иметь отношение к Вашей проблеме.
+	Такую, как например версия операционной системы (например OS X 10.3.2),
+	путь куда устанавливается програмное обеспечение (например /usr/local)
+	и все ошибки, которые выдает DarwinPorts. Это очень сильно облегчит нам
+	задачу при оказании Вам помощи. Избыток информации всегда лучше, чем ее недостаток.</p>
+
+	<h5 class="subhdr">IRC</h5>
+
+	<p>Дополнительно для обсуждения в режиме on-line существует канал #darwinports в сети
+	<a href="http://freenode.net/">freenode IRC network</a>.</p>
+
+	<p>Однако, пожалуйста имейте ввиду, что никто не обязан Вам помочь или
+	ответить на Ваш вопрос если Вы соединились с каналом IRC. Не обращайтесь
+	к кому-либо персонально, просто задайте Ваш вопрос в списке рассылки
+	<a href="http://www.opendarwin.org/mailman/listinfo/darwinports">darwinports</a>.</p>
+
+	</div>
+</div>
+
+<?php print_footer(); ?>
+
Index: trunk/www/localized/ru/includes/common.inc
===================================================================
--- trunk/www/localized/ru/includes/common.inc	(revision 28303)
+++ trunk/www/localized/ru/includes/common.inc	(revision 28303)
@@ -0,0 +1,46 @@
+<?php
+
+# $Id$
+# $Trans-Id: common.inc,v 1.0 2004/09/14 00:47:13 jc Exp $
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# print the page header
+function print_header($title, $encoding) {
+  global $DOCUMENT_ROOT;
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
+  <head>
+    <title><?php echo("$title"); ?></title>
+    <meta http-equiv="Content-type" content="text/html; charset=<?php echo("$encoding"); ?>" />
+    <meta name="author" content="Jim Mock (mij@opendarwin.org)" />
+    <meta name="copyright" content="2003, OpenDarwin" />
+    <meta name="robots" content="all" />
+    <link rel="stylesheet" type="text/css" href="/dp.css" />
+    <link rel="alternate" type="application/rss+xml" href="http://darwinports.opendarwin.org/dp.xml" />
+  </head>
+
+  <body>
+
+  <div id="main">
+
+<?php
+  include("$DOCUMENT_ROOT/ru/includes/header.inc");
+}
+
+###################################################################### 
+
+# print the page footer
+function print_footer() {
+  global $DOCUMENT_ROOT;
+
+  include("$DOCUMENT_ROOT/ru/includes/footer.inc");
+
+  echo "  </body>\n";
+  echo "</html>\n";
+}
+?>
Index: trunk/www/localized/ru/includes/db.inc
===================================================================
--- trunk/www/localized/ru/includes/db.inc	(revision 28303)
+++ trunk/www/localized/ru/includes/db.inc	(revision 28303)
@@ -0,0 +1,6 @@
+<?php
+  $host = 'localhost';
+  $user = 'dp_www';
+  $pass = 'dp_secret';
+  $db = 'dp_www';
+?>
Index: trunk/www/localized/ru/includes/footer.inc
===================================================================
--- trunk/www/localized/ru/includes/footer.inc	(revision 28303)
+++ trunk/www/localized/ru/includes/footer.inc	(revision 28303)
@@ -0,0 +1,4 @@
+      <div id="footer">
+		<span class="languages"><a href="/">English</a>, <a href="/fr/">Français</a>, <a href="/es/">Español</a>, Russian, <a href="/it/">Italiano</a></span>
+      	Copyright © 2002-<? print date("Y"); ?>, <a href="http://www.opendarwin.org/ru/">OpenDarwin</a>.  Все права сохраняются. | <a href="http://darwinports.opendarwin.org/dp_news.xml">RSS feed</a>
+      </div>
Index: trunk/www/localized/ru/includes/functions.inc
===================================================================
--- trunk/www/localized/ru/includes/functions.inc	(revision 28303)
+++ trunk/www/localized/ru/includes/functions.inc	(revision 28303)
@@ -0,0 +1,256 @@
+<?php
+
+# $Id$
+# Copyright (c) 2003, OpenDarwin
+
+######################################################################
+
+# variables and includes
+$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+$PHP_SELF = $_SERVER['PHP_SELF'];
+include_once("$DOCUMENT_ROOT/includes/db.inc");
+$connect = mysql_pconnect($host, $user, $pass) or die("Can't connect to db!");
+mysql_select_db($db);
+
+######################################################################
+
+# create an RSS feed of the project news
+function create_rss() {
+  global $DOCUMENT_ROOT, $connect;
+
+  $query = "SELECT id, title, news FROM headlines ORDER BY id DESC LIMIT 10";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $open = fopen("$DOCUMENT_ROOT/dp_news.xml", "w+");
+  $rssdate = substr_replace(date("Y-m-d\TH:i:sO", time()),':', -2, 0);
+
+  $rss = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+  $rss .= "<rss version=\"2.0\"\n";
+  $rss .= "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
+  $rss .= "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
+  $rss .= "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
+  $rss .= "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
+  $rss .= "  xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n\n";
+
+  $rss .= "  <channel>\n";
+  $rss .= "    <title>DarwinPorts Project News</title>\n";
+  $rss .= "    <link>http://darwinports.opendarwin.org/</link>\n";
+  $rss .= "    <description>DarwinPorts Project News</description>\n";
+  $rss .= "    <dc:language>en-us</dc:language>\n";
+  $rss .= "    <dc:creator>Jim Mock (mij@opendarwin.org)</dc:creator>\n";
+  $rss .= "    <dc:rights>Copyright 2002-2003</dc:rights>\n";
+  $rss .= "    <dc:date>$rssdate</dc:date>\n";
+  $rss .= "    <admin:errorReportsTo rdf:resource=\"mailto:mij@opendarwin.org\" />\n";
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      $rss .= "    <item>\n";
+      $rss .= "      <title>$row->title</title>\n";
+      $rss .= "      <link>http://darwinports.opendarwin.org/archives/$row->id.php</link>\n";
+
+      $desc_query = "SELECT SUBSTRING_INDEX(news, ' ', 26) FROM headlines WHERE id=$row->id";
+      $desc_result = mysql_query($desc_query);
+      $desc_row = mysql_fetch_row($desc_result);
+
+      $description = $desc_row[0];
+
+      $rss .= "      <description><![CDATA[$description...</p>]]></description>\n";
+      $rss .= "      <guid isPermaLink=\"true\">http://darwinports.opendarwin.org/archives/$row->id.php</guid>\n";
+      $rss .= "      <content:encoded><![CDATA[$row->news]]></content:encoded>\n";
+      $rss .= "    </item>\n";
+    }
+  }
+  $rss .= "  </channel>\n";
+  $rss .= "</rss>\n";
+
+  $write = fwrite($open, $rss);
+  $close = fclose($open);
+}
+
+######################################################################
+
+# print the project news
+function print_headlines() {
+  global $connect;
+
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines ORDER BY id DESC LIMIT 5";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+      echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+      echo "$row->news\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available at this time.</p>\n";
+  }
+}
+
+######################################################################
+
+# display a single headline
+function print_headline() {
+  global $connect;
+
+  $id = $_GET['id'];
+  $query = "SELECT id, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp, title, news FROM headlines WHERE id='$id'";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+
+  $row = mysql_fetch_object($result);
+  if($row) {
+    echo "<h5 class=\"subhdr\">$row->title</h5>\n";
+    echo "<h6 class=\"date\">$row->f_timestamp</h6>\n";
+    echo "$row->news\n\n";
+  }
+  else {
+    echo "<h2 class=\"hdr\">Error!</h2>\n";
+    echo "<p>The requested headline could not be found.  It is either not in the database, or an error has occurred.</p>\n";
+  }
+}
+
+######################################################################
+
+# print the form used to add project news
+function print_add_headline() {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    echo "<p>Use the form below to add project news.</p>\n\n";
+    echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+    echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" /></p>\n";
+    echo "<p>News:</p>\n";
+    echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\"></textarea></p>\n";
+    echo "<p><input type=\"submit\" name=\"submit\" value=\"Submit\" /></p>\n";
+    echo "</form>\n\n";
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "INSERT INTO headlines (timestamp, title, news) VALUES (NOW(), '$title', '$news')";
+      $result = mysql_query($query) or die("Error: $query.");
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>The addition was successful.  You can either <a href=\"list.php\">list all existing headlines, <a href=\"add.php\">add another headline</a>, or <a href=\"/\">return to the DarwinPorts site</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>The following errors have occurred:</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print the form used to edit project news
+function print_edit_headline($id) {
+  global $PHP_SELF, $connect;
+
+  if(!$_POST['submit']) {
+    $id = $_GET['id'];
+    $query = "SELECT title, news FROM headlines WHERE id='$id'";
+    $result = mysql_query($query) or die("Error: $query.");
+    if(!$result) {
+      die("Error: $result.");
+    }
+    if(mysql_num_rows($result) > 0) {
+      $row = mysql_fetch_object($result);
+      echo "<p>Use the form below to edit project news.</p>\n\n";
+      echo "<form action=\"$PHP_SELF?id=$id\" method=\"post\">\n";
+      echo "<p>Title:&nbsp;&nbsp;<input type=\"text\" name=\"title\" size=\"40\" value=\"$row->title\" /></p>\n";
+      echo "<p>News:</p>\n";
+      echo "<p><textarea name=\"news\" cols=\"70\" rows=\"20\">";
+      echo htmlentities($row->news);
+      echo "</textarea></p>\n";
+      echo "<p><input type=\"submit\" name=\"submit\" value=\"Edit\" /></p>\n";
+      echo "</form>\n\n";
+    }
+    else {
+      echo "<p>The requested news headline could not be found.  It is either not in the database, or an error has occurred.  Please try again.</p>\n\n";
+    }
+  }
+  else {
+    $title = $_POST['title'];
+    $news = $_POST['news'];
+    $errorList = array();
+    $count = 0;
+    if(!$title) {
+      $errorList[$count] = 'Invalid entry: Title';
+      $count++;
+    }
+    if(!$news) {
+      $errorList[$count] = 'Invalid entry: News';
+      $count++;
+    }
+    if(sizeof($errorList) == 0) {
+      $query = "UPDATE headlines SET title='$title', news='$news' WHERE id='$id'";
+      $result = mysql_query($query) or die("Error: $query.");
+
+      if(!$result) {
+	die("Error: $result.");
+      }
+      echo "<p>The update was successful.  You can either <a href=\"list.php\">list all existing headlines, <a href=\"add.php\">add another headline</a>, or <a href=\"/\">return to the DarwinPorts site</a>.</p>\n\n";
+      create_rss();
+    }
+    else {
+      echo "<p>The following errors have occurred:</p>\n\n";
+      echo "<ul>\n";
+      for($x=0; $x<sizeof($errorList); $x++) {
+	echo "<li>$errorList[$x]</li>\n";
+      }
+      echo "</ul>\n\n";
+    }
+  }
+}
+
+######################################################################
+
+# print a list of all existing headlines
+function print_all_headlines() {
+  global $connect;
+
+  echo "<p>Below is a list of all existing news headlines.  They can be viewed, edited, or deleted from this interface.  Alternatively, you can also <a href=\"add.php\">add news</a>.</p>\n\n";
+
+  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
+  $result = mysql_query($query) or die("Error: $query.");
+  if(!$result) {
+    die("Error: $result.");
+  }
+  if(mysql_num_rows($result) > 0) {
+    while($row = mysql_fetch_object($result)) {
+      echo "<p><a href=\"/archives/$row->id.php\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">edit</a></p>\n\n";
+    }
+  }
+  else {
+    echo "<p>No headlines are available.</p>\n\n";
+  }
+}
+
+?>
Index: trunk/www/localized/ru/includes/header.inc
===================================================================
--- trunk/www/localized/ru/includes/header.inc	(revision 28303)
+++ trunk/www/localized/ru/includes/header.inc	(revision 28303)
@@ -0,0 +1,50 @@
+      <div id="nav">
+	<div id="logo">
+	  <a href="/ru/" title="DarwinPorts"><img src="/img/dp.jpg" alt="DarwinPorts" /></a>
+	</div>
+	<div id="l">
+	  <ul>
+	  <?php
+	    $PHP_SELF = $_SERVER['PHP_SELF'];
+	    $home = '/ru/index.php';
+	    $getdp = '/ru/getdp/index.php';
+	    $ports = '/ru/ports/index.php';
+	    $help = '/ru/help/index.php';
+
+	    if($PHP_SELF == $home) {
+	      echo "<li class=\"selected\"><a href=\"/ru/\" title=\"В начало\">В начало</a></li>\n";
+	    }
+	    else {
+	      echo "<li><a href=\"/ru/\" title=\"В начало\">В начало</a></li>\n";
+	    }
+	    if($PHP_SELF == $getdp) {
+	      echo "<li class=\"selected\"><a href=\"/ru/getdp/\" title=\"Получить DarwinPorts\">Получить DarwinPorts</a></li>\n";
+	    }
+	    else {
+	      echo "<li><a href=\"/ru/getdp/\" title=\"Получить DarwinPorts\">Получить DarwinPorts</a></li>\n";
+	    }
+	  ?>
+	    <li class="last"><a href="http://www.opendarwin.org/bugzilla/" title="Bugzilla">Bugzilla</a></li>
+	  </ul>
+	</div>
+	<div id="r">
+	  <ul>
+	    <li><a href="/docs/" title="Документация">Документация</a></li>
+	    <?php
+	      if($PHP_SELF == $ports) {
+		echo "<li class=\"selected\"><a href=\"/ru/ports/\" title=\"База портов\">База портов</a></li>\n";
+	      }
+	      else {
+		echo "<li><a href=\"/ru/ports/\" title=\"База портов\">База портов</a></li>\n";
+	      }
+	      if($PHP_SELF == $help) {
+		echo "<li class=\"sellast\"><a href=\"/ru/help/\" title=\"Помощь\">Помощь</a></li>\n";
+	      }
+	      else {
+		echo "<li class=\"last\"><a href=\"/ru/help/\" title=\"Помощь\">Помощь</a></li>\n";
+	      }
+	    ?>
+	  </ul>
+	</div>
+      </div>
+
Index: trunk/www/localized/ru/includes/lang.inc
===================================================================
--- trunk/www/localized/ru/includes/lang.inc	(revision 28303)
+++ trunk/www/localized/ru/includes/lang.inc	(revision 28303)
@@ -0,0 +1,8 @@
+<p id="lang">[ 
+  <a href="/">English</a>,
+  <a href="/ja/">Japanese</a>,
+  <a href="/fr/">Fran&ccedil;ais</a>,
+  <a href="/es/">Espa&ntilde;ol</a>,
+  <a href="/ru/">Russian</a>
+ ]</p>
+
Index: trunk/www/localized/ru/index.php
===================================================================
--- trunk/www/localized/ru/index.php	(revision 28303)
+++ trunk/www/localized/ru/index.php	(revision 28303)
@@ -0,0 +1,48 @@
+  <?php
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/ru/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/ru/includes/functions.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    print_header('DarwinPorts Home', 'utf-8');
+  ?>
+
+    <div id="content">
+      <h2 class="hdr">Введение в проект DarwinPorts</h2>
+<?
+                $result = mysql_query("SELECT count(*) from darwinports.portfiles");
+                if ($result) {
+                        $row = mysql_fetch_array($result);
+                        $count = $row[0];
+                } else {
+                        $count = 0;
+                }
+?>
+
+      <p>Главная задача проекта DarwinPorts - предоставить простой механизм
+      установки различного свободно-распостраняемого програмного обеспечения
+      в системах Darwin, Mac OS X, FreeBSD, или Linux.</p>
+
+      <p>На данный момент доступны несколько сотен законченных и готовых для
+      использования <a href="/ru/ports/">портов</a>, которые постоянно добавляются.
+      Вы можете отслеживать добавляемые порты, подписавшись на список рассылки
+      <a href="http://www.opendarwin.org/mailman/listinfo/cvs-darwinports-all">cvs-darwinports-all</a></p>
+	
+      <p>Для дополнительной информации о получении и установки DarwinPorts,
+      пожалуйста обратитесь к разделу <a href="/ru/getdp/">получить DarwinPorts</a>.
+      Так же, пожалуйста, обратите внимание на <a href="/docs/">документацию</a>.
+      Если у Вас возникли вопросы или Вы нуждаетесь в помощи посетите раздел 
+      <a href="/ru/help/">получить помощь</a>.</p>
+
+      <p>Сообщения об ошибках, предложения о новом функционале, а так же новые
+      порты должны посылаться через интерфейс <a href="http://www.opendarwin.org/bugzilla/">Bugzilla</a>.</p>
+
+      <div id="news">
+	<h2 class="hdr">Новости проекта</h2>
+
+	<?php print_headlines(); ?>
+      </div>
+    </div>
+  </div>
+
+<?php print_footer(); ?>
+
Index: trunk/www/localized/ru/ports.php
===================================================================
--- trunk/www/localized/ru/ports.php	(revision 28303)
+++ trunk/www/localized/ru/ports.php	(revision 28303)
@@ -0,0 +1,218 @@
+<?
+    $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
+    include_once("$DOCUMENT_ROOT/ru/includes/common.inc");
+    include_once("$DOCUMENT_ROOT/includes/db.inc");
+    include_once("$DOCUMENT_ROOT/includes/email.inc");
+    print_header('Текущая база портов', 'utf-8');
+    $by = isset($_GET['by']) ? $_GET['by'] : '';
+    $substr = isset($_GET['substr']) ? $_GET['substr'] : '';
+?>
+	<center>
+	<h1>Текущая база портов DarwinPorts</h1>
+	</center>
+
+	<p>С помощью этой формы Вы можете осуществлять поиск по текущей базе данных проекта DarwinPorts<br />
+	<i>Последний раз данные обновлены: </i>
+	<?
+		$sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM darwinports.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
+		$result = mysql_query($sql);
+		if($result && $row = mysql_fetch_row($result)) {
+				echo date("d-M-Y H:i:s", $row[0]);
+		}
+	?>
+	</p>
+	
+	<form action="<?= $PHP_SELF; ?>">
+	<table>
+		<tr>
+			<th>Искать по:</th>
+			<td>
+				<select name="by">
+				<option value="name"<? if ($by == "name") { echo " selected=\"selected\""; } ?>>Названию</option>
+				<option value="desc"<? if ($by == "desc") { echo " selected=\"selected\""; } ?>>Описанию</option>
+				<option value="cat"<? if ($by == "cat") { echo " selected=\"selected\""; } ?>>Категориям</option>
+				<option value="maintainer"<? if ($by == "maintainer") { echo " selected=\"selected\""; } ?>>Разработчику</option>
+				</select>
+			</td>
+			<td><input type="text" name="substr" size="40" /></td>
+			<td><input type="submit" name="Search" value="Поиск" /></td>
+		</tr>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr>
+<?
+		$result = mysql_query("SELECT count(*) from darwinports.portfiles");
+		if ($result) {
+			$row = mysql_fetch_array($result);
+			$count = $row[0];
+		} else {
+			$count = 0;
+		}
+?>
+			<td colspan="4" align="left"><a href="<?= $PHP_SELF; ?>?by=all">Посмотреть все названия (<?= $count; ?>)</a></td>
+		</tr>
+		<?
+			if (!$by || (!$substr && $by != "all")) {
+		?>
+		<tr><td colspan="4"><hr size="1" noshade="noshade" /></td></tr>
+		<tr><th colspan="4" align="left">Просмотр по категориям:</th></tr>
+		<?
+				$query = "SELECT DISTINCT category FROM darwinports.categories ORDER BY category";
+				$result = mysql_query($query);
+				if($result) {
+					while( $row = mysql_fetch_assoc($result) ) {
+		?>
+		<tr><td colspan="4"><a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $row['category']; ?>"><?= $row['category']; ?></a></td></tr>
+		<?
+					}
+				}
+			}
+		?>
+	</table>
+	</form>
+
+<?
+	if ($by && ($substr || $by == "all")) {
+		$fields = "name, path, version, description";
+		$query = "1";
+		$tables = "darwinports.portfiles p";
+		if ($by == "name") {
+			$query = $query . " AND p.name LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "library") {
+			$query = $query . " AND p.name='" . addslashes($substr) . "'";
+		}
+		if ($by == "desc") {
+			$query = $query . " AND p.description LIKE '%" . addslashes($substr) . "%'";
+		}
+		if ($by == "cat") {
+			$tables = $tables . ", darwinports.categories c";
+			$query = $query . " AND c.portfile=p.name AND c.category='" . addslashes($substr) . "'";
+		}
+		if ($by == "variant") {
+			$tables = $tables . ", darwinports.variants v";
+			$query = $query . " AND v.portfile=p.name AND v.variant='" . addslashes($substr) . "'";
+		}
+		if ($by == "platform") {
+			$tables = $tables . ", darwinports.platforms pl";
+			$query = $query . " AND pl.portfile=p.name AND pl.platform ='" . addslashes($substr) . "'";
+		}
+		if ($by == "maintainer") {
+			$tables = $tables . ", darwinports.maintainers m";
+			$query = $query . " AND m.portfile=p.name AND m.maintainer LIKE '%" . addslashes($substr) . "%'";
+		}
+		$query = "SELECT DISTINCT $fields FROM $tables WHERE $query ORDER BY name";
+		$result = mysql_query($query);
+		if($result) {
+?>
+	<p>
+	<i><?= mysql_num_rows($result); ?> Portfile<? if (mysql_num_rows($result) != 1) { echo "s"; } ?> Selected</i>
+	</p>
+	<dl>
+<?		
+			while( $row = mysql_fetch_assoc($result) ) {
+?>
+	<dt><b><a href="http://www.darwinports.org/darwinports/dports/<?= $row['path']; ?>/Portfile"><?= $row['name']; ?></a></b> <?= $row['version']; ?></dt>
+	<dd>
+	<?= $row['description']; ?><br />
+	<?
+// MAINTAINERS
+				$nquery = "SELECT maintainer FROM darwinports.maintainers WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, maintainer";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<i>Разработчик:</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						if ($primary) { echo "<b>"; }
+						$addr = obfuscate_email($nrow[0]);
+						print $addr;
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// CATEGORIES
+				$nquery = "SELECT category FROM darwinports.categories WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, category";
+				$nresult = mysql_query($nquery);
+				if ($nresult) {
+?>
+	<br />
+	<i>Категории:</i>
+<?
+					$primary = 1;
+					while ( $nrow = mysql_fetch_assoc($nresult) ) {
+						if ($primary) { echo "<b>"; }
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=cat&substr=<?= $nrow['category']; ?>"><?= $nrow['category']; ?></a>
+					<?
+						if ($primary) { echo "</b>"; }
+						$primary = 0;
+					}
+				}
+
+// PLATFORMS
+				$nquery = "SELECT platform FROM darwinports.platforms WHERE portfile='" . $row['name'] . "' ORDER BY platform";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Платформы:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$platform = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=platform&substr=<?= $platform; ?>"><?= $platform; ?></a>
+					<?
+					}
+				}
+
+// DEPENDENCIES
+				$nquery = "SELECT library FROM darwinports.dependencies WHERE portfile='" . $row['name'] . "' ORDER BY library";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Зависимости:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						// lib:libpng.3:libpng -> libpng
+						$library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
+					<?
+					}
+				}
+/*
+// VARIANTS
+				$nquery = "SELECT variant FROM darwinports.variants WHERE portfile='" . $row['name'] . "' ORDER BY variant";
+				$nresult = mysql_query($nquery);
+				if ($nresult && mysql_num_rows($nresult) > 0) {
+?>
+	<br />
+	<i>Варианты:</i>
+<?
+					while ( $nrow = mysql_fetch_array($nresult) ) {
+						$variant = $nrow[0];
+					?>
+						<a href="<?= $PHP_SELF; ?>?by=variant&substr=<?= $variant; ?>"><?= $variant; ?></a>
+					<?
+					}
+				}
+*/
+	?>
+	<br />
+	</dd>
+	<br />
+<?	
+			} 
+		} else {
+			echo "В ходе работы произошла ошибка. (501)";
+		}
+	}
+?>
+	</dl>
+	</div>
+<?php
+  print_footer();
+?>
Index: trunk/www/mp.css
===================================================================
--- trunk/www/mp.css	(revision 28303)
+++ trunk/www/mp.css	(revision 28303)
@@ -0,0 +1,234 @@
+/*
+  $Id$
+*/
+
+* {
+	font-family: Georgia, "New Century Schoolbook", "Times New Roman", Times, serif;
+}
+
+body {
+	background: #e3f1c7;
+	width: 720px;
+	margin: 15px auto 15px auto;
+	font-size: 12px;
+}
+
+a:link {
+	color: #669;
+	text-decoration: none;
+	font-weight: bold;
+	border-bottom: 1px dotted #c63;
+}
+
+a:visited {
+	color: #888;
+	text-decoration: none;
+	font-weight: bold;
+	border-bottom: 1px dotted #669;
+}
+
+a:hover {
+	color: #c63;
+	text-decoration: none;
+	font-weight: bold;
+	border-bottom: 1px dotted #369;
+}
+
+img, a img {
+	border: none;
+	text-decoration: none;
+}
+
+h1 {
+	font-size: 22px;
+}
+
+h2 {
+	font-size: 20px;
+}
+
+h3 {
+	font-size: 18px;
+}
+
+h4 {
+	font-size: 16px;
+}
+
+h5 {
+	font-size: 14px;
+}
+
+h6 {
+	font-size: 13px;
+}
+
+br {
+	clear: both;
+}
+
+p {
+	margin: 10px 0 1em 0;
+	line-height: 16px;
+}
+
+input, textarea {
+	font-family: Courier, "Courier New", monospace;
+}
+
+kbd {
+	color: #c63;
+	font-family: Courier, "Courier New", monospace;
+}
+
+pre {
+	color: #369;
+	font-family: Sans, "Sans serif";
+	font-size: 14px;
+	margin-left: 20px;
+}
+
+#nav {
+	height: 76px;
+	padding: 0;
+	font-size: 10px;
+}
+
+#logo {
+	background: #fff;
+	float: left;
+	display: inline;
+	width: 400px;
+	height: 75px;
+	border-top: 1px solid #bbb;
+	border-bottom: 1px solid #bbb;
+}
+
+#logo a {
+	border: none;
+}
+
+#nav #l {
+	width: 150px;
+	height: 75px;
+	float: left;
+	border: 1px solid #bbb;
+}
+
+#nav #r {
+	width: 150px;
+	height: 75px;
+	float: left;
+	border-top: 1px solid #bbb;
+	border-bottom: 1px solid #bbb;
+}
+
+#nav ul {
+	list-style-type: none;
+	margin: 0;
+	padding: 0;
+	text-align: center;
+}
+
+#nav li a {
+	background: #fff;
+	display: block;
+	text-decoration: none;
+	line-height: 20px;
+	padding: 2px;
+	border-bottom: 1px solid #bbb;
+}
+
+#nav li a:visited {
+	color: #999;
+	text-decoration: none;
+}
+
+#nav li a:hover {
+	background: #d8e6e7;
+	color: #888;
+}
+
+#nav li.last a {
+	border: none;
+	display: block;
+	line-height: 21px;
+}
+
+#nav li.selected a {
+	background: #f3f3f3;
+	color: #c63;
+}
+
+#nav li.sellast a {
+	background: #f3f3f3;
+	color: #c63;
+	border: none;
+	display: block;
+	line-height: 21px;
+}
+
+#main {
+	background: #fff;
+	width: 702px;
+	border-right: 1px solid #bbb;
+	border-left: 1px solid #bbb;
+	padding-bottom: 100px;
+}
+
+#content {
+	width: 80%; 
+	margin: 10px 0 0 0;
+	padding: 5px 20px;
+}
+
+#news {
+	margin: 10px 0 0 0;
+	padding: 5px 0 0 0;
+}
+
+#footer {
+	width: 692px;
+	background: #fff;
+	border: 1px solid #bbb;
+	font-size: 10px;
+	padding: 5px;
+	text-align: right;
+}
+
+.languages {
+	float: left;
+}
+
+.hdr {
+	color: #669;
+	margin: 0;
+	padding: 10px 0 0 0;
+	border-bottom: 1px solid #bbb;
+}
+
+.subhdr {
+	color: #879880;
+	margin: 5px 0 0 0;
+	padding: 0;
+}
+
+.date {
+	color: #999;
+	margin: 0 auto;
+	padding: 0;
+}
+
+.referer_box {
+	margin: auto;
+	margin-bottom: 1em;
+	width: 90%;
+	border: 1px solid #CC6633;
+	background-color: #D37F54;
+	color: black;
+	padding: 1em;
+}
+.referer_box a {
+	color: white;
+}
+
Index: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php	(revision 19376)
+++ trunk/www/ports.php	(revision 28303)
@@ -1,20 +1,19 @@
 <?php
 	$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
-	include_once("$DOCUMENT_ROOT/includes/common.inc");
-	include_once("$DOCUMENT_ROOT/includes/db.inc");
-	include_once("$DOCUMENT_ROOT/includes/email.inc");
-	print_header('Available Ports', 'iso-8859-1');
+	include_once("$DOCUMENT_ROOT/macports/includes/common.inc");
+	include_once("$DOCUMENT_ROOT/macports/includes/email.inc");
+	print_header('Available Ports', 'utf-8');
 	$by = isset($_GET['by']) ? $_GET['by'] : '';
 	$substr = isset($_GET['substr']) ? $_GET['substr'] : '';
 ?>
 	<center>
-	<h1>DarwinPorts Portfiles</h1>
+	<h1>MacPorts Portfiles</h1>
 	</center>
 
 	<p>
-	This form allows you to search the current index of DarwinPorts software. <br />
+	This form allows you to search the current index of MacPorts software. <br />
 	<i>Index last updated: </i>
 	<?php
-		$sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM darwinports.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
+		$sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM macports.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
 		$result = mysql_query($sql);
 		if($result && $row = mysql_fetch_row($result)) {
@@ -42,5 +41,5 @@
 		<tr>
 <?php
-		$result = mysql_query("SELECT count(*) from darwinports.portfiles");
+		$result = mysql_query("SELECT count(*) from macports.portfiles");
 		if ($result) {
 			$row = mysql_fetch_array($result);
@@ -58,5 +57,5 @@
 		<tr><th colspan="4" align="left">View By Category:</th></tr>
 		<?php
-				$query = "SELECT DISTINCT category FROM darwinports.categories ORDER BY category";
+				$query = "SELECT DISTINCT category FROM macports.categories ORDER BY category";
 				$result = mysql_query($query);
 				if($result) {
@@ -76,5 +75,5 @@
 		$fields = "name, path, version, description";
 		$query = "1";
-		$tables = "darwinports.portfiles p";
+		$tables = "macports.portfiles p";
 		if ($by == "name") {
 			$query .= " AND p.name LIKE '%" . mysql_real_escape_string($substr) . "%'";
@@ -87,17 +86,17 @@
 		}
 		if ($by == "cat") {
-			$tables .= ", darwinports.categories c";
+			$tables .= ", macports.categories c";
 			$query .= " AND c.portfile=p.name AND c.category='" . mysql_real_escape_string($substr) . "'";
 		}
 		if ($by == "variant") {
-			$tables .= ", darwinports.variants v";
+			$tables .= ", macports.variants v";
 			$query .= " AND v.portfile=p.name AND v.variant='" . mysql_real_escape_string($substr) . "'";
 		}
 		if ($by == "platform") {
-			$tables .= ", darwinports.platforms pl";
+			$tables .= ", macports.platforms pl";
 			$query .= " AND pl.portfile=p.name AND pl.platform ='" . mysql_real_escape_string($substr) . "'";
 		}
 		if ($by == "maintainer") {
-			$tables .= ", darwinports.maintainers m";
+			$tables .= ", macports.maintainers m";
 			$query .= " AND m.portfile=p.name AND m.maintainer LIKE '%" . mysql_real_escape_string($substr) . "%'";
 		}
@@ -113,10 +112,10 @@
 			while( $row = mysql_fetch_assoc($result) ) {
 ?>
-	<dt><b><a href="http://www.darwinports.org/darwinports/dports/<?php echo $row['path']; ?>/Portfile"><?php echo htmlspecialchars($row['name']); ?></a></b> <?php echo htmlspecialchars($row['version']); ?></dt>
+	<dt><b><a href="http://trac.macports.org/projects/macports/browser/trunk/dports/<?php echo $row['path']; ?>/Portfile"><?php echo htmlspecialchars($row['name']); ?></a></b> <?php echo htmlspecialchars($row['version']); ?></dt>
 	<dd>
 	<?php echo htmlspecialchars($row['description']); ?><br />
 	<?php
 // MAINTAINERS
-				$nquery = "SELECT maintainer FROM darwinports.maintainers WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY is_primary DESC, maintainer";
+				$nquery = "SELECT maintainer FROM macports.maintainers WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY is_primary DESC, maintainer";
 				$nresult = mysql_query($nquery);
 				if ($nresult) {
@@ -135,5 +134,5 @@
 
 // CATEGORIES
-				$nquery = "SELECT category FROM darwinports.categories WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY is_primary DESC, category";
+				$nquery = "SELECT category FROM macports.categories WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY is_primary DESC, category";
 				$nresult = mysql_query($nquery);
 				if ($nresult) {
@@ -154,5 +153,5 @@
 
 // PLATFORMS
-				$nquery = "SELECT platform FROM darwinports.platforms WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY platform";
+				$nquery = "SELECT platform FROM macports.platforms WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY platform";
 				$nresult = mysql_query($nquery);
 				if ($nresult && mysql_num_rows($nresult) > 0) {
@@ -170,5 +169,5 @@
 
 // DEPENDENCIES
-				$nquery = "SELECT library FROM darwinports.dependencies WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY library";
+				$nquery = "SELECT library FROM macports.dependencies WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY library";
 				$nresult = mysql_query($nquery);
 				if ($nresult && mysql_num_rows($nresult) > 0) {
@@ -187,5 +186,5 @@
 /*
 // VARIANTS
-				$nquery = "SELECT variant FROM darwinports.variants WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY variant";
+				$nquery = "SELECT variant FROM macports.variants WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY variant";
 				$nresult = mysql_query($nquery);
 				if ($nresult && mysql_num_rows($nresult) > 0) {
