Renamed template editor and fixed wordings.

git-svn-id: http://svn.automattic.com/wordpress/trunk@589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-12-08 01:55:38 +00:00
parent b64371a05d
commit cbb0f32f0f
3 changed files with 31 additions and 42 deletions

View File

@ -4,7 +4,7 @@
5 linkmanager.php Links 5 linkmanager.php Links
3 users.php Users 3 users.php Users
4 wp-options.php Options 4 wp-options.php Options
4 b2template.php Template 4 templates.php Templates
*** ***
(Everything after the '***' is a comment.) (Everything after the '***' is a comment.)

View File

@ -1,6 +1,5 @@
<?php <?php
$title = "Template &amp; file editing"; $title = "Template &amp; file editing";
/* <Template> */
function add_magic_quotes($array) { function add_magic_quotes($array) {
foreach ($array as $k => $v) { foreach ($array as $k => $v) {
@ -46,14 +45,14 @@ case 'update':
die('<p>You have no right to edit the template for this blog.<br />Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>'); die('<p>You have no right to edit the template for this blog.<br />Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
} }
$newcontent = stripslashes($HTTP_POST_VARS["newcontent"]); $newcontent = stripslashes($HTTP_POST_VARS['newcontent']);
$file = $HTTP_POST_VARS["file"]; $file = $HTTP_POST_VARS['file'];
$f = fopen($file, 'w+'); $f = fopen($file, 'w+');
fwrite($f, $newcontent); fwrite($f, $newcontent);
fclose($f); fclose($f);
$file = str_replace('../', '', $file); $file = str_replace('../', '', $file);
header("Location: b2template.php?file=$file&a=te"); header("Location: templates.php?file=$file&a=te");
exit(); exit();
break; break;
@ -100,55 +99,45 @@ default:
} }
?> ?>
<div class="wrap"> <div class="wrap">
<?php <?php
echo "Listing <strong>$file</strong> $warning"; echo "Editing <strong>$file</strong> $warning";
if ('te' == $a) if ('te' == $a)
echo "<em>File edited successfully.</em>"; echo "<em>File edited successfully.</em>";
if (!$error) { if (!$error) {
?> ?>
<form name="template" action="b2template.php" method="post"> <form name="template" action="templates.php" method="post">
<textarea cols="80" rows="20" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea> <textarea cols="80" rows="20" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea>
<input type="hidden" name="action" value="update" /> <input type="hidden" name="action" value="update" />
<input type="hidden" name="file" value="<?php echo $file ?>" /> <input type="hidden" name="file" value="<?php echo $file ?>" />
<br /> <br />
<?php <?php
if (is_writeable($file)) { if (is_writeable($file)) {
echo "<input type=\"submit\" name=\"submit\" class=\"search\" value=\"update template !\" tabindex=\"2\" />"; echo "<input type=\"submit\" name=\"submit\" class=\"search\" value=\"update template !\" tabindex=\"2\" />";
} else { } else {
echo "<input type=\"button\" name=\"oops\" class=\"search\" value=\"(you cannot update that file/template: must make it writable, e.g. CHMOD 766)\" tabindex=\"2\" />"; echo "<input type=\"button\" name=\"oops\" class=\"search\" value=\"(you cannot update that file/template: must make it writable, e.g. CHMOD 766)\" tabindex=\"2\" />";
} }
?> ?>
</form> </form>
<?php <?php
} else { } else {
echo '<p>Oops, no such file exists! Double check the name and try again, merci.</p>'; echo '<p>Oops, no such file exists! Double check the name and try again, merci.</p>';
} }
?> ?>
</div> </div>
<div class="wrap"> <div class="wrap">
<p>You can also edit the <a href="b2template.php?file=b2comments.php">comments <p>You can also edit the <a href="templates.php?file=b2comments.php">comments template</a> or the <a href="templates.php?file=b2commentspopup.php">popup comments template</a>, or edit any other file (provided it&#8217;s writable by the server, e.g. CHMOD 766).</p>
template</a> or the <a href="b2template.php?file=b2commentspopup.php">popup <p>To edit a file, type its name here:</p>
comments template</a>, or edit any other file (provided it&#8217;s writable by <form name="file" action="templates.php" method="get">
the server, e.g. CHMOD 766).</p> <input type="text" name="file" />
<p>To edit a file, type its name here:</p> <input type="submit" name="submit" class="search" value="go" />
<form name="file" action="b2template.php" method="get"> </form>
<input type="text" name="file" /> <p>Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don't have access to a text editor or FTP client.</p>
<input type="submit" name="submit" class="search" value="go" /> </div>
</form> <?php
<p>Note: of course, you can also edit the files/templates in your text editor
and upload them. This online editor is only meant to be used when you don't
have access to a text editor.</p>
</div>
<?php
break; break;
} }
/* </Template> */ include("b2footer.php") ?>
include("b2footer.php") ?>

View File

@ -1,5 +1,5 @@
<?php <?php
$title = 'Team management'; $title = 'Users';
/* <Team> */ /* <Team> */
$b2varstoreset = array('action','standalone','redirect','profile'); $b2varstoreset = array('action','standalone','redirect','profile');
@ -84,7 +84,7 @@ default:
?> ?>
<div class="wrap"> <div class="wrap">
<h2>Authors</h2> <h2>Authors</h2>
<table cellpadding="5" cellspacing="0"> <table cellpadding="5" cellspacing="0" width="100%">
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>Nickname</th> <th>Nickname</th>