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