This repository was archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpupils.php
44 lines (43 loc) · 1.8 KB
/
pupils.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<td id="news" align="left" valign="top" rowspan="2">
<table width="640" cellpadding="0" cellspacing="0">
<tr><td colspan="2" class="topbr"></td></tr>
<tr class="newstitletr"><td class="title">Ó÷åíèêè </td></tr>
<tr><td colspan="2" class="newsborder"></td></tr>
<tr><td colspan="2" class="newstop"></td></tr>
<tr><td class="text" colspan="2">
<table width = '100%' cellspacing = '0' cellpadding = '0' border = '0' class = "tbl">
<?
switchConnection(1, "realmd");
if (!isset($_GET['p'])) {
echo "<p align=center>Ñïèñîê ó÷åíèêîâ, çàðåãèñòðèðîâàííûõ íà ñàéòå. Íàõîäèòå äðóã äðóãà è îáùàéòåñü!</p></br></br>";
$result=dbquery("SELECT * FROM site_pupil_profile order by level desc, secondname asc") or die("eror");
echo "<table width=90% align=center><tr><td width=35%><h2>Ôàìèëèÿ Èìÿ</h2></td><td width=30%><h2>Êëàññ</h2></td></tr><tr><td width=35%></td><td width=30%></td></tr>";
if (dbrows($result) != 0)
{
while ($data=dbarray($result))
{
echo "<tr>
<td width=35%>"; if ($data['level']>0) {echo "<a href= './?s=pupil&p=$data[id]'>$data[secondname] $data[name] </a>";} else {echo "$data[secondname] $data[name] ";} echo "</td><td width=30%> $data[class] $data[letter] </td><td width=10%></td>
</tr>";
}
}
echo "</table>";
}
else {
$t = $_GET['p'];
$query= "SELECT * FROM site_pupil_profile WHERE id=$t";
$result= dbquery($query);
$result= dbarray($result);
if (isset($result['id'])){
include "./engine/profile_p.php";
if ($result[blog_enable]=1) {
include "./engine/blog.php";
}
}
else echo "Òàêîé ñòðàíèöû íå ñóùåñòâóåò!";
}
?>
<br><br />
<A HREF="javascript:history.back()" onMouseOver="window.status='Íàçàä';return true">Íàçàä</A>
</table>
</table>