*
* Licensed under the GNU GPL. For full terms see the file COPYING that came
* with the Squirrelmail distribution.
*
* $Id: table_html.php,v 1.8 2004/01/26 13:36:02 avel Exp $
*/
/* HTML Functions for main GUI - table.php */
function print_header($customtitle) {
print '
";
}
function print_section_start($title) {
global $color, $addrule_error;
print "
".
$title .
"
";
if($addrule_error) {
print '
'.
$addrule_error .
'
';
}
print "
";
}
function print_section_end() {
global $color;
echo "
\n";
//echo "";
echo "
\n";
}
function print_create_new() {
print '
';
print _("Here you can add or delete filtering rules for your email account. These filters will always apply to your incoming mail, wherever you check your email.");
print '
';
print "
" . _("You don't have any rules yet. Feel free to add any with the button "Add a New Rule". When you are done, please select "Save Changes" to get back to the main options screen.") . "
";
}
function print_table_header() {
global $color, $conservative, $displaymodes, $mode, $scriptinfo;
print "
"._("Here you can add or delete filtering rules for your email account. These filters will always apply to your incoming mail, wherever you check your email.")."
";
if($conservative) {
print "
"._("When you are done with editing, remember to select "Save Changes" to activate your changes!")."
";
}
/* Print the 'communication' string from the previous screen */
if(isset($_SESSION['comm'])) {
print '
';
}
function print_addnewrulebutton() {
global $spamrule_enable;
/* Following code is alternative, if you only like the user to have
* only one spamrule per script */
/*
global $rules;
if($spamrule_enable == true) {
$spamrule_exists = false;
if (isset($rules)) {
foreach($rules as $no=>$rl) {
if($rl['type'] == 10) {
$spamrule_exists = true;
}
}
}
if ($spamrule_exists == false) {
print '';
}
}
*/
print '';
/* Link to add Spam rule */
if($spamrule_enable == true) {
print '';
}
if($spamrule_enable == true) {
print '';
}
}
function print_footer() {
global $conservative;
if($conservative) {
print '
';
print _("When you are done, please click the button below to return to your webmail.");
print '
';
}
}
/**
* Print link for corresponding rule function (such as edit, delete, move).
*
* @param name str
* @param i int
* @param url str which page to link to
* @param xtra str extra stuff to be passed to URL
*/
function avelsieve_print_toolicon ($name, $i, $url = "table.php", $xtra = "", $attribs=array()) {
global $useimages, $imagetheme, $location, $avelsievetools;
$desc = $avelsievetools[$name]['desc'];
$img = $avelsievetools[$name]['img'];
if(empty($xtra)) {
print ' 0) {
foreach($attribs as $key=>$val) {
print ' '.$key.'="'.$val.'"';
}
}
print '>';
if($useimages) {
print '';
} else {
print " | ". $desc;
}
print '';
}
/**
* Print script information (last modification date etc.)
*/
function avelsieve_print_scriptinfo() {
global $scriptinfo;
if(function_exists('getLongDateString')) {
bindtextdomain('squirrelmail', SM_PATH . 'locale');
textdomain('squirrelmail');
$cr = getLongDateString($scriptinfo['created']);
$mo = getLongDateString($scriptinfo['modified']);
bindtextdomain ('avelsieve', SM_PATH . 'plugins/avelsieve/locale');
textdomain ('avelsieve');
print '