]> git.vanrenterghem.biz Git - www.vanrenterghem.biz.git/blob - phpBB2_old/xs_mod/tpl/edit_file.tpl
2bc5d9e18cb8990824c51c73c104cfd99b3ca91c
[www.vanrenterghem.biz.git] / phpBB2_old / xs_mod / tpl / edit_file.tpl
1 <!-- BEGIN xs_file_version -->
2 /***************************************************************************
3  *                              edit_file.tpl
4  *                              -------------
5  *   copyright            : (C) 2003, 2004 CyberAlien
6  *   support              : http://www.phpbbstyles.com
7  *
8  *   version              : 2.0.1
9  *
10  *   file revision        : 45
11  *   project revision     : 51
12  *   last modified        : 25 Aug 2004  11:51:48
13  *
14  ***************************************************************************/
15 <!-- END xs_file_version -->
17 <script language="JavaScript" type="text/javascript">
18 <!--
20 function xs_replace()
21 {
22         var old = document.edit.content.value;
23         var search = document.edit.edit_replace1.value;
24         var replace = document.edit.edit_replace2.value;
25         var data = '';
26         var pos = old.indexOf(search);
27         if(pos == -1)
28         {
29                 alert('{L_XS_FILEEDIT_SEARCH_NOMATCH}');
30         }
31         else
32         {
33                 data = old.substring(0, pos) + replace + old.substring(pos + search.length, old.length);
34                 document.edit.edit_replace3.value = old;
35                 document.edit.content.value = data;
36                 alert('{L_XS_FILEEDIT_SEARCH_MATCH1}');
37         }
38 }
40 function xs_replace_all()
41 {
42         var old = document.edit.content.value;
43         var search = document.edit.edit_replace1.value;
44         var replace = document.edit.edit_replace2.value;
45         var data = '';
46         var pos = old.indexOf(search);
47         var count = 0;
48         var backup = old;
49         if(pos == -1)
50         {
51                 alert('{L_XS_FILEEDIT_SEARCH_NOMATCH}');
52         }
53         else
54         {
55                 while(pos >= 0)
56                 {
57                         data = data + old.substring(0, pos) + replace;
58                         old = old.substring(pos + search.length, old.length);
59                         pos = old.indexOf(search);
60                         count ++;
61                 }
62                 data = data + old;
63                 document.edit.edit_replace3.value = backup;
64                 document.edit.content.value = data;
65                 alert('{L_XS_FILEEDIT_SEARCH_MATCHES}');
66         }
67 }
69 function xs_replace_restore()
70 {
71         var data = document.edit.edit_replace3.value;
72         if(data.length < 1)
73         {
74                 alert('{L_XS_FILEEDIT_NOUNDO}');
75         }
76         else
77         {
78                 document.edit.content.value = data;
79                 alert('{L_XS_FILEEDIT_UNDO_COMPLETE}');
80         }
81 }
83 //-->
84 </script>
86 <h1>{L_XS_EDIT_TEMPLATES}</h1>
88 <p>{L_XS_EDIT_TEMPLATE_COMMENT2}</p>
90 <form action="{U_ACTION}" method="post" enctype="multipart/form-data" name="edit" style="display: inline;">{S_HIDDEN_FIELDS}{S_FILTER}<input type="hidden" name="dir" value="{DIR}" /><input type="hidden" name="edit" value="{FILE}" />
91 <table cellpadding="4" cellspacing="1" border="0" class="forumline" align="center" width="100%">
92 <tr>
93         <th>{L_XS_FILEEDIT_EDIT_NAME} {FULLFILE}</th>
94 </tr>
95 <tr>
96         <td class="row3" align="left" valign="middle"><span class="genmed">
97         {L_XS_FILEEDIT_LOCATION}
98         <!-- BEGIN tree -->
99         {tree.SEPARATOR}
100         <a href="{tree.URL}">{tree.ITEM}</a>
101         <!-- END tree -->
102         / <a href="{U_EDIT}">{FILE}</a>
103         &nbsp;
104         |
105         &nbsp;
106         [<a href="{U_EDIT}">{L_XS_FILEEDIT_RELOAD_LC}</a>]
107         [<a href="{U_DOWNLOAD}">{L_XS_FILEEDIT_DOWNLOAD_LC}</a>]
108         </span></td>
109 </tr>
110 <tr>
111         <td class="row1" align="left"><textarea name="content" cols="120" rows="35" style="width: 100%">{CONTENT}</textarea></td>
112 </tr>
113 <tr>
114         <td class="row1" align="left"><span class="gen"><label><input type="checkbox" name="trim" checked="checked" /> {L_XS_FILEEDIT_TRIM}</label></span></td>
115 </tr>
116 <tr>
117         <th>{L_XS_FILEEDIT_FUNCTIONS}</th>
118 </tr>
119 <input type="hidden" name="edit_replace3" value="" />
120 <tr>
121         <td class="row1" align="left"><span class="genmed">
122         {L_XS_FILEEDIT_REPLACE1}<textarea name="edit_replace1" class="post" cols="20" rows="2"></textarea>{L_XS_FILEEDIT_REPLACE2}<textarea name="edit_replace2" class="post" cols="20" rows="2"></textarea> [<a href="javascript:void(0);" onclick="xs_replace();">{L_XS_FILEEDIT_REPLACE_FIRST_LC}</a>] [<a href="javascript:void(0);" onclick="xs_replace_all();">{L_XS_FILEEDIT_REPLACE_ALL_LC}</a>] [<a href="javascript:void(0)" onclick="xs_replace_restore();">{L_XS_FILEEDIT_REPLACE_UNDO_LC}</a>]<br />
123         </span></td>
124 </tr>
125 <tr>
126         <th>{L_XS_FILEEDIT_BACKUPS}</th>
127 </tr>
128 <tr>
129         <td class="row1" align="left"><span class="genmed">
130         [<a href="{U_BACKUP}">{L_XS_FILEEDIT_BACKUPS_SAVE_LC}</a>]<br />
131         <!-- BEGIN backup -->
132         {backup.TIME} [<a href="{backup.U_VIEW}">{L_XS_FILEEDIT_BACKUPS_SHOW_LC}</a>] [<a href="{backup.U_RESTORE}">{L_XS_FILEEDIT_BACKUPS_RESTORE_LC}</a>] [<a href="{backup.U_DOWNLOAD}">{L_XS_FILEEDIT_BACKUPS_DOWNLOAD_LC}</a>] [<a href="{backup.U_DELETE}">{L_XS_FILEEDIT_BACKUPS_DELETE_LC}</a>]<br />
133         <!-- END backup -->
134         </span></td>
135 </tr>
136 <tr>
137         <th>{L_XS_FILEEDIT_UPLOAD}</th>
138 </tr>
139 <tr>
140         <td class="row1" align="left" valign="middle"><span class="genmed">
141         {L_XS_FILEEDIT_UPLOAD_FILE} <input type="file" name="upload" class="post" />
142         </span></td>
143 </tr>
144 <tr>
145         <td class="catBottom" align="center"><input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /> <input type="reset" name="reset" value="{L_RESET}" class="liteoption" /></td>
146 </tr>
147 </table>
148 </form>
149 <br />