Subversion Repositories www_nix-files

Rev

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

Rev Author Line No. Line
25 diffor 1
<?php
2
        require_once dirname(__FILE__)."/lib/init.php";
3
        include "./inc/header.htm";
4
 
5
$memb = abs(intval($_GET["memb"]));
6
 
27 diffor 7
if($memb==0) {
8
        $mems =& $db->query("SELECT * FROM members");
9
        echo "<table>";
10
        echo "<tr>";
51 diffor 11
        echo "<th>Ник</th><th>Аватар</th><th>Контакты</th><th>Куратор</th><th>Админ</th>\n";
27 diffor 12
        while ($mems->fetchInto($info_mems, DB_FETCHMODE_ASSOC)) {
28 diffor 13
            echo "<tr><td><a href='./members.php?memb=".$info_mems['id']."'>".$info_mems['nick']."</a></td>\n";
47 diffor 14
            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";
27 diffor 15
 
16
            echo "<td>";
17
            $ress =& $db->query("SELECT * FROM resources WHERE member_id=".$info_mems['id']);
18
            while ($ress->fetchInto($info_ress, DB_FETCHMODE_ASSOC)) {
47 diffor 19
                echo "<img src='".$info_ress['picture']."' alt='".$info_ress['resource']."'> <a href='./details.php?res=".$info_ress["id"]."'>".$info_ress['resource']."</a><br>";
27 diffor 20
            }
51 diffor 21
            echo "</td>";
22
            echo "<td>";
23
            $srvs =& $db->query("SELECT * FROM servers WHERE member_id=".$info_mems['id']);
24
            if ($srvs->numRows()==0)
130 alex-w 25
                 echo "&mdash;";
51 diffor 26
            else
27
                while ($srvs->fetchInto($info_srvs, DB_FETCHMODE_ASSOC)) {
28
                    echo "<a href='./servers.php?srv=".$info_srvs['id']."'>".$info_srvs['server']."</a>";
29
            }
30
            echo "</td>\n";
31
            echo "</tr>\n";
27 diffor 32
        }
33
        echo "</table>";
34
}
35
else {
25 diffor 36
        $mems =& $db->query("SELECT * FROM members WHERE id=".$memb);
37
        while ($mems->fetchInto($info_mems, DB_FETCHMODE_ASSOC)) {
115 alex-w 38
            echo "<div id='infocard-member' class='avatar-id-".$info_mems['id']."'><h4>".$info_mems['nick']."</h4>\n";
90 alex-w 39
            echo "<p class='fio'>".$info_mems['fio']."</p>\n";
40
            echo "<p class='jabber'>".$info_mems['jabber']."</p>\n";
207 diffor 41
            echo "<p class='homepage'><a href='".$info_mems['homepage']."'>".$info_mems['homepage']."</a></p>\n";
120 alex-w 42
//        echo "<p class='icq'>".$info_mems['icq']."</p>\n";
121 alex-w 43
            echo "<div class='owners'><p><strong>Курирует:</strong> ";
26 diffor 44
            $ress =& $db->query("SELECT * FROM resources WHERE member_id=".$memb);
45
            while ($ress->fetchInto($info_ress, DB_FETCHMODE_ASSOC)) {
116 alex-w 46
                echo "<span class='".$info_ress['resource']."-small'><a href='./details.php?res=".$info_ress["id"]."'>".$info_ress['resource']."</a></span>";
26 diffor 47
            }
121 alex-w 48
            echo "</p></div>";
49
            echo "<div class='admins'><p><strong>Администрирует:</strong> ";
51 diffor 50
            $srvs =& $db->query("SELECT * FROM servers WHERE member_id=".$memb);
51
            while ($srvs->fetchInto($info_srvs, DB_FETCHMODE_ASSOC)) {
146 alex-w 52
                echo "<span class='server'><a href='./servers.php?srv=".$info_srvs['id']."'>".$info_srvs['server']."</a></span>";
51 diffor 53
            }
121 alex-w 54
        echo "</p></div></div>";
25 diffor 55
        }
27 diffor 56
}
25 diffor 57
 
58
        include "./inc/footer.htm";
59
?>