This repository was archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrename.php
More file actions
executable file
·59 lines (55 loc) · 1.91 KB
/
rename.php
File metadata and controls
executable file
·59 lines (55 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
include_once('globals.php');
include_once('checklogin.php');
include_once('classes/folder.php');
include_once('classes/file.php');
//----------Start XHTML Output----------------------------------//
require('doctype.php');
require('appearance.php');
echo "<link rel=\"stylesheet\" href=\"skins/$skin/default.css\" type=\"text/css\" title=\"$skin\" />\n";
foreach($altskins as $altskin)
echo "<link rel=\"alternate stylesheet\" href=\"skins/$altskin/default.css\" type=\"text/css\" title=\"$altskin\" />\n";
?>
<title><?php echo $appname; ?> - Rename File</title>
<style type="text/css"></style>
</head>
<body>
<?php
/**** begin html head *****/
require('htmlhead.php'); //starts main container
/****end html head content ****/
?>
<div>
<?php
if(isset($_GET['fileid']) || isset($_GET['folderid']))
{
if(isset($_GET['fileid']))
$curr = new File($_GET['fileid'], $db);
else
$curr = new Folder($_GET['folderid'], $db);
echo "<form method=\"post\" action=\"files.php\"><fieldset>";
echo "<label for=\"newname\">Enter new name:</label>";
echo "<input type=\"text\" name=\"newname\" id=\"newname\" size=\"30\" value=\"".htmlspecialchars($curr->getNameNoVer())."\" /><br />";
echo "<label for=\"newdesc\">Enter new description:</label>";
echo "<input type=\"text\" name=\"newdesc\" id=\"newdesc\" size=\"30\" value=\"".htmlspecialchars($curr->getDesc())."\" />";
echo "<input type=\"hidden\" name=\"rename\" value=\"rename\" />";
if(isset($_GET['fileid']))
echo "<input type=\"hidden\" name=\"file\" value=\"".$_GET['fileid']."\" />";
else
echo "<input type=\"hidden\" name=\"folder\" value=\"".$_GET['folderid']."\" />";
?>
<br />
<input type="submit" value="Rename" />
</fieldset></form>
<?php
}
else
echo "<p>No file or folder selected.</p>";
?>
</div>
<?php
//include rest of html layout file
require('htmlcontentfoot.php');// ends main container
?>
</body>
</html>