WP Htaccess Editor - Version 1.1.0

Version Description

  • Adding Czech and English language
  • Adding debug panel
  • Added information about the author and translators
  • Fixed vulnerability
  • Fixed bug loading translations files
  • Optimized for minimum memory requirements
  • Small code modifications
Download this release

Release Info

Developer Lukenzi
Plugin Icon 128x128 WP Htaccess Editor
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.1 to 1.1.0

lang/cs_CZ.mo ADDED
Binary file
lang/cs_CZ.po ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP Htaccess editor\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-04-14 05:55+0100\n"
6
+ "PO-Revision-Date: 2011-04-14 05:55+0100\n"
7
+ "Last-Translator: Lukenzi <mail@lukenzi.info>\n"
8
+ "Language-Team: Lukenzi <wphe@lukenzi.info>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e;__\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: Czech\n"
15
+ "X-Poedit-Country: CZECH REPUBLIC\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: lib/lib.ad.php:7
20
+ msgid "Plugin homepage"
21
+ msgstr "Web autora pluginu"
22
+
23
+ #: lib/lib.ad.php:21
24
+ #: lib/lib.ad.php:29
25
+ msgid "Unlimited hosting WEDOS"
26
+ msgstr "Neomezený hosting WEDOS"
27
+
28
+ #: lib/lib.pages.php:10
29
+ #: pages/wphe-dashboard.php:10
30
+ msgid "WP Htaccess Editor"
31
+ msgstr "WP Htaccess Editor"
32
+
33
+ #: lib/lib.pages.php:10
34
+ msgid "Htaccess"
35
+ msgstr "Htaccess"
36
+
37
+ #: lib/lib.pages.php:11
38
+ msgid "Htaccess Editor"
39
+ msgstr "Htaccess Editor"
40
+
41
+ #: lib/lib.pages.php:12
42
+ msgid "Backup"
43
+ msgstr "Záloha"
44
+
45
+ #: pages/wphe-backup.php:8
46
+ msgid "WP Htaccess Editor - Backup"
47
+ msgstr "WP Htaccess Editor - Záloha"
48
+
49
+ #: pages/wphe-backup.php:17
50
+ msgid "Unable to restore backup! Probably the wrong setting write permissions to the files."
51
+ msgstr "Obnovení zálohy nebylo úspěšné! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
52
+
53
+ #: pages/wphe-backup.php:19
54
+ #: pages/wphe-backup.php:39
55
+ msgid "The backup file is located in the <code>wp-content</code> folder."
56
+ msgstr "Soubor zálohy je uložen ve složce <code>wp-content</code>."
57
+
58
+ #: pages/wphe-backup.php:23
59
+ msgid "Backup was restored successfully"
60
+ msgstr "Záloha souboru byla úspěšně obnovena."
61
+
62
+ #: pages/wphe-backup.php:24
63
+ msgid "Old backup file was deleted successfully"
64
+ msgstr "Starý záložní soubor byl úspěšně odstraněn."
65
+
66
+ #: pages/wphe-backup.php:27
67
+ msgid "Unable to restore backup!"
68
+ msgstr "Nelze obnovit zálohu!"
69
+
70
+ #: pages/wphe-backup.php:29
71
+ msgid "This is contents of the original file, put it into a file manually"
72
+ msgstr "Toto je obsah původního souboru, vložte jej do souboru <code>htaccess</code> ručně."
73
+
74
+ #: pages/wphe-backup.php:37
75
+ msgid "Backup file was created successfully"
76
+ msgstr "Záložní soubor byl úspěšně vytvořen."
77
+
78
+ #: pages/wphe-backup.php:40
79
+ #: pages/wphe-backup.php:62
80
+ msgid "Download backup file"
81
+ msgstr "Uložit záložní soubor do PC"
82
+
83
+ #: pages/wphe-backup.php:43
84
+ msgid "Unable to create backup! Probably the wrong setting write permissions to the files."
85
+ msgstr "Vytvoření zálohy nebylo úspěšné! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
86
+
87
+ #: pages/wphe-backup.php:50
88
+ msgid "Backup file was successfully removed"
89
+ msgstr "Záložní soubor byl úspěšně odstraněn."
90
+
91
+ #: pages/wphe-backup.php:52
92
+ msgid "Backup file could not be removed! Probably the wrong setting write permissions to the files."
93
+ msgstr "Záložní soubor nelze odstranit! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
94
+
95
+ #: pages/wphe-backup.php:59
96
+ msgid "The backup file was found..."
97
+ msgstr "Záložní soubor byl nalezen..."
98
+
99
+ #: pages/wphe-backup.php:69
100
+ msgid "Do you want to restore the backup file?"
101
+ msgstr "Chcete obnovit zálohu původního souboru?"
102
+
103
+ #: pages/wphe-backup.php:69
104
+ msgid "Restore backup &raquo;"
105
+ msgstr "Obnovit &raquo;"
106
+
107
+ #: pages/wphe-backup.php:78
108
+ msgid "Do you want to delete a backup file?"
109
+ msgstr "Chcete odstranit záložní soubor?"
110
+
111
+ #: pages/wphe-backup.php:78
112
+ #: pages/wphe-dashboard.php:29
113
+ msgid "Remove backup &raquo;"
114
+ msgstr "Odstranit zálohu &raquo;"
115
+
116
+ #: pages/wphe-backup.php:84
117
+ msgid "Backup file not found..."
118
+ msgstr "Záložní soubor nebyl nalezen..."
119
+
120
+ #: pages/wphe-backup.php:92
121
+ msgid "Do you want to create a new backup file?"
122
+ msgstr "Chcete vytvořit nový záložní soubor?"
123
+
124
+ #: pages/wphe-backup.php:92
125
+ msgid "Create new &raquo;"
126
+ msgstr "Vytvořit nový &raquo;"
127
+
128
+ #: pages/wphe-backup.php:109
129
+ #: pages/wphe-dashboard.php:178
130
+ msgid "You do not have permission to view this page"
131
+ msgstr "Nemáte oprávnění k zobrazení této stránky"
132
+
133
+ #: pages/wphe-backup.php:109
134
+ #: pages/wphe-dashboard.php:178
135
+ msgid "Access denied"
136
+ msgstr "Přístup odepřen"
137
+
138
+ #: pages/wphe-dashboard.php:21
139
+ msgid "File has been successfully changed"
140
+ msgstr "Soubor byl úspěšně změňen"
141
+
142
+ #: pages/wphe-dashboard.php:23
143
+ msgid "You have made changes to the htaccess file. The original file was automatically backed up."
144
+ msgstr "Provedli jste změny v htaccess souboru. Původní soubor byl automaticky zálohován."
145
+
146
+ #: pages/wphe-dashboard.php:24
147
+ msgid "Check the functionality of your site (the links to the articles or categories)."
148
+ msgstr "Vyzkoušejte funkčnost Vašeho webu (odkazy na články nebo rubriky)."
149
+
150
+ #: pages/wphe-dashboard.php:24
151
+ msgid "If something is not working properly restore the original backup file."
152
+ msgstr "Pokud nefungují správně obnovte zálohu původního souboru."
153
+
154
+ #: pages/wphe-dashboard.php:29
155
+ msgid "If everything works properly, you can delete the backup file:"
156
+ msgstr "Pokud vše funguje jak má, můžete záložní soubor smazat:"
157
+
158
+ #: pages/wphe-dashboard.php:29
159
+ #: pages/wphe-dashboard.php:134
160
+ msgid "or"
161
+ msgstr "nebo"
162
+
163
+ #: pages/wphe-dashboard.php:29
164
+ msgid "restore the original file from backup"
165
+ msgstr "obnovte zálohu původního souboru"
166
+
167
+ #: pages/wphe-dashboard.php:34
168
+ msgid "The file could not be saved! Probably the wrong setting read permissions to the files"
169
+ msgstr "Soubor nebyl uložen! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
170
+
171
+ #: pages/wphe-dashboard.php:37
172
+ msgid "Unable to create backup of the original file! Probably the wrong setting read permissions to the files"
173
+ msgstr "Nelze vytvořit zálohu původního souboru! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
174
+
175
+ #: pages/wphe-dashboard.php:45
176
+ msgid "Htaccess file is not created. Probably the wrong setting read permissions to the files"
177
+ msgstr "Soubor Htaccess nebyl vytvořen! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
178
+
179
+ #: pages/wphe-dashboard.php:47
180
+ msgid "Htaccess file was successfully created."
181
+ msgstr "Soubor htaccess byl úspěšně vytvořen."
182
+
183
+ #: pages/wphe-dashboard.php:54
184
+ msgid "Backup file could not be removed! Probably the wrong setting read permissions to the files"
185
+ msgstr "Záložní soubor se nepodařilo odstranit! Pravděpodobně jsou špatně nastavena práva k zápisu do souboru. "
186
+
187
+ #: pages/wphe-dashboard.php:56
188
+ msgid "Backup file has been successfully removed."
189
+ msgstr "Záložní soubor byl úspěšně odstraněn."
190
+
191
+ #: pages/wphe-dashboard.php:62
192
+ msgid "Using this editor you can easily modify your htaccess file without having to use an FTP client."
193
+ msgstr "Tento editor slouží k snadné úpravě vašeho htaccess souboru bez nutnosti použití FTP klienta."
194
+
195
+ #: pages/wphe-dashboard.php:63
196
+ msgid "<strong>WARNING:</strong> Any error in this file may cause malfunction of your site!"
197
+ msgstr "<strong>POZOR:</strong> Jakákoliv chyba v tomto souboru může způsobit nefunkčnost vašeho webu!"
198
+
199
+ #: pages/wphe-dashboard.php:64
200
+ msgid "Edit htaccess file should therefore be performed only by experienced users!"
201
+ msgstr "Upravovat htaccess soubor by měli provádět pouze zkušení uživatelé!"
202
+
203
+ #: pages/wphe-dashboard.php:70
204
+ msgid "Htaccess file not found!"
205
+ msgstr "Htaccess soubor nebyl nalezen!"
206
+
207
+ #: pages/wphe-dashboard.php:73
208
+ msgid "Htaccess file found..."
209
+ msgstr "Htaccess soubor byl nalezen..."
210
+
211
+ #: pages/wphe-dashboard.php:77
212
+ #: pages/wphe-dashboard.php:86
213
+ msgid "Htaccess file not read!"
214
+ msgstr "Htaccess soubor nelze přečíst!"
215
+
216
+ #: pages/wphe-dashboard.php:90
217
+ msgid "Htaccess file is empty..."
218
+ msgstr "Htaccess soubor je prázdný..."
219
+
220
+ #: pages/wphe-dashboard.php:111
221
+ msgid "Save file &raquo;"
222
+ msgstr "Uložit soubor &raquo;"
223
+
224
+ #: pages/wphe-dashboard.php:117
225
+ msgid "Htaccess file is not readable, probably does not exist"
226
+ msgstr "Htaccess soubor nelze přečíst, pravděpodobně neexistuje"
227
+
228
+ #: pages/wphe-dashboard.php:123
229
+ msgid "Create new <code>.htaccess</code> file?"
230
+ msgstr "Vytvořit nový <code>.htaccess</code> soubor?"
231
+
232
+ #: pages/wphe-dashboard.php:123
233
+ msgid "Create &raquo;"
234
+ msgstr "Vytvořit nový &raquo;"
235
+
236
+ #: pages/wphe-dashboard.php:132
237
+ msgid "Information for editing htaccess file"
238
+ msgstr "Informace pro úpravy Htaccess souboru"
239
+
240
+ #: pages/wphe-dashboard.php:134
241
+ msgid "For more information on possible adjustments to this file, please visit"
242
+ msgstr "Pro více informací o možných úpravách tohoto souboru navštivte weby"
243
+
244
+ #: pages/wphe-dashboard.php:135
245
+ msgid "Interesting tips and guides can also be found on "
246
+ msgstr "Zajímavé tipy a návody můžete nalézt také na webu"
247
+
248
+ #: pages/wphe-dashboard.php:136
249
+ msgid "Or use the Google search."
250
+ msgstr "Nebo použijte Google"
251
+
252
+ #: pages/wphe-dashboard.php:138
253
+ msgid "Information about this plugin"
254
+ msgstr "Informace o tomto pluginu"
255
+
256
+ #: pages/wphe-dashboard.php:141
257
+ msgid "Author"
258
+ msgstr "Autor"
259
+
260
+ #: pages/wphe-dashboard.php:145
261
+ msgid "Translators"
262
+ msgstr "Překladatelé"
263
+
264
+ #: pages/wphe-dashboard.php:152
265
+ msgid "Plugin"
266
+ msgstr "Plugin"
267
+
268
+ #: pages/wphe-dashboard.php:154
269
+ msgid "Version:"
270
+ msgstr "Verze pluginu:"
271
+
272
+ #: pages/wphe-dashboard.php:155
273
+ msgid "URL:"
274
+ msgstr "Web pluginu:"
275
+
276
+ #: pages/wphe-dashboard.php:155
277
+ msgid "WordPress repository"
278
+ msgstr "WordPress repozitář"
279
+
280
+ #: pages/wphe-dashboard.php:156
281
+ msgid "Feedback:"
282
+ msgstr "Hlášení chyb:"
283
+
284
+ #: pages/wphe-dashboard.php:160
285
+ msgid "Other plugins"
286
+ msgstr "Další pluginy autora"
287
+
288
+ #: pages/wphe-dashboard.php:162
289
+ msgid "Czech support for WordPress"
290
+ msgstr "Česká podpora pro WordPress"
291
+
lang/default.po CHANGED
@@ -2,266 +2,290 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Htaccess editor\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-03-23 00:18+0100\n"
6
- "PO-Revision-Date: 2011-03-23 00:18+0100\n"
7
  "Last-Translator: Lukenzi <mail@lukenzi.info>\n"
8
- "Language-Team: Lukenzi <mail@lukenzi.info>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: _e;__\n"
13
- "X-Poedit-Basepath: .\n"
14
  "X-Poedit-Language: Czech\n"
15
  "X-Poedit-Country: CZECH REPUBLIC\n"
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
- #: lib/lib.pages.php:16
20
- msgid "Htaccess záloha"
21
  msgstr ""
22
 
23
- #: pages/wphe-backup.php:10
24
- msgid "WP Htaccess Editor - Obnovení zálohy"
 
25
  msgstr ""
26
 
27
- #: pages/wphe-backup.php:14
28
- msgid "Záloha souboru <code>.htaccess</code> nebyla nalezena, obnovení zálohy nelze provést!"
 
29
  msgstr ""
30
 
31
- #: pages/wphe-backup.php:26
32
- msgid "Zálohu souboru <code>.htaccess</code> se nepodařilo obnovit!"
33
  msgstr ""
34
 
35
- #: pages/wphe-backup.php:28
36
- msgid "Záloha souboru <code>.htaccess</code> byla úspěšně obnovena."
37
  msgstr ""
38
 
39
- #: pages/wphe-backup.php:36
40
- msgid "Zálohu souboru <code>.htaccess</code> se nepodařilo odstranit!"
41
  msgstr ""
42
 
43
- #: pages/wphe-backup.php:38
44
- #: pages/wphe-dashboard.php:99
45
- msgid "Záloha souboru <code>.htaccess</code> byla úspěšně odstraněna."
46
  msgstr ""
47
 
48
- #: pages/wphe-backup.php:44
49
- msgid "Záloha souboru byla nalezena..."
50
  msgstr ""
51
 
52
- #: pages/wphe-backup.php:51
53
- msgid "Chcete obnovit zálohu souboru <code>.htaccess</code>?"
 
54
  msgstr ""
55
 
56
- #: pages/wphe-backup.php:51
57
- msgid "Obnovit zálohu &raquo;"
58
  msgstr ""
59
 
60
- #: pages/wphe-backup.php:60
61
- msgid "Chcete odstranit zálohu souboru <code>.htaccess</code>?"
62
  msgstr ""
63
 
64
- #: pages/wphe-backup.php:60
65
- #: pages/wphe-dashboard.php:75
66
- msgid "Odstranit zálohu &raquo;"
67
  msgstr ""
68
 
69
- #: pages/wphe-backup.php:65
70
- msgid "Záloha souboru <code>.htaccess</code> nebyla nalezena!"
71
  msgstr ""
72
 
73
- #: pages/wphe-backup.php:66
74
- msgid "Záloha ještě pravděpodobně nebyla vytvořena, nebo se při úpravách vašeho <code>.htaccess</code> souboru nezdařila. Můžete zkusit smazat obsah vašeho <code>.htaccess</code> souboru a aktualizovat nastavení trvalých odkazů. Htaccess soubor se tak vrátí do výchozí podoby."
75
  msgstr ""
76
 
77
- #: pages/wphe-dashboard.php:11
78
- msgid "WP Htaccess Editor"
 
79
  msgstr ""
80
 
81
- #: pages/wphe-dashboard.php:21
82
- #: pages/wphe-dashboard.php:38
83
- msgid "Původní soubor se nepodařilo přečíst! Záloha nebyla vytvořena!"
84
  msgstr ""
85
 
86
- #: pages/wphe-dashboard.php:27
87
- #: pages/wphe-dashboard.php:44
88
- msgid "Zálohu souboru <code>.htaccess</code> se nepodařilo uložit!"
89
  msgstr ""
90
 
91
- #: pages/wphe-dashboard.php:29
92
- #: pages/wphe-dashboard.php:46
93
- msgid "Záloha původního souboru byla úspěšně uložena."
94
  msgstr ""
95
 
96
- #: pages/wphe-dashboard.php:59
97
- msgid "Soubor <code>.htaccess</code> se nepodařilo uložit!"
98
  msgstr ""
99
 
100
- #: pages/wphe-dashboard.php:61
101
- msgid "Soubor <code>.htaccess</code> byl úspěšně uložen."
102
  msgstr ""
103
 
104
- #: pages/wphe-dashboard.php:67
105
- msgid "Provedli jste změny v <code>.htaccess</code> souboru. Automaticky byla vytvořena záloha původního souboru."
106
  msgstr ""
107
 
108
- #: pages/wphe-dashboard.php:68
109
- msgid "Zkontrolujte"
110
  msgstr ""
111
 
112
- #: pages/wphe-dashboard.php:68
113
- msgid "zda se váš web správně zobrazuje!"
 
114
  msgstr ""
115
 
116
- #: pages/wphe-dashboard.php:68
117
- msgid "V případě problémů můžete použít stránku"
118
  msgstr ""
119
 
120
- #: pages/wphe-dashboard.php:68
121
- msgid "obnovení zálohy"
122
  msgstr ""
123
 
124
- #: pages/wphe-dashboard.php:68
125
- msgid "Váš <code>.htaccess</code> soubor tak může být obnoven do stavu před vaší úpravou tohoto souboru."
126
  msgstr ""
127
 
128
- #: pages/wphe-dashboard.php:69
129
- msgid "Uložená záloha <code>.htaccess</code> souboru je na vašem webu volně přístupná z prohlížeče! Po ověření správné funkčnosti webu by jste ji měli, níže zobrazeným tlačítkem, odstranit!"
 
130
  msgstr ""
131
 
132
- #: pages/wphe-dashboard.php:70
133
- msgid "Soubor se zálohou si můžete ještě před odstraněním"
 
134
  msgstr ""
135
 
136
- #: pages/wphe-dashboard.php:70
137
- msgid "uložit"
138
  msgstr ""
139
 
140
- #: pages/wphe-dashboard.php:70
141
- msgid "do vašeho PC (klikněte na odkaz pravým tlačítkem myši a zvolte \"Uložít cíl jako...\")"
142
  msgstr ""
143
 
144
- #: pages/wphe-dashboard.php:75
145
- msgid "Chcete odstranit soubor se zálohou?"
146
  msgstr ""
147
 
148
- #: pages/wphe-dashboard.php:83
149
- msgid "Soubor <code>.htaccess</code> se nepodařilo vytvořit!</strong>(root webu nemá patrně nastavena práva pro zápis)"
150
  msgstr ""
151
 
152
- #: pages/wphe-dashboard.php:84
153
- msgid "Došlo k chybě při vytváření souboru. Do hlavní složky vašeho webu nelze zapisovat. Pro vytvoření <code>htaccess</code> souboru musíte použít FTP klienta."
154
  msgstr ""
155
 
156
- #: pages/wphe-dashboard.php:86
157
- msgid "Soubor <code>.htaccess</code> byl úspěšně vytvořen."
 
158
  msgstr ""
159
 
160
- #: pages/wphe-dashboard.php:87
161
- msgid "Vraťte se zpět na"
162
  msgstr ""
163
 
164
- #: pages/wphe-dashboard.php:87
165
- msgid "stránku editoru"
166
  msgstr ""
167
 
168
- #: pages/wphe-dashboard.php:87
169
- msgid "kde si váš nový <code>htaccess</code> soubor můžete snadno upravit."
170
  msgstr ""
171
 
172
- #: pages/wphe-dashboard.php:91
173
- msgid "Došlo k chybě: Soubor <code>.htaccess</code> nemůžete vytvořit protože již existuje!"
174
  msgstr ""
175
 
176
- #: pages/wphe-dashboard.php:97
177
- msgid "Zálohu <code>.htaccess</code> souboru se nepodařilo odstranit!</strong>(odstraňte ji pomocí FTP klienta)"
178
  msgstr ""
179
 
180
- #: pages/wphe-dashboard.php:102
181
- msgid "Váš <code>.htaccess</code> soubor byl úspěšně změněn. Informace o tomto pluginu nebo o autorovi naleznete na webu"
182
  msgstr ""
183
 
184
- #: pages/wphe-dashboard.php:111
185
- msgid "Pomocí tohoto editoru můžete jednoduše upravovat váš <code>.htaccess</code> soubor bez nutnosti použití FTP klienta."
186
  msgstr ""
187
 
188
- #: pages/wphe-dashboard.php:112
189
- msgid "<strong>POZOR:</strong> Jakkákoliv chyba v tomto souboru může způsobit nefunkčnost vašeho webu!"
190
  msgstr ""
191
 
192
- #: pages/wphe-dashboard.php:113
193
- msgid "Úpravy <code>.htaccess</code> souboru by proto měli provádět pouze zkušení uživatelé!"
194
  msgstr ""
195
 
196
- #: pages/wphe-dashboard.php:117
197
- msgid "Soubor \".htaccess\" nebyl nalezen!"
198
  msgstr ""
199
 
200
- #: pages/wphe-dashboard.php:120
201
- msgid "Soubor \".htaccess\" byl nalezen..."
202
  msgstr ""
203
 
204
- #: pages/wphe-dashboard.php:123
205
- msgid "Soubor \".htaccess\" nelze přečíst!"
206
  msgstr ""
207
 
208
- #: pages/wphe-dashboard.php:126
209
- msgid "Soubor \".htaccess\" lze přečíst..."
 
 
 
 
 
 
 
 
 
210
  msgstr ""
211
 
212
  #: pages/wphe-dashboard.php:133
213
- msgid "Obsah souboru se nepodařilo přečíst!"
214
  msgstr ""
215
 
216
- #: pages/wphe-dashboard.php:136
217
- msgid "Soubor .htaccess je prázdný..."
218
  msgstr ""
219
 
220
  #: pages/wphe-dashboard.php:139
221
- msgid "Soubor byl úspěšně přečten..."
222
  msgstr ""
223
 
224
- #: pages/wphe-dashboard.php:158
225
- msgid "Uložit soubor &raquo;"
226
  msgstr ""
227
 
228
- #: pages/wphe-dashboard.php:164
229
- msgid "Soubor <code>.htaccess</code> nemůže být zobrazen, protože neexistuje."
230
  msgstr ""
231
 
232
- #: pages/wphe-dashboard.php:169
233
- msgid "Vytvořit nový <code>.htaccess</code> soubor?"
234
  msgstr ""
235
 
236
- #: pages/wphe-dashboard.php:169
237
- msgid "Vytvořit &raquo;"
238
  msgstr ""
239
 
240
- #: pages/wphe-dashboard.php:178
241
- msgid "Informace k úpravám .htaccess souboru"
 
 
 
 
242
  msgstr ""
243
 
244
- #: pages/wphe-dashboard.php:179
245
- msgid "Více informací o možných úpravách tohoto souboru naleznete na stránce"
246
  msgstr ""
247
 
248
- #: pages/wphe-dashboard.php:180
249
- msgid "Zajímavé tipy a návody naleznete také na"
250
  msgstr ""
251
 
252
- #: pages/wphe-dashboard.php:180
253
- msgid "webu"
254
  msgstr ""
255
 
256
- #: pages/wphe-dashboard.php:180
257
- msgid "autora pluginu"
258
  msgstr ""
259
 
260
- #: pages/wphe-dashboard.php:181
261
- msgid "Informace o tomto pluginu"
262
  msgstr ""
263
 
264
- #: pages/wphe-dashboard.php:182
265
- msgid "Pokud máte s pluginem nějaký problém nebo máte návrh na jeho vylepšení, popřípadě se chcete dozvědět něco i o jiných pluginech autora, navštivte stránky"
 
 
 
 
 
 
 
 
266
  msgstr ""
267
 
2
  msgstr ""
3
  "Project-Id-Version: WP Htaccess editor\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-04-14 00:14+0100\n"
6
+ "PO-Revision-Date: 2011-04-14 00:15+0100\n"
7
  "Last-Translator: Lukenzi <mail@lukenzi.info>\n"
8
+ "Language-Team: Lukenzi <wphe@lukenzi.info>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: _e;__\n"
13
+ "X-Poedit-Basepath: c:\\wamp\\wordpress\\wp-content\\plugins\\wp-htaccess-editor\\\n"
14
  "X-Poedit-Language: Czech\n"
15
  "X-Poedit-Country: CZECH REPUBLIC\n"
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: lib/lib.ad.php:15
20
+ msgid "Plugin homepage"
21
  msgstr ""
22
 
23
+ #: lib/lib.ad.php:35
24
+ #: lib/lib.ad.php:47
25
+ msgid "Unlimited hosting WEDOS"
26
  msgstr ""
27
 
28
+ #: lib/lib.pages.php:19
29
+ #: pages/wphe-dashboard.php:18
30
+ msgid "WP Htaccess Editor"
31
  msgstr ""
32
 
33
+ #: lib/lib.pages.php:19
34
+ msgid "Htaccess"
35
  msgstr ""
36
 
37
+ #: lib/lib.pages.php:20
38
+ msgid "Htaccess Editor"
39
  msgstr ""
40
 
41
+ #: lib/lib.pages.php:21
42
+ msgid "Backup"
43
  msgstr ""
44
 
45
+ #: pages/wphe-backup.php:16
46
+ msgid "WP Htaccess Editor - Backup"
 
47
  msgstr ""
48
 
49
+ #: pages/wphe-backup.php:24
50
+ msgid "Unable to restore backup! Probably the wrong setting write permissions to the files."
51
  msgstr ""
52
 
53
+ #: pages/wphe-backup.php:26
54
+ #: pages/wphe-backup.php:46
55
+ msgid "The backup file is located in the <code>wp-content</code> folder."
56
  msgstr ""
57
 
58
+ #: pages/wphe-backup.php:30
59
+ msgid "Backup was restored successfully"
60
  msgstr ""
61
 
62
+ #: pages/wphe-backup.php:31
63
+ msgid "Old backup file was deleted successfully"
64
  msgstr ""
65
 
66
+ #: pages/wphe-backup.php:34
67
+ msgid "Unable to restore backup!"
 
68
  msgstr ""
69
 
70
+ #: pages/wphe-backup.php:36
71
+ msgid "This is contents of the original file, put it into a file manually"
72
  msgstr ""
73
 
74
+ #: pages/wphe-backup.php:44
75
+ msgid "Backup file was created successfully"
76
  msgstr ""
77
 
78
+ #: pages/wphe-backup.php:47
79
+ #: pages/wphe-backup.php:71
80
+ msgid "Download backup file"
81
  msgstr ""
82
 
83
+ #: pages/wphe-backup.php:50
84
+ msgid "Unable to create backup! Probably the wrong setting write permissions to the files."
 
85
  msgstr ""
86
 
87
+ #: pages/wphe-backup.php:58
88
+ msgid "Backup file was successfully removed"
 
89
  msgstr ""
90
 
91
+ #: pages/wphe-backup.php:60
92
+ msgid "Backup file could not be removed! Probably the wrong setting write permissions to the files."
 
93
  msgstr ""
94
 
95
+ #: pages/wphe-backup.php:68
96
+ msgid "The backup file was found..."
97
  msgstr ""
98
 
99
+ #: pages/wphe-backup.php:78
100
+ msgid "Do you want to restore the backup file?"
101
  msgstr ""
102
 
103
+ #: pages/wphe-backup.php:78
104
+ msgid "Restore backup &raquo;"
105
  msgstr ""
106
 
107
+ #: pages/wphe-backup.php:87
108
+ msgid "Do you want to delete a backup file?"
109
  msgstr ""
110
 
111
+ #: pages/wphe-backup.php:87
112
+ #: pages/wphe-dashboard.php:40
113
+ msgid "Remove backup &raquo;"
114
  msgstr ""
115
 
116
+ #: pages/wphe-backup.php:94
117
+ msgid "Backup file not found..."
118
  msgstr ""
119
 
120
+ #: pages/wphe-backup.php:102
121
+ msgid "Do you want to create a new backup file?"
122
  msgstr ""
123
 
124
+ #: pages/wphe-backup.php:102
125
+ msgid "Create new &raquo;"
126
  msgstr ""
127
 
128
+ #: pages/wphe-backup.php:120
129
+ #: pages/wphe-dashboard.php:194
130
+ msgid "You do not have permission to view this page"
131
  msgstr ""
132
 
133
+ #: pages/wphe-backup.php:120
134
+ #: pages/wphe-dashboard.php:194
135
+ msgid "Access denied"
136
  msgstr ""
137
 
138
+ #: pages/wphe-dashboard.php:32
139
+ msgid "File has been successfully changed"
140
  msgstr ""
141
 
142
+ #: pages/wphe-dashboard.php:34
143
+ msgid "You have made changes to the htaccess file. The original file was automatically backed up."
144
  msgstr ""
145
 
146
+ #: pages/wphe-dashboard.php:35
147
+ msgid "Check the functionality of your site (the links to the articles or categories)."
148
  msgstr ""
149
 
150
+ #: pages/wphe-dashboard.php:35
151
+ msgid "If something is not working properly restore the original backup file."
152
  msgstr ""
153
 
154
+ #: pages/wphe-dashboard.php:40
155
+ msgid "If everything works properly, you can delete the backup file:"
156
  msgstr ""
157
 
158
+ #: pages/wphe-dashboard.php:40
159
+ #: pages/wphe-dashboard.php:150
160
+ msgid "or"
161
  msgstr ""
162
 
163
+ #: pages/wphe-dashboard.php:40
164
+ msgid "restore the original file from backup"
165
  msgstr ""
166
 
167
+ #: pages/wphe-dashboard.php:45
168
+ msgid "The file could not be saved! Probably the wrong setting read permissions to the files"
169
  msgstr ""
170
 
171
+ #: pages/wphe-dashboard.php:49
172
+ msgid "Unable to create backup of the original file! Probably the wrong setting read permissions to the files"
173
  msgstr ""
174
 
175
+ #: pages/wphe-dashboard.php:58
176
+ msgid "Htaccess file is not created. Probably the wrong setting read permissions to the files"
177
  msgstr ""
178
 
179
+ #: pages/wphe-dashboard.php:61
180
+ msgid "Htaccess file was successfully created."
181
  msgstr ""
182
 
183
+ #: pages/wphe-dashboard.php:68
184
+ msgid "Backup file could not be removed! Probably the wrong setting read permissions to the files"
185
  msgstr ""
186
 
187
+ #: pages/wphe-dashboard.php:70
188
+ msgid "Backup file has been successfully removed."
189
  msgstr ""
190
 
191
+ #: pages/wphe-dashboard.php:75
192
+ msgid "Using this editor you can easily modify your htaccess file without having to use an FTP client."
193
  msgstr ""
194
 
195
+ #: pages/wphe-dashboard.php:76
196
+ msgid "<strong>WARNING:</strong> Any error in this file may cause malfunction of your site!"
197
  msgstr ""
198
 
199
+ #: pages/wphe-dashboard.php:77
200
+ msgid "Edit htaccess file should therefore be performed only by experienced users!"
201
  msgstr ""
202
 
203
+ #: pages/wphe-dashboard.php:83
204
+ msgid "Htaccess file not found!"
205
  msgstr ""
206
 
207
+ #: pages/wphe-dashboard.php:86
208
+ msgid "Htaccess file found..."
209
  msgstr ""
210
 
211
+ #: pages/wphe-dashboard.php:90
212
+ #: pages/wphe-dashboard.php:100
213
+ msgid "Htaccess file not read!"
214
+ msgstr ""
215
+
216
+ #: pages/wphe-dashboard.php:104
217
+ msgid "Htaccess file is empty..."
218
+ msgstr ""
219
+
220
+ #: pages/wphe-dashboard.php:127
221
+ msgid "Save file &raquo;"
222
  msgstr ""
223
 
224
  #: pages/wphe-dashboard.php:133
225
+ msgid "Htaccess file is not readable, probably does not exist"
226
  msgstr ""
227
 
228
+ #: pages/wphe-dashboard.php:139
229
+ msgid "Create new <code>.htaccess</code> file?"
230
  msgstr ""
231
 
232
  #: pages/wphe-dashboard.php:139
233
+ msgid "Create &raquo;"
234
  msgstr ""
235
 
236
+ #: pages/wphe-dashboard.php:148
237
+ msgid "Information for editing htaccess file"
238
  msgstr ""
239
 
240
+ #: pages/wphe-dashboard.php:150
241
+ msgid "For more information on possible adjustments to this file, please visit"
242
  msgstr ""
243
 
244
+ #: pages/wphe-dashboard.php:151
245
+ msgid "Interesting tips and guides can also be found on "
246
  msgstr ""
247
 
248
+ #: pages/wphe-dashboard.php:152
249
+ msgid "Or use the Google search."
250
  msgstr ""
251
 
252
+ #: pages/wphe-dashboard.php:154
253
+ msgid "Information about this plugin"
254
+ msgstr ""
255
+
256
+ #: pages/wphe-dashboard.php:157
257
+ msgid "Author"
258
  msgstr ""
259
 
260
+ #: pages/wphe-dashboard.php:161
261
+ msgid "Translators"
262
  msgstr ""
263
 
264
+ #: pages/wphe-dashboard.php:168
265
+ msgid "Plugin"
266
  msgstr ""
267
 
268
+ #: pages/wphe-dashboard.php:170
269
+ msgid "Version:"
270
  msgstr ""
271
 
272
+ #: pages/wphe-dashboard.php:171
273
+ msgid "URL:"
274
  msgstr ""
275
 
276
+ #: pages/wphe-dashboard.php:171
277
+ msgid "WordPress repository"
278
  msgstr ""
279
 
280
+ #: pages/wphe-dashboard.php:172
281
+ msgid "Feedback:"
282
+ msgstr ""
283
+
284
+ #: pages/wphe-dashboard.php:176
285
+ msgid "Other plugins"
286
+ msgstr ""
287
+
288
+ #: pages/wphe-dashboard.php:178
289
+ msgid "Czech support for WordPress"
290
  msgstr ""
291
 
lib/lib.ad.php CHANGED
@@ -1,9 +1,32 @@
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
- function ViewAD(){
5
- $id = rand(1,3);
6
- echo '<a href="http://hosting.wedos.com/d/65832"><img src="http://www.wp-blog.cz/wp-content/wedos/'.$id.'.gif" alt="" border="0" /></a>';
7
- unset($id);
8
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ?>
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
+ /*** funkce pro zobrazení odkazu na domovskou stránku pluginu ***/
5
+ function WPHE_PluginLink()
6
+ {
7
+ echo '<a class="plugin-link" href="http://www.wp-blog.cz/101-plugin-wp-htaccess-editor/" title="'.__('Plugin homepage','wphe').'" target="_blank">'.__('Plugin homepage','wphe').'</a>';
8
  }
9
+
10
+ /*** funkce pro zobrazení odkazu na domovskou stránku autora ***/
11
+ function WPHE_AuthorLink()
12
+ {
13
+ echo '<a class="author-link" href="http://www.wp-blog.cz/" target="_blank">WP-blog.cz</a>';
14
+ }
15
+
16
+ /*** funkce pro zobrazení reklamního banneru ***/
17
+ function WPHE_ViewAdBanner()
18
+ {
19
+ global $WPHE_dirurl;
20
+ $id = rand(1,3);
21
+ echo '<a class="wedos-img" href="http://hosting.wedos.com/d/65832" title="'.__('Unlimited hosting WEDOS','wphe').'" target="_blank"><img src="'.$WPHE_dirurl.'style/img/'.$id.'.gif" alt="'.__('Unlimited hosting WEDOS','wphe').'" border="0" /></a>';
22
+ unset($id);
23
+ unset($WPHE_dirurl);
24
+ }
25
+
26
+ /*** funkce pro zobrazení reklamního odkazu ***/
27
+ function WPHE_ViewAdLink()
28
+ {
29
+ echo '<a class="wedos-link" href="http://hosting.wedos.com/d/65832" title="'.__('Unlimited hosting WEDOS','wphe').'" target="_blank">'.__('Unlimited hosting WEDOS','wphe').'</a>';
30
+ }
31
+
32
  ?>
lib/lib.debug.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) die();
3
+
4
+ /*** Zjištění aktuálního využití paměti pluginem ***/
5
+ function WPHE_GetMemory()
6
+ {
7
+ global $WPHE_mem_start, $WPHE_mem_end;
8
+
9
+ $WPHE_mem_plugin = $WPHE_mem_end - $WPHE_mem_start;
10
+ $WPHE_mem_plugin = WPHE_ConvertMemory($WPHE_mem_plugin);
11
+
12
+ return $WPHE_mem_plugin;
13
+ }
14
+
15
+ /*** Převod hodnot do visuální podoby ***/
16
+ function WPHE_ConvertMemory($mem)
17
+ {
18
+ $unit = array('</td><td>b','</td><td>Kb','</td><td>Mb');
19
+ $WPHE_result = @round($mem/pow(1024,($i = floor(log($mem,1024)))),2).' '.$unit[$i];
20
+ unset($mem);
21
+ unset($unit);
22
+ unset($i);
23
+
24
+ return $WPHE_result;
25
+ }
26
+
27
+ /*** Zobrazení debug panelu ***/
28
+ function WPHE_DebugPanel($mem,$peak)
29
+ {
30
+ ?><div class="wphe-debug-panel"><?php
31
+ echo '<strong>Memory usage:</strong><br /><span class="wphe-white"><table><tr><td>Plugin:</td><td class="wphe-lime">'.WPHE_GetMemory().'</td></tr><tr><td>Total:</td><td class="wphe-lime">'.WPHE_ConvertMemory($mem).'</td></tr><tr><td>Max:</td><td class="wphe-lime">'.WPHE_ConvertMemory($peak).'</td></tr></table></span>';
32
+ ?></div><?php
33
+ }
34
+ ?>
lib/lib.functions.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) die();
3
+
4
+ function WPHE_CreateBackup()
5
+ {
6
+ $WPHE_backup_path = ABSPATH.'wp-content/htaccess.backup';
7
+ $WPHE_orig_path = ABSPATH.'.htaccess';
8
+
9
+ if(file_exists($WPHE_backup_path))
10
+ {
11
+ WPHE_DeleteBackup();
12
+ if(file_exists(ABSPATH.'.htaccess'))
13
+ {
14
+ $htaccess_content_orig = file_get_contents($WPHE_orig_path, false, NULL);
15
+ $htaccess_content_orig = trim($htaccess_content_orig);
16
+ $htaccess_content_orig = str_replace('\\\\', '\\', $htaccess_content_orig);
17
+ $htaccess_content_orig = str_replace('\"', '"', $htaccess_content_orig);
18
+ $WPHE_success = file_put_contents($WPHE_backup_path, $htaccess_content_orig, LOCK_EX);
19
+ if($WPHE_success === false)
20
+ {
21
+ unset($WPHE_backup_path);
22
+ unset($WPHE_orig_path);
23
+ unset($htaccess_content_orig);
24
+ unset($WPHE_success);
25
+ return false;
26
+ }else{
27
+ unset($WPHE_backup_path);
28
+ unset($WPHE_orig_path);
29
+ unset($htaccess_content_orig);
30
+ unset($WPHE_success);
31
+ return true;
32
+ }
33
+ }else{
34
+ unset($WPHE_backup_path);
35
+ unset($WPHE_orig_path);
36
+ return false;
37
+ }
38
+ }else{
39
+ if(file_exists(ABSPATH.'.htaccess'))
40
+ {
41
+ $htaccess_content_orig = file_get_contents($WPHE_orig_path, false, NULL);
42
+ $htaccess_content_orig = trim($htaccess_content_orig);
43
+ $htaccess_content_orig = str_replace('\\\\', '\\', $htaccess_content_orig);
44
+ $htaccess_content_orig = str_replace('\"', '"', $htaccess_content_orig);
45
+ $WPHE_success = file_put_contents($WPHE_backup_path, $htaccess_content_orig, LOCK_EX);
46
+ if($WPHE_success === false)
47
+ {
48
+ unset($WPHE_backup_path);
49
+ unset($WPHE_orig_path);
50
+ unset($htaccess_content_orig);
51
+ unset($WPHE_success);
52
+ return false;
53
+ }else{
54
+ unset($WPHE_backup_path);
55
+ unset($WPHE_orig_path);
56
+ unset($htaccess_content_orig);
57
+ unset($WPHE_success);
58
+ return true;
59
+ }
60
+ }else{
61
+ unset($WPHE_backup_path);
62
+ unset($WPHE_orig_path);
63
+ return false;
64
+ }
65
+ }
66
+ }
67
+
68
+ function WPHE_RestoreBackup()
69
+ {
70
+ $wphe_backup_path = ABSPATH.'wp-content/htaccess.backup';
71
+ $WPHE_orig_path = ABSPATH.'.htaccess';
72
+
73
+ if(!file_exists($wphe_backup_path))
74
+ {
75
+ unset($wphe_backup_path);
76
+ unset($WPHE_orig_path);
77
+ return false;
78
+ }else{
79
+ if(file_exists($WPHE_orig_path))
80
+ {
81
+ if(is_writable($WPHE_orig_path))
82
+ {
83
+ @unlink($WPHE_orig_path);
84
+ }else{
85
+ @chmod($WPHE_orig_path, 0666);
86
+ @unlink($WPHE_orig_path);
87
+ }
88
+ }
89
+ $wphe_htaccess_content_backup = file_get_contents($wphe_backup_path, false, NULL);
90
+ if(WPHE_WriteNewHtaccess($wphe_htaccess_content_backup) == false)
91
+ {
92
+ unset($wphe_success);
93
+ unset($WPHE_orig_path);
94
+ unset($wphe_backup_path);
95
+ return $wphe_htaccess_content_backup;
96
+ }else{
97
+ WPHE_DeleteBackup();
98
+ unset($wphe_success);
99
+ unset($wphe_htaccess_content_backup);
100
+ unset($WPHE_orig_path);
101
+ unset($wphe_backup_path);
102
+ return true;
103
+ }
104
+ }
105
+ }
106
+
107
+ function WPHE_DeleteBackup()
108
+ {
109
+ $wphe_backup_path = ABSPATH.'wp-content/htaccess.backup';
110
+
111
+ if(file_exists($wphe_backup_path))
112
+ {
113
+ if(is_writable($wphe_backup_path))
114
+ {
115
+ @unlink($wphe_backup_path);
116
+ }else{
117
+ @chmod($wphe_backup_path, 0666);
118
+ @unlink($wphe_backup_path);
119
+ }
120
+
121
+ if(file_exists($wphe_backup_path))
122
+ {
123
+ unset($wphe_backup_path);
124
+ return false;
125
+ }else{
126
+ unset($wphe_backup_path);
127
+ return true;
128
+ }
129
+ }else
130
+ {
131
+ unset($wphe_backup_path);
132
+ return true;
133
+ }
134
+ }
135
+
136
+ function WPHE_WriteNewHtaccess($WPHE_new_content)
137
+ {
138
+ $WPHE_orig_path = ABSPATH.'.htaccess';
139
+
140
+ if(file_exists($WPHE_orig_path))
141
+ {
142
+ if(is_writable($WPHE_orig_path))
143
+ {
144
+ @unlink($WPHE_orig_path);
145
+ }else{
146
+ @chmod($WPHE_orig_path, 0666);
147
+ @unlink($WPHE_orig_path);
148
+ }
149
+ }
150
+ $WPHE_new_content = trim($WPHE_new_content);
151
+ $WPHE_new_content = str_replace('\\\\', '\\', $WPHE_new_content);
152
+ $WPHE_new_content = str_replace('\"', '"', $WPHE_new_content);
153
+ $WPHE_write_success = file_put_contents($WPHE_orig_path, $WPHE_new_content, LOCK_EX);
154
+
155
+ if(!file_exists($WPHE_orig_path) && $WPHE_write_success === false)
156
+ {
157
+ unset($WPHE_orig_path);
158
+ unset($WPHE_new_content);
159
+ unset($WPHE_write_success);
160
+ return false;
161
+ }else{
162
+ unset($WPHE_orig_path);
163
+ unset($WPHE_new_content);
164
+ unset($WPHE_write_success);
165
+ return true;
166
+ }
167
+ }
168
+ ?>
lib/lib.pages.php CHANGED
@@ -1,40 +1,62 @@
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
- function wphe_admin_menu() {
5
- global $WPHE_dirname;
6
-
7
- if(!function_exists('wp_get_current_user')){
8
- require_once ABSPATH.'wp-includes/pluggable.php';
9
- }
10
- if(!function_exists('current_user_can')){
11
- require_once ABSPATH.'wp-includes/capabilities.php';
12
- }
13
- if(current_user_can('activate_plugins')){
14
- add_menu_page('WP Htaccess Editor', 'Htaccess', 'activate_plugins', $WPHE_dirname, 'wphe_view_page', '');
15
- wphe_add_page('Htaccess Editor','Htaccess Editor', 'activate_plugins', $WPHE_dirname, 'wphe_view_page');
16
- wphe_add_page(__('Htaccess záloha', $WPHE_lang_id),__('Htaccess záloha', $WPHE_lang_id), 'activate_plugins', $WPHE_dirname.'_backup', 'wphe_view_page');
 
 
 
 
 
17
  }
18
  }
19
 
20
- function wphe_view_page(){
21
- global $WPHE_dirname, $WPHE_root;
 
 
22
 
23
- switch ($_GET['page']) {
 
24
  case $WPHE_dirname:
25
- require_once($WPHE_root.'pages/wphe-dashboard.php');
26
- break;
27
  case $WPHE_dirname.'_backup':
28
- require_once($WPHE_root.'pages/wphe-backup.php');
29
- break;
30
  default:
31
- require_once($WPHE_root.'pages/wphe-dashboard.php');
32
- break;
33
- }
 
 
 
 
 
34
  }
35
 
36
- function wphe_add_page($page_title, $menu_title, $access_level, $file, $function = '') {
37
- global $WPHE_dirname;
38
- add_submenu_page($WPHE_dirname, $page_title, $menu_title, $access_level, $file, $function);
 
 
 
 
 
 
 
 
 
39
  }
40
  ?>
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
+ /*** Přidání stránek do menu v administraci ***/
5
+ function WPHE_admin_menu()
6
+ {
7
+ global $WPHE_dirname, $WPHE_dirurl;
8
+ if(current_user_can('activate_plugins'))
9
+ {
10
+ add_menu_page(__('WP Htaccess Editor','wphe'), __('Htaccess','wphe'), 'activate_plugins', $WPHE_dirname, 'WPHE_view_page', '');
11
+ WPHE_add_page(__('Htaccess Editor','wphe'),__('Htaccess Editor','wphe'), 'activate_plugins', $WPHE_dirname, 'WPHE_view_page');
12
+ WPHE_add_page(__('Backup', 'wphe'),__('Backup', 'wphe'), 'activate_plugins', $WPHE_dirname.'_backup', 'WPHE_view_page');
13
+
14
+ // přidání css stylu do administrace
15
+ wp_enqueue_style('wphe-style', $WPHE_dirurl.'style/wphe-style.css');
16
+
17
+ unset($WPHE_dirname);
18
+ unset($WPHE_dirurl);
19
+ }else{
20
+ unset($WPHE_dirname);
21
+ unset($WPHE_dirurl);
22
  }
23
  }
24
 
25
+ /*** Zobrazení stránky podle požadavku ***/
26
+ function WPHE_view_page()
27
+ {
28
+ global $WPHE_dirname, $WPHE_root, $WPHE_dirurl, $WPHE_version;
29
 
30
+ switch (htmlspecialchars(addslashes($_GET['page'])))
31
+ {
32
  case $WPHE_dirname:
33
+ include($WPHE_root.'pages/wphe-dashboard.php');
34
+ break;
35
  case $WPHE_dirname.'_backup':
36
+ include($WPHE_root.'pages/wphe-backup.php');
37
+ break;
38
  default:
39
+ include($WPHE_root.'pages/wphe-dashboard.php');
40
+ break;
41
+ }
42
+
43
+ unset($WPHE_dirname);
44
+ unset($WPHE_root);
45
+ unset($WPHE_dirurl);
46
+ unset($WPHE_version);
47
  }
48
 
49
+ /*** Pomocná funkce pro vytvoření menu ***/
50
+ function WPHE_add_page($page_title, $menu_title, $access_level, $file, $function = '')
51
+ {
52
+ global $WPHE_dirname;
53
+ add_submenu_page($WPHE_dirname, $page_title, $menu_title, $access_level, $file, $function);
54
+
55
+ unset($WPHE_dirname);
56
+ unset($page_title);
57
+ unset($menu_title);
58
+ unset($access_level);
59
+ unset($file);
60
+ unset($function);
61
  }
62
  ?>
lib/lib.wp-files.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) die();
3
+
4
+ if(!function_exists('wp_get_current_user'))
5
+ {
6
+ require_once ABSPATH.'wp-includes/pluggable.php';
7
+ }
8
+
9
+ if(!function_exists('current_user_can'))
10
+ {
11
+ require_once ABSPATH.'wp-includes/capabilities.php';
12
+ }
13
+
14
+ ?>
pages/wphe-backup.php CHANGED
@@ -1,78 +1,111 @@
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
- if(is_admin()){
5
- $backup_path = ABSPATH.'wp-content/htaccess.backup';
6
- $success = false;
7
- $htaccess_content = '';
8
- ?>
9
- <div class="wrap">
10
- <h2><?php _e('WP Htaccess Editor - Obnovení zálohy', $WPHE_lang_id);?></h2>
11
- <?php
12
- if(!empty($_POST['submit']) AND !empty($_POST['restore_backup'])){
13
- if(!file_exists($backup_path)){
14
- echo'<div id="message" class="error fade"><p><strong>'.__('Záloha souboru <code>.htaccess</code> nebyla nalezena, obnovení zálohy nelze provést!',$WPHE_lang_id).' </strong></p></div>';
15
- }else{
16
- @chmod($backup_path, 0666);
17
- $ht_content_backup = file_get_contents($backup_path, false, NULL);
18
- @unlink($backup_path);
19
- unset($backup_path);
20
- @chmod(ABSPATH.'.htaccess', 0666);
21
- $ht_content_backup = str_replace('\\\\', '\\', $ht_content_backup);
22
- $ht_content_backup = str_replace('\"', '"', $ht_content_backup);
23
- $success = file_put_contents(ABSPATH.'.htaccess', $ht_content_backup, LOCK_EX);
24
- unset($ht_content_backup);
25
- if($success === false){
26
- echo'<div id="message" class="error fade"><p><strong>'.__('Zálohu souboru <code>.htaccess</code> se nepodařilo obnovit!',$WPHE_lang_id).'</strong></p></div>';
27
- }else{
28
- echo'<div id="message" class="updated fade"><p><strong>'.__('Záloha souboru <code>.htaccess</code> byla úspěšně obnovena.',$WPHE_lang_id).'</strong></p></div>';
29
- }
30
- }
31
- }elseif(!empty($_POST['submit']) AND !empty($_POST['delete_backup'])){
32
- if(file_exists($backup_path)){
33
- @chmod($backup_path, 0666);
34
- @unlink($backup_path);
35
- if(file_exists($backup_path)){
36
- echo'<div id="message" class="error fade"><p><strong>'.__('Zálohu souboru <code>.htaccess</code> se nepodařilo odstranit!',$WPHE_lang_id).' </strong></p></div>';
37
- }else{
38
- echo'<div id="message" class="updated fade"><p><strong>'.__('Záloha souboru <code>.htaccess</code> byla úspěšně odstraněna.',$WPHE_lang_id).' </strong></p></div>';
39
- }
40
- }
41
- }else{
42
- if(file_exists($backup_path)){
43
- echo '<div class="postbox" style="float: left; width: 95%; padding: 15px;">';
44
- echo '<pre style="color:green;">'.__('Záloha souboru byla nalezena...',$WPHE_lang_id).'</pre>';
45
- echo '</div>';
46
- echo '<div class="postbox" style="float: left; width: 95%; padding: 15px;">';
47
- ?>
48
- <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>_backup">
49
- <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>_backup" />
50
- <input type="hidden" name="restore_backup" value="restore" />
51
- <p class="submit"><?php _e('Chcete obnovit zálohu souboru <code>.htaccess</code>?',$WPHE_lang_id);?> <input type="submit" name="submit" value="<?php _e('Obnovit zálohu &raquo;',$WPHE_lang_id);?>" /></p>
52
- </form>
53
- <?php
54
- echo '</div>';
55
- echo '<div class="postbox" style="float: left; width: 95%; padding: 15px;">';
56
- ?>
57
- <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>_backup">
58
- <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>_backup" />
59
- <input type="hidden" name="delete_backup" value="delete" />
60
- <p class="submit"><?php _e('Chcete odstranit zálohu souboru <code>.htaccess</code>?',$WPHE_lang_id);?> <input type="submit" name="submit" value="<?php _e('Odstranit zálohu &raquo;',$WPHE_lang_id);?>" /></p>
61
- </form>
62
- <?php
63
- echo '</div>';
64
- }else{
65
- echo'<div id="message" class="error fade"><p><strong>'.__('Záloha souboru <code>.htaccess</code> nebyla nalezena!',$WPHE_lang_id).' </strong></p></div>';
66
- echo'<p>'.__('Záloha ještě pravděpodobně nebyla vytvořena, nebo se při úpravách vašeho <code>.htaccess</code> souboru nezdařila. Můžete zkusit smazat obsah vašeho <code>.htaccess</code> souboru a aktualizovat nastavení trvalých odkazů. Htaccess soubor se tak vrátí do výchozí podoby.',$WPHE_lang_id).'</p>';
67
- }
68
- }
69
- ?>
70
- <p style="clear:both;">&nbsp;</p>
71
- <p style="clear:both;">&nbsp;</p>
72
- <p style="float:none;margin: 0 auto; text-align: center;"><?php ViewAD(); ?></p>
73
- </div>
74
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }else{
76
- die();
77
  }
78
  ?>
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
+ if(current_user_can('activate_plugins'))
5
+ {
6
+ ?>
7
+ <div class="wrap">
8
+ <h2><?php _e('WP Htaccess Editor - Backup', 'wphe'); ?></h2>
9
+ <?php
10
+ //============================ Restore Backup ===================================
11
+ if(!empty($_POST['submit']) && !empty($_POST['restore_backup']))
12
+ {
13
+
14
+ $wphe_restore_result = WPHE_RestoreBackup();
15
+ if($wphe_restore_result === false)
16
+ {
17
+ echo'<div id="message" class="error fade"><p><strong>'.__('Unable to restore backup! Probably the wrong setting write permissions to the files.', 'wphe').'</strong></p></div>';
18
+ echo'<div class="postbox wphe-box">';
19
+ echo'<p>'.__('The backup file is located in the <code>wp-content</code> folder.','wphe').'</p>';
20
+ echo'</div>';
21
+ }elseif($wphe_restore_result === true)
22
+ {
23
+ echo'<div id="message" class="updated fade"><p><strong>'.__('Backup was restored successfully', 'wphe').'</strong></p></div>';
24
+ echo'<div id="message" class="updated fade"><p><strong>'.__('Old backup file was deleted successfully', 'wphe').'</strong></p></div>';
25
+ }else
26
+ {
27
+ echo'<div id="message" class="error fade"><p><strong>'.__('Unable to restore backup!', 'wphe').'</strong></p></div>';
28
+ echo'<div class="postbox wphe-box" style="background: #FFEECE;">';
29
+ echo'<p class="wphe-red">'.__('This is contents of the original file, put it into a file manually','wphe').':</p>';
30
+ echo'<textarea class="wphe-textarea">'.$wphe_restore_result.'</textarea>';
31
+ echo'</div>';
32
+ }
33
+ //============================== Create Backup ===================================
34
+ }elseif(!empty($_POST['submit']) && !empty($_POST['create_backup'])){
35
+ if(WPHE_CreateBackup())
36
+ {
37
+ echo'<div id="message" class="updated fade"><p><strong>'.__('Backup file was created successfully', 'wphe').'</strong></p></div>';
38
+ echo'<div class="postbox wphe-box">';
39
+ echo'<p>'.__('The backup file is located in the <code>wp-content</code> folder.','wphe').'</p>';
40
+ echo'<p><a href="'.WP_CONTENT_URL.'/htaccess.backup" target="_blank">'.__('Download backup file','wphe').'</a></p>';
41
+ echo'</div>';
42
+ }else{
43
+ echo'<div id="message" class="error fade"><p><strong>'.__('Unable to create backup! Probably the wrong setting write permissions to the files.', 'wphe').'</strong></p></div>';
44
+ }
45
+ //============================== Delete Backup ====================================
46
+ }elseif(!empty($_POST['submit']) && !empty($_POST['delete_backup']))
47
+ {
48
+ if(WPHE_DeleteBackup())
49
+ {
50
+ echo'<div id="message" class="updated fade"><p><strong>'.__('Backup file was successfully removed', 'wphe').'</strong></p></div>';
51
+ }else{
52
+ echo'<div id="message" class="error fade"><p><strong>'.__('Backup file could not be removed! Probably the wrong setting write permissions to the files.','wphe').'</strong></p></div>';
53
+ }
54
+ //============================== Home ==============================================
55
+ }else{
56
+ if(file_exists(ABSPATH.'wp-content/htaccess.backup'))
57
+ {
58
+ echo '<div class="postbox wphe-box">';
59
+ echo '<pre class="wphe-green">'.__('The backup file was found...','wphe').'</pre>';
60
+ echo '</div>';
61
+ echo '<div class="postbox wphe-box" style="background: #E0FCE1;">';
62
+ echo '<a href="'.WP_CONTENT_URL.'/htaccess.backup" target="_blank">'.__('Download backup file','wphe').'</a>';
63
+ echo '</div>';
64
+ echo '<div class="postbox wphe-box" style="background: #FFEECE;">';
65
+ ?>
66
+ <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>_backup">
67
+ <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>_backup" />
68
+ <input type="hidden" name="restore_backup" value="restore" />
69
+ <p class="submit"><?php _e('Do you want to restore the backup file?', 'wphe'); ?> <input type="submit" name="submit" value="<?php _e('Restore backup &raquo;', 'wphe'); ?>" /></p>
70
+ </form>
71
+ <?php
72
+ echo '</div>';
73
+ echo '<div class="postbox wphe-box" style="background: #FFEECE;">';
74
+ ?>
75
+ <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>_backup">
76
+ <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>_backup" />
77
+ <input type="hidden" name="delete_backup" value="delete" />
78
+ <p class="submit"><?php _e('Do you want to delete a backup file?', 'wphe'); ?> <input type="submit" name="submit" value="<?php _e('Remove backup &raquo;', 'wphe'); ?>" /></p>
79
+ </form>
80
+ <?php
81
+ echo '</div>';
82
+ }else{
83
+ echo '<div class="postbox wphe-box">';
84
+ echo '<pre class="wphe-red">'.__('Backup file not found...','wphe').'</pre>';
85
+ echo '</div>';
86
+
87
+ echo '<div class="postbox wphe-box" style="background: #E0FCE1;">';
88
+ ?>
89
+ <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>_backup">
90
+ <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>_backup" />
91
+ <input type="hidden" name="create_backup" value="create" />
92
+ <p class="submit"><?php _e('Do you want to create a new backup file?', 'wphe'); ?> <input type="submit" name="submit" value="<?php _e('Create new &raquo;', 'wphe'); ?>" /></p>
93
+ </form>
94
+ <?php
95
+ echo '</div>';
96
+ }
97
+ }
98
+ ?>
99
+ <p style="clear:both;">&nbsp;</p>
100
+ <p style="clear:both;">&nbsp;</p>
101
+ <p style="clear:both;">&nbsp;</p>
102
+ <p class="wphe-banner"><?php WPHE_ViewAdBanner(); ?></p>
103
+ <?php
104
+ WPHE_DebugPanel(memory_get_usage(),memory_get_peak_usage());
105
+ ?>
106
+ </div>
107
+ <?php
108
  }else{
109
+ wp_die( __('You do not have permission to view this page','wphe'), __('Access denied','wphe'));
110
  }
111
  ?>
pages/wphe-dashboard.php CHANGED
@@ -1,192 +1,180 @@
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
-
5
- if(is_admin()){
6
- $backup_path = ABSPATH.'wp-content/htaccess.backup';
7
- $success = false;
8
- $htaccess_content = '';
9
- ?>
10
- <div class="wrap">
11
- <h2><?php _e('WP Htaccess Editor', $WPHE_lang_id); ?></h2>
12
- <?php
13
- if(!empty($_POST['submit']) AND !empty($_POST['save_htaccess'])){
14
- $htaccess_content = $_POST['ht_content'];
15
- if(file_exists($backup_path)){
16
- @chmod($backup_path, 0666);
17
- @unlink($backup_path);
18
- @chmod(ABSPATH.'.htaccess', 0666);
19
- $htaccess_content_backup = file_get_contents(ABSPATH.'.htaccess', false, NULL);
20
- if($htaccess_content_backup === false){
21
- echo'<div id="message" class="error fade"><p><strong>'.__('Původní soubor se nepodařilo přečíst! Záloha nebyla vytvořena!', $WPHE_lang_id).'</strong></p></div>';
22
- }else{
23
- $htaccess_content_backup = str_replace('\\\\', '\\', $htaccess_content_backup);
24
- $htaccess_content_backup = str_replace('\"', '"', $htaccess_content_backup);
25
- $create_backup = file_put_contents($backup_path, $htaccess_content_backup, LOCK_EX);
26
- if($create_backup === false){
27
- echo'<div id="message" class="error fade"><p><strong>'.__('Zálohu souboru <code>.htaccess</code> se nepodařilo uložit!', $WPHE_lang_id).'</strong></p></div>';
28
- }else{
29
- echo'<div id="message" class="updated fade"><p><strong>'.__('Záloha původního souboru byla úspěšně uložena.', $WPHE_lang_id).'</strong></p></div>';
30
- @chmod($backup_path, 0640);
31
- }
32
- }
33
- unset($create_backup);
34
- }else{
35
- @chmod(ABSPATH.'.htaccess', 0666);
36
- $htaccess_content_backup = file_get_contents(ABSPATH.'.htaccess', false, NULL);
37
- if($htaccess_content_backup === false){
38
- echo'<div id="message" class="error fade"><p><strong>'.__('Původní soubor se nepodařilo přečíst! Záloha nebyla vytvořena!', $WPHE_lang_id).'</strong></p></div>';
39
- }else{
40
- $htaccess_content_backup = str_replace('\\\\', '\\', $htaccess_content_backup);
41
- $htaccess_content_backup = str_replace('\"', '"', $htaccess_content_backup);
42
- $create_backup = file_put_contents($backup_path, $htaccess_content_backup, LOCK_EX);
43
- if($create_backup === false){
44
- echo'<div id="message" class="error fade"><p><strong>'.__('Zálohu souboru <code>.htaccess</code> se nepodařilo uložit!', $WPHE_lang_id).'</strong></p></div>';
45
- }else{
46
- echo'<div id="message" class="updated fade"><p><strong>'.__('Záloha původního souboru byla úspěšně uložena.', $WPHE_lang_id).'</strong></p></div>';
47
- }
48
- @chmod($backup_path, 0640);
49
- unset($create_backup);
50
- unset($backup_path);
51
- unset($htaccess_content_backup);
52
- }
53
- }
54
- @chmod(ABSPATH.'.htaccess', 0666);
55
- $htaccess_content = str_replace('\\\\', '\\', $htaccess_content);
56
- $htaccess_content = str_replace('\"', '"', $htaccess_content);
57
- $save = file_put_contents(ABSPATH.'.htaccess', $htaccess_content, LOCK_EX);
58
- if($save === false){
59
- echo'<div id="message" class="error fade"><p><strong>'.__('Soubor <code>.htaccess</code> se nepodařilo uložit!', $WPHE_lang_id).'</strong></p></div>';
60
- }else{
61
- echo'<div id="message" class="updated fade"><p><strong>'.__('Soubor <code>.htaccess</code> byl úspěšně uložen.', $WPHE_lang_id).'</strong></p></div>';
62
- }
63
- unset($save);
64
- @chmod(ABSPATH.'.htaccess', 0640);
65
- unset($htaccess_content);
66
- ?>
67
- <p><?php _e('Provedli jste změny v <code>.htaccess</code> souboru. Automaticky byla vytvořena záloha původního souboru.', $WPHE_lang_id);?><br />
68
- <a href="<?php echo get_option('home'); ?>/" target="_blank"><?php _e('Zkontrolujte', $WPHE_lang_id);?></a> <?php _e('zda se váš web správně zobrazuje!', $WPHE_lang_id);?> <br /><?php _e('V případě problémů můžete použít stránku', $WPHE_lang_id);?> <a href="admin.php?page=<?php echo $WPHE_dirname.'_backup'; ?>"><?php _e('obnovení zálohy', $WPHE_lang_id);?></a>. <?php _e('Váš <code>.htaccess</code> soubor tak může být obnoven do stavu před vaší úpravou tohoto souboru.', $WPHE_lang_id);?></p>
69
- <p style="color:red;"><?php _e('Uložená záloha <code>.htaccess</code> souboru je na vašem webu volně přístupná z prohlížeče! Po ověření správné funkčnosti webu by jste ji měli, níže zobrazeným tlačítkem, odstranit!', $WPHE_lang_id);?></p>
70
- <p><?php _e('Soubor se zálohou si můžete ještě před odstraněním', $WPHE_lang_id);?> <a href="<?php echo WP_CONTENT_URL.'/htaccess.backup';?>"><?php _e('uložit', $WPHE_lang_id);?></a> <?php _e('do vašeho PC (klikněte na odkaz pravým tlačítkem myši a zvolte "Uložít cíl jako...")', $WPHE_lang_id);?>.</p>
71
- <div class="postbox" style="float: left; width: 95%; padding: 15px;">
72
- <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>">
73
- <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>" />
74
- <input type="hidden" name="delete_backup" value="delete" />
75
- <p class="submit"><?php _e('Chcete odstranit soubor se zálohou?', $WPHE_lang_id);?> <input type="submit" name="submit" value="<?php _e('Odstranit zálohu &raquo;', $WPHE_lang_id);?>" /></p>
76
- </form>
77
- </div>
78
- <?php
79
- }elseif(!empty($_POST['submit']) AND !empty($_POST['create_htaccess'])){
80
- if(!file_exists(ABSPATH.'.htaccess')){
81
- $success_create = file_put_contents(ABSPATH.'.htaccess', '', LOCK_EX);
82
- if($success_create === false){
83
- echo'<div id="message" class="error fade"><p><strong>'.__('Soubor <code>.htaccess</code> se nepodařilo vytvořit!</strong>(root webu nemá patrně nastavena práva pro zápis)', $WPHE_lang_id).'</p></div>';
84
- echo '<p>'.__('Došlo k chybě při vytváření souboru. Do hlavní složky vašeho webu nelze zapisovat. Pro vytvoření <code>htaccess</code> souboru musíte použít FTP klienta.', $WPHE_lang_id).'</p>';
85
- }else{
86
- echo'<div id="message" class="updated fade"><p><strong>'.__('Soubor <code>.htaccess</code> byl úspěšně vytvořen.', $WPHE_lang_id).'</strong></p></div>';
87
- echo'<p>'.__('Vraťte se zpět na', $WPHE_lang_id).' <a href="admin.php?page='.$WPHE_dirname.'">'.__('stránku editoru', $WPHE_lang_id).'</a> '.__('kde si váš nový <code>htaccess</code> soubor můžete snadno upravit.', $WPHE_lang_id).'</p>';
88
- }
89
- unset($success_create);
90
  }else{
91
- echo'<div id="message" class="error fade"><p><strong>'.__('Došlo k chybě: Soubor <code>.htaccess</code> nemůžete vytvořit protože již existuje!', $WPHE_lang_id).'</strong></p></div>';
92
  }
93
- }elseif(!empty($_POST['submit']) AND !empty($_POST['delete_backup'])){
94
- @chmod($backup_path, 0666);
95
- @unlink($backup_path);
96
- if(file_exists($backup_path)){
97
- echo'<div id="message" class="error fade"><p><strong>'.__('Zálohu <code>.htaccess</code> souboru se nepodařilo odstranit!</strong>(odstraňte ji pomocí FTP klienta)', $WPHE_lang_id).'</p></div>';
 
98
  }else{
99
- echo'<div id="message" class="updated fade"><p><strong>'.__('Záloha souboru <code>.htaccess</code> byla úspěšně odstraněna.', $WPHE_lang_id).'</strong></p></div>';
100
  }
101
- ?>
102
- <p><?php _e('Váš <code>.htaccess</code> soubor byl úspěšně změněn. Informace o tomto pluginu nebo o autorovi naleznete na webu', $WPHE_lang_id);?> <a href="http://www.wp-blog.cz">WP-blog.cz</a>.</p>
103
- <p style="clear: both;">&nbsp;</p>
104
- <p style="clear: both;">&nbsp;</p>
105
- <p style="clear: both;">&nbsp;</p>
106
- <p style="float:none;margin: 0 auto; text-align: center;"><?php ViewAD(); ?></p>
107
- <?php
108
- unset($backup_path);
109
- }else{
110
- ?>
111
- <p><?php _e('Pomocí tohoto editoru můžete jednoduše upravovat váš <code>.htaccess</code> soubor bez nutnosti použití FTP klienta.', $WPHE_lang_id);?></p>
112
- <p style="color:red;"><?php _e('<strong>POZOR:</strong> Jakkákoliv chyba v tomto souboru může způsobit nefunkčnost vašeho webu!', $WPHE_lang_id);?><br />
113
- <?php _e('Úpravy <code>.htaccess</code> souboru by proto měli provádět pouze zkušení uživatelé!', $WPHE_lang_id);?></p>
114
- <div class="postbox" style="float: left; width: 95%; padding: 15px;">
115
- <?php
116
- if(!file_exists(ABSPATH.'.htaccess')){
117
- echo'<pre style="color: red;">'.__('Soubor ".htaccess" nebyl nalezen!', $WPHE_lang_id).'</pre>';
118
- $success = false;
119
- }else{
120
- echo'<pre style="color: green;">'.__('Soubor ".htaccess" byl nalezen...', $WPHE_lang_id).'</pre>';
121
- $success = true;
122
- if(!is_readable(ABSPATH.'.htaccess')){
123
- echo'<pre style="color: red;">'.__('Soubor ".htaccess" nelze přečíst!', $WPHE_lang_id).'</pre>';
124
- $success = false;
125
- }else{
126
- echo'<pre style="color: green;">'.__('Soubor ".htaccess" lze přečíst...', $WPHE_lang_id).'</pre>';
127
- $success = true;
128
- }
129
- if($success == true){
130
- @chmod(ABSPATH.'.htaccess', 0644);
131
- $htaccess_content = file_get_contents(ABSPATH.'.htaccess', false, NULL);
132
- if($htaccess_content === false){
133
- echo'<pre style="color: red;">'.__('Obsah souboru se nepodařilo přečíst!', $WPHE_lang_id).'</pre>';
134
- $success = false;
135
- }elseif(empty($htaccess_content)){
136
- echo'<pre style="color: orange;">'.__('Soubor .htaccess je prázdný...', $WPHE_lang_id).'</pre>';
137
- $success = true;
138
- }else{
139
- echo'<pre style="color: green">'.__('Soubor byl úspěšně přečten...', $WPHE_lang_id).'</pre>';
140
- $success = true;
141
- }
142
- @chmod(ABSPATH.'.htaccess', 0640);
143
- }
144
-
145
- }
146
-
147
- ?>
148
- </div>
149
- <div class="postbox" style="float: left; width: 95%; padding: 15px;">
150
- <?php
151
- if($success == true){
152
- ?>
153
- <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>">
154
- <input type="hidden" name="save_htaccess" value="save" />
155
- <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>" />
156
- <textarea name="ht_content" style="float:left;width: 100%;padding:5px;color:blue;background-color:whitesmoke;height:250px;" wrap="off"><?php echo $htaccess_content;?></textarea>
157
- <p style="clear:both;">&nbsp;</p>
158
- <p class="submit"><input type="submit" name="submit" value="<?php _e('Uložit soubor &raquo;', $WPHE_lang_id);?>" /></p>
159
- </form>
160
- <?php
161
- unset($htaccess_content);
162
-
163
- }else{
164
- echo'<strong>'.__('Soubor <code>.htaccess</code> nemůže být zobrazen, protože neexistuje.', $WPHE_lang_id).'</strong><br />';
165
- ?>
166
- <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>">
167
- <input type="hidden" name="create_htaccess" value="create" />
168
- <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>" />
169
- <p class="submit"><?php _e('Vytvořit nový <code>.htaccess</code> soubor?',$WPHE_lang_id);?> <input type="submit" name="submit" value="<?php _e('Vytvořit &raquo;',$WPHE_lang_id);?>" /></p>
170
- </form>
171
- <?php
172
- }
173
 
174
- unset($success);
175
- ?>
176
- </div>
177
- <p style="clear:both;">&nbsp;</p>
178
- <h2><?php _e('Informace k úpravám .htaccess souboru', $WPHE_lang_id);?></h2>
179
- <p><?php _e('Více informací o možných úpravách tohoto souboru naleznete na stránce', $WPHE_lang_id);?> <a href="http://httpd.apache.org/docs/current/howto/htaccess.html" target="_blank">Apache Tutorial: .htaccess files</a>. </p>
180
- <p><?php _e('Zajímavé tipy a návody naleznete také na', $WPHE_lang_id);?> <a href="http://www.wp-blog.cz" target="_blank"><?php _e('webu', $WPHE_lang_id);?></a> <?php _e('autora pluginu', $WPHE_lang_id);?>.</p>
181
- <h2><?php _e('Informace o tomto pluginu', $WPHE_lang_id);?></h2>
182
- <p><?php _e('Pokud máte s pluginem nějaký problém nebo máte návrh na jeho vylepšení, popřípadě se chcete dozvědět něco i o jiných pluginech autora, navštivte stránky', $WPHE_lang_id);?> <a href="http://www.wp-blog.cz">WP-blog.cz</a>.</p>
183
- <p style="clear:both;">&nbsp;</p>
184
- <p style="float:none;margin: 0 auto; text-align: center;"><?php ViewAD(); ?></p>
185
- </div>
186
-
187
- <?php
188
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  }else{
190
- die();
191
  }
192
  ?>
1
  <?php
2
  if (!defined('ABSPATH')) die();
3
 
4
+ if(current_user_can('activate_plugins'))
5
+ {
6
+ $WPHE_backup_path = WP_CONTENT_URL.'/htaccess.backup';
7
+ $WPHE_orig_path = ABSPATH.'.htaccess';
8
+ ?>
9
+ <div class="wrap">
10
+ <h2><?php _e('WP Htaccess Editor', 'wphe'); ?></h2>
11
+ <?php
12
+ //============================ Save Htaccess =======================================
13
+ if(!empty($_POST['submit']) AND !empty($_POST['save_htaccess']))
14
+ {
15
+ $WPHE_new_content = $_POST['ht_content'];
16
+ WPHE_DeleteBackup();
17
+ if(WPHE_CreateBackup())
18
+ {
19
+ if(WPHE_WriteNewHtaccess($WPHE_new_content))
20
+ {
21
+ echo'<div id="message" class="updated fade"><p><strong>'.__('File has been successfully changed', 'wphe').'</strong></p></div>';
22
+ ?>
23
+ <p><?php _e('You have made changes to the htaccess file. The original file was automatically backed up.', 'wphe'); ?><br />
24
+ <a href="<?php echo get_option('home'); ?>/" target="_blank"><?php _e('Check the functionality of your site (the links to the articles or categories).', 'wphe');?></a>. <?php _e('If something is not working properly restore the original backup file.', 'wphe');?></p>
25
+ <div class="postbox" style="float: left; width: 95%; padding: 15px;">
26
+ <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>">
27
+ <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>" />
28
+ <input type="hidden" name="delete_backup" value="delete" />
29
+ <p class="submit"><?php _e('If everything works properly, you can delete the backup file:', 'wphe');?> <input type="submit" name="submit" value="<?php _e('Remove backup &raquo;', 'wphe');?>" />&nbsp;<?php echo __('or','wphe'); ?>&nbsp;<a href="admin.php?page=<?php echo $WPHE_dirname; ?>_backup"><?php _e('restore the original file from backup','wphe');?></a></p>
30
+ </form>
31
+ </div>
32
+ <?php
33
+ }else{
34
+ echo'<div id="message" class="error fade"><p><strong>'.__('The file could not be saved! Probably the wrong setting read permissions to the files', 'wphe').'</strong></p></div>';
35
+ }
36
+ }else{
37
+ echo'<div id="message" class="error fade"><p><strong>'.__('Unable to create backup of the original file! Probably the wrong setting read permissions to the files', 'wphe').'</strong></p></div>';
38
+ }
39
+ unset($WPHE_new_content);
40
+ //============================ Create New Htaccess ================================
41
+ }elseif(!empty($_POST['submit']) AND !empty($_POST['create_htaccess']))
42
+ {
43
+ if(WPHE_WriteNewHtaccess('') === false)
44
+ {
45
+ echo'<div id="message" class="error fade"><p><strong>'.__('Htaccess file is not created. Probably the wrong setting read permissions to the files', 'wphe').'</p></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }else{
47
+ echo'<div id="message" class="updated fade"><p><strong>'.__('Htaccess file was successfully created.', 'wphe').'</strong></p></div>';
48
  }
49
+ //============================ Delete Backup =======================================
50
+ }elseif(!empty($_POST['submit']) AND !empty($_POST['delete_backup']))
51
+ {
52
+ if(WPHE_DeleteBackup() === false)
53
+ {
54
+ echo'<div id="message" class="error fade"><p><strong>'.__('Backup file could not be removed! Probably the wrong setting read permissions to the files', 'wphe').'</p></div>';
55
  }else{
56
+ echo'<div id="message" class="updated fade"><p><strong>'.__('Backup file has been successfully removed.', 'wphe').'</strong></p></div>';
57
  }
58
+ //============================ Home ================================================
59
+ }else
60
+ {
61
+ ?>
62
+ <p><?php _e('Using this editor you can easily modify your htaccess file without having to use an FTP client.', 'wphe');?></p>
63
+ <p class="wphe-red"><?php _e('<strong>WARNING:</strong> Any error in this file may cause malfunction of your site!', 'wphe');?><br />
64
+ <?php _e('Edit htaccess file should therefore be performed only by experienced users!', 'wphe');?><br />
65
+ </p>
66
+ <div class="postbox wphe-box">
67
+ <?php
68
+ if(!file_exists($WPHE_orig_path))
69
+ {
70
+ echo'<pre class="wphe-red">'.__('Htaccess file not found!', 'wphe').'</pre>';
71
+ $success = false;
72
+ }else{
73
+ echo'<pre class="wphe-green">'.__('Htaccess file found...', 'wphe').'</pre>';
74
+ $success = true;
75
+ if(!is_readable($WPHE_orig_path))
76
+ {
77
+ echo'<pre class="wphe-red">'.__('Htaccess file not read!', 'wphe').'</pre>';
78
+ $success = false;
79
+ }
80
+ if($success == true)
81
+ {
82
+ @chmod($WPHE_orig_path, 0644);
83
+ $WPHE_htaccess_content = file_get_contents($WPHE_orig_path, false, NULL);
84
+ if($WPHE_htaccess_content === false)
85
+ {
86
+ echo'<pre class="wphe-red">'.__('Htaccess file not read!', 'wphe').'</pre>';
87
+ $success = false;
88
+ }elseif(empty($WPHE_htaccess_content))
89
+ {
90
+ echo'<pre style="color: orange;">'.__('Htaccess file is empty...', 'wphe').'</pre>';
91
+ $success = true;
92
+ }else{
93
+ $success = true;
94
+ }
95
+ @chmod($WPHE_orig_path, 0640);
96
+ }
97
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
+ ?>
100
+ </div>
101
+ <?php
102
+ if($success == true)
103
+ {
104
+ ?>
105
+ <div class="postbox wphe-box">
106
+ <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>">
107
+ <input type="hidden" name="save_htaccess" value="save" />
108
+ <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>" />
109
+ <textarea name="ht_content" style="float:left;width: 100%;padding:5px;color:blue;background-color:whitesmoke;height:250px;" wrap="off"><?php echo $WPHE_htaccess_content;?></textarea>
110
+ <p style="clear:both;">&nbsp;</p>
111
+ <p class="submit"><input type="submit" name="submit" value="<?php _e('Save file &raquo;', 'wphe');?>" /></p>
112
+ </form>
113
+ </div>
114
+ <?php
115
+ unset($WPHE_htaccess_content);
116
+ }else{
117
+ echo'<strong class="wphe-red">'.__('Htaccess file is not readable, probably does not exist', 'wphe').'</strong><br />';
118
+ ?>
119
+ <div class="postbox wphe-box" style="background: #E0FCE1;">
120
+ <form method="post" action="admin.php?page=<?php echo $WPHE_dirname; ?>">
121
+ <input type="hidden" name="create_htaccess" value="create" />
122
+ <input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=<?php echo $WPHE_dirname; ?>" />
123
+ <p class="submit"><?php _e('Create new <code>.htaccess</code> file?', 'wphe');?> <input type="submit" name="submit" value="<?php _e('Create &raquo;', 'wphe');?>" /></p>
124
+ </form>
125
+ </div>
126
+ <?php
127
+ }
128
+ unset($success);
129
+ ?>
130
+
131
+ <p style="clear:both;">&nbsp;</p>
132
+ <h2><?php _e('Information for editing htaccess file', 'wphe');?></h2>
133
+ <div class="postbox wphe-box">
134
+ <p><?php _e('For more information on possible adjustments to this file, please visit', 'wphe');?> <a href="http://httpd.apache.org/docs/current/howto/htaccess.html" target="_blank">Apache Tutorial: .htaccess files</a> <?php _e('or','wphe'); ?> <a href="http://net.tutsplus.com/tutorials/other/the-ultimate-guide-to-htaccess-files/" target="_blank">The Ultimate Guide to .htaccess Files</a>. </p>
135
+ <p><?php _e('Interesting tips and guides can also be found on ', 'wphe');?> <?php WPHE_AuthorLink(); ?>.</p>
136
+ <p><a href="http://www.google.com/#sclient=psy&q=htaccess+how+to" target="_blank"><?php _e('Or use the Google search.','wphe');?></a></p>
137
+ </div>
138
+ <h2><?php _e('Information about this plugin', 'wphe');?></h2>
139
+ <div class="postbox wphe-box">
140
+ <div class="wphe-infobox">
141
+ <h4><?php _e('Author','wphe'); ?></h4>
142
+ <p style="padding-left: 5px"><em>Lukáš Svadbík</em>&nbsp;&nbsp;<?php WPHE_AuthorLink(); ?></p>
143
+ </div>
144
+ <div class="wphe-infobox">
145
+ <h4><?php _e('Translators','wphe'); ?></h4>
146
+ <table class="wphe-translators">
147
+ <tr><td><em>Lukáš Svadbík</em></td><td><img src="<?php echo $WPHE_dirurl.'style/img/flag-cz.jpg'; ?>" border="0" alt="Czech" width="12" height="9" /></td><td><?php WPHE_AuthorLink(); ?></td></tr>
148
+ <tr><td><em>Andi Eko</em></td><td><img src="<?php echo $WPHE_dirurl.'style/img/flag-en.jpg'; ?>" border="0" alt="English" width="12" height="9" /></td><td><a href="http://andieko.info/" target="_blank">andieko.info</a></td></tr>
149
+ </table>
150
+ </div>
151
+ <div class="wphe-infobox">
152
+ <h4><?php _e('Plugin','wphe'); ?></h4>
153
+ <table>
154
+ <tr><td><em><?php _e('Version:','wphe'); ?></em></td><td><span class="wphe-green"><?php echo $WPHE_version; ?></span></td></tr>
155
+ <tr><td><em><?php _e('URL:','wphe'); ?></em></td><td><a href="http://wordpress.org/extend/plugins/wp-htaccess-editor/" target="_blank"><?php _e('WordPress repository','wphe'); ?></a></td></tr>
156
+ <tr><td><em><?php _e('Feedback:','wphe'); ?></em></td><td><a href="mailto:wphe@lukenzi.info">wphe&#64;lukenzi&#46;info</a></td></tr>
157
+ </table>
158
+ </div>
159
+ <div class="wphe-infobox">
160
+ <h4><?php _e('Other plugins','wphe'); ?></h4>
161
+ <table>
162
+ <tr><td><em><a href="http://wordpress.org/extend/plugins/ceska-podpora-wordpressu/" target="_blank"><?php _e('Czech support for WordPress','wphe'); ?></a></em></td></tr>
163
+ </table>
164
+ </div>
165
+ </div>
166
+ <?php
167
+ }
168
+ WPHE_DebugPanel(memory_get_usage(), memory_get_peak_usage());
169
+ ?>
170
+ <p style="clear:both;">&nbsp;</p>
171
+ <p class="wphe-banner"><?php WPHE_ViewAdBanner(); ?></p>
172
+ <p style="clear:both;">&nbsp;</p>
173
+ </div>
174
+ <?php
175
+ unset($WPHE_orig_path);
176
+ unset($WPHE_backup_path);
177
  }else{
178
+ wp_die( __('You do not have permission to view this page','wphe'), __('Access denied','wphe'));
179
  }
180
  ?>
readme.txt CHANGED
@@ -1,33 +1,49 @@
1
  === WP Htaccess Editor ===
2
  Contributors: Lukenzi
3
  Donate link: http://www.wp-blog.cz/o-autorovi/
4
- Tags: editor,htaccess,simply
5
  Requires at least: 3.0
6
- Tested up to: 3.1
7
- Stable tag: 1.0.1
8
 
9
- Simply .htaccess editor
10
 
11
  == Description ==
12
 
13
- Simple editor htaccess file without using FTP client
14
- (This plugin is yet only in Czech language :/ )
15
 
16
  == Installation ==
17
 
18
- 1. Extract the zip into the wp-content/plugins directory
19
  2. Activate the plugin through the Admin panel of your WordPress
20
 
 
21
  == Screenshots ==
22
 
23
  1. Editing htaccess file
24
  2. Admin menu
25
  3. Restore backup
26
 
 
 
 
 
27
 
 
 
28
 
29
  == Changelog ==
30
 
 
 
 
 
 
 
 
 
 
31
  = 1.0.1 =
32
  * Adding button for create .htaccess file if not exists
33
  * Fixed bug in the permissions to view the plugin
@@ -36,22 +52,3 @@ Simple editor htaccess file without using FTP client
36
  = 1.0.0 =
37
  * First stable version
38
  * Adding to WordPress repository
39
-
40
-
41
- == Credits ==
42
-
43
- Copyright 2011 by Lukenzi
44
-
45
- This program is free software; you can redistribute it and/or modify
46
- it under the terms of the GNU General Public License as published by
47
- the Free Software Foundation; either version 2 of the License, any
48
- later version.
49
-
50
- This program is distributed in the hope that it will be useful,
51
- but WITHOUT ANY WARRANTY; without even the implied warranty of
52
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53
- GNU General Public License for more details.
54
-
55
- You should have received a copy of the GNU General Public License
56
- along with this program; if not, write to the Free Software
57
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1
  === WP Htaccess Editor ===
2
  Contributors: Lukenzi
3
  Donate link: http://www.wp-blog.cz/o-autorovi/
4
+ Tags: simply,htaccess,editor
5
  Requires at least: 3.0
6
+ Tested up to: 3.1.1
7
+ Stable tag: 1.1.0
8
 
9
+ Simple editor htaccess file without using FTP client.
10
 
11
  == Description ==
12
 
13
+ Simple editor *htaccess* file without using FTP client.
14
+ **This plugin should be used only by experienced users!**
15
 
16
  == Installation ==
17
 
18
+ 1. Extract the zip into the *wp-content/plugins* directory
19
  2. Activate the plugin through the Admin panel of your WordPress
20
 
21
+
22
  == Screenshots ==
23
 
24
  1. Editing htaccess file
25
  2. Admin menu
26
  3. Restore backup
27
 
28
+ == Frequently Asked Questions ==
29
+
30
+ = Can create or edit the htaccess file =
31
+ If your hosting does not allow you to create or modify files on the server, use another hosting :)
32
 
33
+ = I edited my htaccess file and now my site does not work =
34
+ Try to restore the original backup file. If restoration is not possible with this plugin, restore the backup file from the folder "wp-content " manually.
35
 
36
  == Changelog ==
37
 
38
+ = 1.1.0 =
39
+ * Adding Czech and English language
40
+ * Adding debug panel
41
+ * Added information about the author and translators
42
+ * Fixed vulnerability
43
+ * Fixed bug loading translations files
44
+ * Optimized for minimum memory requirements
45
+ * Small code modifications
46
+
47
  = 1.0.1 =
48
  * Adding button for create .htaccess file if not exists
49
  * Fixed bug in the permissions to view the plugin
52
  = 1.0.0 =
53
  * First stable version
54
  * Adding to WordPress repository
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/img/1.gif ADDED
Binary file
style/img/2.gif ADDED
Binary file
style/img/3.gif ADDED
Binary file
style/img/flag-cz.jpg ADDED
Binary file
style/img/flag-en.jpg ADDED
Binary file
style/wphe-style.css ADDED
@@ -0,0 +1 @@
 
1
+ .wphe-box{ float: left; width: 95%; padding: 10px; } .wphe-box textarea.wphe-textarea{ width: 400px; _width: 420px; height: 400px; padding: 10px; color: Purple; } .wphe-red{ color: Red!important; } .wphe-green{ color: Green!important; } .wphe-white{ color: White!important; } .wphe-lime{ color: Lime!important; } .wphe-banner{ float: none; text-align: center; margin: 0 auto; border: none; } .wphe-banner a img{ border: none; background-color: #E0FCE1; } .wphe-debug-panel{ width: auto; text-align: left; padding: 5px; font-size: 11px; position:fixed; bottom:0px; right:0px; height: auto; color:yellow; background-color:black; z-index:1000; } table.wphe-translators tr td{ padding: 0 5px 0 5px; } .wphe-infobox{ float: left; margin: 0 15px 15px 15px; }
wp-htaccess-editor.php CHANGED
@@ -1,15 +1,15 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Htaccess Editor
4
- Plugin URI: http://www.wp-blog.cz
5
- Description: Simple editor htaccess file without using FTP client
6
- Version: 1.0.1
7
  Author: Lukenzi
8
- Author URI: http://www.wp-blog.cz/o-autorovi/
9
  License: GPLv2 or later
10
  */
11
 
12
- /* Copyright 2011, Lukenzi (email : mail@Lukenzi.info)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
@@ -27,45 +27,60 @@ License: GPLv2 or later
27
  */
28
 
29
  if (!defined('ABSPATH')) die();
 
30
  if(!is_admin()){
31
  return;
32
  }else{
 
 
33
 
34
- if(!defined('WP_CONTENT_URL')){
35
- if(defined('WP_SITEURL')){
36
- define('WP_CONTENT_URL', WP_SITEURL.'/wp-content');
37
- }else{
38
- define('WP_SITEURL', get_option('url').'/');
39
- define('WP_CONTENT_URL', WP_SITEURL.'wp-content');
40
- }
41
- }
42
- if(!defined('WP_PLUGIN_URL')){
43
- define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
44
- }
45
-
46
-
47
- $WPHE_root = str_replace('\\', '/', dirname(__FILE__)).'/';
48
- $WPHE_lib = $WPHE_root.'lib/';
49
- $WPHE_plugin = str_replace('\\', '/', plugin_basename(__FILE__));
50
- $arr = explode('/plugins/', $WPHE_root, 2);
51
- $WPHE_dirname = str_replace('/', '', $arr[1]);
52
- unset($arr);
53
- $WPHE_dirurl = WP_PLUGIN_URL.'/'.$WPHE_dirname.'/';
54
- $WPHE_lang_id = $WPHE_dirname;
55
 
 
 
 
 
 
56
 
57
  /******************************************************************************/
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- if(function_exists('add_action')){
60
- if(function_exists('load_plugin_textdomain')){
61
- load_plugin_textdomain($WPHE_lang_id,'/wp-content/plugins/'.$WPHE_dirname.'/lang/');
62
- }
63
- include $WPHE_lib.'lib.ad.php';
64
- include $WPHE_lib.'lib.pages.php';
65
- add_action('admin_menu', 'wphe_admin_menu');
66
- }
67
- /******************************************************************************/
68
-
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
  ?>
1
  <?php
2
  /*
3
  Plugin Name: WP Htaccess Editor
4
+ Plugin URI: http://www.wp-blog.cz/101-plugin-wp-htaccess-editor/
5
+ Description: Simple editor htaccess file without using FTP client.
6
+ Version: 1.1.0
7
  Author: Lukenzi
8
+ Author URI: http://www.wp-blog.cz/
9
  License: GPLv2 or later
10
  */
11
 
12
+ /* Copyright 2011, Lukenzi (email : mail@lukenzi.info)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
27
  */
28
 
29
  if (!defined('ABSPATH')) die();
30
+
31
  if(!is_admin()){
32
  return;
33
  }else{
34
+ $WPHE_version = '1.1.0';
35
+ $WPHE_mem_start = memory_get_usage();
36
 
37
+ if(!defined('WP_CONTENT_URL')){
38
+ if(!defined('WP_SITEURL')){
39
+ define('WP_SITEURL', get_option('url').'/');
40
+ }
41
+ define('WP_CONTENT_URL', WP_SITEURL.'wp-content');
42
+ }
43
+ if(!defined('WP_PLUGIN_URL')){
44
+ define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
45
+ }
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
+ $WPHE_root = str_replace('\\', '/', dirname(__FILE__)).'/';
48
+ $WPHE_lib = $WPHE_root.'lib/';
49
+ $WPHE_plugin = str_replace('\\', '/', dirname(plugin_basename(__FILE__)));
50
+ $WPHE_dirname = $WPHE_plugin;// deprecated 1.1.0
51
+ $WPHE_dirurl = WP_PLUGIN_URL.'/'.$WPHE_dirname.'/';
52
 
53
  /******************************************************************************/
54
+ $WPHE_Locale = get_locale();
55
+ if(!empty($WPHE_Locale))
56
+ {
57
+ $WPHE_moFile = dirname(__FILE__) . '/lang/'.$WPHE_Locale.'.mo';
58
+ if(@file_exists($WPHE_moFile) && is_readable($WPHE_moFile))
59
+ {
60
+ load_textdomain('wphe', $WPHE_moFile);
61
+ }
62
+ unset($WPHE_moFile);
63
+ }
64
+ unset($WPHE_Locale);
65
 
66
+ include $WPHE_lib.'lib.wp-files.php';
67
+ include $WPHE_lib.'lib.functions.php';
68
+ include $WPHE_lib.'lib.debug.php';
69
+ include $WPHE_lib.'lib.ad.php';
70
+ include $WPHE_lib.'lib.pages.php';
 
 
 
 
 
71
 
72
+ if(function_exists('add_action')){
73
+ add_action('admin_menu', 'WPHE_admin_menu');
74
+ }else{
75
+ unset($WPHE_root);
76
+ unset($WPHE_lib);
77
+ unset($WPHE_plugin);
78
+ unset($WPHE_dirname);
79
+ unset($WPHE_dirurl);
80
+ unset($WPHE_mem_start);
81
+ return;
82
+ }
83
+ $WPHE_mem_end = memory_get_usage();
84
+ /******************************************************************************/
85
  }
86
  ?>