parent
1d951c063d
commit
294c3b9db2
|
@ -45,7 +45,6 @@
|
||||||
$links = array();
|
$links = array();
|
||||||
if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER))
|
if (preg_match_all('/\[\[(.*)\]\]/', $content, $links, PREG_SET_ORDER))
|
||||||
{
|
{
|
||||||
$divcontent .= '<br><div>Internal links:</div>';
|
|
||||||
foreach($links as $link)
|
foreach($links as $link)
|
||||||
{
|
{
|
||||||
$divcontent .= '<div>
|
$divcontent .= '<div>
|
||||||
|
@ -56,7 +55,6 @@
|
||||||
$links = array();
|
$links = array();
|
||||||
if (preg_match_all('/https:(.*)\b/', $content, $links, PREG_SET_ORDER))
|
if (preg_match_all('/https:(.*)\b/', $content, $links, PREG_SET_ORDER))
|
||||||
{
|
{
|
||||||
$divcontent .= '<br><div>External links:</div>';
|
|
||||||
foreach($links as $link)
|
foreach($links as $link)
|
||||||
{
|
{
|
||||||
$divcontent .= '<div>
|
$divcontent .= '<div>
|
||||||
|
@ -76,7 +74,7 @@
|
||||||
savenote('todo', $content);
|
savenote('todo', $content);
|
||||||
$_GET['param'] = '';
|
$_GET['param'] = '';
|
||||||
}
|
}
|
||||||
else if (isset($_POST['save']) || isset($_POST['home']) || isset($_POST['links']))
|
else if (isset($_POST['save']) || isset($_POST['home']) || isset($_POST['links']) || isset($_POST['stats']))
|
||||||
{
|
{
|
||||||
$title = $_POST['title'];
|
$title = $_POST['title'];
|
||||||
$content = $_POST['content'];
|
$content = $_POST['content'];
|
||||||
|
|
17
note.php
17
note.php
|
@ -2,13 +2,20 @@
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" name="home" value="home" accesskey="h">
|
<input type="submit" name="home" value="home" accesskey="h">
|
||||||
<input type="submit" name="save" value="save" accesskey="s">
|
<input type="submit" name="save" value="save" accesskey="s">
|
||||||
<input type="submit" name="delete" value="delete" accesskey="d">
|
|
||||||
<input type="submit" name="preview" value="preview" accesskey="p">
|
<input type="submit" name="preview" value="preview" accesskey="p">
|
||||||
<input type="submit" name="links" value="links" accesskey="l">
|
<input type="submit" name="links" value="links" accesskey="l">
|
||||||
<span class="grey"><?echo $lines; ?> lines</span>
|
<input type="submit" name="stats" value="stats" accesskey="i">
|
||||||
<span class="grey"><?echo $words; ?> words</span>
|
<input type="submit" name="delete" value="delete" accesskey="d">
|
||||||
<span class="grey"><?echo $chars; ?> chars</span>
|
<?php
|
||||||
<?php if (isset($_POST['links']))
|
if (isset($_POST['stats']))
|
||||||
|
{
|
||||||
|
echo '<div>
|
||||||
|
<span class="grey">' . $lines . ' lines</span>
|
||||||
|
<span class="grey">'. $words . ' words</span>
|
||||||
|
<span class="grey">' . $chars . ' chars</span>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
else if (isset($_POST['links']))
|
||||||
{
|
{
|
||||||
echo linksdiv($content);
|
echo linksdiv($content);
|
||||||
}?>
|
}?>
|
||||||
|
|
Loading…
Reference in New Issue