1: <html>
2: <head>
3: <title>LON-CAPA Publishing Frame</title>
4: <script>
5:
6: function getfilename() {
7: document.publisher.filename.value=parent.LONCAPAToBePublished.location.href;
8: if ((document.publisher.filename.value.charAt(
9: document.publisher.filename.value.length-1)!='/') &&
10: (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) {
11: document.publisher.submit();
12: } else {
13: alert('Cannot publish directory');
14: }
15: }
16:
17: function getdfilename() {
18: document.dpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
19: if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) {
20: document.dpublisher.submit();
21: }
22: }
23:
24: function getufilename() {
25: document.upublisher.filename.value=parent.LONCAPAToBePublished.location.href;
26: if (document.upublisher.filename.value.indexOf('/adm/pubdir')==-1) {
27: document.upublisher.submit();
28: }
29: }
30:
31: function getrfilename() {
32: document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
33: if ((document.rpublisher.filename.value.charAt(
34: document.rpublisher.filename.value.length-1)!='/') &&
35: (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) {
36: document.rpublisher.submit();
37: } else {
38: alert('Cannot retrieve directory');
39: }
40: }
41:
42: function getdelfilename() {
43: document.del.filename.value=parent.LONCAPAToBePublished.location.href;
44: document.del.submit();
45: }
46:
47: function getrenamefilename() {
48: document.rename.filename.value=parent.LONCAPAToBePublished.location.href;
49: document.rename.submit();
50: }
51:
52: function getcpfilename() {
53: document.cp.filename.value=parent.LONCAPAToBePublished.location.href;
54: document.cp.submit();
55: }
56:
57: function getnewdirfilename() {
58: document.newdir.filename.value=parent.LONCAPAToBePublished.location.href;
59: if (document.newdir.filename.value.indexOf('/adm/pubdir')!=-1) {
60: document.newdir.filename.value=document.dpublisher.filename.value;
61: }
62: if ((document.newdir.filename.value.charAt(
63: document.newdir.filename.value.length-1)!='/') &&
64: (document.newdir.filename.value.indexOf('/adm/pubdir')==-1)) {
65: alert('Must create new subdirectory inside a directory');
66: } else {
67: document.newdir.submit();
68: }
69: }
70:
71: </script>
72: </head>
73: <body bgcolor="#FFFFFF">
74: <table border=2><tr><td>
75: <form name="publisher" action="/adm/publish" target="_parent" method="post">
76: <input type="hidden" name="filename" value="">
77: <input type="button" value="Publish this Resource" onClick="getfilename();">
78: </form>
79: </td><td>
80: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished"
81: method="post">
82: <input type="hidden" name="filename" value="">
83: <input type="button" value="List Directory" onClick="getdfilename();">
84: </form></td><td>
85: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
86: <input type="hidden" name="filename" value="">
87: <input type="button" value="Retrieve Old Version" onClick="getrfilename();">
88: </form></td><td>
89: <form name="upublisher" action="/adm/upload" target="_parent"
90: method="post" enctype="multipart/form-data">
91: <input type="hidden" name="filename" value="">
92: <input type="file" name="upfile" size="10">
93: <input type="button" value="Upload file" onClick="getufilename();">
94: </form>
95: </td></tr>
96: <tr>
97: <td>
98: <form name="del" action="/adm/cfile" target="_parent" method="post">
99: <input type="hidden" name="filename" value="">
100: <input type="hidden" name="action" value="delete">
101: <input type="button" value="Delete" onClick="getdelfilename();">
102: </form></td><td>
103: <form name="cp" action="/adm/cfile" target="_parent" method="post">
104: <input type="hidden" name="filename" value="">
105: <input type="hidden" name="action" value="copy">
106: <input type="text" size=15 name="newfilename" value="">
107: <input type="button" value="Copy" onClick="getcpfilename();">
108: </form></td><td>
109: <form name="rename" action="/adm/cfile" target="_parent" method="post">
110: <input type="hidden" name="filename" value="">
111: <input type="hidden" name="action" value="rename">
112: <input type="text" size=15 name="newfilename" value="">
113: <input type="button" value="Rename" onClick="getrenamefilename();">
114: </form></td><td>
115: <form name="newdir" action="/adm/cfile" target="_parent" method="post">
116: <input type="hidden" name="filename" value="">
117: <input type="hidden" name="action" value="newdir">
118: <input type="text" size=15 name="newfilename" value="">
119: <input type="button" value="New Subdirectory" onClick="getnewdirfilename();">
120: </form></td>
121: </tr>
122: </table>
123: </body>
124: </html>
125:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>