Changed mailbox display so that flags would be aligned center.
[squirrelmail.git] / src / folders_rename_getname.php
1 <?php
2 /**
3 ** folders_rename_getname.php
4 **
5 ** Copyright (c) 1999-2000 The SquirrelMail development team
6 ** Licensed under the GNU GPL. For full terms see the file COPYING.
7 **
8 ** Gets folder names and enables renaming
9 ** Called from folders.php
10 **/
11
12 session_start();
13
14 if (!isset($config_php))
15 include("../config/config.php");
16 if (!isset($strings_php))
17 include("../functions/strings.php");
18 if (!isset($page_header_php))
19 include("../functions/page_header.php");
20 if (!isset($imap_php))
21 include("../functions/imap.php");
22
23 include("../src/load_prefs.php");
24
25 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
26
27 $dm = sqimap_get_delimiter($imapConnection);
28 if (substr($old, strlen($old) - strlen($dm)) == $dm) {
29 $isfolder = true;
30 $old = substr($old, 0, strlen($old) - 1);
31 }
32
33 if (strpos($old, $dm)) {
34 $old_name = substr($old, strrpos($old, $dm)+1, strlen($old));
35 $old_parent = substr($old, 0, strrpos($old, $dm));
36 } else {
37 $old_name = $old;
38 $old_parent = "";
39 }
40
41 $old_name = sqStripSlashes($old_name);
42
43 displayPageHeader($color, "None");
44 echo "<br><TABLE align=center border=0 WIDTH=95% COLS=1>";
45 echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>";
46 echo _("Rename a folder");
47 echo "</B></TD></TR>";
48 echo "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
49 echo "<FORM ACTION=\"folders_rename_do.php\" METHOD=\"POST\">\n";
50 echo _("New name:");
51 echo "<br><B>$old_parent . </B><INPUT TYPE=TEXT SIZE=25 NAME=new_name VALUE=\"$old_name\"><BR>\n";
52 if ($isfolder)
53 echo "<INPUT TYPE=HIDDEN NAME=isfolder VALUE=\"true\">";
54 printf("<INPUT TYPE=HIDDEN NAME=orig VALUE=\"%s\">\n", $old);
55 printf("<INPUT TYPE=HIDDEN NAME=old_name VALUE=\"%s\">\n", $old_name);
56 echo "<INPUT TYPE=SUBMIT VALUE=\""._("Submit")."\">\n";
57 echo "</FORM><BR></TD></TR>";
58 echo "</TABLE>";
59
60 /** Log out this session **/
61 sqimap_logout($imapConnection);
62 ?>
63
64