Хранилища Subversion ant

Сравнить редакции

Не учитывать пробелы Редакция 465 → Редакция 466

/branches/shower/apt.db
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/shower/apt.db
Новый файл
Изменения свойств:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: shower/README
===================================================================
--- shower/README (revision 0)
+++ shower/README (revision 466)
@@ -0,0 +1,2 @@
+Необходима PEAR-DB и PHP-SQLITE
+для Debian это пакеты php-db и php5-sqlite
Index: shower/shower.php
===================================================================
--- shower/shower.php (revision 0)
+++ shower/shower.php (revision 466)
@@ -0,0 +1,28 @@
+<?php
+
+require_once 'DB.php';
+
+$dsn = 'sqlite://custom/apt.db?mode=0777';
+
+$db =& DB::connect($dsn);
+if (PEAR::isError($db)) {
+ die($db->getMessage());
+}
+
+ $reps =& $db->query("SELECT * FROM reps");
+ while ($reps->fetchInto($info_reps,DB_FETCHMODE_ASSOC)) {
+ echo $info_reps['rep']."<br>";
+ $dists =& $db->query("SELECT * FROM reps2dists JOIN dists ON reps2dists.dist_id=dists.id WHERE rep_id=".$info_reps['id']);
+ while ($dists->fetchInto($info_dists,DB_FETCHMODE_ASSOC)) {
+ echo " http://apt.nix-files.org.ru/".$info_reps['rep']." ".$info_dists['dists.dist'];
+ $sects =& $db->query("SELECT * FROM reps2dists2sects JOIN sects ON reps2dists2sects.sect_id=sects.id WHERE reps2dists_id==".$info_dists['reps2dists.id']);
+ while ($sects->fetchInto($info_sects,DB_FETCHMODE_ASSOC)) {
+ echo " ".$info_sects['sects.sect'];
+ }
+ echo "<br>";
+ }
+ }
+
+//$query =& $dba->query("SET NAMES utf8");
+
+?>