From 4f3bce79bfb5851cef9e7bc655c91bb3093cc401 Mon Sep 17 00:00:00 2001
From: donncha
Date: Tue, 12 Jul 2005 11:27:54 +0000
Subject: Initial Import
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1 7be80a69-a1ef-0310-a953-fb0f7c49ff36
---
wp-inst/wp-admin/theme-editor.php | 157 ++++++++++++++++++++++++++++++++++++++
1 file changed, 157 insertions(+)
create mode 100644 wp-inst/wp-admin/theme-editor.php
(limited to 'wp-inst/wp-admin/theme-editor.php')
diff --git a/wp-inst/wp-admin/theme-editor.php b/wp-inst/wp-admin/theme-editor.php
new file mode 100644
index 0000000..3ebf035
--- /dev/null
+++ b/wp-inst/wp-admin/theme-editor.php
@@ -0,0 +1,157 @@
+You have do not have sufficient permissions to edit templates for this blog.
'));
+ }
+
+ $newcontent = stripslashes($_POST['newcontent']);
+ $theme = urlencode($theme);
+ if (is_writeable($real_file)) {
+ $f = fopen($real_file, 'w+');
+ fwrite($f, $newcontent);
+ fclose($f);
+ header("Location: theme-editor.php?file=$file&theme=$theme&a=te");
+ } else {
+ header("Location: theme-editor.php?file=$file&theme=$theme");
+ }
+
+ exit();
+
+break;
+
+default:
+
+ require_once('admin-header.php');
+ if ($user_level <= 5) {
+ die(__('You have do not have sufficient permissions to edit themes for this blog.
'));
+ }
+
+ update_recently_edited($file);
+
+ if (!is_file($real_file))
+ $error = 1;
+
+ if (!$error && filesize($real_file) > 0) {
+ $f = fopen($real_file, 'r');
+ $content = fread($f, filesize($real_file));
+ $content = htmlspecialchars($content);
+ }
+
+ ?>
+
+
+
+
+
+
+
+
+ ' . sprintf(__('Editing
%s'), $file) . '';
+ } else {
+ echo '
' . sprintf(__('Browsing %s'), $file) . '
';
+ }
+ ?>
+
+
'%s' theme files"), $theme) ?>
+
+
+
+
+
+
+
+
' . __('Oops, no such file exists! Double check the name and try again, merci.') . '
';
+ }
+ ?>
+
+
--
cgit