Lots of little UI tweaks and some handsome borders in the Options and Folder areas.
[squirrelmail.git] / src / folders_rename_getname.php
CommitLineData
59177427 1<?php
ef870322 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
245a6892 10 **
11 ** $Id$
ef870322 12 **/
13
f740c049 14 include('../src/validate.php');
f740c049 15 include("../functions/page_header.php");
16 include("../functions/imap.php");
d3cdb279 17 include("../src/load_prefs.php");
18
e1469126 19 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
be69e508 20
813eba2f 21 $dm = sqimap_get_delimiter($imapConnection);
693ccbc9 22 if (substr($old, strlen($old) - strlen($dm)) == $dm) {
23 $isfolder = true;
24 $old = substr($old, 0, strlen($old) - 1);
25 }
26
d92b6f31 27 if (strpos($old, $dm)) {
28 $old_name = substr($old, strrpos($old, $dm)+1, strlen($old));
29 $old_parent = substr($old, 0, strrpos($old, $dm));
30 } else {
31 $old_name = $old;
32 $old_parent = "";
33 }
be69e508 34
f8f9bed9 35 displayPageHeader($color, "None");
e9f8ea4e 36 echo "<br><TABLE align=center border=0 WIDTH=95% COLS=1>";
aae41ae9 37 echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>";
036a8a9d 38 echo _("Rename a folder");
aae41ae9 39 echo "</B></TD></TR>";
f8f9bed9 40 echo "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
9f2215a1 41 echo "<FORM ACTION=\"folders_rename_do.php\" METHOD=\"POST\">\n";
036a8a9d 42 echo _("New name:");
5bdd7223 43 echo "<br><B>$old_parent . </B><INPUT TYPE=TEXT SIZE=25 NAME=new_name VALUE=\"$old_name\"><BR>\n";
1863670d 44 if (isset($isfolder))
693ccbc9 45 echo "<INPUT TYPE=HIDDEN NAME=isfolder VALUE=\"true\">";
5bdd7223 46 printf("<INPUT TYPE=HIDDEN NAME=orig VALUE=\"%s\">\n", $old);
47 printf("<INPUT TYPE=HIDDEN NAME=old_name VALUE=\"%s\">\n", $old_name);
48 echo "<INPUT TYPE=SUBMIT VALUE=\""._("Submit")."\">\n";
be69e508 49 echo "</FORM><BR></TD></TR>";
50 echo "</TABLE>";
51
52 /** Log out this session **/
813eba2f 53 sqimap_logout($imapConnection);
be69e508 54?>
55
56