home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / admin / main_tools.inc < prev    next >
Encoding:
Text File  |  2003-07-06  |  2.6 KB  |  66 lines

  1. <?php
  2. /////////////////////////////////////////////////////////
  3. //    
  4. //    include/main.inc
  5. //
  6. //    (C)Copyright 2000-2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
  7. //
  8. //    This file is part of IlohaMail. IlohaMail is free software released 
  9. //    under the GPL license.  See enclosed file COPYING for details, or 
  10. //    see http://www.fsf.org/copyleft/gpl.html
  11. //
  12. /////////////////////////////////////////////////////////
  13. /*
  14.     This file contains the main message list tools.
  15.     (i.e. delete, mark read/unread, move controls)
  16. */
  17.  
  18.             reset($main_tool_fields); //$main_tool_fields is declared in main.php
  19.             while ( list($k,$field)=each($main_tool_fields) ){
  20.                 $field_var_name = $field."_name";
  21.                 $$field_var_name = $field.($main_tool_shown?"_2":"");
  22.             }
  23.             
  24.             echo "<table width=\"100%\"><tr>";
  25.             echo "<td>";
  26.             if (strcmp($folder,$my_prefs["trash_name"])==0){
  27.                 echo "<input type=\"hidden\" name=\"$expunge_name\" value=\"1\">\n";
  28.                 echo "<input type=\"submit\" name=\"$empty_trash_name\" value=\"".$mainStrings[11]."\">\n";
  29.             }else{
  30.                 echo "<input type=\"submit\" name=\"$delete_selected_name\" value=\"".$mainStrings[10]."\">\n";
  31.             }
  32.             echo "</td><td><span class=mainLight>\n";
  33.             if ($ICL_CAPABILITY["flags"]){            
  34.                 $flag_buttons = "<input type=\"submit\" name=\"$mark_read_name\" value=\"".$mainStrings[21]."\">\n";
  35.                 $flag_buttons.= "<input type=\"submit\" name=\"$mark_unread_name\" value=\"".$mainStrings[22]."\">\n";
  36.                 $flag_group = str_replace("%b", $flag_buttons, $mainStrings[20]);
  37.                 echo $flag_group."\n";
  38.             }
  39.             echo "</span></td><td align=\"right\">";
  40.             if ($ICL_CAPABILITY["folders"]){
  41.                 if (!is_array($folderlist)){
  42.                     $clock->register("pre read cached folders");
  43.                     $cached_folders = cache_read($loginID, $host, "folders");
  44.                     $clock->register("post read cached folders");
  45.                     if (is_array($cached_folders)){
  46.                         echo "<!-- Read cache! //-->\n";
  47.                         $folderlist = $cached_folders;
  48.                     }else{
  49.                         echo "<!-- No cache...";
  50.                         if ($my_prefs["hideUnsubscribed"]) $folderlist = iil_C_ListSubscribed($conn, $my_prefs["rootdir"], "*");
  51.                         else $folderlist = iil_C_ListMailboxes($conn, $my_prefs["rootdir"], "*");
  52.                         $cache_result = cache_write($loginID, $host, "folders", $folderlist);
  53.                         echo "write: $cache_result //-->\n";
  54.                     }
  55.                 }
  56.                 echo "<select name=\"$moveto_name\">\n";
  57.                 echo "<option value=\"\"></option>\n";
  58.                 RootedFolderOptions($folderlist, $defaults, $my_prefs["rootdir"]);
  59.                 echo "</select>";
  60.                 echo "<input type=submit name=\"$move_selected_name\" value=\"".$mainStrings[12]."\">";
  61.             }
  62.             echo "</td></tr></table>\n";
  63.             
  64.             $main_tool_shown = true;
  65.  
  66. ?>