* * 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 '

'._("Server-Side Mail Filtering"); if($customtitle) { print ' - '.$customtitle; } print '

'; } function print_my_header() { global $color; echo "
\n". "\n". "\n". "
\n". "
" . _("Server-Side Mail Filtering"). "
\n". "
\n"; } function printheader2($customtitle) { global $color; print '
'. _("Server-Side Mail Filtering"); if($customtitle) { print ' - '.$customtitle; } print '
'; } function printfooter2() { print '
'; print '
'; } function print_all_sections_start() { echo "\n"; } function print_all_sections_end() { echo "
"; } 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 '

'; if(isset($_SESSION['comm']['new'])) { print _("Successfully added new rule."); } elseif (isset($_SESSION['comm']['edited'])) { print _("Successfully updated rule #"); print $_SESSION['comm']['edited']+1; } elseif (isset($_SESSION['comm']['deleted'])) { if(is_array($_SESSION['comm']['deleted'])) { print _("Successfully deleted rules #"); for ($i=0; $i

'; session_unregister('comm'); } if(isset($scriptinfo['created'])) { avelsieve_print_scriptinfo(); } print "

"._("The following table summarizes your current mail filtering rules.")."

"; /* NEW*/ print ' "; } function print_table_footer() { print '
'; print _("No"); print ''; print ''; print _("Description of Rule"); print ' ('; print _("Display as:"); foreach($displaymodes as $id=>$name) { if($mode == $id) { print ' '.$name.''; } else { print ' '.$name.''; } } print ')'; print " "._("Options")."
'; } function print_buttons () { print '
'; print_addnewrulebutton(); /* */ print '
'; } function print_buttons_new () { print '
'; print_addnewrulebutton(); 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 '
'; print ''; print '
'; /* Link to add Spam rule */ if($spamrule_enable == true) { print '
'; print ''; 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 ''.$desc.''; } 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 '

'._("Created:").' '.$cr.'.
'. _("Last modified:").' '.$mo.'

'; } else { print '

'._("Created:").' '. date("Y-m-d H:i:s",$scriptinfo['created']).'. '. _("Last modified:").' '. date("Y-m-d H:i:s",$scriptinfo['modified']).'

'; } if(AVELSIEVE_DEBUG == 1) { global $avelsieve_version; print '

Versioning Information:

'; print ''; } } ?>