fixed minor bug with deleting folders that had quotes in them
[squirrelmail.git] / src / folders_rename_getname.php
CommitLineData
be69e508 1<?
d068c0ec 2 if (!isset($config_php))
3 include("../config/config.php");
4 if (!isset($strings_php))
5 include("../functions/strings.php");
6 if (!isset($page_header_php))
7 include("../functions/page_header.php");
8 if (!isset($imap_php))
9 include("../functions/imap.php");
be69e508 10
d3cdb279 11 include("../src/load_prefs.php");
12
e1469126 13 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
be69e508 14
813eba2f 15 $dm = sqimap_get_delimiter($imapConnection);
693ccbc9 16 if (substr($old, strlen($old) - strlen($dm)) == $dm) {
17 $isfolder = true;
18 $old = substr($old, 0, strlen($old) - 1);
19 }
20
d92b6f31 21 if (strpos($old, $dm)) {
22 $old_name = substr($old, strrpos($old, $dm)+1, strlen($old));
23 $old_parent = substr($old, 0, strrpos($old, $dm));
24 } else {
25 $old_name = $old;
26 $old_parent = "";
27 }
be69e508 28
d7092926 29 $old_name = stripslashes($old_name);
30
f8f9bed9 31 echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
32 displayPageHeader($color, "None");
be69e508 33 echo "<TABLE WIDTH=100% COLS=1>";
aae41ae9 34 echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>";
036a8a9d 35 echo _("Rename a folder");
aae41ae9 36 echo "</B></TD></TR>";
f8f9bed9 37 echo "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
be69e508 38 echo "<FORM ACTION=folders_rename_do.php METHOD=POST>\n";
036a8a9d 39 echo _("New name:");
40 echo " &nbsp;&nbsp;<INPUT TYPE=TEXT SIZE=25 NAME=new_name VALUE=\"$old_name\"><BR>\n";
693ccbc9 41 if ($isfolder)
42 echo "<INPUT TYPE=HIDDEN NAME=isfolder VALUE=\"true\">";
be69e508 43 echo "<INPUT TYPE=HIDDEN NAME=orig VALUE=\"$old\">";
036a8a9d 44 echo "<INPUT TYPE=SUBMIT VALUE=\"";
45 echo _("Submit");
46 echo "\">\n";
be69e508 47 echo "</FORM><BR></TD></TR>";
48 echo "</TABLE>";
49
50 /** Log out this session **/
813eba2f 51 sqimap_logout($imapConnection);
be69e508 52?>
53
54