OSDN Git Service

original file
[nucleus-jp/nucleus-plugins.git] / trunk / NP_TinyMCE2j / tinymce2j / plugins / filemanager / InsertFile / move.php
1 <?php
2 /***********************************************************************
3 ** Title.........:    Insert File Dialog, File Manager
4 ** Version.......:    1.1
5 ** Authors.......:    Al Rashid <alrashid@klokan.sk>
6 **                    Xiang Wei ZHUO <wei@zhuo.org>
7 ** Filename......:    move.php
8 ** URL...........:    http://alrashid.klokan.sk/insFile/
9 ** Last changed..:    23 July 2004
10 ***********************************************************************/
11
12 require('config.inc.php');
13 require('functions.php');
14 ?>
15
16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
17 <html>
18         <head>
19         <title>Folder dialog</title>
20         <?php
21                 echo '<meta http-equiv="content-language" content="'.$MY_LANG.'" />'."\n";
22                 echo '<meta http-equiv="Content-Type" content="text/html; charset='.$MY_CHARSET.'" />'."\n";
23                 echo '<meta name="author" content="AlRashid, www: http://alrashid.klokan.sk; mailto:alrashid@klokan.sk" />'."\n";
24         ?>
25
26 <style type="text/css">
27  /*<![CDATA[*/
28  html, body {  background-color: ButtonFace;  color: ButtonText; font: 11px Tahoma,Verdana,sans-serif; margin: 0; padding: 0;}
29 body { padding: 5px; }
30  .title { background-color: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; border-bottom: 1px  solid black; letter-spacing: 2px;}
31 select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
32 .buttons { width: 70px; text-align: center; }
33 form { padding: 0px;  margin: 0;}
34 form .elements{
35         padding: 10px; text-align: center;
36 }
37  /*]]>*/
38  </style>
39         <script type="text/javascript" src="js/popup.js"></script>
40         <script type="text/javascript">
41         /*<![CDATA[*/
42                 window.resizeTo(550, 200);
43
44                   function onCancel() {
45                         __dlg_close(null);
46                         return false;
47                 }
48
49                 function onOK() {
50                         // pass data back to the calling window
51                         var param = new Object();
52                         var selection = document.forms[0].newpath;
53                         var newDir = selection.options[selection.selectedIndex].value;
54                         param['newpath'] = newDir;
55                           __dlg_close(param);
56                           return false;
57                 }
58
59                 function Init() {
60                         __dlg_init();
61                 }
62
63                 function refreshDirs() {
64                         var allPaths = document.forms[0].newpath.options;
65                         var fields = ["/" <?php dirs($MY_DOCUMENT_ROOT,'');?>];
66                         for(i=0; i<fields.length; i++) {
67                                 var newElem =        document.createElement("OPTION");
68                                 var newValue = fields[i];
69                                 newElem.text = newValue;
70                                 newElem.value = newValue;
71                                 allPaths.add(newElem);
72                         }
73                 }
74 /*]]>*/
75 </script>
76 </head>
77 <body onload="Init()">
78         <div class="title"><?php echo $MY_MESSAGES['selectfolder']; ?></div>
79         <form action="">
80                 <div class="elements">
81                         <label for="newpath">
82                                         <?php echo $MY_MESSAGES['directory']; ?>
83                         </label>
84                         <select name="newpath" id="newpath" style="width:35em">
85                         </select>
86                 </div>
87                 <div style="text-align: right;">
88                          <hr />
89                         <button type="button" class="buttons" onclick="return onCancel();"><?php echo $MY_MESSAGES['cancel']; ?></button>
90                         <button type="button" class="buttons" onclick="return onOK();"><?php echo $MY_MESSAGES['ok']; ?></button>
91                 </div>
92         </form>
93         <script type="text/javascript">
94         /*<![CDATA[*/
95                 refreshDirs();
96         /*]]>*/
97         </script>
98 </body>
99 </html>