cvs: pearweb /public_html export.php

From: Date: Fri, 16 Nov 2001 09:20:04 +0000
Subject: cvs: pearweb /public_html export.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1337@lists.php.net to get a copy of this message
ssb Fri Nov 16 04:20:04 2001 EDT Modified files: /pearweb/public_html export.php Log: * added "writers" export Index: pearweb/public_html/export.php diff -u pearweb/public_html/export.php:1.1 pearweb/public_html/export.php:1.2 --- pearweb/public_html/export.php:1.1 Thu Nov 15 20:07:07 2001 +++ pearweb/public_html/export.php Fri Nov 16 04:20:04 2001 @@ -1,7 +1,12 @@ <?php +if (empty($what)) { + $what = basename($HTTP_SERVER_VARS['PATH_INFO']); +} + +header("Content-type: text/plain"); + if ($what == "avail") { - header("Content-type: text/plain"); print "unavail\n"; $sth = $dbh->query("SELECT handle,path FROM cvs_acl"); while ($sth->fetchInto($row, DB_FETCHMODE_ORDERED) === DB_OK) { @@ -12,16 +17,19 @@ print "avail|$users|$path\n"; } } elseif ($what == "cvsusers") { - header("Content-type: text/plain"); $sth = $dbh->query("SELECT handle,name,email FROM users"); while ($sth->fetchInto($row, DB_FETCHMODE_ORDERED)) { print implode(":", $row) . "\n"; } } elseif ($what == "passwd") { - header("Content-type: text/plain"); $sth = $dbh->query("SELECT handle,password FROM users"); while ($sth->fetchInto($row, DB_FETCHMODE_ORDERED)) { print implode(":", $row) . ":cvs\n"; + } +} elseif ($what == "writers") { + $sth = $dbh->query("SELECT DISTINCT handle FROM cvs_acl WHERE access = 1"); + while ($sth->fetchInto($row, DB_FETCHMODE_ORDERED)) { + print "{$row[0]}\n"; } }

« previous php.pear.cvs (#1337) next »