This blob has been accessed 402 times via Git panel.
- <?php
- require_once("core.php");
- if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
- exit;
- }
- $search_folders = kartero_sort_folders($host,imap_list($mbox,$host,"*"));
- if (is_array($search_folders)) {
- echo "<title>Kartero - Search $folder</title>";
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>";
- echo "<form method=\"post\">";
- echo "<td><select class=\"input\" name=\"box\">";
- foreach ($search_folders as $search_folder) {
- $search_folder = str_replace($host,"",$search_folder);
- if ($folder == $search_folder) {
- echo "<option selected>$search_folder</option>";
- }
- else {
- echo "<option>$search_folder</option>";
- }
- }
- echo "</select></td>";
- echo "<td width=\"2\"></td>";
- echo "<td><select class=\"input\" name=\"imap_search_where\">";
- echo "<option value=\"FROM\">From:</option>";
- if (strtolower($folder) == strtolower("Sent")) {
- echo "<option value=\"TO\" selected>To:</option>";
- }
- else {
- echo "<option value=\"TO\">To:</option>";
- }
- echo "<option value=\"CC\">Cc:</option>";
- echo "<option value=\"SUBJECT\">Subject</option>";
- echo "<option value=\"TEXT\">Text</option>";
- echo "<option value=\"BODY\">Body</option>";
- echo "</select></td>";
- echo "<td width=\"2\"></td>";
- echo "<td><input required type=\"text\" class=\"input\" name=\"imap_search_query\"></td>";
- echo "<td width=\"2\"></td>";
- echo "<td width=\"40\"><input type=\"submit\" value=\"search\"></td>";
- echo "</form>";
- echo "</tr></table>";
- }
- ?>