Skip to content
Permalink
Browse files

Submitted by: matt@

Reviewed by: mij@

Adding a function to automate the update of the
number of ports available.

git-svn-id: https://svn.macports.org/repository/macports/trunk/www@15457 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Matt Anton
Matt Anton committed Dec 12, 2005
1 parent 7d23511 commit 66648504b013aea7657a14569900d5f6d301e5cf
Showing with 85 additions and 11 deletions.
  1. +19 −3 es/includes/functions.inc
  2. +1 −1 es/index.php
  3. +15 −1 fr/includes/functions.inc
  4. +2 −2 fr/index.php
  5. +15 −1 includes/functions.inc
  6. +1 −1 index.php
  7. +15 −1 it/includes/functions.inc
  8. +17 −1 ru/includes/functions.inc
@@ -1,6 +1,6 @@
<?php
<?php

# $Id: functions.inc,v 1.2 2004/09/14 18:05:17 matt Exp $
# $Id: functions.inc,v 1.3 2005/12/12 18:56:59 matt Exp $
# Copyright (c) 2004, OpenDarwin

###############################################################################
@@ -249,5 +249,21 @@
echo "<p>No hay titulares disponibles.</p>\n\n";
}
}

######################################################################

# print the number or available ports
function print_available_ports() {
global $connect;

$result = mysql_query("SELECT count(*) from darwinports.portfiles");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
echo $count;
} else {
$count = 0;
}
}

?>
?>
@@ -12,7 +12,7 @@
sencilla de instalar varios productos de código abierto en un sistema
Darwin, Mac OS X, FreeBSD o Linux.</p>

<p>En la actualidad hay unos cuantos cientos de <a href="/es/ports/">portes</a>
<p>En la actualidad hay <? print_available_ports(); ?> <a href="/es/ports/">portes</a>
completados y usables, mientras que más son agregados regularmente. Usted
puede conocer sobre los portes recientemente añadidos al susbcribirse a la
lista de correo <a href="http://www.opendarwin.org/mailman/listinfo/cvs-darwinports-all">cvs-darwinports-all</a>.</p>
@@ -1,6 +1,6 @@
<?php

# $Id: functions.inc,v 1.8 2005/12/06 18:40:32 matt Exp $
# $Id: functions.inc,v 1.9 2005/12/12 18:56:59 matt Exp $
# Copyright (c) 2003, OpenDarwin

######################################################################
@@ -275,6 +275,20 @@ function print_all_headlines_nonadmin() {
}
}

######################################################################

# print the number or available ports
function print_available_ports() {
global $connect;

$result = mysql_query("SELECT count(*) from darwinports.portfiles");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
echo $count;
} else {
$count = 0;
}
}

?>
@@ -17,8 +17,8 @@
</p>

<p>
Il y a actuellement environ 2800 <a href="/fr/ports/">ports</a> opérationnels et
disponibles, mais d'autres seront bientôt ajoutés régulièrement. Vous pouvez
Il y a actuellement <? print_available_ports(); ?> <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>.
@@ -1,6 +1,6 @@
<?php

# $Id: functions.inc,v 1.5 2005/12/06 18:25:03 mww Exp $
# $Id: functions.inc,v 1.6 2005/12/12 18:56:58 matt Exp $
# Copyright (c) 2003, OpenDarwin

######################################################################
@@ -275,6 +275,20 @@ function print_all_headlines_nonadmin() {
}
}

######################################################################

# print the number or available ports
function print_available_ports() {
global $connect;

$result = mysql_query("SELECT count(*) from darwinports.portfiles");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
echo $count;
} else {
$count = 0;
}
}

?>
@@ -14,7 +14,7 @@
<a href="http://www.apple.com/macosx/">Mac OS X</a> and
<a href="http://developer.apple.com/darwin/projects/darwin/">Darwin</a>)</p>

<p>There are currently about 2800 completed and usable <a
<p>There are currently about <? print_available_ports(); ?> completed and usable <a
href="/ports/">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>
@@ -1,6 +1,6 @@
<?php

# $Id: functions.inc,v 1.3 2005/12/09 15:20:31 riccardo Exp $
# $Id: functions.inc,v 1.4 2005/12/12 18:56:59 matt Exp $
# Copyright (c) 2003, OpenDarwin

######################################################################
@@ -275,6 +275,20 @@ function print_all_headlines_nonadmin() {
}
}

######################################################################

# print the number or available ports
function print_available_ports() {
global $connect;

$result = mysql_query("SELECT count(*) from darwinports.portfiles");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
echo $count;
} else {
$count = 0;
}
}

?>
@@ -1,6 +1,6 @@
<?php

# $Id: functions.inc,v 1.1 2004/09/13 23:01:04 matt Exp $
# $Id: functions.inc,v 1.2 2005/12/12 18:56:59 matt Exp $
# Copyright (c) 2003, OpenDarwin

######################################################################
@@ -253,4 +253,20 @@ function print_all_headlines() {
}
}

######################################################################

# print the number or available ports
function print_available_ports() {
global $connect;

$result = mysql_query("SELECT count(*) from darwinports.portfiles");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
echo $count;
} else {
$count = 0;
}
}

?>

0 comments on commit 6664850

Please sign in to comment.
You can’t perform that action at this time.