change: preview in same tab with back button
This commit is contained in:
parent
2ba071e361
commit
22e0065507
15
note.php
15
note.php
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
else if (isset($_POST['preview']))
|
||||
{
|
||||
header("Location: note.php?preview=1&title=" . $title);
|
||||
header("Location: note.php?preview=true&title=" . $title);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
@ -87,11 +87,13 @@
|
|||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<form action="note.php" method="POST" <? if(isset($_GET['preview'])) echo 'hidden'; ?>>
|
||||
<!-- editor -->
|
||||
<div <? if(isset($_GET['preview'])) echo 'hidden'; ?>>
|
||||
<form action="note.php" method="POST">
|
||||
<div>
|
||||
<input type="submit" name="home" value="home" accesskey="h">
|
||||
<input type="submit" name="save" value="save" accesskey="s">
|
||||
<input type="submit" name="preview" value="preview" accesskey="p" formtarget="_bbn_preview">
|
||||
<input type="submit" name="preview" value="preview" accesskey="p">
|
||||
<input type="submit" name="download" value="download" accesskey="d">
|
||||
<input type="submit" name="delete" value="delete">
|
||||
<input hidden name="lastchanged" value="<? echo $lastchanged; ?>">
|
||||
|
@ -106,7 +108,14 @@
|
|||
echo linksdiv($content);
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- preview -->
|
||||
<div <? if(!isset($_GET['preview'])) echo 'hidden'; ?>>
|
||||
<form action="note.php" method="GET">
|
||||
<input type="submit" value="back">
|
||||
<input hidden name="title" value="<? echo $title; ?>">
|
||||
</form>
|
||||
<?
|
||||
echo computepreview($title, $content);
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue