File: search.php

package info (click to toggle)
webcalendar 0.9.45-4sarge7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,888 kB
  • ctags: 4,775
  • sloc: php: 16,990; sql: 1,272; perl: 777; sh: 120; makefile: 45
file content (58 lines) | stat: -rw-r--r-- 1,732 bytes parent folder | download
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
<?php
	include_once 'includes/init.php';

	$INC = array('js/search.php');
	print_header($INC);
?>
<h2><?php 
	etranslate("Search"); 
?></h2>

<form action="search_handler.php" method="post" name="searchformentry" style="margin-left:13px;">

<label for="keywordsadv"><?php etranslate("Keywords")?>:&nbsp;</label>
<input type="text" name="keywords" id="keywordsadv" size="30" />&nbsp;
<input type="submit" value="<?php etranslate("Search")?>" /><br />
<?php 
	if ( ($login == "__public__" && $public_access_others != "Y") || (! $is_admin) ) {
		echo "</form>";
	} else {
		echo "<div id=\"advlink\"><a title=\"" . 
			translate("Advanced Search") . "\" href=\"javascript:show('adv'); hide('advlink');\">" . 
			translate("Advanced Search") . "</a></div>";
?>
<table id="adv" style="display:none;">
<tr><td style="vertical-align:top; text-align:right; font-weight:bold; width:60px;">
	<?php etranslate("Users"); ?>:&nbsp;</td><td>
<?php
  $users = get_my_users ();
  $size = 0;
  $out = "";
  for ( $i = 0; $i < count ( $users ); $i++ ) {
    $out .= "<option value=\"" . $users[$i]['cal_login'] . "\"";
    if ( $users[$i]['cal_login'] == $login )
      $out .= " selected=\"selected\"";
    $out .= ">" . $users[$i]['cal_fullname'] . "</option>\n";
  }
  if ( count ( $users ) > 50 )
    $size = 15;
  else if ( count ( $users ) > 10 )
    $size = 10;
  else
    $size = count ( $users );
?>
<select name="users[]" size="<?php echo $size;?>" multiple="multiple"><?php echo $out; ?></select>
<?php 
  if ( $groups_enabled == "Y" ) {
   echo "<input type=\"button\" onclick=\"selectUsers()\" value=\"" .
      translate("Select") . "...\" />\n";
  }
?>
</td></tr>
</table>
</form>
<?php } ?>

<?php print_trailer(); ?>
</body>
</html>