Rev 2 | Rev 4 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 3 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | mysql_query("update vts_fehlerlog set anzahlsolved = anzahl where text like '%".mysql_real_escape_string($_REQUEST['solveall'])."%'"); |
32 | mysql_query("update vts_fehlerlog set anzahlsolved = anzahl where text like '%".mysql_real_escape_string($_REQUEST['solveall'])."%'"); |
33 | header('location:?sort='.urlencode($sort)); // avoid F5 |
33 | header('location:?sort='.urlencode($sort)); // avoid F5 |
34 | die(); |
34 | die(); |
35 | } |
35 | } |
36 | 36 | ||
- | 37 | $filter_add = ''; |
|
37 | $filter = isset($_REQUEST['filter']) ? '%'.mysql_real_escape_string($filter).'%' : ''; |
38 | if (isset($_REQUEST['filter'])) { |
- | 39 | $ary = explode(' ', $_REQUEST['filter']); |
|
- | 40 | foreach ($ary as $a) { |
|
- | 41 | $a = trim($a); |
|
- | 42 | if ($a == '') continue; |
|
- | 43 | ||
- | 44 | if (substr($a,0,1) == '-') { |
|
- | 45 | $negate = "NOT "; |
|
- | 46 | $a = substr($a, 1); // remove "-" |
|
- | 47 | } else { |
|
- | 48 | $negate = " "; |
|
- | 49 | } |
|
- | 50 | ||
38 | $filter_add = $filter ? "and text like '%".mysql_real_escape_string($filter)."%'" : ''; |
51 | $filter_add .= " and text $negate like '".mysql_real_escape_string('%'.$a.'%')."' "; |
- | 52 | } |
|
- | 53 | } |
|
39 | 54 | ||
40 | $sort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : ''; |
55 | $sort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : ''; |
41 | if ($sort == '') $sort = 'anzahl'; |
56 | if ($sort == '') $sort = 'anzahl'; |
42 | if (($sort != 'anzahl') && ($sort != 'letzter') && ($sort != 'random')) die('Sort falsch'); |
57 | if (($sort != 'anzahl') && ($sort != 'letzter') && ($sort != 'random')) die('Sort falsch'); |
43 | 58 | ||
Line 62... | Line 77... | ||
62 | if (logviewer_allow_solvemark()) { |
77 | if (logviewer_allow_solvemark()) { |
63 | echo ' | <a href="?sort='.htmlentities($sort).'&solveall='.urlencode($_REQUEST['filter']).'" onclick="return confirm(\'Are you sure?\');">Solve all</a>'; |
78 | echo ' | <a href="?sort='.htmlentities($sort).'&solveall='.urlencode($_REQUEST['filter']).'" onclick="return confirm(\'Are you sure?\');">Solve all</a>'; |
64 | } |
79 | } |
65 | } |
80 | } |
66 | ?></p> |
81 | ?></p> |
- | 82 | <p><font size="-3">Search terms divided with whitespace. Prepend hyphen to exclude a search term. Only field "Message" will be searched.</font></p> |
|
67 | </form> |
83 | </form> |
68 | 84 | ||
69 | <?php |
85 | <?php |
70 | if (!empty($add_filters)) { |
86 | if (!empty($add_filters)) { |
71 | echo '<span class="filter_hint">Showing max. '.COUNT.' results of max. '.MAXYEARS.' years; Hardcoded filter: '.htmlentities($add_filters).'</span>'; |
87 | echo '<span class="filter_hint">Showing max. '.COUNT.' results of max. '.MAXYEARS.' years; Hardcoded filter: '.htmlentities($add_filters).'</span>'; |