Configure the new TinyMCE to have almost the same buttons as the old one.
Configure the new TinyMCE to have almost the same buttons as the old one.

File last commit:

881a86f051f9
3cf3f8fd35f8
Show More
swap-comics.php
58 lines | 1.2 KiB | text/x-php | XmlPhpLexer
/ swap-comics.php
Add most necessary files for admin interface.
r1 <?php
require_once('include/admin.inc.php');
auth_redirect(); // Require logged in user to access this page.
if($_POST)
{
check_nonce('swap-strip');
Clean up extraneous spaces at the ends of lines.
r8
Add most necessary files for admin interface.
r1 if(!is_numeric($_POST['comic_a']) || !is_numeric($_POST['comic_b']))
mtdie('This tool only works on numeric strip numbers.');
$a = (int)$_POST['comic_a'];
$b = (int)$_POST['comic_b'];
$f = fopen(SITE_PATH_ABS.'/'.SITE_STRIP.'/'.SITE_STRIP_LOCK, 'w');
flock($f, LOCK_EX);
Clean up extraneous spaces at the ends of lines.
r8
Add most necessary files for admin interface.
r1 swap_strips( $a, $b );
Clean up extraneous spaces at the ends of lines.
r8
Add most necessary files for admin interface.
r1 close($f);
Clean up extraneous spaces at the ends of lines.
r8
Add most necessary files for admin interface.
r1 $info.='<p>Strips $a and $b swapped successfully.</p>';
adminlog("Strips $a and $b have been swapped.", MTS_STRIP, MTA_MODIFY);
}
adminhead('Swap Comics');
adminmenu('swap-comics.php');
?>
<h2>Swap Comics</h2>
<form action="swap-comics.php" method="post" name="post" id="post">
<div id="poststuff">
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th scope="row" width="33%">First Comic</th>
<td width="66%"><input name="comic_a" type="text" id="comic_a" value="" /></th>
</tr>
<tr>
<th scope="row" width="33%">Second Comic</th>
<td width="66%"><input name="comic_b" type="text" id="comic_b" value="" /></th>
</tr>
</table>
Clean up extraneous spaces at the ends of lines.
r8
Add most necessary files for admin interface.
r1 <p class="submit"><input type="submit" value="Swap &raquo;" name="submit" /></p>
</div>
</form>
<?php adminfooter() ?>