Subversion Repositories www_nix-files

Rev

Rev 206 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
        require_once dirname(__FILE__)."/lib/init.php";
        include "./inc/header.htm";

$memb = abs(intval($_GET["memb"]));

if($memb==0) {
        $mems =& $db->query("SELECT * FROM members");
        echo "<table>";
        echo "<tr>";
        echo "<th>Ник</th><th>Аватар</th><th>Контакты</th><th>Куратор</th><th>Админ</th>\n";
        while ($mems->fetchInto($info_mems, DB_FETCHMODE_ASSOC)) {
            echo "<tr><td><a href='./members.php?memb=".$info_mems['id']."'>".$info_mems['nick']."</a></td>\n";
            echo "<td><img src='".$info_mems['avatar']."' alt='avatar'></td><td><img src='./img/contact/jabber_protocol.png' alt='Jabber' title='Jabber'>".$info_mems['jabber']."</td>\n";

            echo "<td>";
            $ress =& $db->query("SELECT * FROM resources WHERE member_id=".$info_mems['id']);
            while ($ress->fetchInto($info_ress, DB_FETCHMODE_ASSOC)) {
                echo "<img src='".$info_ress['picture']."' alt='".$info_ress['resource']."'> <a href='./details.php?res=".$info_ress["id"]."'>".$info_ress['resource']."</a><br>";
            }
            echo "</td>";
            echo "<td>";
            $srvs =& $db->query("SELECT * FROM servers WHERE member_id=".$info_mems['id']);
            if ($srvs->numRows()==0)
                 echo "&mdash;";
            else
                while ($srvs->fetchInto($info_srvs, DB_FETCHMODE_ASSOC)) {
                    echo "<a href='./servers.php?srv=".$info_srvs['id']."'>".$info_srvs['server']."</a>";
            }
            echo "</td>\n";
            echo "</tr>\n";
        }
        echo "</table>";
}
else {
        $mems =& $db->query("SELECT * FROM members WHERE id=".$memb);
        while ($mems->fetchInto($info_mems, DB_FETCHMODE_ASSOC)) {
            echo "<div id='infocard-member' class='avatar-id-".$info_mems['id']."'><h4>".$info_mems['nick']."</h4>\n";
            echo "<p class='fio'>".$info_mems['fio']."</p>\n";
            echo "<p class='jabber'>".$info_mems['jabber']."</p>\n";
            echo "<p class='homepage'><a href='".$info_mems['homepage']."'>".$info_mems['homepage']."</a></p>\n";
//        echo "<p class='icq'>".$info_mems['icq']."</p>\n";
            echo "<div class='owners'><p><strong>Курирует:</strong> ";
            $ress =& $db->query("SELECT * FROM resources WHERE member_id=".$memb);
            while ($ress->fetchInto($info_ress, DB_FETCHMODE_ASSOC)) {
                echo "<span class='".$info_ress['resource']."-small'><a href='./details.php?res=".$info_ress["id"]."'>".$info_ress['resource']."</a></span>";
            }
            echo "</p></div>";
            echo "<div class='admins'><p><strong>Администрирует:</strong> ";
            $srvs =& $db->query("SELECT * FROM servers WHERE member_id=".$memb);
            while ($srvs->fetchInto($info_srvs, DB_FETCHMODE_ASSOC)) {
                echo "<span class='server'><a href='./servers.php?srv=".$info_srvs['id']."'>".$info_srvs['server']."</a></span>";
            }
        echo "</p></div></div>";
        }
}

        include "./inc/footer.htm";
?>