Хранилища Subversion www_nix-files

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

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

/trunk/index.php
7,24 → 7,32
<h3><i>изучай/пользуй/обновляй линукс вместе с nix-files.org.ru</i></h3>
<?php
// table header
$nets =& $db->query("SELECT * FROM networks");
echo "<table>";
echo "<tr>";
echo "<th>&nbsp;</th><th>&nbsp;</th><th>Ресурс</th>\n";
$netlist = array();
$netcount = $nets->numRows();
$n = 0;
while ($nets->fetchInto($info_nets, DB_FETCHMODE_ASSOC)) {
// network name & link
if ($info_nets['link']=="") { echo " <th>".$info_nets['network']."</th>\n"; }
else { echo " <th><a href='./networks.php?net=".$info_nets['id']."'>".$info_nets['network']."</a></th>\n"; }
// netlist
$netlist[$n] = $info_nets['id'];
$n++;
$netcount = 0;
$theader1 = "<tr>\n<th rowspan='2'>&nbsp;</th><th rowspan='2'>&nbsp;</th><th rowspan='2'>Ресурс</th>\n"; // category header
$theader2 = "<tr>\n"; // networks header
$ncats =& $db->query("SELECT * FROM netcats");
while ($ncats->fetchInto($info_ncats, DB_FETCHMODE_ASSOC)) {
$ccnc = 0; // Count networks of current category
$nets =& $db->query("SELECT * FROM networks WHERE netcat_id=".$info_ncats['id']);
while ($nets->fetchInto($info_nets, DB_FETCHMODE_ASSOC)) {
// network name & link
if ($info_nets['link']=="") { $theader2 .= " <th>".$info_nets['network']."</th>\n"; }
else { $theader2 .= " <th><a href='./networks.php?net=".$info_nets['id']."'>".$info_nets['network']."</a></th>\n"; }
// netlist
$netlist[$netcount] = $info_nets['id'];
$netcount++;
$ccnc++;
}
$theader1 .= "<th colspan='".$ccnc."'>".$info_ncats['netcat']."</th>";
}
echo $theader1."\n</tr>\n";
echo $theader2."\n</tr>\n";
echo "</tr>\n";
// table body
$cats =& $db->query("SELECT * FROM categories");
while ($cats->fetchInto($info_cats, DB_FETCHMODE_ASSOC)) {