Browse the code
| Revision log Information on the revision | |
|---|---|
| Revision: | 362 (differences) |
| Author: | xbright |
| Log message: |
* Updated AGPL headers |
| Change revision: | |
0
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
<?php // This file is a part of CodingTeam. Take a look at <http://codingteam.org>. // Copyright © 2007-2010 Erwan Briand <erwan@codingteam.net> // // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, version 3 only. // // 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 Affero General Public // License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. class head_search { private $ct_session, $ct_db, $page; function __construct($ct_session, $ct_db, $page) { $this->ct_session = $ct_session; $this->ct_db = $ct_db; $this->page = $page; if ($this->page[1] == 'project' && isset($this->page[2])) $this->in_array = array('projects-bugs' => i18n('Bugs'), 'projects-doc' => i18n('Documentation'), 'projects-forum' => i18n('Forum'), 'projects-news' => i18n('News')); else $this->in_array = array('projects' => i18n('Projects'), 'projects-bugs' => i18n('Bugs'), 'projects-doc' => i18n('Documentation'), 'projects-forum' => i18n('Forum'), 'projects-news' => i18n('News'), 'notepad' => i18n('Notepad'), 'users' => i18n('Users')); } function treatForms() { } function getPageContent() { echo ' <form action="search/" method="get"> <p style="float: left;padding-right: 3px;">'; if ($this->page[1] == 'project' && isset($this->page[2])) { echo '<input type="hidden" name="project" value="'. htmlspecialchars($this->page[2]).'" />'; $prj = getClass('projects.projects', $this->ct_db); $prj->load($this->page[2], 'dbname'); $prjname = htmlspecialchars($prj->getName()); $text = i18n('Search in %(project)s', array('project' => map_str($prjname, 15))); } else $text = i18n('Search'); echo '<input type="text" size="15" maxlength="255" name="keyword" '. 'style="width: 200px;" /> <select name="in" style="width: 140px;">'; foreach ($this->in_array as $key => $value) { echo '<option value="'.$key.'">'; $explode = explode('-', $key); if (isset($explode[1]) && !($this->page[1] == 'project' && isset($this->page[2]))) echo ' '; echo $value.'</option>'; } echo '</select> <input class="submit" type="submit" value="'.$text.'" /> </p> </form>'; } } ?>

CodingTeam