initial commit
This commit is contained in:
commit
b65642cd0a
18 changed files with 1543 additions and 0 deletions
31
modules/quicknote/quicknote.php
Normal file
31
modules/quicknote/quicknote.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
$path = __DIR__ . '/../../tmp/quicknotes';
|
||||
|
||||
if (!file_exists($path)) {
|
||||
mkdir($path);
|
||||
}
|
||||
|
||||
$path = realpath($path);
|
||||
|
||||
$message = '';
|
||||
|
||||
if (isset($_GET['m'])) {
|
||||
$message = $_GET['m'];
|
||||
}
|
||||
|
||||
if (isset($_GET['message'])) {
|
||||
$message = $_GET['message'];
|
||||
}
|
||||
|
||||
if (strlen($message) === 0) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$data = '[' . date('Y-m-d H:i:s') . ']';
|
||||
$data .= ' - ' . $message;
|
||||
$data .= "\n";
|
||||
|
||||
file_put_contents($path . '/logs.txt', $data, FILE_APPEND);
|
||||
|
||||
echo 'OK';
|
||||
Loading…
Add table
Add a link
Reference in a new issue