Clear out tabs for proper spaces
[squirrelmail.git] / src / folders_rename_getname.php
CommitLineData
59177427 1<?php
895905c0 2
35586184 3/**
4 * folders_rename_getname.php
5 *
15e6162e 6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
35586184 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Gets folder names and enables renaming
10 * Called from folders.php
11 *
12 * $Id$
13 */
ef870322 14
1c52ba77 15global $delimiter;
35586184 16
17require_once('../src/validate.php');
18require_once('../functions/imap.php');
d3cdb279 19
1c52ba77 20$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
be69e508 21
1c52ba77 22if (substr($old, strlen($old) - strlen($delimiter)) == $delimiter) {
23 $isfolder = TRUE;
24 $old = substr($old, 0, strlen($old) - 1);
25} else {
26 $isfolder = FALSE;
27}
be69e508 28
1c52ba77 29if (strpos($old, $delimiter)) {
30 $old_name = substr($old, strrpos($old, $delimiter)+1, strlen($old));
31 $old_parent = substr($old, 0, strrpos($old, $delimiter));
32} else {
33 $old_name = $old;
34 $old_parent = '';
35}
36
37displayPageHeader($color, 'None');
38echo "<br><TABLE align=center border=0 WIDTH=\"95%\" COLS=1>".
39 "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>".
40 _("Rename a folder").
41 "</B></TD></TR>".
42 "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
43 "<FORM ACTION=\"folders_rename_do.php\" METHOD=\"POST\">\n".
44 _("New name:").
45 "<br><B>$old_parent $delimiter </B><INPUT TYPE=TEXT SIZE=25 NAME=new_name VALUE=\"$old_name\"><BR>\n";
46if ( $isfolder ) {
47 echo "<INPUT TYPE=HIDDEN NAME=isfolder VALUE=\"true\">";
48}
49printf("<INPUT TYPE=HIDDEN NAME=orig VALUE=\"%s\">\n", $old);
50printf("<INPUT TYPE=HIDDEN NAME=old_name VALUE=\"%s\">\n", $old_name);
51echo "<INPUT TYPE=SUBMIT VALUE=\""._("Submit")."\">\n".
52 "</FORM><BR></TD></TR>".
53 "</TABLE>";
54
55/** Log out this session **/
56sqimap_logout($imapConnection);
57?>