This repository has been archived by the owner on Jul 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvyhladavanie.php
114 lines (89 loc) · 5.11 KB
/
vyhladavanie.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
<?php
if (isset($HTTP_POST_VARS['hladat']))
$hladat=$HTTP_POST_VARS['hladat'];
else $hladat='';
if (isset($HTTP_POST_VARS['hl_popis']))
$hl_popis=1;
else $hl_popis=0;
if (isset($HTTP_POST_VARS['first_run']))
$first_run=1;
else $first_run=0;
if (isset($HTTP_POST_VARS['popis']))
$popis=1;
else $popis=0;
if (isset($HTTP_POST_VARS['first_run']))
$first_run=1;
else $first_run=0;
?>
<div class="post-page"><h2>Vyhľadávanie rozšírení podľa názvu</h2>
<div class="entrytext">
Nástroj vyhľadávania vám pomôže pri hľadaní toho rozšírenia, ktoré práve hľadáte. Máte viacero možností, medzi ktorými nechýba ani vyhľadávanie v popisoch. To znamená, že vyhľadávanie je intuitívnejšie a nájdete aj rozšírenie, ktorého názov síce nepoznáte, ale poznáte jeho účel.<br/><br/>
<div class="post-top">
<div class="post-bottom">
<div class="post">
<div id="vyhladavanie2">
<img src="/wp-content/themes/mozillask/images/vyhladavanie.png" alt="Vyhľadávanie" />
<form action="/rozsirenia/vyhladavanie/" method="post" id="vyhladavanie_form2">
<input class="form-text" type="text" size="15" value="<?php echo wp_specialchars($hladat, 1); ?>" name="hladat" id="keys_vyh2" />
<input style="padding-top: 2px" id="submit_vyh2" type="image" src="/wp-content/themes/mozillask/searcha.png" /><input type="hidden" value="1" name="first_run" />
<input id="popis" name="popis" type="checkbox" value="1"<?php if(($popis==1) || ($first_run==0)) echo ('checked="checked" '); ?> /> <label for="popis"><small>Zobraziť popis rozšírenia</small></label>
<input id="hl_popis" name="hl_popis" type="checkbox" value="1"<?php if(($hl_popis==1) || ($first_run==0)) echo ('checked="checked" '); ?> /> <label for="hl_popis"><small>Hľadať aj v popise rozšírenia</small></label>
<br/><br/></form>
</div>
</div>
</div>
</div>
<?php
$hl_string = "";
if ($hladat != "") {
if ($hl_popis == 1) $hl_string .= " AND (nazov LIKE '%$hladat%' OR popis LIKE '%$hladat%') ";
else $hl_string .= " AND nazov LIKE '%$hladat%' ";
}
$rozsirenia = $wpdb->get_results("SELECT MAX(id) AS id, nazov, popis FROM mozsk_rozsirenia
WHERE publikovat=1 $hl_string GROUP BY nazov ORDER BY nazov ASC");
if($rozsirenia)
{
echo '<dl>';
foreach ($rozsirenia as $rozsirenie)
{
$roz = $wpdb->get_row("SELECT urlid, nazov, urcene_ff_od, urcene_tb_od, urcene_ms_od, urcene_nv_od, urcene_sb_od, urcene_sm_od, urcene_ns_od, urcene_fl_od, urcene_sng_od, popis, verzia FROM mozsk_rozsirenia, mozsk_roz_meta WHERE mozsk_rozsirenia.id=$rozsirenie->id AND nazov='$rozsirenie->nazov' AND mozsk_rozsirenia.kategoria=mozsk_roz_meta.id");
/* echo '<dt style="float:left">';
echo '<a href="'.$folder.$roz->urlid.'/">'.$roz->nazov.' <small>v'.$roz->verzia.'</small></a> ';
echo '</dt>';
echo '<dt style="float:right">';
if ($roz->urcene_ff_od!='') echo ' <img alt="Firefox" src="/wp-content/images/logo/ff_small.png" />';
if ($roz->urcene_tb_od!='') echo ' <img alt="Thunderbird" src="/wp-content/images/logo/tb_small.png" />';
if ($roz->urcene_ms_od!='') echo ' <img alt="Mozilla Suite" src="/wp-content/images/logo/ms_small.png" />';
if ($roz->urcene_nv_od!='') echo ' <img alt="NVU" src="/wp-content/images/logo/nvu_small.png" />';
if ($roz->urcene_sb_od!='') echo ' <img alt="Sunbird" src="/wp-content/images/logo/sn_small.png" />';
if ($roz->urcene_sm_od!='') echo ' <img alt="SeaMonkey" src="/wp-content/images/logo/sm_small.png" />';
if ($roz->urcene_ns_od!='') echo ' <img alt="Netscape" src="/wp-content/images/logo/ns_small.png" />';
if ($roz->urcene_fl_od!='') echo ' <img alt="Flock" src="/wp-content/images/logo/fl_small.png" />';
echo'</dt>';
echo '<dd style="clear: both">';
if (($popis == 1) || ($first_run==0)) echo formattext($roz->popis,$roz->urlid);
echo '</dd>';
*/
echo '<dt>';
echo '<a href="'.$folder.$roz->urlid.'/">'.$roz->nazov.' <small>v'.$roz->verzia.'</small></a> ';
if ($roz->urcene_ff_od!='') echo ' <img alt="Firefox" src="/wp-content/images/logo/ff_small.png" />';
if ($roz->urcene_tb_od!='') echo ' <img alt="Thunderbird" src="/wp-content/images/logo/tb_small.png" />';
if ($roz->urcene_ms_od!='') echo ' <img alt="Mozilla Suite" src="/wp-content/images/logo/ms_small.png" />';
if ($roz->urcene_nv_od!='') echo ' <img alt="NVU" src="/wp-content/images/logo/nvu_small.png" />';
if ($roz->urcene_sb_od!='') echo ' <img alt="Sunbird" src="/wp-content/images/logo/sn_small.png" />';
if ($roz->urcene_sm_od!='') echo ' <img alt="SeaMonkey" src="/wp-content/images/logo/sm_small.png" />';
if ($roz->urcene_ns_od!='') echo ' <img alt="Netscape" src="/wp-content/images/logo/ns_small.png" />';
if ($roz->urcene_fl_od!='') echo ' <img alt="Flock" src="/wp-content/images/logo/fl_small.png" />';
echo'</dt>';
echo '<dd>';
if (($popis == 1) || ($first_run==0)) echo formattext($roz->popis,$roz->urlid);
echo '</dd>';
}
echo '</dl>';
}
else
{
echo '<div class="error">Nebolo nájdené žiadne rozšírenie.</div>';
}
?>
</div></div>