Added basic support for message highlighting. Note that this needs quite
[squirrelmail.git] / src / msg_highlight.php
1 <?php
2 session_start();
3
4 if (!isset($config_php))
5 include("../config/config.php");
6 if (!isset($strings_php))
7 include("../functions/strings.php");
8 if (!isset($page_header_php))
9 include("../functions/page_header.php");
10 if (!isset($i18n_php))
11 include("../functions/i18n.php");
12 include("../src/load_prefs.php");
13
14 displayPageHeader($color, "None");
15
16 // MESSAGE HIGHLIGHTING
17 echo "<br>\n";
18 echo "<center><b>" . _("Message Highlighting") . "</b></center><br>\n";
19
20
21 if ($action == "save") {
22 if (!$id) $id = 0;
23 setPref($data_dir, $username, "highlight$id", $name.",".$newcolor.",".$value);
24 echo "<a href=\"options.php\">saved</a>";
25 } else {
26 if (!isset($id)) $id = count($message_highlight_list);
27
28 echo "<form action=\"msg_highlight.php\">\n";
29 echo "<input type=\"hidden\" value=\"save\" name=\"action\">\n";
30 echo "<input type=\"hidden\" value=\"$id\" name=\"id\">\n";
31 echo "<table width=75% cellpadding=2 cellspacing=0 border=0>\n";
32 echo " <tr>\n";
33 echo " <td>\n";
34 echo _("Identifying name") . ":";
35 echo " </td>\n";
36 echo " <td>\n";
37 echo " <input type=\"text\" value=\"".$message_highlight_list[$id]["name"]."\" name=\"name\">";
38 echo " </td>\n";
39 echo " </tr>\n";
40 echo " <tr>\n";
41 echo " <td>\n";
42 echo _("Color") . ":";
43 echo " </td>\n";
44 echo " <td>\n";
45 echo " <input type=\"text\" value=\"".$message_highlight_list[$id]["color"]."\" name=\"newcolor\">";
46 echo " </td>\n";
47 echo " </tr>\n";
48 echo " <tr>\n";
49 echo " <td>\n";
50 echo _("Match") . ":";
51 echo " </td>\n";
52 echo " <td>\n";
53 echo " <input type=\"text\" value=\"".$message_highlight_list[$id]["value"]."\" name=\"value\">";
54 echo " </td>\n";
55 echo " </tr>\n";
56 echo "</table>\n";
57 echo "<center><input type=\"submit\" value=\"" . _("Submit") . "\"></center>\n";
58 echo "</form>\n";
59 }
60 echo "</BODY></HTML>";
61 ?>