-
Notifications
You must be signed in to change notification settings - Fork 0
/
o_vypis-vs.php
348 lines (144 loc) · 6.44 KB
/
o_vypis-vs.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?
// uniLETIM - LETS & TimeBank announcing and accounting system
// Copyright (C) 2003 PRIESTOR o.z., Ondrej Vegh, Robert Zelnik, Michal Jurco
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (in Slovak Republic
// in the terms of the Vseobecna zverejnovacia licencia GNU) as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or visit http://www.gnu.sk/ for Vseobecna zverejnovacia licencia GNU
$sql = mysql_query("SELECT * FROM uniletim_sections WHERE sec_id = '$rub' AND ul_group = '$sess[4]'");
$sec_row = mysql_fetch_row($sql);
$rn = $sec_row[1];
?>
<H3 class="tit1"><? echo "$rn";?> > <? echo _ALL ?></H3>
<table width="460" border="0" cellspacing="0" cellpadding="3">
<?
//numbers of table colums
$cs = "4";
$cs1 = "3";
// subsections
announces_subsections ($sess,$rub,$pri,$cs,$cs1);
// vypis hlasiek
if($result != "" || $error != ""):?>
<tr><td>
<div class="res"><? echo "$result";?></div> <div class="error"><? echo "$error";?></div>
</td></tr>
<?endif;
// výpis ponúk
if($tbp != "dop"):
?>
</TABLE>
<table width="460" border="1" cellspacing="0" cellpadding="0" align="center">
<TR><td>
<table width="460" align="center" border="0" cellspacing="0" cellpadding="5">
<TR class="td_tmave">
<td colspan="4" class="td_tmave">Ponuka</td>
</TR>
<?
$sqk = mysql_query("SELECT * FROM uniletim_subsections WHERE sub_section='$rub' AND ul_group = '$sess[4]' ORDER BY sub_name");
while ($rok = mysql_fetch_row($sqk)) {
$rn = $rok[1];
$pri = $rok[0];
@$sqo = mysql_query("SELECT * FROM uniletim_announces WHERE ann_sub = '$pri' AND ann_oq = 'ponuka' AND ul_group = '$sess[4]' ORDER BY ann_date ");
if (mysql_num_rows($sqo) > 0)
{
?>
<TR>
<td colspan="4"> </td>
</TR>
<TR class="td_st">
<td colspan="2" class="td_st"><b><? echo "$rn";?></b></td>
<TD align=right height=16 class="td_st" noWrap>
<a HREF="o_novy.php?rub=<? echo "$rub"; ?>&pri=<? echo "$pri"; ?>&dp=ponuka"><? echo _INSERT ?></A>
</TD>
</TR>
<?
$i = 0;
while ($roz = mysql_fetch_row($sqo))
{
if ($i%2==0) $bgcolor=''; else $bgcolor=" class=td_rd";?>
<TR <? echo $bgcolor; ?>>
<TD COLSPAN="3" class="hlavicka"><? echo "$roz[7]";?>
</TR>
<TR class="paticka" <? echo $bgcolor; ?>>
<td<? echo $bgcolor; ?>><B>Vlo¾il:</B> <A HREF="u_info.php?id=<? echo "$roz[1]";?>"><?
@$squ = mysql_query("SELECT * FROM uniletim_members WHERE mbr_id = '$roz[1]' AND ul_group = '$sess[4]'");
$rou = mysql_fetch_row($squ);
echo "$rou[1]";?></A></td>
<td<? echo $bgcolor; ?>><? $timed = Date("d.m.Y", $roz[4]); echo "$timed";?></td>
<td<? echo $bgcolor; ?>>
<? if ($sess[3] != "timebank"):?>
<B>Cena: </B><? echo "$roz[8]";?>
<?endif;?>
</td>
</TR>
<?
$i++;
}
}
}
?>
</TABLE>
</td></TR>
</TABLE>
<br><br>
<?// výpis dopytov
endif;
if($tbp != "pon"):?>
<table width="460" border="1" cellspacing="0" cellpadding="0" align="center">
<TR><td>
<table width="460" align="center" border="0" cellspacing="0" cellpadding="5">
<TR class="td_tmave">
<td colspan="4" class="td_tmave">Dopyt</td>
</TR>
<?
$sqk = mysql_query("SELECT * FROM uniletim_subsections WHERE sub_section='$rub' AND ul_group = '$sess[4]' ORDER BY sub_name");
while ($rok = mysql_fetch_row($sqk)) {
$rn = $rok[1];
$pri = $rok[0];
@$sqo = mysql_query("SELECT * FROM uniletim_announces WHERE ann_sub = '$pri' AND ann_oq = 'dopyt' AND ul_group = '$sess[4]' ORDER BY ann_date ");
if (mysql_num_rows($sqo) > 0)
{
?>
<TR>
<td colspan="4"> </td>
</TR>
<TR class="td_st">
<td colspan="2" class="td_st"><b><? echo "$rn";?></b></td>
<TD align=right height=16 class="td_st" noWrap>
<a HREF="o_novy.php?rub=<? echo "$rub"; ?>&pri=<? echo "$pri"; ?>&dp=dopyt"><? echo _INSERT ?></A>
</TD>
</TR>
<?
$i = 0;
while ($roz = mysql_fetch_row($sqo))
{
if ($i%2==0) $bgcolor=''; else $bgcolor=" class=td_rd";
?>
<TR <? echo $bgcolor; ?>>
<TD COLSPAN="3" class="hlavicka"><? echo "$roz[7]";?>
</TR>
<TR class="paticka">
<td<? echo $bgcolor; ?>><B>Vlo¾il:</B> <A HREF="u_info.php?id=<? echo "$roz[1]";?>"><?
@$squ = mysql_query("SELECT * FROM uniletim_members WHERE mbr_id = '$roz[1]' AND ul_group = '$sess[4]'");
$rou = mysql_fetch_row($squ);
echo "$rou[1]";?></A></td>
<td<? echo $bgcolor; ?>><? $timed = Date("d.m.Y", $roz[4]); echo "$timed";?></td>
<td<? echo $bgcolor; ?>>
<? if ($sess[3] != "timebank"):?>
<B>Cena: </B><? echo "$roz[8]";?>
<?endif;?>
</td>
</TR>
<?
$i++;
}
}
}
endif;
?>
</TABLE>
</td></TR>
</TABLE>