phase 1 of interface improvements -- alternating row colors (needs some work)
[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
2a32fc83 14 session_start();
15
d068c0ec 16 if (!isset($strings_php))
17 include("../functions/strings.php");
1863670d 18 if (!isset($config_php))
19 include("../config/config.php");
d068c0ec 20 if (!isset($page_header_php))
21 include("../functions/page_header.php");
22 if (!isset($imap_php))
23 include("../functions/imap.php");
be69e508 24
d3cdb279 25 include("../src/load_prefs.php");
26
e1469126 27 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
be69e508 28
813eba2f 29 $dm = sqimap_get_delimiter($imapConnection);
693ccbc9 30 if (substr($old, strlen($old) - strlen($dm)) == $dm) {
31 $isfolder = true;
32 $old = substr($old, 0, strlen($old) - 1);
33 }
34
d92b6f31 35 if (strpos($old, $dm)) {
36 $old_name = substr($old, strrpos($old, $dm)+1, strlen($old));
37 $old_parent = substr($old, 0, strrpos($old, $dm));
38 } else {
39 $old_name = $old;
40 $old_parent = "";
41 }
be69e508 42
f8f9bed9 43 displayPageHeader($color, "None");
e9f8ea4e 44 echo "<br><TABLE align=center border=0 WIDTH=95% COLS=1>";
aae41ae9 45 echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>";
036a8a9d 46 echo _("Rename a folder");
aae41ae9 47 echo "</B></TD></TR>";
f8f9bed9 48 echo "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
9f2215a1 49 echo "<FORM ACTION=\"folders_rename_do.php\" METHOD=\"POST\">\n";
036a8a9d 50 echo _("New name:");
5bdd7223 51 echo "<br><B>$old_parent . </B><INPUT TYPE=TEXT SIZE=25 NAME=new_name VALUE=\"$old_name\"><BR>\n";
1863670d 52 if (isset($isfolder))
693ccbc9 53 echo "<INPUT TYPE=HIDDEN NAME=isfolder VALUE=\"true\">";
5bdd7223 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";
be69e508 57 echo "</FORM><BR></TD></TR>";
58 echo "</TABLE>";
59
60 /** Log out this session **/
813eba2f 61 sqimap_logout($imapConnection);
be69e508 62?>
63
64