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.
| 1. / 2. / ...
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: list.php 2266 2009-03-21 10:37:39Z duRiel $
$cs_lang = cs_translate('search');
$data = array();
$search_error = 0;
$data['search']['where'] = '';
$data['search']['text'] = '';
$data['search']['errmsg'] = '';
$submit = empty($_REQUEST['submit']) ? 0 : 1;
$data['if']['errmsg'] = false;
$data['if']['text'] = false;
if(!empty($submit)) {
if(!empty($_REQUEST['text'])) {
$data['if']['text'] = true;
$data['search']['text'] = $_REQUEST['text'];
} else {
$data['search']['errmsg'] = cs_icon('important'). $cs_lang['error_text'] . cs_html_br(1);
$search_error++;
}
if(!empty($_REQUEST['where'])) {
$data['search']['where'] = $_REQUEST['where'];
} else {
$data['search']['errmsg'] .= cs_icon('important'). $cs_lang['error_modul'];
$search_error++;
}
}
$sel = 'selected="selected"';
$checked = 'checked="checked"';
$data['search']['news_check'] = $data['search']['where'] == 'news' ? $sel : '';
$data['search']['files_check'] = $data['search']['where'] == 'files' ? $sel : '';
$data['search']['static_check'] = $data['search']['where'] == 'static' ? $sel : '';
if(!empty($search_error)) {
$data['if']['errmsg'] = true;
}
echo cs_subtemplate(__FILE__,$data,'search','list');
if(!empty($submit) AND empty($search_error)) {
switch ($data['search']['where']) {
case 'clans':
$target = 'mods/search/mods/clans.php';
break;
case 'news':
$target = 'mods/search/mods/news.php';
break;
case 'files':
$target = 'mods/search/mods/files.php';
break;
case 'files':
$target = 'mods/search/mods/view???.php';
break;
}
require($target);
}
?>
|