<?if(VALID_DOCUMENT != 1) die('what?');?>
<form action="<?=$_SERVER['PHP_SELF']; ?>" method="post">
<table align="center" width="75%">
<tr>
<th class="title" colspan="2">E-Mails Search</th>
</tr>
<tr>
<td colspan="2">
<center><input name="query" type="text" size="65"/></center></td>
</tr>
<tr>
<th colspan="2">
<center>
<input name="action" value="show-folder" type="hidden"/>
<input value="search" type="submit"/>
</center>
</th>
</tr>
<tr>
<th>Search in</th>
<th>Query Type</th>
</tr>
<tr>
<td width="50%">
<input name="subject" type="checkbox" checked><b> subject</b><br>
<input name="email" type="checkbox" checked><b>e-mail</b> (to, from, cc)<br>
<input name="body" type="checkbox"><b>mail body</b> (may be slow search)<br>
</td>
<td>
<input name="type" value="and" type="radio" checked> <b>AND</b><br>
<input name="type" value="or" type="radio"> <b>OR</b><br>
You can use quotes in query<br>
(for example: "Re: your mail" )
</td>
</tr>
<tr>
<th colspan="2">Mail Folders</th>
</tr>
<tr>
<td colspan="2">
<?foreach(get_mailboxes_names() as $k=>$n){?>
<input type="checkbox" checked="checked" name="mbox[]" value="<?=$n?>"/> <b><?=$k?></b><br/>
<?}?>
<br/>
<input type="checkbox" onClick="setChecked(this.form,'mbox[]',this.checked);" checked="checked" title="check/uncheck all"/><i>check/uncheck all</i>
</td>
</tr>
</table>
</form>